:root {
    --navy: #2a2629;
    --navy-deep: #151315;
    --accent: #db297a;
    --accent-dark: #a91f5e;
    --green: #1f9f68;
    --pink: #db297a;
    --ink: #262126;
    --muted: #746d72;
    --line: #e2dde0;
    --canvas: #f7f5f6;
    --soft-accent: #fae8f0;
    --warning: #fff6df;
    --radius: 20px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: 16px; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: clamp(1.35rem, 2vw, 2rem); letter-spacing: -.025em; }
h3 { margin-bottom: 5px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }
.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 22px; background: linear-gradient(180deg, var(--navy-deep), var(--navy)); color: white; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: 1.05rem; }
.brand small { display: block; margin-top: 2px; color: #a9bfd5; }
.brand-mark { display: block; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 9px 14px rgba(0,0,0,.16)); }
.primary-nav { display: grid; gap: 6px; margin-top: 42px; }
.primary-nav a { padding: 12px 14px; border-radius: 12px; color: #dce9f4; text-decoration: none; font-weight: 700; }
.primary-nav a:hover, .primary-nav a:focus-visible { background: rgba(255,255,255,.1); color: white; }
.primary-nav form { margin: 0; }
.primary-nav .nav-action { width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; color: #d9d4d7; text-align: left; font-weight: 700; }
.primary-nav .nav-action:hover { background: rgba(255,255,255,.1); color: white; }
.sidebar-note { margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; color: #cfe0ef; font-size: .82rem; }
.status-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: #50d39e; box-shadow: 0 0 0 4px rgba(80,211,158,.14); }
.page-shell { min-width: 0; }
.topbar { min-height: 82px; padding: 18px clamp(24px, 4vw, 56px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); display: flex; justify-content: space-between; align-items: center; }
.topbar > div:first-child { display: grid; gap: 4px; }
.eyebrow { margin: 0; color: var(--accent); font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
.environment { color: var(--muted); font-size: .86rem; }
.user-chip { min-width: 36px; min-height: 36px; border-radius: 999px; background: var(--soft-accent); }
.account-actions { display: flex; align-items: center; gap: 12px; }
.account-actions form { margin: 0; }
.sign-out { padding: 7px 10px; border: 0; background: transparent; color: var(--muted); font-weight: 700; }
.sign-out:hover { color: var(--accent); }
.content { width: min(1420px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 56px); }
.hero { padding: clamp(28px, 5vw, 64px); border-radius: 28px; background: linear-gradient(135deg, #fff 5%, #fbf0f5 100%); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); gap: 40px; align-items: center; box-shadow: 0 20px 45px rgba(38, 33, 38, .08); }
.lede, .page-heading > p:last-child { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.hero-badge { padding: 22px; border-radius: var(--radius); background: white; border: 1px solid #cfe4de; display: flex; gap: 14px; align-items: center; }
.hero-badge small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.shield { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 50%; color: white; background: var(--accent); font-weight: 900; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0 48px; }
.metric { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; margin: 8px 0; font-size: 1.45rem; }
.section-heading { margin: 32px 0 18px; display: flex; justify-content: space-between; gap: 20px; align-items: end; }
.section-heading h2 { margin-bottom: 0; }
.text-link { color: var(--accent-dark); font-weight: 800; text-decoration: none; }
.area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; display: flex; align-items: center; gap: 16px; }
.area-card p, .tool-row p, .feature-card p, .notice p { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.area-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--soft-accent); color: var(--accent); font-weight: 900; }
.page-heading { margin-bottom: 40px; }
.page-heading h1 { margin: 8px 0 14px; font-size: clamp(2rem, 3.5vw, 3.5rem); }
.tool-section { margin: 32px 0; }
.tool-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.tool-row { padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; }
.tool-row + .tool-row { border-top: 1px solid var(--line); }
.pill { padding: 6px 10px; border-radius: 999px; background: #f1edef; color: var(--muted); font-size: .76rem; font-weight: 800; }
.button { display: inline-flex; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; align-items: center; justify-content: center; background: var(--accent); color: white; font-weight: 800; text-decoration: none; }
.button-secondary { border-color: #d4cdd1; background: white; color: var(--ink); }
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { min-height: 230px; padding: 26px; border-radius: var(--radius); background: white; border: 1px solid var(--line); }
.feature-card > span { display: inline-block; margin-bottom: 34px; color: var(--accent); font-weight: 900; }
.notice { margin-top: 24px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); }
.notice-warning { background: var(--warning); border-color: #ead59d; }
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(circle at top left, #f9dfe9, transparent 42%), var(--canvas); }
.auth-card { width: min(540px, 100%); padding: clamp(28px, 6vw, 56px); border-radius: 28px; background: white; border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(38, 33, 38,.14); }
.auth-card .brand-mark { margin-bottom: 32px; }
.auth-card h1 { margin: 8px 0 16px; font-size: clamp(2rem, 5vw, 3.2rem); }
.auth-card p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.auth-card .button { margin-top: 12px; }
.auth-form, .form-card { display: grid; gap: 10px; margin-top: 28px; }
.auth-form label, .form-card label { margin-top: 6px; color: var(--ink); font-size: .82rem; font-weight: 800; }
.auth-form .form-control, .form-card .form-control { min-height: 50px; border-color: var(--line); border-radius: 12px; }
.auth-form .form-control:focus, .form-card .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 .22rem rgba(219,41,122,.13); }
.auth-form .button, .form-card .button { margin-top: 12px; }
.validation-summary, .field-validation-error { color: #a3263c; font-size: .82rem; }
.validation-summary:empty { display: none; }
.form-card { max-width: 620px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.compact-heading h1 { font-size: clamp(2rem, 3vw, 3.2rem); }
.password-form { gap: 12px; }

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; width: auto; height: auto; padding: 18px 22px; flex-direction: row; align-items: center; gap: 22px; }
    .primary-nav { display: flex; margin: 0 0 0 auto; }
    .sidebar-note { display: none; }
    .hero { grid-template-columns: 1fr; }
    .area-grid, .security-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 660px) {
    .primary-nav a { padding: 11px 9px; font-size: .86rem; }
    .brand small { display: none; }
    .topbar { min-height: 64px; }
    .metric-grid, .area-grid, .security-grid { grid-template-columns: 1fr; }
    .tool-row { grid-template-columns: 1fr auto; }
    .tool-row .button { grid-column: 1 / -1; }
}
