/* marketFit.me - Unified Brand & Dashboard Styles 
   Palette: Champagne, Gold, and Deep Amber
*/

:root {
    /* ACCESSIBLE GOLD TONES */
    --gold-deep: #92400E;
    --gold-primary: #B45309;
    --gold-action: #D97706;

    /* SOFT TONES */
    --gold-surface: #FEF3C7;
    --gold-mist: #FFFBEB;

    /* NEUTRALS */
    --white: #FFFFFF;
    --bg-light: #FAFAF9;
    --text-main: #1C1917;
    --text-muted: #57534E;
    --border: #E7E5E4;

    /* SYSTEM */
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Extra padding at bottom for mobile nav visibility */
    padding-bottom: 80px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- NAVIGATION --- */
.navbar {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: var(--transition);
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand .dot {
    color: var(--gold-action);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-nav {
    background: var(--gold-surface);
    color: var(--gold-deep);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

/* --- DASHBOARD HERO --- */
.hero-dashboard {
    padding: 10px 0 5px;
    text-align: center;
}

.pricing-form {
    max-width: 480px;
    margin: 24px auto 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.pricing-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--white);
    color: var(--text-main);
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold-deep);
    margin-bottom: 8px;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 24px;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-muted);
}

.plan-features li::before {
    content: '✓';
    color: var(--gold-action);
    font-weight: 800;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.highlight {
    background: linear-gradient(120deg, var(--gold-surface) 0%, var(--gold-surface) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.35em;
    background-position: 0 90%;
}

.badge {
    display: inline-block;
    background: var(--gold-surface);
    color: var(--gold-deep);
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 16px;
    border: 1px solid rgba(180, 83, 9, 0.15);
}

/* --- PROGRESS TRACKER --- */
.progress-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 20px auto 0;
    box-shadow: var(--shadow);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-status {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-gold {
    color: var(--gold-deep);
}

.progress-track {
    height: 8px;
    background: var(--gold-mist);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold-action);
    border-radius: 10px;
}

/* --- DASHBOARD GRID --- */
.edge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.edge-card {
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.highlight-card {
    border-color: var(--gold-action);
    background: var(--gold-mist);
}

.edge-icon {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold-primary);
    opacity: 0.2;
    margin-bottom: 15px;
}

.edge-content h3 {
    color: var(--gold-deep);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.edge-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
}

/* --- BUTTONS --- */
.btn-primary {
    background: var(--gold-action);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--gold-primary);
    transform: translateY(-1px);
}

/* --- LOCKED STATES --- */
.locked-card {
    opacity: 0.6;
    background: var(--bg-light);
    border-style: dashed;
    cursor: not-allowed;
}

.lock-label {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--border);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
}

/* --- MOBILE NAVIGATION (BOTTOM) --- */
.bottom-nav {
    display: none;
    /* Desktop hidden */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 12px 0;
    justify-content: space-around;
    z-index: 2000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 600;
}

.nav-item span {
    margin-top: 4px;
}

.nav-item.active {
    color: var(--gold-action);
}

/* --- RESPONSIVE UPDATES --- */
@media (max-width: 850px) {
    h1 {
        font-size: 2.2rem;
    }

    .nav-menu {
        display: none;
    }

    /* Hide desktop nav */

    .bottom-nav {
        display: flex;
    }

    /* Show mobile bottom nav */

    .edge-grid {
        grid-template-columns: 1fr;
    }

    .edge-card {
        padding: 30px;
    }

    .full-width {
        grid-column: auto;
    }

    .major-part {
        grid-column: auto;
    }
}

@media (min-width: 851px) {
    .full-width {
        grid-column: span 3;
    }


    .major-part {
        grid-column: span 2;
    }
}

/* --- Loading Spinner CSS --- */
.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid var(--gold-action);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* --- ONBOARDING MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 25, 23, 0.6); /* Using var(--text-main) depth tint */
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
}

.modal-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 2px solid var(--gold-surface);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    animation: fadeIn 0.25s ease-out;
    overflow: hidden;
}

.modal-header {
    background: var(--gold-mist);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.modal-header h2 {
    color: var(--gold-deep);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.modal-form {
    padding: 24px;
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-label .req {
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    background-color: var(--bg-light);
    color: var(--text-main);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-action);
    background-color: var(--white);
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.3;
}

/* DOB Alternative Controls */
.dob-toggle-container {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    color: var(--text-muted);
    transition: var(--transition);
}

.toggle-btn.active {
    background: var(--white);
    color: var(--gold-deep);
    box-shadow: var(--shadow);
    font-weight: 700;
}

.dob-row {
    display: flex;
    gap: 10px;
}

.text-center {
    text-align: center;
}

.skip-warning-text {
    font-size: 0.8rem;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #b45309;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.4;
}

.privacy-notice {
    margin-top: 15px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background-color: var(--bg-light);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--gold-action);
}

.modal-error {
    background: #fee2e2;
    color: #ef4444;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.w-full {
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* --- PRIMARY BUTTON DISABLED STATE --- */
.btn-primary:disabled {
    background-color: #e7e5e4; /* Matches var(--border) light neutral gray */
    color: #a8a29e;            /* Muted text color for low contrast */
    border: 1px solid var(--border);
    cursor: not-allowed;       /* Changes pointer to an indicator showing it is unclickable */
    transform: none !important; /* Disables any lift/hover animation transitions */
    box-shadow: none;          /* Removes focus depth shadows */
    opacity: 0.7;
}

/* --- POSITION AND STYLE REFINEMENTS FOR CLOSE BUTTON --- */
.modal-header {
    position: relative; /* Anchor the absolute button element */
    background: var(--gold-mist);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--gold-deep);
    background-color: var(--gold-surface);
}

.modal-close-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

/* Gray tinted backdrop that overlays the modal card content */
.modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: inherit; /* Matches your modal card curvature */
}


@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-container {
    max-width: 700px;
    margin: 40px auto;
}
