 /* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f9fafb;
    color: #111827;
}

/* Layout Containers */
.container {
    max-width: 1800px;
    margin: 0 auto;
}

/* Form Styles */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 40px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="number"] {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
}

.invalid-feedback {
    display: block;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.field-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.required {
    color: #dc3545;
}

/* Headers */
h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 300;
}

.main-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Sections */
.section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fafafa;
}

.section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #444;
    font-size: 18px;
}

.section-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Cards */
.metric-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.strategy-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.strategy-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-radius: 8px 8px 0 0;
    text-align: center;
}

.strategy-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.strategy-period {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}

/* Metrics */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-title {
    font-size: 0.875rem;
    color: #6b7280;
}

.metric-value {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Tables */
.table-container,
.comparison-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th,
td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.comparison-table table {
    min-width: 800px;
}

.comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.comparison-table .metric-name {
    font-weight: 600;
    background-color: #f8fafc;
    color: #374151;
}

.key {
    font-weight: 500;
    color: #4b5563;
}

.value {
    font-weight: 600;
}

/* Comparison Section */
.comparison-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 2rem;
}

.comparison-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

/* Buttons */
.submit-btn {
    background-color: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
}

/* Utility Classes */
.positive {
    color: #059669;
}

.negative {
    color: #dc2626;
}

.neutral {
    color: #374151;
}
/* Trade ledger link on the performance dashboard. Styled as a button rather
   than an inline link because it is the one action on that header, and it
   leaves for a page of its own. */
.trade-ledger-link {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    background: #1f4e79;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
}

.trade-ledger-link:hover,
.trade-ledger-link:focus {
    background: #16395a;
    color: #fff;
    text-decoration: none;
}

.trade-ledger-hint {
    display: block;
    margin-top: 0.4rem;
    color: #5b6570;
    font-size: 0.85rem;
}
