:root {
    --c-bg: #F4F5F2;
    --c-surface: #FFFFFF;
    --c-alt: #EDF0EC;
    --c-ink: #0F172A;
    --c-muted: #475569;
    --c-line: #D5DCD6;
    --c-pine: #145346;
    --c-pine-dark: #0D3B31;
    --c-pine-soft: #E5F2EE;
    --c-bad: #B91C1C;
    --c-warn: #B45309;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--c-bg); color: var(--c-ink); font-family: 'Inter', system-ui, sans-serif; line-height: 1.45; overflow-x: hidden; }
code, .c2d-mono { font-family: 'JetBrains Mono', monospace; }
.is-hidden { display: none !important; }

.c2d-landing-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #E3EFEA, #F4F5F2 60%); }
.c2d-auth-card { max-width: 640px; width: 100%; background: #FFF; border: 1px solid var(--c-line); border-radius: 18px; padding: 32px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08); }
.c2d-auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.c2d-auth-brand h1 { margin: 2px 0 0; font-family: 'Instrument Serif', Georgia, serif; font-size: 32px; font-weight: 400; }
.c2d-emblem { width: 42px; height: 42px; border-radius: 11px; background: var(--c-pine); color: #FFF; display: grid; place-items: center; flex-shrink: 0; }
.c2d-kicker { font: 800 10.5px 'JetBrains Mono', monospace; letter-spacing: 0.09em; color: var(--c-pine); text-transform: uppercase; }
.c2d-auth-desc { color: var(--c-muted); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.c2d-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.c2d-feat { background: var(--c-alt); padding: 11px; border-radius: 10px; font-size: 12px; }
.c2d-feat strong { display: block; margin-bottom: 3px; font-size: 12.5px; }
.c2d-btn-stack { display: flex; flex-direction: column; gap: 9px; }
.c2d-auth-foot { margin-top: 16px; font-size: 11.5px; color: var(--c-muted); text-align: center; }

/* TOPBAR */
.c2d-topbar { background: #0F1A17; color: #FFF; position: sticky; top: 0; z-index: 30; }
.c2d-topbar__inner { max-width: 1380px; margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.c2d-brand { display: flex; align-items: center; gap: 12px; }
.c2d-brand .c2d-kicker { color: #6EE7B7; }
.c2d-topbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.c2d-op-pill { background: rgba(255,255,255,0.08); padding: 5px 11px; border-radius: 8px; font-size: 12px; }
.c2d-op-pill strong { display: block; }
.c2d-op-pill span { color: #94A3B8; font-size: 11px; }

.c2d-nav { max-width: 1380px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.1); }
.c2d-nav-btn { background: transparent; border: none; color: #CBD5E1; padding: 11px 14px; font: 600 13px 'Inter', sans-serif; cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.c2d-nav-btn:hover { color: #FFF; }
.c2d-nav-btn.is-active { color: #6EE7B7; border-bottom-color: #34D399; }

/* MAIN */
.c2d-main { max-width: 1380px; margin: 0 auto; padding: 24px 20px 64px; }
.c2d-section { display: none; }
.c2d-section.is-active { display: block; }

.c2d-toast { margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; background: #065F46; color: #FFF; font-size: 13.5px; font-weight: 600; }
.c2d-toast.is-error { background: #991B1B; }

.c2d-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.c2d-kpi { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 12px; padding: 15px 16px; }
.c2d-kpi span { display: block; font-size: 11.5px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; }
.c2d-kpi strong { font-size: 25px; font-weight: 800; color: var(--c-pine); font-family: 'JetBrains Mono', monospace; }

.c2d-two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.c2d-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px; padding: 20px; }
.c2d-card h2 { margin: 0 0 6px; font-size: 17px; }
.c2d-sub { margin: 0 0 14px; font-size: 13px; color: var(--c-muted); }

label { display: block; font-size: 12px; font-weight: 700; margin: 9px 0 4px; color: #334155; }
.c2d-input { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--c-line); font: 500 13px 'Inter', sans-serif; background: #FFF; color: var(--c-ink); }
.c2d-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }

.c2d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 15px; border-radius: 9px; border: 1px solid transparent; font: 700 13px 'Inter', sans-serif; cursor: pointer; text-decoration: none; }
.c2d-btn--sm { padding: 6px 10px; font-size: 12px; border-radius: 7px; }
.c2d-btn--full { width: 100%; }
.c2d-btn--primary { background: var(--c-pine); color: #FFF; }
.c2d-btn--primary:hover { background: var(--c-pine-dark); }
.c2d-btn--ghost { background: var(--c-alt); color: var(--c-ink); border-color: var(--c-line); }
.c2d-topbar .c2d-btn--ghost { background: rgba(255,255,255,0.1); color: #FFF; border-color: rgba(255,255,255,0.2); }
.c2d-btn--danger { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }

.c2d-empty-slot { padding: 28px; border: 2px dashed var(--c-line); border-radius: 12px; text-align: center; color: var(--c-muted); font-size: 13px; }
.c2d-preview-box { border: 1px solid var(--c-line); border-radius: 12px; padding: 16px; background: #F8FAFC; text-align: center; }
.c2d-preview-box svg { width: 185px; height: 185px; background: #FFF; padding: 6px; border: 1px solid var(--c-line); border-radius: 8px; }

.c2d-table-wrap { overflow-x: auto; }
.c2d-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.c2d-table th, .c2d-table td { padding: 9px 10px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: middle; }
.c2d-table th { font-size: 11px; text-transform: uppercase; color: var(--c-muted); background: var(--c-alt); }

.c2d-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 11px 'JetBrains Mono', monospace; }
.c2d-pill--ok { background: #ECFDF5; color: #065F46; }
.c2d-pill--bad { background: #FEF2F2; color: #B91C1C; }
.c2d-pill--warn { background: #FFFBEB; color: #B45309; }
.c2d-list-compact { display: flex; flex-direction: column; gap: 8px; }
.c2d-list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; background: var(--c-alt); border-radius: 9px; font-size: 13px; }

@media (max-width: 960px) {
    .c2d-two-col, .c2d-feature-grid { grid-template-columns: 1fr; }
}
