/* =========================================
   OCA PRO - MASTER STYLESHEET
   Version: 13.0 (Ultra-Lightweight)
   - System fonts (no external downloads)
   - Removed Font Awesome dependency
   - Optimized for speed & performance
   ========================================= */

:root {
  --bg: #0c111d;
  --panel: #0f172a;
  --panel-soft: #111927;
  --card: #ffffff;
  --muted: #5b6474;
  --ink: #0f172a;
  --accent: #d97706;
  --accent-soft: #f59e0b;
  --border: #e5e7eb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  --radius: 16px;
  --success: #10b981;
  --danger: #ef4444;
  /* Legacy tokens for dashboard components */
  --brand-primary: #0f172a;
  --brand-hover: #1f2937;
  --sepia-50: #f8fafc;
  --sepia-100: #f1f5f9;
  --sepia-200: #e2e8f0;
  --sepia-300: #cbd5e1;
  --sepia-800: #1f2937;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
}

/* Base Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(120deg, #0b1220 0%, #0f172a 60%, #0b1220 100%);
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { font-weight: 800; color: #f8fafc; line-height: 1.2; }
p { color: #cbd5e1; }
a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 94vw); margin: 0 auto; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
}
.btn.lg { padding: 14px 20px; font-size: 1rem; }
.btn.solid { background: linear-gradient(135deg, #0ea5e9, #2563eb); color: #fff; box-shadow: 0 15px 30px rgba(14,165,233,0.3); }
.btn.solid:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(14,165,233,0.35); }
.btn.outline { background: transparent; color: #e2e8f0; border-color: rgba(255,255,255,0.2); }
.btn.outline:hover { border-color: #60a5fa; color: #fff; }
.btn.ghost { background: rgba(255,255,255,0.06); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.08); }
.btn.ghost:hover { background: rgba(255,255,255,0.12); }

/* Topbar */
.topbar { background: rgba(15,23,42,0.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.topbar-actions { display: flex; gap: 10px; }

.brand { display: flex; align-items: center; gap: 12px; color: #f8fafc; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, #f59e0b, #d97706); display: grid; place-items: center; font-weight: 900; color: #0f172a; font-size: 1rem; }
.brand-mark.small { width: 36px; height: 36px; font-size: 0.95rem; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { letter-spacing: -0.01em; font-weight: 800; }
.brand-tag { font-size: 0.78rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.12em; }

/* Hero */
.hero { padding: 80px 0 40px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.18), transparent 32%), radial-gradient(circle at 80% 10%, rgba(244,114,182,0.12), transparent 28%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero-copy h1 { font-size: clamp(2.6rem, 4vw, 3.8rem); margin: 12px 0 18px; }
.hero-copy p { max-width: 640px; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; margin: 28px 0 16px; flex-wrap: wrap; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 14px; color: #cbd5e1; font-size: 0.95rem; }
.hero-highlights span { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: #f8fafc; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; text-transform: uppercase; }
.pill.mild { background: rgba(255,255,255,0.04); color: #cbd5e1; border-color: rgba(255,255,255,0.08); }

.hero-visual img { width: 100%; border-radius: 14px; display: block; object-fit: cover; aspect-ratio: 16 / 10; filter: saturate(1.05); }
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.lock-label {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

/* Metrics */
.metrics { padding: 32px 0 10px; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; }
.metric { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 16px 18px; }
.metric-value { font-weight: 800; font-size: 1.1rem; color: #f8fafc; letter-spacing: -0.01em; }
.metric-label { font-size: 0.9rem; color: #94a3b8; margin-top: 4px; }

/* Features */
.features { padding: 60px 0 30px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; color: #94a3b8; margin-bottom: 6px; }
.lede { color: #cbd5e1; font-size: 1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
.card {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 18px 18px 20px;
  box-shadow: 0 14px 28px rgba(0,0,0,0.25);
}
.card h3 { color: #f8fafc; margin: 12px 0 8px; font-size: 1.2rem; }
.card p { color: #b6c4d7; font-size: 0.98rem; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); color: #fbbf24; font-weight: 800; border: 1px solid rgba(255,255,255,0.1);
}

/* Footer */
.footer { padding: 32px 0 24px; background: rgba(12,17,29,0.92); border-top: 1px solid rgba(255,255,255,0.05); margin-top: 30px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-note { color: #94a3b8; max-width: 720px; line-height: 1.4; font-size: 0.95rem; }
.footer-meta { margin-top: 16px; text-align: center; color: #64748b; font-size: 0.85rem; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: #f8fafc; }

#landing-container { color: #e2e8f0; }
#app-container { background: #f8fafc; color: var(--text-primary); }

/* =========================================
   DASHBOARD & APP STYLES (preserved)
   ========================================= */
.header-strip { display: none; } /* top hero replaces old strip on landing */

.paywall-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.paywall-overlay.active { opacity: 1; pointer-events: auto; }
.paywall-hidden { display: none !important; }

.paywall-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    padding: 0;
    border: 1px solid var(--border);
    overflow: hidden;
}

.paywall-header { padding: 32px 32px 20px; text-align: center; }
.paywall-title { font-size: 1.5rem; font-weight: 700; color: var(--brand-primary); margin-bottom: 8px; }
.paywall-sub { font-size: 0.95rem; color: var(--text-secondary); }
.paywall-body { padding: 0 32px 32px; }

.paywall-input-group { margin-bottom: 20px; text-align: left; }
.paywall-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 6px; }
.paywall-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: #f8fafc; color: var(--brand-primary); }
.paywall-input:focus { outline: none; background: #fff; border-color: #3b82f6; }

.paywall-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.plan-btn { padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.plan-btn.active { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }
.plan-btn strong { display: block; font-size: 1.125rem; font-weight: 700; }
.plan-btn span { font-size: 0.8rem; opacity: 0.8; }
.plan-btn.active span { color: #cbd5e1; }

.btn-block { display: block; width: 100%; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; text-align: center; }
.btn-trial { background: linear-gradient(135deg, #4f46e5, #4338ca); color: #fff; }
.btn-secondary { background: transparent; color: var(--text-secondary); margin-top: 12px; }
.btn-secondary:hover { color: var(--brand-primary); }

.hidden-view { display: none; }
.text-error { color: var(--danger); font-size: 0.85rem; margin-top: 8px; text-align: center; }
.text-success-msg { background: #f0fdf4; color: var(--success); padding: 12px; border-radius: 8px; border: 1px solid #bbf7d0; margin-bottom: 16px; }

.terms-check { display: flex; gap: 10px; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; }

/* Dashboard Specifics */
.header { background: #ffffff; border-bottom: 2px solid var(--sepia-200); padding: 8px 16px; display: flex; align-items: center; gap: 16px; min-height: 56px; }
.header-title { font-size: 20px; font-weight: 700; color: var(--brand-primary); margin-right: 8px; }
.premium-tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; background: #b91c1c; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 0.2px; }
.header-controls { display: flex; gap: 12px; flex: 1; overflow: hidden; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-clock { font-size: 14px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.info-btn { border: 1px solid var(--sepia-300); background: #ffffff; color: var(--text-secondary); border-radius: 999px; width: 22px; height: 22px; font-size: 12px; text-align: center; cursor: pointer; }

.index-tabs { display: flex; gap: 4px; min-width: 240px; }
.index-tab { padding: 6px 14px; font-size: 13px; font-weight: 600; border: 1px solid var(--sepia-300); background: #ffffff; color: var(--text-secondary); cursor: pointer; border-radius: 4px; }
.index-tab.active { background: var(--brand-primary); color: #ffffff; border-color: var(--brand-primary); }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 16px; max-width: 1800px; margin: 0 auto; }
@media (max-width: 1200px) { .dashboard-grid { grid-template-columns: 1fr; } }

.chart-card { background: #ffffff; border: 1px solid var(--sepia-200); border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-title { font-size: 14px; font-weight: 700; color: var(--brand-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.chart-container { height: 300px; width: 100%; }

.sticky-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sticky-table th { position: sticky; top: 0; background: #ffffff; z-index: 2; padding: 8px; border-bottom: 1px solid var(--sepia-200); text-align: left; color: var(--text-secondary); }
.sticky-table td { padding: 8px; border-bottom: 1px solid var(--sepia-50); color: var(--text-primary); }

/* Badges */
.badge-row { display: flex; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--sepia-200); background: #ffffff; align-items: center; }
.badge { display: inline-flex; gap: 6px; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--sepia-200); font-size: 12px; font-weight: 700; background: var(--sepia-50); }
.b-green { background: #e8f5f0; color: var(--success); border-color: #b7e3d7; }
.b-red { background: #fdecea; color: var(--danger); border-color: #f5c2c0; }
.b-gray { background: var(--sepia-50); color: var(--text-secondary); border-color: var(--sepia-200); }

/* Utility */
.calendar-input { padding: 6px; font-size: 13px; border: 1px solid var(--sepia-300); border-radius: 4px; }
.loading-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.8); display: none; align-items: center; justify-content: center; z-index: 10000; color: white; }
.loading-overlay.show { display: flex; }
.loading-spinner { border: 3px solid rgba(255,255,255,0.1); border-top: 3px solid white; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =========================================
   REDESIGN OVERRIDES (From index_new.html)
   ========================================= */
.paywall-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.pw-tab {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.pw-tab:hover { color: #1e40af; background: #f1f5f9; }
.pw-tab.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
    background: #ffffff;
}

/* Override .paywall-plans grid gap/margin if needed */
.paywall-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
/* Override .plan-btn */
.plan-btn {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 80px;
}
.plan-btn:hover { border-color: #cbd5e1; }
.plan-btn.active {
    border-color: #1e40af;
    background: #eff6ff;
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.1);
}
.plan-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.plan-top strong { font-size: 1.1rem; color: #0f172a; }
.plan-tag { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; color: #64748b; }
.plan-desc { font-size: 0.8rem; color: #64748b; }
.plan-btn.active .plan-desc { color: #1e40af; font-weight: 500; }