* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0f1923;
    --bg-secondary: #152238;
    --bg-card: #1a2d47;
    --border: #243b5c;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --gain: #00c853;
    --loss: #ff1744;
    --accent: #2196f3;
    --accent-dim: rgba(33, 150, 243, 0.12);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.header h1 span { color: var(--accent); }

.header-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Tabs */
.tab-nav {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
}

.tab-btn {
    padding: 14px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; padding: 24px 32px; }
.tab-panel.active { display: block; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Stats Grid */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.stat-box .label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-box .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-box .value.gain { color: var(--gain); }
.stat-box .value.loss { color: var(--loss); }
.stat-box .value.accent { color: var(--accent); }

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Holdings Table */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(36, 59, 92, 0.5);
}

tbody tr:hover { background: rgba(33, 150, 243, 0.05); }

.positive { color: var(--gain); }
.negative { color: var(--loss); }

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    padding: 12px 28px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover { background: #1976d2; }

/* Greeks Display */
.greeks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.greek-item {
    text-align: center;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.greek-item .name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.greek-item .val {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

/* MC Controls */
.mc-controls {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.mc-controls .form-group { flex: 1; }

/* Option type toggle */
.option-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
}

.option-toggle button {
    flex: 1;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.option-toggle button:first-child { border-radius: 6px 0 0 6px; }
.option-toggle button:last-child { border-radius: 0 6px 6px 0; }
.option-toggle button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Responsive */
@media (max-width: 1000px) {
    .grid-2 { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .greeks-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .header { padding: 12px 16px; }
    .tab-nav { padding: 0 16px; overflow-x: auto; }
    .tab-panel { padding: 16px; }
    .stats-row { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}
