:root {
    --navy: #11263f;
    --teal: #1f8a8a;
    --gold: #caa75d;
    --bg: #f5f7fa;
    --ink: #182331;
    --muted: #64748b;
    --line: #dde5ee;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
h1 { font-size: 1.8rem; margin-bottom: .75rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }

.auth-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy), #153d4e 60%, var(--teal)); }
.auth-shell { width: min(980px, 94vw); display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
.auth-brand { color: white; }
.auth-brand h1 { font-size: clamp(2rem, 5vw, 4rem); }
.auth-brand p { font-size: 1.15rem; max-width: 34rem; color: #d7edf0; }
.auth-card, .panel { background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 16px 40px rgba(17,38,63,.08); padding: 1.25rem; margin-bottom: 1rem; }
.auth-links { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .92rem; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { background: var(--navy); color: white; padding: 1.25rem; }
.admin-side { background: #1c2430; }
.brand { display: block; color: white; text-decoration: none; font-weight: 800; margin-bottom: 1.5rem; font-size: 1.15rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav a { color: #dbeafe; text-decoration: none; padding: .7rem .8rem; border-radius: 6px; }
.sidebar nav a:hover { background: rgba(255,255,255,.1); color: white; }
.main { min-width: 0; }
.topbar { height: 64px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; }
.content { padding: 1.5rem; max-width: 1180px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.metric-card { display: grid; gap: .5rem; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 1rem; text-decoration: none; }
.metric-card span { color: var(--muted); }
.metric-card strong { font-size: 2rem; color: var(--teal); }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.action-grid a { background: white; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 1rem; text-decoration: none; font-weight: 700; }
.cards-list { display: grid; gap: 1rem; }
.upgrade-dashboard-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.pricing div { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.pricing span { display: block; color: var(--teal); margin-top: .5rem; }
.upgrade-hero {
    background: linear-gradient(135deg, #10243c, #173853 62%, #1f8a8a);
    color: white;
    border: 0;
}
.upgrade-copy {
    max-width: 700px;
}
.upgrade-eyebrow {
    display: inline-block;
    margin-bottom: .75rem;
    padding: .35rem .65rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 0;
}
.upgrade-hero h1 {
    margin-bottom: .75rem;
    font-size: 2.2rem;
}
.upgrade-hero .muted {
    color: rgba(255,255,255,.84);
    max-width: 48rem;
}
.upgrade-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}
.upgrade-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 1rem;
    padding: 1.4rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(17,38,63,.08);
}
.upgrade-card-featured {
    border-color: rgba(202,167,93,.55);
    box-shadow: 0 18px 44px rgba(17,38,63,.12);
}
.upgrade-badge {
    justify-self: start;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: rgba(202,167,93,.18);
    color: #7b5b1d;
    font-size: .82rem;
    font-weight: 700;
}
.upgrade-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}
.upgrade-price span {
    margin-left: .3rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
}
.upgrade-description {
    margin: 0;
    color: #334155;
}
.upgrade-points {
    margin: 0;
    padding-left: 1.1rem;
    color: #475569;
}
.upgrade-points li + li {
    margin-top: .45rem;
}
.upgrade-button {
    width: 100%;
    padding: .8rem 1rem;
    font-weight: 700;
}
.btn-outline-primary {
    color: var(--teal);
    border-color: var(--teal);
}
.btn-outline-primary:hover {
    color: white;
    background: var(--teal);
    border-color: var(--teal);
}
.btn-primary { background: var(--teal); border-color: var(--teal); }
.btn-primary:hover { background: #166f6f; border-color: #166f6f; }

.print-body { background: white; padding: 2rem; }
.print-page { max-width: 800px; margin: 0 auto; }
.print-button { position: fixed; right: 1rem; top: 1rem; padding: .6rem 1rem; }
@media print {
    .no-print { display: none; }
    body { background: white; }
}

@media (max-width: 820px) {
    .auth-shell, .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content { padding: 1rem; }
    .upgrade-dashboard-card { flex-direction: column; align-items: stretch; }
    .upgrade-grid { grid-template-columns: 1fr; }
    .upgrade-hero h1 { font-size: 1.9rem; }
}
