/* RallyPoint by Velentrix — Dashboard Design System */

:root {
    /* RallyPoint brand tokens from official brand sheet.
       Variable NAMES kept for back-compat with 900+ lines below;
       --blue is now the gold brand accent. */
    --bg-primary: #0B1D36;       /* rp-navy */
    --bg-secondary: #14253E;     /* rp-navy-soft */
    --bg-tertiary: #1A2B47;
    --bg-hover: #233961;
    --border: #1E2F4A;           /* rp-navy-line */
    --border-bright: #2C3F5F;
    --text-primary: #E7E9EF;     /* rp-off-white */
    --text-secondary: #A8B0BD;   /* rp-slate-light */
    --text-tertiary: #707A8B;    /* rp-slate */
    --green: #2EA86A;            /* institutional, less neon */
    --green-bg: rgba(46,168,106,0.12);
    --green-bright: #4CC183;
    --red: #D6443C;
    --red-bg: rgba(214,68,60,0.12);
    --red-bright: #E15F58;
    --blue: #D4A835;             /* rp-gold — primary brand accent */
    --blue-bg: rgba(212,168,53,0.12);
    --blue-bright: #E8BE48;      /* rp-gold-bright */
    --yellow: #E8923B;           /* amber, distinct from gold */
    --yellow-bg: rgba(232,146,59,0.12);
    --purple: #7B68C8;           /* admin/special — muted institutional */
    --purple-bg: rgba(123,104,200,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.3);
    --transition: 200ms ease;
}

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

html { height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

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

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-variant-numeric: tabular-nums; }
.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

/* ===== NAVIGATION ===== */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 64px;
    background: rgba(10,14,23,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav-content {
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.nav-logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.logo-icon { color: var(--blue); font-size: 1.4rem; }
.nav-links {
    display: flex;
    gap: 4px;
}
.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active {
    color: var(--blue);
    background: var(--blue-bg);
}
.nav-admin { color: var(--purple); }
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.nav-logout {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
}
.nav-logout:hover { border-color: var(--red); color: var(--red); }

/* Hamburger menu button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.nav-hamburger:hover { border-color: var(--blue); }
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== MARKET TICKER ===== */
.ticker-bar {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99;
    height: 36px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
}
.ticker-track {
    display: flex;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}
.ticker-symbol { font-weight: 600; color: var(--text-primary); }
.ticker-price { color: var(--text-secondary); }
.ticker-change { font-weight: 600; }
.ticker-change.up { color: var(--green); }
.ticker-change.down { color: var(--red); }
.ticker-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border-bright);
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== MAIN LAYOUT ===== */
.main-content {
    padding-top: 124px; /* nav 64 + ticker 36 + gap 24 */
    padding-bottom: 48px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}
.main-content.no-ticker {
    padding-top: 88px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-bright); }
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}
.card-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* ===== HERO SECTION ===== */
.portfolio-hero {
    margin-bottom: 24px;
}
.portfolio-value {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 8px;
}
.portfolio-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.portfolio-change.positive { color: var(--green); }
.portfolio-change.negative { color: var(--red); }
.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* ===== STATUS PILLS ===== */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-red { background: var(--red-bg); color: var(--red); }
.pill-blue { background: var(--blue-bg); color: var(--blue); }
.pill-yellow { background: var(--yellow-bg); color: var(--yellow); }
.pill-purple { background: var(--purple-bg); color: var(--purple); }
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
.status-dot.green { background: var(--green); }
.status-dot.red { background: var(--red); }
.status-dot.yellow { background: var(--yellow); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ===== P&L CARDS GRID ===== */
.pnl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.pnl-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}
.pnl-card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.pnl-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.pnl-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.pnl-pct {
    font-size: 0.85rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}
.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral { color: var(--text-secondary); }

/* ===== CHART ===== */
.chart-card {
    margin-bottom: 24px;
}
.chart-controls {
    display: flex;
    gap: 4px;
}
.chart-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.chart-btn:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.chart-btn.active { color: var(--blue); background: var(--blue-bg); }
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 16px;
}

/* ===== TABLES ===== */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }
.td-right { text-align: right; }
.td-ticker { font-weight: 600; color: var(--text-primary); }
.td-muted { color: var(--text-tertiary); font-size: 0.8rem; }

/* ===== TICKER TOOLTIP ===== */
.ticker-tooltip {
    position: relative;
    cursor: pointer;
}
.ticker-tooltip::after {
    content: attr(data-company);
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--bg-tertiary);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-bright);
}
.ticker-tooltip:hover::after {
    opacity: 1;
}

/* ===== ACTION PILLS (for trade actions) ===== */
.action-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.action-buy { background: var(--green-bg); color: var(--green); }
.action-sell { background: var(--blue-bg); color: var(--blue); }
.action-short { background: var(--red-bg); color: var(--red); }
.action-cover { background: var(--yellow-bg); color: var(--yellow); }
.direction-long { background: var(--green-bg); color: var(--green); }
.direction-short { background: var(--red-bg); color: var(--red); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.15); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-bright); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.15); }
.btn-success { background: var(--green); color: white; }
.btn-success:hover:not(:disabled) { filter: brightness(1.15); }
.btn-warning { background: var(--yellow); color: #1a1a1a; }
.btn-sm { padding: 6px 12px; font-size: 0.75rem; }
.btn-group { display: flex; gap: 8px; }

/* ===== FORM INPUTS ===== */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition);
    outline: none;
}
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.form-input::placeholder { color: var(--text-tertiary); }
select.form-input { cursor: pointer; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-tertiary);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 0.9rem; }

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-lg { height: 42px; width: 200px; margin-bottom: 8px; }
.skeleton-md { height: 24px; width: 120px; }
.skeleton-chart { height: 300px; width: 100%; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== VIEW ALL LINK ===== */
.view-all {
    font-size: 0.8rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}
.view-all:hover { color: var(--blue-bright); }

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.mb-24 { margin-bottom: 24px; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.pagination button {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition);
}
.pagination button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 400px;
}
.toast-success { background: var(--green); color: white; }
.toast-error { background: var(--red); color: white; }
.toast-info { background: var(--blue); color: white; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== WELCOME CARD (new users) ===== */
.welcome-card {
    margin-bottom: 24px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(59,130,246,0.2);
    background: linear-gradient(135deg, rgba(59,130,246,0.04) 0%, rgba(139,92,246,0.04) 100%);
}
.welcome-header {
    text-align: center;
    padding: 36px 32px 24px;
}
.welcome-icon {
    font-size: 1.8rem;
    color: var(--blue);
    margin-bottom: 12px;
}
.welcome-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.welcome-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.welcome-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    padding: 0 32px 24px;
}
.welcome-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.welcome-step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.welcome-step-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.welcome-step-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.welcome-step-content a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}
.welcome-step-content a:hover { text-decoration: underline; }
.welcome-quote {
    text-align: center;
    padding: 20px 32px 28px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.welcome-quote span {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: normal;
}

/* ===== O'NEIL QUOTE BAR ===== */
.oneil-quote-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(139,92,246,0.05) 100%);
    border: 1px solid rgba(59,130,246,0.1);
    border-radius: var(--radius);
    min-height: 48px;
}
.oneil-diamond {
    color: var(--blue);
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.6;
}
.oneil-text {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}
.oneil-attr {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== O'NEIL MEMORIAL ===== */
.oneil-memorial-link {
    text-align: center;
    padding: 24px 16px 32px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition);
    letter-spacing: 0.02em;
}
.oneil-memorial-link:hover {
    color: var(--text-secondary);
}
.memorial-diamond {
    color: var(--blue);
    opacity: 0.5;
    margin-right: 6px;
    font-size: 0.7rem;
}
.oneil-memorial-link:hover .memorial-diamond {
    opacity: 0.8;
}

.oneil-memorial-overlay {
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
}

.oneil-memorial-card {
    background: linear-gradient(180deg, #111827 0%, #0d1117 100%);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 60px rgba(59,130,246,0.05);
}

.memorial-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color var(--transition);
}
.memorial-close:hover { color: var(--text-primary); }

.memorial-header {
    text-align: center;
    padding: 48px 40px 32px;
    border-bottom: 1px solid var(--border);
}
.memorial-icon {
    font-size: 1.5rem;
    color: var(--blue);
    opacity: 0.4;
    margin-bottom: 16px;
}
.memorial-header h2 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.memorial-dates {
    font-size: 0.95rem;
    color: var(--text-tertiary);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.memorial-titles {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

.memorial-body {
    padding: 32px 40px;
}
.memorial-body p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}
.memorial-body blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    border-left: 3px solid var(--blue);
    background: rgba(59,130,246,0.04);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.7;
}
.memorial-dedication {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 16px 0 8px;
    letter-spacing: 0.02em;
}

.memorial-footer {
    border-top: 1px solid var(--border);
    padding: 20px 40px 28px;
    text-align: center;
}
.memorial-footer p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.6;
}
.memorial-footer a {
    color: var(--blue);
    text-decoration: none;
}
.memorial-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .oneil-memorial-card {
        margin: 16px;
        border-radius: 16px;
    }
    .memorial-header { padding: 36px 24px 24px; }
    .memorial-body { padding: 24px; }
    .memorial-footer { padding: 16px 24px 20px; }
    .memorial-header h2 { font-size: 1.5rem; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-content { padding: 0 16px; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-user #navUsername { display: none; }
    .main-content { padding-left: 16px; padding-right: 16px; }
    .portfolio-value { font-size: 2rem; }
    .pnl-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
    .chart-container { height: 220px; }
    .modal { padding: 24px; margin: 16px; }

    /* Mobile nav menu */
    .nav-links.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        gap: 4px;
        z-index: 200;
    }
    .nav-links.show .nav-link {
        padding: 12px 16px;
        font-size: 1rem;
    }

    /* O'Neil quote bar - stack vertically */
    .oneil-quote-bar { flex-direction: column; text-align: center; gap: 4px; padding: 12px 16px; }
    .oneil-text { font-size: 0.8rem; }

    /* Filter inputs - full width on mobile */
    .filter-group { width: 100%; }
    .filter-group .form-input,
    .filter-group select,
    .filter-group input { width: 100% !important; min-width: 0 !important; }
    .filter-bar { flex-direction: column; }

    /* Settings grid */
    .config-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
    .pnl-grid { grid-template-columns: 1fr; }
    .portfolio-value { font-size: 1.75rem; }
    .nav-content { padding: 0 12px; }
    .main-content { padding-left: 12px; padding-right: 12px; }
    .card { padding: 16px; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .chart-controls { width: 100%; justify-content: space-between; }
    .chart-controls .chart-btn { flex: 1; padding: 6px 4px; font-size: 0.75rem; }
    .nav-logo { font-size: 1rem; }
    .table th, .table td { padding: 8px 10px; font-size: 0.8rem; }
    .oneil-memorial-card { margin: 8px; }
    .memorial-header { padding: 24px 16px 16px; }
    .memorial-body { padding: 16px; font-size: 0.9rem; }
    .memorial-header h2 { font-size: 1.25rem; }
}

@media (max-width: 380px) {
    .pnl-card .pnl-value { font-size: 1rem; }
    .portfolio-value { font-size: 1.5rem; }
    .portfolio-label { font-size: 0.75rem; }
}
