/* ============================================================
   TheZAxis Numerology Calculator — Design System
   Black background • Gold trim • Orange font
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Cinzel:wght@400;600;700&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    --bg-primary:     #000000;
    --bg-card:        #0a0a0a;
    --bg-input:       #111111;
    --gold:           #D4AF37;
    --gold-light:     #F0D060;
    --gold-dark:      #A88520;
    --orange:         #E87A1E;
    --orange-light:   #F5993D;
    --orange-dim:     #B35D10;
    --white:          #FFFFFF;
    --white-50:       rgba(255,255,255,0.5);
    --white-20:       rgba(255,255,255,0.2);
    --white-10:       rgba(255,255,255,0.1);

    --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display:   'Cinzel', 'Georgia', serif;

    --radius:         12px;
    --radius-sm:      8px;
    --border-gold:    1px solid var(--gold);
    --glow-gold:      0 0 15px rgba(212,175,55,0.15);
    --glow-orange:    0 0 20px rgba(232,122,30,0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--orange);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}


/* ===== HEADER ===== */
header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 40px;
    border-bottom: 1px solid var(--gold-dark);
    background: linear-gradient(180deg, rgba(212,175,55,0.06) 0%, transparent 100%);
    position: relative;
}

.logo {
    height: 64px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(232,122,30,0.4));
    transition: filter 0.3s, transform 0.3s;
}

.logo:hover {
    filter: drop-shadow(0 0 20px rgba(232,122,30,0.6));
    transform: scale(1.05);
}

.header-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--white-50);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 2px;
}


/* ===== MAIN LAYOUT ===== */
main {
    max-width: 840px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}


/* ===== INPUT SECTIONS ===== */
/* ===== TAB 3: CALENDAR ===== */
.calendar-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.cal-mode-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
}

.cal-mode-btn.active, .cal-mode-btn:hover {
    background: var(--gold);
    color: var(--bg-primary);
}

.calendar-header-section {
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cal-year-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.cal-year-header input[type="number"] {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    background: transparent;
    border: none;
    text-align: center;
    width: 120px;
    padding: 0;
}

.cal-year-header input[type="number"]:focus {
    box-shadow: none;
    border-bottom: 1px solid var(--gold);
}

.cal-year-meta {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gold);
    font-weight: 600;
    margin-top: -5px;
}

.cal-month-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cal-month-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cal-month-header select {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    background: transparent;
    border: none;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
}

.cal-month-header select option {
    background: var(--bg-input);
    color: var(--white);
    font-size: 1rem;
}

.cal-month-meta {
    font-size: 1rem;
    color: var(--gold);
    font-weight: 600;
}

/* Calendar Grid */
.calendar-grid-section {
    margin-top: 20px;
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--glow-gold);
}

.cal-dow-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: var(--orange);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day-box {
    background: #000;
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius-sm);
    min-height: 100px;
    position: relative;
    padding: 8px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cal-day-box.not-in-month {
    opacity: 0.3;
    pointer-events: none;
}

.cal-day-box:hover, .cal-day-box.highlight-today {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212,175,55,0.4);
    transform: scale(1.02);
    z-index: 2;
}

.cal-day-date {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--white);
}

.cal-day-doy {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #32CD32; /* lime green */
}

.cal-day-content {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    line-height: 1.3;
}

.cal-day-content.personal-view {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--white);
    margin-top: 15px;
}

.cal-day-content.personal-view span {
    color: var(--gold);
}

.input-section {
    border: var(--border-gold);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 28px;
    background: var(--bg-card);
    box-shadow: var(--glow-gold);
    animation: fadeSlideUp 0.6s ease both;
    transition: box-shadow 0.3s;
}

.input-section:hover {
    box-shadow: 0 0 25px rgba(212,175,55,0.25);
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.section-icon {
    margin-right: 8px;
    font-size: 1.1em;
}


/* ===== FORM FIELDS ===== */
label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: var(--radius-sm);
    color: var(--orange-light);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212,175,55,0.2);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
    color: rgba(232,122,30,0.3);
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}


/* ===== NAME SECTION LAYOUT ===== */
.name-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.name-field-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.name-field-row .field-wrapper {
    flex: 1;
}

.add-field-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: transparent;
    color: var(--gold);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-bottom: 2px;
}

.add-field-btn:hover {
    background: var(--gold);
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(212,175,55,0.4);
    transform: rotate(90deg);
}

.name-field-group {
    margin-top: 12px;
}

.field-with-remove {
    display: flex;
    gap: 8px;
    align-items: center;
}

.field-with-remove input {
    flex: 1;
}

.remove-field-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(232,122,30,0.3);
    border-radius: 50%;
    background: transparent;
    color: var(--orange-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-field-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255,68,68,0.1);
}

#middle-names-container,
#last-names-container {
    min-height: 0;
}


/* ===== BIRTHDAY SECTION ===== */
.birthday-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 16px;
}


/* ===== TIME SECTION — SCROLL PICKERS ===== */
.time-picker-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.time-separator {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-top: 8px;
}

.picker-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.picker-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scroll Picker Container */
.picker-container {
    position: relative;
    width: 80px;
    overflow: hidden;
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
}

.picker-scroll {
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.picker-scroll::-webkit-scrollbar {
    display: none;
}

.picker-item {
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--orange-dim);
    transition: all 0.15s ease;
    user-select: none;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

.picker-item.picker-selected {
    color: var(--orange-light) !important;
    font-weight: 700;
    font-size: 1.35rem;
}

.picker-spacer {
    color: transparent !important;
}

/* Center highlight bar */
.picker-highlight {
    position: absolute;
    top: 50%;
    left: 4px;
    right: 4px;
    height: 48px;
    transform: translateY(-50%);
    border: 1px solid var(--gold);
    border-radius: 6px;
    background: rgba(212,175,55,0.06);
    pointer-events: none;
    z-index: 2;
}

/* Top/bottom gradient overlays */
.picker-overlay {
    position: absolute;
    left: 0;
    right: 0;
    height: 40%;
    pointer-events: none;
    z-index: 3;
}

.picker-overlay-top {
    top: 0;
    background: linear-gradient(to bottom, var(--bg-input) 0%, transparent 100%);
}

.picker-overlay-bottom {
    bottom: 0;
    background: linear-gradient(to top, var(--bg-input) 0%, transparent 100%);
}


/* ===== CALCULATE BUTTON ===== */
.calculate-btn-wrapper {
    text-align: center;
    margin: 36px 0;
}

#calculate-btn {
    padding: 16px 56px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(212,175,55,0.3);
    position: relative;
    overflow: hidden;
}

#calculate-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

#calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212,175,55,0.5);
    background-position: right center;
}

#calculate-btn:hover::before {
    transform: rotate(45deg) translateX(100%);
}

#calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(212,175,55,0.3);
}


/* ===== ERROR MESSAGE ===== */
#error-message {
    display: none;
    text-align: center;
    padding: 12px 24px;
    margin: -12px auto 24px;
    max-width: 500px;
    background: rgba(255,68,68,0.1);
    border: 1px solid rgba(255,68,68,0.3);
    border-radius: var(--radius-sm);
    color: #ff6666;
    font-size: 0.9rem;
    font-weight: 500;
    animation: shakeError 0.4s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}


/* ===== RESULTS SECTION ===== */
#results {
    margin-top: 20px;
}

.chart-card {
    border: var(--border-gold);
    border-radius: var(--radius);
    margin-bottom: 20px;
    background: var(--bg-card);
    box-shadow: var(--glow-gold);
    overflow: hidden;
    animation: cardReveal 0.5s ease both;
    transition: box-shadow 0.3s, transform 0.3s;
}

.chart-card:hover {
    box-shadow: 0 0 25px rgba(212,175,55,0.25);
    transform: translateY(-2px);
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chart-card:nth-child(1) { animation-delay: 0.05s; }
.chart-card:nth-child(2) { animation-delay: 0.12s; }
.chart-card:nth-child(3) { animation-delay: 0.19s; }
.chart-card:nth-child(4) { animation-delay: 0.26s; }
.chart-card:nth-child(5) { animation-delay: 0.33s; }
.chart-card:nth-child(6) { animation-delay: 0.40s; }

.card-header {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 14px 24px;
    background: linear-gradient(90deg, rgba(212,175,55,0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(212,175,55,0.2);
}

.card-body {
    padding: 8px 24px;
}

.chart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(212,175,55,0.06);
}

.chart-row:last-child {
    border-bottom: none;
}

.chart-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.chart-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--orange-light);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

/* Three-column rows for pinnacles/challenges */
.chart-row-three {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 16px;
}

.chart-age {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--white-50);
    font-style: italic;
}


/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid rgba(212,175,55,0.15);
    margin-top: 40px;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--white-20);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-text .brand {
    color: var(--gold-dark);
    font-weight: 600;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    header {
        padding: 16px 20px;
        gap: 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-titles {
        width: 100%;
        margin-bottom: 8px;
    }

    .logo {
        height: 60px;
    }

    .header-title {
        font-size: 1.3rem;
    }

    .header-subtitle {
        font-size: 0.7rem;
    }

    .tabs {
        padding: 10px 5px 0;
        gap: 5px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .tab-btn {
        font-size: 0.75rem;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .calendar-grid-section {
        padding: 8px;
    }

    .cal-dow-row {
        font-size: 0.65rem;
        gap: 2px;
    }

    .cal-grid {
        gap: 2px;
    }

    .cal-day-box {
        min-height: 75px;
        padding: 2px;
    }

    .cal-day-date, .cal-day-doy {
        font-size: 0.65rem;
    }

    .cal-day-content {
        font-size: 0.8rem;
    }

    .cal-day-content.personal-view {
        font-size: 0.55rem;
        margin-top: 14px;
        line-height: 1.2;
    }

    .live-numbers-display {
        font-size: 0.9rem;
        min-height: 24px;
        letter-spacing: 2px;
        margin-bottom: 12px;
        padding: 5px;
    }

    /* DB Controls override on mobile */
    .grid-header-db { display: none !important; }
    .grid-row-db {
        grid-template-columns: 1fr;
        gap: 0;
        border: 1px solid #333;
        border-radius: 8px;
        margin: 10px;
    }
    .grid-row-db > div {
        border-right: none;
        border-bottom: 1px solid #333;
    }
    .grid-row-db > div:last-child {
        border-bottom: none;
    }
    .grid-row-db > div::before {
        content: attr(data-label) ": ";
        color: var(--primary-color);
        margin-right: 10px;
        min-width: 100px;
    }

    main {
        padding: 24px 16px 60px;
    }

    .input-section {
        padding: 20px 18px;
    }

    .birthday-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .birthday-grid > *:last-child {
        grid-column: span 2;
    }

    .time-picker-row {
        gap: 4px;
    }

    .picker-container {
        width: 68px;
    }

    .time-separator {
        font-size: 1.4rem;
    }

    .chart-row-three {
        grid-template-columns: 40px 1fr auto;
        gap: 8px;
    }

    .card-body {
        padding: 8px 16px;
    }

    #calculate-btn, .transit-btn {
        padding: 14px 30px;
        font-size: 0.85rem;
    }
}


/* ===== BACKGROUND ACCENT ===== */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(212,175,55,0.03) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(232,122,30,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================================
   NEW FEATURES: TABS, TRANSITS, ACCOUNTS
   ============================================================ */

/* ===== HEADER CONTROLS ===== */
.header-titles {
    flex-grow: 1;
}

.user-controls {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-btn {
    background: var(--orange);
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-orange);
    text-transform: uppercase;
}

.auth-btn:hover {
    background: var(--orange-light);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(232,122,30,0.4);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    background: var(--bg-card);
    border: 1px solid var(--orange);
    border-radius: var(--radius-sm);
    bottom: 0px;
    z-index: 1000;
}

/* DATABASE GRID STYLES */
.grid-row-db {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    border-bottom: 1px solid #222;
    transition: background 0.2s;
}
.grid-row-db > div {
    padding: 15px;
    border-right: 1px solid #333;
}
.grid-row-db > div:last-child {
    border-right: none;
}
.grid-row-db:hover { background: #2a2a2a; cursor: pointer; }
.person-name { color: var(--accent-color); font-weight: bold; }
.person-note { font-size: 0.8em; color: #888; display: block; margin-top: 5px; }

.user-dropdown {
    box-shadow: 0 5px 25px rgba(0,0,0,0.8);
    overflow: hidden;
}

.user-dropdown.hidden {
    display: none;
}

.user-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-dropdown li {
    padding: 12px 16px;
    color: var(--orange-light);
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(232,122,30,0.2);
    transition: background 0.2s;
}

.user-dropdown li:last-child {
    border-bottom: none;
}

.user-dropdown li:hover {
    background: rgba(232,122,30,0.1);
}

.dropdown-header {
    background: var(--orange);
    color: #000 !important;
    font-weight: 700;
    cursor: default !important;
}
.dropdown-header:hover {
    background: var(--orange) !important;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--white-50);
    font-family: var(--font-display);
    font-size: 1rem;
    padding: 12px 24px;
    cursor: pointer;
    letter-spacing: 1px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    text-transform: uppercase;
}

.tab-btn:hover {
    color: var(--white);
}

.tab-btn.active {
    color: var(--gold);
    border-bottom: 2px solid var(--gold);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border: var(--border-gold);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--glow-gold);
}

.modal-content h3 {
    font-family: var(--font-display);
    color: var(--gold);
    margin-bottom: 12px;
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--white-50);
    margin-bottom: 20px;
}

.modal-content input {
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.modal-actions.space-between {
    justify-content: space-between;
}

.modal-actions button {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-actions button:not(.action-btn) {
    background: transparent;
    border: 1px solid var(--white-50);
    color: var(--white);
}

.modal-actions button:not(.action-btn):hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
}

.action-btn {
    background: var(--orange);
    color: #000;
    border: none;
}

.action-btn:hover {
    background: var(--orange-light);
    box-shadow: var(--glow-orange);
}

.action-btn.save {
    background: transparent;
    border: 1px solid var(--orange);
    color: var(--orange);
}
.action-btn.save:hover {
    background: var(--orange);
    color: #000;
}

.chart-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
}

.chart-actions.hidden {
    display: none !important;
}

/* Load Modal scrollable list */
.scrollable-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    text-align: left;
}

.saved-chart-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    color: var(--gold);
    display: flex;
    justify-content: space-between;
}

.saved-chart-item:hover {
    background: rgba(212,175,55,0.1);
}

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

#close-load-modal {
    background: transparent;
    border: 1px solid var(--white-50);
    color: var(--white);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.saved-loader-wrapper {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}

.saved-loader-wrapper select {
    flex: 1;
    padding: 8px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.load-btn {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}

/* ===== TRANSIT CALCULATOR STYLES (BLACK/WHITE) ===== */
.transit-section {
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 15px rgba(255,255,255,0.1);
}

.transit-section:hover {
    box-shadow: 0 0 25px rgba(255,255,255,0.2);
}

.transit-section .section-title {
    color: var(--white);
    border-bottom-color: rgba(255,255,255,0.2);
}

.transit-section .subsection-title {
    color: var(--white-50);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 24px 0 12px;
    text-align: center;
}

.transit-section label {
    color: var(--white-50);
}

.transit-section input {
    border-color: rgba(255,255,255,0.3);
    color: var(--white);
}

.transit-section input:focus {
    border-color: var(--white);
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.transit-section .picker-container {
    border-color: rgba(255,255,255,0.3);
}

.transit-section .picker-label {
    color: var(--white-50);
}

.transit-section .time-separator {
    color: var(--white);
}

.transit-section .picker-highlight {
    border-color: var(--white);
    background: rgba(255,255,255,0.06);
}

.transit-section .picker-item {
    color: rgba(255,255,255,0.4);
}

.transit-section .picker-selected {
    color: var(--white) !important;
}

.transit-btn {
    padding: 16px 56px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: linear-gradient(135deg, #ffffff 0%, #dddddd 50%, #ffffff 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(255,255,255,0.2);
}

.transit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,255,255,0.4);
}

#transit-results .chart-card {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 0 15px rgba(255,255,255,0.05);
}

#transit-results .card-header {
    color: var(--white);
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    border-bottom-color: rgba(255,255,255,0.1);
}

#transit-results .chart-row {
    border-bottom-color: rgba(255,255,255,0.05);
}

#transit-results .chart-label {
    color: rgba(255,255,255,0.7);
}

#transit-results .chart-value {
    color: var(--white);
}

/* ===== TAB 3: STOCK MARKET CALCULATOR ===== */

.settings-btn {
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    margin-right: 15px;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: rgba(220,186,134,0.1);
    box-shadow: 0 0 10px rgba(220,186,134,0.4);
}

.stock-manager-section {
    background: var(--bg-card);
    border: 1px solid var(--orange);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.stock-saved-loader {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(232,122,30,0.3);
}

.stock-saved-loader select {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(232,122,30,0.5);
    color: var(--orange-light);
    border-radius: var(--radius-sm);
}

.stock-form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
}

.csv-upload-wrapper input[type="file"] {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border: 1px dashed var(--gold-dark);
    color: var(--gold);
    box-sizing: border-box;
}

.dashboard-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media(min-width: 900px) {
    .dashboard-split {
        grid-template-columns: 350px 1fr;
    }
}

.calendar-tool-row {
    background: var(--bg-card);
    border: 1px solid var(--orange);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.calendar-input {
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--orange);
    color: var(--white);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
}

/* AI Chat Panel */
.ai-panel {
    background: var(--bg-card);
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    height: 500px;
    overflow: hidden;
}

.ai-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: 85%;
}

.chat-message.bot {
    background: rgba(232,122,30,0.1);
    border-left: 3px solid var(--orange);
    color: var(--white);
    align-self: flex-start;
}

.chat-message.user {
    background: rgba(220,186,134,0.1);
    border-right: 3px solid var(--gold);
    color: var(--gold);
    align-self: flex-end;
}

.ai-chat-input-row {
    display: flex;
    border-top: 1px solid rgba(220,186,134,0.2);
    padding: 10px;
    gap: 10px;
}

.ai-chat-input-row input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(220,186,134,0.3);
    color: var(--white);
    padding: 10px;
    border-radius: var(--radius-sm);
}

/* Horizontal Cards Panel */
.cards-panel {
    background: var(--bg-card);
    border: 1px solid var(--orange);
    border-radius: var(--radius-md);
    padding: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.market-card-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory;
    flex: 1;
    align-items: center;
}

.market-card-grid::-webkit-scrollbar {
    height: 8px;
}
.market-card-grid::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 4px;
}

.market-card {
    min-width: 250px;
    max-width: 250px;
    background: rgba(0,0,0,0.6);
    border: 1px solid #444;
    border-radius: var(--radius-sm);
    padding: 15px;
    scroll-snap-align: start;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.market-card.positive {
    border-color: #2e7d32; /* Green */
    box-shadow: 0 0 10px rgba(46,125,50,0.3);
}

.market-card.negative {
    border-color: #c62828; /* Red */
    box-shadow: 0 0 10px rgba(198,40,40,0.3);
}

.market-card-date {
    font-size: 0.85rem;
    color: var(--white-50);
    margin-bottom: 5px;
}

.market-card-pnl {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.positive .market-card-pnl { color: #4caf50; }
.negative .market-card-pnl { color: #ef5350; }

.market-card-match {
    background: rgba(255,255,255,0.05);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--gold);
    margin-bottom: 10px;
}

.market-card-desc {
    font-size: 0.85rem;
    color: var(--white);
    line-height: 1.4;
}

/* ===== NEW UI ADDITIONS ===== */

.live-numbers-display {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold);
    min-height: 30px;
    letter-spacing: 4px;
    margin-bottom: 5px;
    text-align: center;
    background: rgba(220,186,134,0.05);
    border-radius: var(--radius-sm);
    padding: 5px;
}

.visible-picker-input {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    height: 48px;
    transform: translateY(-50%);
    z-index: 10;
    opacity: 1 !important;
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    font-family: var(--font-display);
    outline: none;
    caret-color: var(--gold);
    box-sizing: border-box;
}

/* Hide number arrows */
.visible-picker-input::-webkit-outer-spin-button,
.visible-picker-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.visible-picker-input[type=number] {
  -moz-appearance: textfield;
}
