:root {
    --bg: #f3f3f1;
    --panel: #ffffff;
    --ink: #111111;
    --muted: #6d6d68;
    --line: #d9d9d4;
    --accent: #d3131f;
    --dark: #151515;
    --sidebar: #101010;
    --sidebar-muted: #909090;
    --shadow: 0 16px 40px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    background: var(--panel);
}
.login-brand {
    position: relative;
    background: var(--dark);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.login-brand::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -210px;
    bottom: -180px;
    border: 1px solid rgba(255,255,255,.13);
    transform: rotate(18deg);
}
.login-logo-box {
    width: min(350px, 72%);
    min-height: 180px;
    display: flex;
    align-items: flex-start;
}
.login-logo-box img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.login-kicker {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #d0d0d0;
}
.login-brand h1 {
    max-width: 640px;
    margin: 18px 0 16px;
    font-size: clamp(46px, 5vw, 78px);
    line-height: .94;
    letter-spacing: -.055em;
    font-weight: 820;
}
.login-brand p { max-width: 560px; color: #bdbdbd; line-height: 1.6; font-size: 15px; }
.brand-foot { color: #777; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.login-panel {
    display: grid;
    place-items: center;
    padding: 48px;
}
.login-card { width: min(430px, 100%); }
.login-card .eyebrow,
.page-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
}
.login-card h2 {
    margin: 12px 0 8px;
    font-size: 38px;
    letter-spacing: -.04em;
}
.login-card .intro { margin: 0 0 34px; color: var(--muted); line-height: 1.55; }
.field { margin-bottom: 18px; }
.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.field input {
    width: 100%;
    height: 52px;
    border: 1px solid #bdbdb8;
    border-radius: 0;
    background: #fff;
    padding: 0 14px;
    outline: none;
    transition: border-color .16s, box-shadow .16s;
}
.field input:focus { border-color: #111; box-shadow: inset 3px 0 0 var(--accent); }
.login-btn {
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 0;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    letter-spacing: .03em;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.login-btn:hover { background: var(--accent); }
.login-btn:active { transform: translateY(1px); }
.error {
    border-left: 3px solid var(--accent);
    background: #fff1f1;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
}
.login-note { margin-top: 22px; color: #999; font-size: 12px; line-height: 1.5; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 256px minmax(0, 1fr); }
.sidebar {
    min-height: 100vh;
    background: var(--sidebar);
    color: #fff;
    padding: 26px 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #242424;
}
.sidebar-logo {
    min-height: 156px;
    padding: 4px 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.sidebar-logo img {
    display: block;
    width: 100%;
    max-width: 205px;
    height: auto;
    object-fit: contain;
}
.nav-label { color: #5e5e5e; font-size: 10px; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; margin: 0 10px 10px; }
.nav { display: grid; gap: 6px; }
.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    color: var(--sidebar-muted);
    border-left: 2px solid transparent;
    font-size: 14px;
    font-weight: 650;
}
.nav a:hover { color: #fff; background: #181818; }
.nav a.active { color: #fff; background: #1a1a1a; border-left-color: var(--accent); }
.nav svg { width: 18px; height: 18px; }
.sidebar-spacer { flex: 1; }
.sidebar-meta { border-top: 1px solid #2a2a2a; padding-top: 18px; color: #737373; font-size: 11px; line-height: 1.6; }
.logout { margin-top: 14px; color: #c8c8c8; display: inline-flex; gap: 8px; align-items: center; font-size: 13px; }
.logout:hover { color: #fff; }

.main { min-width: 0; }
.topbar {
    height: 78px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}
.mobile-menu { display: none; }
.topbar-title { font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.user-chip { display: flex; align-items: center; gap: 11px; font-size: 13px; color: #555; }
.user-dot { width: 9px; height: 9px; background: #24a148; }
.content { padding: 34px; max-width: 1540px; margin: 0 auto; }
.hero {
    background: var(--panel);
    border: 1px solid var(--line);
    min-height: 278px;
    padding: 40px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 40px;
    box-shadow: var(--shadow);
}
.hero h1 { margin: 10px 0 14px; font-size: clamp(38px, 5vw, 68px); line-height: .96; letter-spacing: -.055em; max-width: 760px; }
.hero p { margin: 0; max-width: 680px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hero-side {
    border-left: 1px solid var(--line);
    padding-left: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hero-side-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.hero-time { font-size: 44px; font-weight: 800; letter-spacing: -.045em; margin-top: 6px; }
.hero-date { color: var(--muted); font-size: 13px; margin-top: 4px; }
.hero-mark { font-size: 13px; font-weight: 800; border-top: 4px solid var(--accent); padding-top: 10px; width: 120px; }

.grid { margin-top: 22px; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 18px; }
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 24px;
    min-height: 182px;
}
.card h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.card-number { font-size: 42px; font-weight: 820; letter-spacing: -.04em; margin: 18px 0 3px; }
.card-sub { color: var(--muted); font-size: 12px; }
.card.accent { border-top: 4px solid var(--accent); }
.card.dark { background: var(--dark); color: #fff; border-color: var(--dark); }
.card.dark p, .card.dark .card-sub { color: #a8a8a8; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }

.quick-list { margin-top: 18px; border-top: 1px solid var(--line); }
.quick-item { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.quick-item strong { font-size: 12px; }
.quick-item .disabled { color: #aaa; }
.status { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 850; color: var(--accent); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 36px 0 14px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.mobile-logo { display: none; }

@media (max-width: 1050px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-brand { min-height: 310px; padding: 34px; }
    .login-brand h1 { font-size: 52px; }
    .brand-foot { display: none; }
    .login-panel { padding: 42px 24px; }
    .app-shell { grid-template-columns: 210px minmax(0,1fr); }
    .hero { grid-template-columns: 1fr; }
    .hero-side { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; flex-direction: row; align-items: end; gap: 20px; }
    .span-3 { grid-column: span 6; }
    .span-4 { grid-column: span 6; }
    .span-8 { grid-column: span 12; }
}

@media (max-width: 760px) {
    .login-brand { min-height: 255px; padding: 26px 22px; }
    .login-logo-box { width: 225px; min-height: 118px; }
    .login-brand h1 { font-size: 39px; margin-top: 12px; }
    .login-brand p { font-size: 13px; }
    .app-shell { display: block; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-101%); transition: transform .2s ease; box-shadow: 14px 0 50px rgba(0,0,0,.22); }
    body.menu-open .sidebar { transform: translateX(0); }
    .topbar { height: 68px; padding: 0 18px; }
    .mobile-menu { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; border-radius: 0; cursor: pointer; }
    .mobile-logo { display: block; height: 37px; width: 82px; object-fit: contain; margin-left: 10px; }
    .topbar-left { display: flex; align-items: center; }
    .topbar-title { display: none; }
    .user-chip span:last-child { display: none; }
    .content { padding: 18px; }
    .hero { padding: 24px; min-height: auto; box-shadow: none; }
    .hero h1 { font-size: 42px; }
    .hero-side { align-items: flex-start; flex-direction: column; }
    .hero-time { font-size: 36px; }
    .grid { gap: 12px; }
    .span-3, .span-4, .span-6, .span-8 { grid-column: span 12; }
    .card { min-height: 150px; }
}
