:root {
    --bg: #0f172a;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #4f46e5;
    --brand-ink: #3730a3;
    --accent: #38bdf8;
    --danger: #dc2626;
    --radius: 14px;
    --wrap: 1080px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #f1f5f9;
    line-height: 1.55;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.25rem;
}

a { color: var(--brand-ink); }

/* ---- header ------------------------------------------------------------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--ink);
}
.brand span { color: var(--brand); }
.site-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-nav a:hover { color: var(--ink); }
.site-nav .who { color: var(--muted); font-size: 0.9rem; }

/* ---- main / footer ------------------------------------------------------ */
.site-main { padding: 2.5rem 0 3.5rem; min-height: calc(100vh - 64px - 60px); }
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.85rem;
}
.site-footer .wrap { height: 60px; display: flex; align-items: center; }

/* ---- buttons ------------------------------------------------------------ */
.btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 0.6rem 1.05rem;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f8fafc; color: var(--ink); }
.btn-block { width: 100%; margin-top: 0.4rem; }

/* ---- cards / forms ------------------------------------------------------ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { margin-top: 0; }
.narrow { display: flex; justify-content: center; }

label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0.85rem 0 0.3rem; }
input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.hint { margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--muted); }
.muted { color: var(--muted); }
.switch { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.alert { border-radius: 10px; padding: 0.7rem 0.85rem; margin-bottom: 0.5rem; font-size: 0.9rem; }
.alert.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* ---- welcome hero ------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
}
.hero-copy h1 { font-size: 2.4rem; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 0.75rem; }
.hero-copy .lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 1.25rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: #fff; background: var(--brand);
    width: 1.15rem; height: 1.15rem; border-radius: 50%;
    display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
}

/* ---- dashboard ---------------------------------------------------------- */
.page-head { margin-bottom: 1.75rem; }
.page-head h1 { margin: 0 0 0.25rem; font-size: 1.8rem; letter-spacing: -0.02em; }
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.panel h2 { margin-top: 0; font-size: 1.15rem; }
.placeholder {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
    .hero-copy h1 { font-size: 2rem; }
}
