/* ─── MoanaAI Design System v2 ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary:        #2563EB;
    --primary-dark:   #1D4ED8;
    --primary-hover:  #1E40AF;
    --primary-light:  #EFF6FF;
    --primary-subtle: #DBEAFE;

    --success:        #059669;
    --success-light:  #ECFDF5;
    --danger:         #DC2626;
    --danger-light:   #FEF2F2;
    --warning:        #D97706;
    --warning-light:  #FFFBEB;

    --hot:   #DC2626;
    --warm:  #D97706;
    --cold:  #2563EB;

    --bg:         #F8FAFC;
    --bg-card:    #FFFFFF;
    --bg-subtle:  #F1F5F9;

    --text:       #0F172A;
    --text-2:     #334155;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    --text-inv:   #FFFFFF;

    --border:     #E2E8F0;
    --border-2:   #CBD5E1;

    --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg:  0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
    --shadow-xl:  0 24px 48px rgba(0,0,0,0.12);

    --radius-xs:  6px;
    --radius-sm:  8px;
    --radius:     12px;
    --radius-lg:  16px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 520px;
    --nav-height: 64px;
    --top-bar-height: 56px;
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-med: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: var(--font); }

/* ─── Layout ─────────────────────────────────────────────────────── */
.app-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
    padding-bottom: calc(var(--nav-height) + 16px);
}
.page-content { padding-top: 20px; }
.wide-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Top Bar ────────────────────────────────────────────────────── */
.top-bar {
    height: var(--top-bar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 200;
}
.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.top-bar-logo .logo-mark {
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.top-bar-logo .logo-mark svg { width: 16px; height: 16px; color: white; }
.top-bar-logo .logo-text {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}
.top-bar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: background var(--transition), color var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}
.top-bar-btn:hover { background: var(--bg-subtle); color: var(--text); text-decoration: none; }
.top-bar-btn svg { width: 20px; height: 20px; }
.top-bar-user {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    padding: 0 6px;
}

/* ─── Bottom Navigation ──────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 200;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 2px 12px;
    color: var(--text-muted);
    transition: color var(--transition);
    text-decoration: none;
    min-width: 52px;
}
.nav-item:hover, .nav-item.active { color: var(--primary); text-decoration: none; }
.nav-item.active .nav-icon-wrap { background: var(--primary-light); }
.nav-icon-wrap {
    width: 36px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    transition: background var(--transition);
}
.nav-item svg { width: 20px; height: 20px; }
.nav-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-transform: uppercase;
}
/* Scan center action */
.nav-item.nav-scan .nav-icon-wrap {
    background: var(--primary);
    width: 44px;
    height: 36px;
    border-radius: var(--radius-sm);
    margin-top: -4px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.nav-item.nav-scan svg { color: white; }
.nav-item.nav-scan { color: var(--primary); }
.nav-item.nav-scan:hover .nav-icon-wrap,
.nav-item.nav-scan.active .nav-icon-wrap { background: var(--primary-dark); }

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 18px;
    margin-bottom: 10px;
    transition: border-color var(--transition-med), box-shadow var(--transition-med);
}
.card:hover { border-color: var(--border-2); }
.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 3px;
}

/* ─── Stats Grid ─────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px 10px;
    text-align: center;
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -1px;
}
.stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 5px;
}
.stat-card.stat-hot  .stat-number { color: var(--hot); }
.stat-card.stat-warm .stat-number { color: var(--warm); }
.stat-card.stat-success .stat-number { color: var(--success); }

/* ─── Section Headers ────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-top: 28px;
}
.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.section-action {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 3px;
}
.section-action svg { width: 14px; height: 14px; }

/* ─── Lead Cards ─────────────────────────────────────────────────── */
.lead-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 13px 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color var(--transition-med), box-shadow var(--transition-med);
    text-decoration: none;
    color: var(--text);
}
.lead-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    text-decoration: none;
}
.lead-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    flex-shrink: 0;
    color: white;
    letter-spacing: 0.5px;
}
.lead-info { flex: 1; min-width: 0; }
.lead-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.lead-meta {
    font-size: 0.775rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.score-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.score-dot.hot  { background: var(--hot); }
.score-dot.warm { background: var(--warm); }
.score-dot.cold { background: var(--cold); }

/* ─── Event Cards ────────────────────────────────────────────────── */
.event-card { display: block; text-decoration: none; color: var(--text); }
.event-card:hover { text-decoration: none; color: var(--text); }
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.775rem;
    color: var(--text-light);
    margin-top: 8px;
}
.event-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.event-meta-item svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ─── Badges ─────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.badge-active   { background: var(--success-light); color: var(--success); }
.badge-inactive { background: var(--bg-subtle);     color: var(--text-muted); }
.badge-hot      { background: var(--danger-light);  color: var(--hot); }
.badge-warm     { background: var(--warning-light); color: var(--warm); }
.badge-cold     { background: var(--primary-subtle); color: var(--primary); }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    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;
    line-height: 1.4;
    white-space: nowrap;
    font-family: var(--font);
}
.btn:hover { text-decoration: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(37,99,235,0.2);
}
.btn-primary:hover { background: var(--primary-dark); color: white; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-2);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--border-2); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }

.btn-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #FECACA; }
.btn-danger:hover { background: #FEE2E2; color: var(--danger); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #047857; color: white; }

.btn-sm     { padding: 7px 13px; font-size: 0.8rem; }
.btn-lg     { padding: 12px 26px; font-size: 0.9375rem; }
.btn-xl     { padding: 14px 36px; font-size: 1rem; }
.btn-block  { display: flex; width: 100%; }
.btn-icon   { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-white  { background: white; color: var(--primary); font-weight: 700; }
.btn-white:hover { background: #F0F4FF; color: var(--primary-dark); }
.btn-outline-white { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); color: white; }

/* ─── Scan FAB ───────────────────────────────────────────────────── */
.scan-fab {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 20px;
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    z-index: 150;
    transition: all var(--transition-med);
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.scan-fab svg { width: 22px; height: 22px; }
.scan-fab:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,0.45); color: white; text-decoration: none; }

/* ─── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-family: var(--font);
    background: var(--bg-card);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.5;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 84px; }
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}
.form-hint  { font-size: 0.775rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.775rem; color: var(--danger); margin-top: 5px; font-weight: 500; }

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}
.form-check input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.form-check label { font-size: 0.875rem; font-weight: 400; color: var(--text-light); }

/* ─── Flash Messages ─────────────────────────────────────────────── */
.flash-messages { padding: 8px 0; }
.flash {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid transparent;
}
.flash svg { width: 15px; height: 15px; flex-shrink: 0; }
.flash-success { background: var(--success-light); color: var(--success);  border-color: #A7F3D0; }
.flash-error   { background: var(--danger-light);  color: var(--danger);   border-color: #FECACA; }
.flash-info    { background: var(--primary-light);  color: var(--primary);  border-color: #BFDBFE; }
.flash-warning { background: var(--warning-light); color: var(--warning);  border-color: #FDE68A; }

/* ─── Score Selector ─────────────────────────────────────────────── */
.score-selector { display: flex; gap: 8px; }
.score-option {
    flex: 1;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
}
.score-option:hover { border-color: var(--border-2); color: var(--text-2); }
.score-hot.active  { border-color: var(--hot);  background: var(--danger-light);  color: var(--hot); }
.score-warm.active { border-color: var(--warm); background: var(--warning-light); color: var(--warm); }
.score-cold.active { border-color: var(--cold); background: var(--primary-subtle); color: var(--cold); }

/* ─── Filter Bar ─────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding: 2px 0 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    padding: 5px 13px;
    border-radius: var(--radius-full);
    font-size: 0.775rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    text-decoration: none;
}
.filter-chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ─── Search Bar ─────────────────────────────────────────────────── */
.search-bar { position: relative; margin-bottom: 14px; }
.search-bar input {
    width: 100%;
    padding: 9px 13px 9px 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    background: var(--bg-card);
    font-family: var(--font);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
}
.search-icon svg { width: 15px; height: 15px; }

/* ─── Empty State ────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-icon {
    width: 52px; height: 52px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.empty-icon svg { width: 26px; height: 26px; color: var(--text-muted); }
.empty-state h3 { font-size: 0.9375rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 0.875rem; color: var(--text-light); margin-bottom: 20px; }

/* ─── Scanner Interface ──────────────────────────────────────────── */
.scanner-container { position: relative; width: 100%; max-width: var(--max-width); margin: 0 auto; }
.scanner-viewport {
    width: 100%;
    aspect-ratio: 1;
    background: #0A0A0A;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}
.scanner-viewport video { width: 100%; height: 100%; object-fit: cover; }
.scanner-overlay {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.scanner-frame { width: 62%; aspect-ratio: 1; position: relative; }
.scanner-corner {
    position: absolute;
    width: 24px; height: 24px;
    border-color: var(--primary);
    border-style: solid;
}
.scanner-corner.tl { top: 0; left: 0;  border-width: 3px 0 0 3px; border-radius: var(--radius-xs) 0 0 0; }
.scanner-corner.tr { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 var(--radius-xs) 0 0; }
.scanner-corner.bl { bottom: 0; left: 0;  border-width: 0 0 3px 3px; border-radius: 0 0 0 var(--radius-xs); }
.scanner-corner.br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 var(--radius-xs) 0; }
.scanner-line {
    position: absolute; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scanLine 2s ease-in-out infinite;
    top: 50%; margin-top: -1px; opacity: 0.9;
}
@keyframes scanLine {
    0%, 100% { opacity: 0.5; transform: scaleX(0.85); }
    50%       { opacity: 1;   transform: scaleX(1); }
}
.scanner-status { text-align: center; padding: 14px 16px; font-size: 0.875rem; color: var(--text-light); }
.scanner-result {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 14px;
    border: 1.5px solid var(--success);
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Detail View ────────────────────────────────────────────────── */
.detail-header { text-align: center; padding: 28px 0 20px; }
.detail-avatar {
    width: 64px; height: 64px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    font-weight: 700;
    color: white;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}
.detail-name    { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.detail-subtitle { font-size: 0.875rem; color: var(--text-light); margin-top: 3px; }
.detail-section { margin-bottom: 22px; }
.detail-section-title {
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-muted); margin-bottom: 10px;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-light); font-weight: 500; flex-shrink: 0; }
.detail-value { color: var(--text); font-weight: 500; text-align: right; word-break: break-word; }

/* ─── Auth Pages ─────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}
.auth-logo .logo-mark {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.auth-logo .logo-mark svg { width: 18px; height: 18px; color: white; }
.auth-logo .logo-text { font-size: 1.0625rem; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.auth-title { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 4px; text-align: center; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-light); text-align: center; margin-bottom: 28px; }

/* ─── Landing Page ───────────────────────────────────────────────── */
.landing-page { background: #fff; }
.landing-nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 100;
}
.landing-nav-logo {
    display: flex; align-items: center; gap: 10px;
}
.landing-nav-logo .logo-mark {
    width: 30px; height: 30px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.landing-nav-logo .logo-mark svg { width: 16px; height: 16px; color: white; }
.landing-nav-logo span { font-size: 0.9375rem; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.landing-nav-links { display: flex; align-items: center; gap: 8px; }

.landing-hero {
    padding: 100px 24px 88px;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}
.landing-hero .eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--primary-subtle);
    color: var(--primary);
    border-radius: var(--radius-full);
    padding: 5px 14px;
    font-size: 0.775rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.landing-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 22px;
}
.landing-hero h1 .accent { color: var(--primary); }
.landing-hero p {
    font-size: 1.0625rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.75;
}
.landing-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 52px;
}
.landing-social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.landing-social-proof svg { width: 15px; height: 15px; color: var(--success); }

.landing-features {
    padding: 96px 24px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.features-header { text-align: center; margin-bottom: 56px; }
.features-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}
.features-header p { font-size: 0.9375rem; color: var(--text-light); max-width: 440px; margin: 0 auto; line-height: 1.7; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 28px 24px;
    transition: box-shadow var(--transition-med), border-color var(--transition-med);
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.feature-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius);
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; color: var(--primary); }
.feature-card h3 { font-size: 0.9375rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.feature-card p  { font-size: 0.8375rem; color: var(--text-light); line-height: 1.7; }

.landing-cta-section {
    padding: 96px 24px;
    text-align: center;
    background: var(--primary);
    color: white;
}
.landing-cta-section h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.75px; }
.landing-cta-section p { font-size: 0.9375rem; opacity: 0.8; margin-bottom: 32px; line-height: 1.7; }

/* ─── Public Pages ───────────────────────────────────────────────── */
.public-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: var(--bg);
}
.public-card {
    width: 100%; max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 32px 28px;
}
.public-header { text-align: center; margin-bottom: 28px; }
.public-header h1 { font-size: 1.375rem; font-weight: 700; margin-bottom: 6px; }
.public-header p  { font-size: 0.875rem; color: var(--text-light); }

/* ─── Quick Actions ──────────────────────────────────────────────── */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}
.quick-action-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
}
.quick-action-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}
.quick-action-card svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary); }

/* ─── Table ──────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8375rem; }
.data-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.data-table tbody tr:hover { background: var(--bg-subtle); }

/* ─── Divider ────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ─── PWA Install Banner ─────────────────────────────────────────── */
.install-banner {
    background: var(--text);
    color: white;
    padding: 11px 16px;
    display: none;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    gap: 12px;
}
.install-banner.show { display: flex; }
.install-banner span { flex: 1; }
.install-banner button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 7px 16px;
    border-radius: var(--radius-xs);
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* ─── Offline Indicator ──────────────────────────────────────────── */
.offline-indicator {
    background: var(--warning);
    color: white;
    text-align: center;
    padding: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
}
.offline-indicator.show { display: block; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (min-width: 640px)  { .app-container { max-width: 640px; } }
@media (min-width: 768px)  {
    .app-container { max-width: 740px; padding-bottom: 40px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .bottom-nav { display: none; }
    .scan-fab { bottom: 24px; }
}

/* ─── Utilities ──────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-light); }
.text-sm     { font-size: 0.8375rem; }
.text-xs     { font-size: 0.75rem; }
.mt-1 { margin-top: 6px; }  .mt-2 { margin-top: 14px; }  .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 14px; } .mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; } .gap-2 { gap: 14px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-1 { flex: 1; }
.hidden { display: none; }
.w-full { width: 100%; }

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; }                       to { opacity: 1; } }
@keyframes fadeInUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade    { animation: fadeIn 0.2s ease; }
.animate-fade-up { animation: fadeInUp 0.28s ease; }
