/* AdmitLogix Design System — SCR-TYPE-1 */
:root {
    --navy: #1A3A6B;
    --navy-light: #2A4F8F;
    --navy-dark: #0F2547;
    --green: #22C55E;
    --green-light: #4ADE80;
    --green-dark: #16A34A;
    --amber: #F59E0B;
    --amber-light: #FBBF24;
    --red: #EF4444;
    --red-light: #FCA5A5;

    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --border: #E2E8F0;
    --border-focus: var(--navy);
    --text: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

    --container: 1200px;
    --gutter: 16px;
    --nav-height: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-light); }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== Typography ===== */
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
p + p { margin-top: 1em; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ===== Layout ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.main { min-height: calc(100vh - var(--nav-height) - 200px); }
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 2.5rem 0; }
    .hide-mobile { display: none !important; }
}

/* ===== Navigation ===== */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--bg); border-bottom: 1px solid var(--border);
    height: var(--nav-height);
}
.nav-inner {
    max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--navy); }
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: var(--navy); color: white;
    border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 700;
}
.logo-text { font-size: 1.125rem; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--text-secondary); font-size: 0.9375rem; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-toggle { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 1px; transition: 0.2s; }
.nav-user { position: relative; }
.nav-user-btn {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-full);
    padding: 0.375rem 0.75rem; font-size: 0.875rem; font-weight: 500; color: var(--text);
}
.nav-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); min-width: 180px; padding: 0.5rem 0; z-index: 200;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a { display: block; padding: 0.5rem 1rem; font-size: 0.875rem; color: var(--text); }
.nav-dropdown a:hover { background: var(--bg-alt); }
.nav-logout { color: var(--red) !important; }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
        flex-direction: column; padding: 1rem; gap: 0.5rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.5rem 0; }
    .nav-user { width: 100%; }
    .nav-dropdown { position: static; box-shadow: none; border: none; padding: 0 0 0 1rem; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem; border-radius: var(--radius); font-weight: 600;
    font-size: 0.9375rem; border: 2px solid transparent; transition: all 0.15s;
    text-decoration: none; line-height: 1.4;
}
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-light); color: white; }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: var(--green-dark); color: white; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #DC2626; color: white; }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ===== Cards ===== */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.5rem; transition: box-shadow 0.15s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-flat { box-shadow: none; }
.card-flat:hover { box-shadow: none; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-title { font-size: 1.125rem; font-weight: 600; }
.card-body { }
.card-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ===== Forms ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 500; margin-bottom: 0.375rem; font-size: 0.875rem; color: var(--text); }
.form-input {
    width: 100%; padding: 0.625rem 0.875rem;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(26,58,107,0.1); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 120px; resize: vertical; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error { font-size: 0.75rem; color: var(--red); margin-top: 0.25rem; }
.form-input.error { border-color: var(--red); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) { .form-row { grid-template-columns: 1fr; } }

/* ===== Badges ===== */
.badge {
    display: inline-flex; align-items: center; padding: 0.125rem 0.625rem;
    border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; line-height: 1.5;
}
.badge-navy { background: rgba(26,58,107,0.1); color: var(--navy); }
.badge-green { background: rgba(34,197,94,0.1); color: var(--green-dark); }
.badge-amber { background: rgba(245,158,11,0.1); color: #B45309; }
.badge-red { background: rgba(239,68,68,0.1); color: var(--red); }
.badge-gray { background: var(--bg-alt); color: var(--text-secondary); }
.plan-badge { font-size: 0.6875rem; padding: 0.0625rem 0.5rem; }
.plan-explorer { background: rgba(26,58,107,0.1); color: var(--navy); }
.plan-strategist { background: rgba(34,197,94,0.1); color: var(--green-dark); }
.plan-navigator { background: rgba(245,158,11,0.1); color: #B45309; }

/* ===== Match Buckets ===== */
.bucket { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; font-size: 0.8125rem; }
.bucket-safety { color: var(--green-dark); }
.bucket-target { color: #2563EB; }
.bucket-reach { color: #B45309; }
.bucket-moonshot { color: var(--red); }
.bucket-dot { width: 8px; height: 8px; border-radius: 50%; }
.bucket-safety .bucket-dot { background: var(--green); }
.bucket-target .bucket-dot { background: #3B82F6; }
.bucket-reach .bucket-dot { background: var(--amber); }
.bucket-moonshot .bucket-dot { background: var(--red); }

/* ===== Deadlines ===== */
.deadline-urgent { color: var(--red); font-weight: 600; }
.deadline-soon { color: var(--amber); font-weight: 600; }
.deadline-ok { color: var(--green-dark); }

/* ===== Progress ===== */
.progress { height: 8px; background: var(--bg-alt); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); transition: width 0.3s; }
.progress-navy { background: var(--navy); }
.progress-green { background: var(--green); }
.progress-amber { background: var(--amber); }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; font-size: 0.8125rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: var(--bg-alt); }

/* ===== Alerts ===== */
.alert { padding: 0.875rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9375rem; }
.alert-info { background: rgba(26,58,107,0.08); color: var(--navy); border: 1px solid rgba(26,58,107,0.15); }
.alert-success { background: rgba(34,197,94,0.08); color: var(--green-dark); border: 1px solid rgba(34,197,94,0.15); }
.alert-warning { background: rgba(245,158,11,0.08); color: #92400E; border: 1px solid rgba(245,158,11,0.15); }
.alert-error { background: rgba(239,68,68,0.08); color: #B91C1C; border: 1px solid rgba(239,68,68,0.15); }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab {
    padding: 0.75rem 1.25rem; font-weight: 500; font-size: 0.9375rem;
    color: var(--text-secondary); border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.15s; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Modal ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    justify-content: center; align-items: center; padding: var(--gutter);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 2rem;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); line-height: 1; }

/* ===== Chat ===== */
.chat-messages { display: flex; flex-direction: column; gap: 1rem; max-height: 500px; overflow-y: auto; padding: 1rem 0; }
.chat-msg { display: flex; gap: 0.75rem; max-width: 85%; }
.chat-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}
.chat-avatar-ai { background: var(--navy); color: white; }
.chat-avatar-user { background: var(--bg-alt); color: var(--text-secondary); border: 1px solid var(--border); }
.chat-bubble { padding: 0.75rem 1rem; border-radius: var(--radius-lg); font-size: 0.9375rem; line-height: 1.5; }
.chat-msg-ai .chat-bubble { background: var(--bg-alt); }
.chat-msg-user .chat-bubble { background: var(--navy); color: white; }
.chat-input-row { display: flex; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.chat-input { flex: 1; }

/* ===== Stats Row ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stat-card { padding: 1.25rem; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-label { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* ===== Steps/Wizard ===== */
.steps { display: flex; gap: 0; margin-bottom: 2rem; overflow-x: auto; }
.step {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
    padding: 0.75rem 0.5rem; position: relative; font-size: 0.8125rem; color: var(--text-muted);
}
.step::after {
    content: ''; position: absolute; top: 22px; left: 50%; width: 100%;
    height: 2px; background: var(--border);
}
.step:last-child::after { display: none; }
.step-num {
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; background: var(--bg-alt); border: 2px solid var(--border);
    position: relative; z-index: 1;
}
.step.active .step-num { background: var(--navy); color: white; border-color: var(--navy); }
.step.completed .step-num { background: var(--green); color: white; border-color: var(--green); }
.step.active { color: var(--navy); font-weight: 600; }
.step.completed { color: var(--green-dark); }

/* ===== Footer ===== */
.footer { background: var(--navy-dark); color: rgba(255,255,255,0.8); padding: 3rem 0 1.5rem; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.footer-brand { margin-bottom: 2rem; }
.footer-brand .logo-mark { background: rgba(255,255,255,0.15); }
.footer-brand .logo-text { color: white; }
.footer-tagline { font-size: 0.875rem; margin-top: 0.5rem; color: rgba(255,255,255,0.6); }
.footer-links { display: flex; gap: 4rem; margin-bottom: 2rem; }
.footer-col h4 { color: white; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 0.875rem; padding: 0.25rem 0; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; }
.footer-bottom p { font-size: 0.8125rem; color: rgba(255,255,255,0.4); }

@media (max-width: 768px) {
    .footer-links { flex-direction: column; gap: 1.5rem; }
}

/* ===== Hero ===== */
.hero {
    padding: 5rem 0 4rem; text-align: center;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
    color: white;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.25rem; color: rgba(255,255,255,0.85); max-width: 640px; margin: 0 auto 2rem; }
.hero .btn-primary { background: var(--green); border-color: var(--green); font-size: 1.125rem; padding: 0.875rem 2rem; }
.hero .btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }

@media (max-width: 768px) {
    .hero { padding: 3rem 0 2.5rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.0625rem; }
}

/* ===== Dashboard Grid ===== */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.dash-full { grid-column: 1 / -1; }
@media (max-width: 768px) { .dash-grid { grid-template-columns: 1fr; } }

/* ===== Page Header ===== */
.page-header { padding: 2rem 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; }
.page-header p { color: var(--text-secondary); margin-top: 0.25rem; }

/* ===== Auth Pages ===== */
.auth-wrap { max-width: 440px; margin: 3rem auto; padding: 0 var(--gutter); }
.auth-card { padding: 2rem; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header h1 { font-size: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--text-muted); font-size: 0.8125rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ===== Pricing ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.pricing-card { text-align: center; padding: 2rem; position: relative; }
.pricing-card.featured { border-color: var(--navy); box-shadow: var(--shadow-lg); }
.pricing-card.featured::before {
    content: 'Most Popular'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--navy); color: white; padding: 0.125rem 0.75rem; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 600;
}
.pricing-name { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.pricing-price { font-size: 3rem; font-weight: 700; margin: 0.75rem 0; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-secondary); }
.pricing-features { list-style: none; text-align: left; margin: 1.5rem 0; }
.pricing-features li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9375rem; display: flex; align-items: center; gap: 0.5rem; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; }
.pricing-features li.disabled { color: var(--text-muted); }
.pricing-features li.disabled::before { content: '—'; color: var(--text-muted); }

@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; } }

/* ===== Loading ===== */
.spinner {
    width: 24px; height: 24px; border: 3px solid var(--border);
    border-top-color: var(--navy); border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
    position: absolute; inset: 0; background: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center; z-index: 10;
    border-radius: var(--radius-lg);
}

/* ===== Misc ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.empty-state p { margin-top: 0.5rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.tag { display: inline-block; padding: 0.125rem 0.5rem; background: var(--bg-alt); border-radius: var(--radius-sm); font-size: 0.75rem; color: var(--text-secondary); }
.score-ring {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; font-weight: 700; color: var(--navy);
    border: 4px solid var(--navy); background: rgba(26,58,107,0.05);
}
