/* CyberReady — Napier AI */

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

:root {
    --brand: #0f766e;        /* teal */
    --brand-light: #14b8a6;
    --brand-dark: #134e4a;
    --navy: #1e3a8a;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --radius: 10px;
}

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

/* NAVBAR */
.navbar { background: var(--brand-dark); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; }
.nav-brand { display: flex; align-items: center; gap: 8px; }
.brand-icon { font-size: 20px; }
.brand-name { color: white; font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.brand-tag { color: #99f6e4; font-size: 12px; background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 20px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link { color: #ccfbf1; text-decoration: none; padding: 6px 14px; border-radius: 6px; font-size: 14px; transition: background 0.15s; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.1); color: white; }
.nav-user { display: flex; align-items: center; gap: 12px; margin-left: 16px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,0.15); }
.nav-user span { color: #99f6e4; font-size: 13px; }
.btn-logout { color: #99f6e4; font-size: 13px; text-decoration: none; }
.btn-logout:hover { color: white; }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; }

/* ALERT */
.alert { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }

/* AUTH */
.auth-wrapper { display: flex; justify-content: center; padding: 60px 16px; }
.auth-card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.auth-logo { font-size: 22px; font-weight: 800; color: var(--brand); margin-bottom: 24px; }
.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 500; }
.form-group input { padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; outline: none; transition: border-color 0.15s; }
.form-group input:focus { border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(20,184,166,0.12); }
.auth-footer { margin-top: 20px; font-size: 14px; color: var(--text-muted); text-align: center; }
.auth-footer a { color: var(--brand); text-decoration: none; font-weight: 500; }

/* BUTTONS */
.btn-primary { background: var(--brand); color: white; border: none; padding: 11px 20px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: background 0.15s; }
.btn-primary:hover { background: var(--brand-light); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); padding: 11px 20px; border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-secondary:hover { border-color: var(--brand-light); color: var(--brand); }
.btn-full { width: 100%; text-align: center; }
.btn-sm { padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; border: 1px solid transparent; display: inline-block; transition: all 0.15s; }
.btn-view { background: #eff6ff; color: var(--navy); border-color: #bfdbfe; }
.btn-view:hover { background: var(--navy); color: white; }
.btn-report { background: #f0fdf4; color: var(--success); border-color: #bbf7d0; }
.btn-report:hover { background: var(--success); color: white; }
.btn-delete { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-delete:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-cta { background: var(--navy); color: white; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 12px; }
.btn-cta:hover { background: #2563eb; }

/* DASHBOARD */
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.dashboard-title h1 { font-size: 26px; font-weight: 700; }
.dashboard-title p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.btn-disabled { opacity: 0.5; pointer-events: none; cursor: not-allowed; }

/* PLAN BAR */
.plan-bar { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.plan-bar-left { display: flex; align-items: center; gap: 12px; }
.plan-bar-right { display: flex; align-items: center; gap: 12px; }
.plan-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.4px; }
.plan-free { background: #f1f5f9; color: #64748b; }
.plan-pro { background: #f0fdf9; color: #0f766e; }
.plan-teams { background: #0f172a; color: white; }
.plan-usage { font-size: 13px; color: var(--text-muted); }
.plan-progress-track { background: #e2e8f0; border-radius: 4px; height: 6px; width: 120px; }
.plan-progress-fill { background: var(--brand); height: 6px; border-radius: 4px; }
.plan-upgrade-link { font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; }
.plan-upgrade-link:hover { text-decoration: underline; }
.plan-pricing-link { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.plan-pricing-link:hover { color: var(--text); }

/* LIMIT BANNER */
.limit-banner { background: #f0fdf9; border: 1px solid #99f6e4; border-radius: var(--radius); padding: 12px 16px; font-size: 13px; color: #134e4a; margin-bottom: 20px; }
.limit-banner a { color: var(--brand); font-weight: 600; text-decoration: none; }
.limit-banner a:hover { text-decoration: underline; }
.limit-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.limit-warning a { color: #d97706; }

/* ASSESSMENT CARDS */
.assessment-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.assessment-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; gap: 20px; transition: box-shadow 0.15s; }
.assessment-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.assessment-card.card-ready { border-left: 4px solid var(--success); }
.assessment-card.card-gaps { border-left: 4px solid var(--warning); }

/* Score ring */
.score-ring { width: 80px; height: 80px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.score-ring.ready { background: #f0fdf4; border: 3px solid var(--success); }
.score-ring.warning { background: #fffbeb; border: 3px solid var(--warning); }
.score-ring.danger { background: #fef2f2; border: 3px solid var(--danger); }
.score-ring.pending { background: #f1f5f9; border: 3px solid var(--border); }
.score-num { font-size: 18px; font-weight: 800; line-height: 1; }
.score-ring.ready .score-num { color: var(--success); }
.score-ring.warning .score-num { color: var(--warning); }
.score-ring.danger .score-num { color: var(--danger); }
.score-ring.pending .score-num { color: var(--text-muted); }
.score-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-align: center; margin-top: 2px; }

.acard-body { flex: 1; }
.acard-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.acard-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta-item { font-size: 13px; color: var(--text-muted); }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.badge-ready { background: #dcfce7; color: #15803d; }
.badge-gaps { background: #fef3c7; color: #b45309; }
.badge-pending { background: #f1f5f9; color: var(--text-muted); }
.acard-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-icon { font-size: 52px; margin-bottom: 16px; }
.empty-state h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

/* INFO STRIP */
.info-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.info-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; align-items: flex-start; gap: 12px; }
.info-icon { font-size: 24px; flex-shrink: 0; }
.info-card strong { font-size: 14px; font-weight: 600; display: block; margin-bottom: 2px; }
.info-card p { font-size: 13px; color: var(--text-muted); }

/* PROGRESS HEADER */
.progress-header { background: white; border-bottom: 1px solid var(--border); padding: 16px 24px; margin: -28px -24px 32px; position: sticky; top: 56px; z-index: 50; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; color: var(--text-muted); }
.progress-step { font-weight: 600; color: var(--brand); }
.progress-track { height: 6px; background: #e2e8f0; border-radius: 3px; margin-bottom: 14px; }
.progress-fill { height: 6px; background: var(--brand); border-radius: 3px; transition: width 0.3s; }
.section-tabs { display: flex; gap: 8px; overflow-x: auto; }
.section-tab { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--text-muted); background: var(--bg); white-space: nowrap; }
.section-tab.active { background: var(--brand); color: white; }
.section-tab.done { background: #ccfbf1; color: var(--brand-dark); }
.tab-name { display: none; }
@media (min-width: 700px) { .tab-name { display: inline; } }

/* ASSESSMENT BODY */
.assessment-body { max-width: 760px; margin: 0 auto; }
.section-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.section-icon { font-size: 36px; }
.section-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.section-header p { color: var(--text-muted); font-size: 14px; }

/* QUESTION CARDS */
.question-form { display: flex; flex-direction: column; gap: 16px; }
.question-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.question-num { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.question-text { font-size: 15px; font-weight: 500; line-height: 1.5; margin-bottom: 14px; }
.answer-options { display: flex; gap: 10px; }
.answer-option { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 14px; transition: all 0.15s; }
.answer-option input { display: none; }
.answer-option:hover { border-color: var(--brand-light); background: #f0fdfa; }
.answer-option.selected { border-color: var(--brand); background: #f0fdfa; font-weight: 600; }
.option-icon { font-size: 16px; flex-shrink: 0; }

.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 16px 0; }

/* RESULTS */
.results-header { margin-bottom: 24px; }
.back-link { color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 500; display: inline-block; margin-bottom: 14px; }
.back-link:hover { text-decoration: underline; }
.results-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.results-title-row h1 { font-size: 26px; font-weight: 700; }
.results-date { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.verdict-card { border-radius: 14px; padding: 24px 28px; margin-bottom: 32px; display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.verdict-ready { background: #f0fdf4; border: 2px solid var(--success); }
.verdict-gaps { background: #fffbeb; border: 2px solid var(--warning); }
.verdict-score { font-size: 56px; font-weight: 800; min-width: 100px; text-align: center; flex-shrink: 0; }
.verdict-ready .verdict-score { color: var(--success); }
.verdict-gaps .verdict-score { color: var(--warning); }
.verdict-text h2 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.verdict-text p { font-size: 14px; color: #374151; }
.verdict-cta { margin-top: 4px; }

.section-heading { font-size: 19px; font-weight: 700; margin: 32px 0 14px; }
.count-badge { background: var(--brand); color: white; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 20px; vertical-align: middle; }

/* CONTROL GRID */
.controls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 32px; }
.control-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.control-card.status-pass { border-left: 4px solid var(--success); }
.control-card.status-warning { border-left: 4px solid var(--warning); }
.control-card.status-fail { border-left: 4px solid var(--danger); }
.ctrl-icon { font-size: 28px; flex-shrink: 0; }
.ctrl-body { flex: 1; }
.ctrl-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ctrl-bar-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ctrl-bar { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; }
.ctrl-fill { height: 8px; border-radius: 4px; }
.status-fill-pass { background: var(--success); }
.status-fill-warning { background: var(--warning); }
.status-fill-fail { background: var(--danger); }
.ctrl-pct { font-size: 14px; font-weight: 700; min-width: 36px; }
.ctrl-status-badge { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; }
.badge-pass { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-fail { background: #fef2f2; color: #b91c1c; }

/* GAPS */
.gaps-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.gap-item { background: white; border-radius: var(--radius); padding: 16px 18px; border-left: 4px solid; }
.gap-item.severity-high { border-color: var(--danger); }
.gap-item.severity-medium { border-color: var(--warning); }
.gap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.gap-control { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.sev-high { font-size: 12px; font-weight: 600; color: var(--danger); }
.sev-medium { font-size: 12px; font-weight: 600; color: var(--warning); }
.gap-question { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.gap-fix { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.fix-label { font-weight: 600; color: var(--brand-dark); margin-right: 4px; }
.gap-cta { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.gap-help-link { font-size: 12px; font-weight: 600; color: var(--brand); text-decoration: none; }
.gap-help-link:hover { text-decoration: underline; }

/* NEXT STEPS */
.next-steps { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 24px; margin-top: 8px; }
.next-steps h2 { font-size: 19px; font-weight: 700; margin-bottom: 18px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.step-card { display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: white; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-card strong { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
.step-card p { font-size: 13px; color: var(--text-muted); }
.step-card a { color: var(--brand); }

@media (max-width: 768px) {
    .controls-grid { grid-template-columns: 1fr; }
    .info-strip { grid-template-columns: 1fr 1fr; }
    .answer-options { flex-direction: column; }
    .assessment-card { flex-wrap: wrap; }
    .verdict-card { flex-direction: column; }
    .results-title-row { flex-direction: column; }
}
@media (max-width: 480px) {
    .info-strip { grid-template-columns: 1fr; }
}
