:root {
    --accent: #d3ad8d;
    --accent-strong: #a97d60;
    --panel: rgba(105, 79, 64, .9);
    --line: rgba(239, 218, 198, .28);
    --text: #fff8f0;
    --muted: #ead7c6;
}

* { box-sizing: border-box; font-family: Inter, system-ui, sans-serif; }
body {
    margin: 0; min-height: 100vh; color: var(--text);
    background: linear-gradient(145deg, #ad8b72, #816452 48%, #5b4438) fixed;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.shell { width: min(1120px, calc(100% - 32px)); margin: auto; padding: 28px 0 60px; }
.nav { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:36px; }
.brand { font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.nav-links { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.pill, .primary, .secondary {
    border:1px solid var(--line); border-radius:999px; padding:9px 15px;
    color:var(--text); background:rgba(78,58,48,.72); cursor:pointer;
}
.primary { background:linear-gradient(135deg,#e7cdb2,var(--accent-strong)); color:#38251c; font-weight:750; }
.secondary:hover, .pill:hover { border-color:var(--accent); }
.small-btn { border:1px solid var(--line); border-radius:9px; padding:6px 9px; color:var(--text); background:#765845; cursor:pointer; white-space:nowrap; }
.small-btn:hover { border-color:var(--accent); }
.danger { border-color:rgba(153,65,65,.55); color:#8f3030; }
.actions { display:flex; gap:6px; flex-wrap:wrap; }
.session-edit { display:flex; align-items:center; gap:6px; }
.session-number { position:relative; width:72px; }
.session-number input { width:100%; border:1px solid var(--line); border-radius:8px; padding:6px 22px 6px 7px; background:#594236; color:var(--text); outline:none; appearance:textfield; -moz-appearance:textfield; }
.session-number input:focus { border-color:var(--accent); }
.session-number input::-webkit-inner-spin-button,.session-number input::-webkit-outer-spin-button { appearance:none; margin:0; }
.session-arrows { position:absolute; top:1px; right:1px; bottom:1px; width:19px; display:grid; grid-template-rows:1fr 1fr; overflow:hidden; border-left:1px solid var(--line); border-radius:0 7px 7px 0; }
.session-arrow { position:relative; min-width:0; padding:0; border:0; background:#765845; color:var(--accent); cursor:pointer; }
.session-arrow:first-child { border-bottom:1px solid var(--line); }
.session-arrow::before { content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:0; height:0; border-left:3.5px solid transparent; border-right:3.5px solid transparent; }
.session-arrow[data-step="up"]::before { border-bottom:4px solid currentColor; }
.session-arrow[data-step="down"]::before { border-top:4px solid currentColor; }
.session-arrow:hover,.session-arrow:focus-visible { background:var(--accent); color:#493226; outline:none; }
.badge { display:inline-block; border-radius:999px; padding:4px 8px; background:rgba(148,163,184,.16); font-size:11px; white-space:nowrap; }
.badge.ok { color:#3f6d4c; }.badge.warn { color:#8a651d; }.badge.bad { color:#963f3f; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:22px; padding:24px; box-shadow:none; }
.auth-wrap { min-height:calc(100vh - 120px); display:grid; place-items:center; }
.auth-page { overflow-x:hidden; }
#auth-garden { position:fixed; inset:0; z-index:0; pointer-events:none; }
.auth-page .auth-wrap { position:relative; z-index:1; }
.auth-card { width:min(440px,100%); position:relative; box-shadow:0 24px 70px rgba(53,35,27,.22); backdrop-filter:blur(12px); }
h1,h2,p { margin-top:0; }
.muted { color:var(--muted); }
.field { display:grid; gap:7px; margin:14px 0; }
.field input { border:1px solid var(--line); border-radius:12px; padding:12px; background:#594236; color:var(--text); outline:none; }
.field input:focus { border-color:var(--accent); }
.full { width:100%; }
.message { min-height:24px; margin:12px 0 0; color:#9b3535; font-size:14px; }
.success { color:#3d714a; }
.tabs { display:flex; gap:8px; margin-bottom:20px; }
.tabs button.active { background:var(--accent); color:#38251c; }
.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.stats-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.metric strong { display:block; margin-top:8px; font-size:30px; }
.wide { grid-column:1/-1; }
.chart { height:220px; display:flex; align-items:flex-end; gap:12px; padding-top:25px; }
.bar-wrap { flex:1; min-width:0; text-align:center; color:var(--muted); font-size:12px; }
.bar { min-height:3px; border-radius:10px 10px 3px 3px; background:linear-gradient(var(--accent),var(--accent-strong)); margin-bottom:8px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:700px; }
th,td { padding:12px 10px; text-align:left; border-bottom:1px solid var(--line); }
th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.07em; }
.hidden { display:none !important; }
@media(max-width:720px){ .grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wide{grid-column:1/-1}.nav{align-items:flex-start}.chart{gap:6px}.card{padding:18px}.metric strong{font-size:23px} }
@media(max-width:430px){ .stats-grid{grid-template-columns:1fr} }
