/* Leveland Account - flat admin-panel look. Grays + orange. No external fonts or inline styles (strict CSP). */
:root {
  --bg: #151516;        /* page */
  --side: #0f0f10;      /* sidebar */
  --panel: #1c1d1f;     /* cards */
  --panel-2: #26282b;   /* hover / raised */
  --input: #1c1d1f;
  --line: #3a3d42;
  --text: #ececee;
  --muted: #9a9ea6;
  --accent: #ff7a1a;    /* Leveland orange */
  --accent-hi: #ff913f;
  --on-accent: #1d1206;
  --ok: #5fcf8a; --err: #ff6b5e; --warn: #f5b942;
  --radius: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #eceef0; --side: #1f2022; --panel: #ffffff; --panel-2: #f3f4f6; --input: #ffffff; --line: #d6d9de;
    --text: #1f2124; --muted: #646a73; --accent: #f26b0a; --accent-hi: #ff7a1a; --on-accent: #fff; --ok: #1f9d55; --err: #d9382b; --warn: #b7791f; }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); line-height: 1.5; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.fine { color: var(--muted); font-size: .82rem; margin: 14px 0 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- login (Jenkins-style: one plain centred form) ---------- */
body.auth { background: #0b0b0c; }
body.auth::before { content: ""; position: fixed; inset: -12px; z-index: -1; background: #0b0b0c url(/static/login-bg.webp) center bottom / cover no-repeat; filter: blur(2.5px); }
body.auth::after { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(8,8,9,.25); }
body.auth .center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login { width: 100%; max-width: 360px; text-align: center; }
.login-logo { border-radius: 10px; display: block; margin: 0 auto 18px; }
.login h1 { font-size: 1.3rem; font-weight: 600; margin: 0 0 22px; }
.login form { text-align: left; background: rgba(24,25,27,.82); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; }
.login .alert { text-align: left; }
.login .fine { text-align: center; }
body.auth .foot { margin-top: 26px; color: #b9bcc3; }

/* ---------- forms ---------- */
label { display: block; font-size: .85rem; font-weight: 600; margin: 16px 0 6px; }
label:first-child, form > label:first-of-type { margin-top: 0; }
input[type=text], input[type=password], textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--input);
  border: 1px solid var(--line); border-radius: 6px; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.pw { position: relative; } .pw input { padding-right: 62px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted);
  font: inherit; font-size: .78rem; font-weight: 600; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.eye:hover { color: var(--text); background: var(--panel-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; font-size: .9rem;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line); padding: 8px 14px; border-radius: 6px;
  cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--muted); }
.btn.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.small { padding: 5px 10px; font-size: .8rem; }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, var(--line)); background: transparent; }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 12%, transparent); }
.btn.block { width: 100%; margin-top: 22px; padding: 11px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.alert { padding: 10px 13px; border-radius: 6px; font-size: .9rem; margin: 0 0 16px; border: 1px solid; border-left-width: 4px; }
.alert.err { color: var(--err); background: color-mix(in srgb, var(--err) 10%, var(--panel)); border-color: var(--err); }
.alert.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); border-color: var(--ok); }
.alert.info { color: var(--text); background: var(--panel); border-color: var(--line); border-left-color: var(--accent); }

/* ---------- app shell: left sidebar + top bar ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 212px; flex: none; background: var(--side); color: #ececee; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; border-right: 1px solid #232426; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px; text-decoration: none; color: #fff; }
.brand img { border-radius: 4px; }
.brand span { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; line-height: 1.1; }
.brand small { display: block; font-weight: 500; letter-spacing: .32em; font-size: .62rem; color: #b9bcc3; margin-top: 3px; }
.nav { padding: 12px 0 6px; }
.nav-bottom { margin-top: auto; padding: 8px 0 18px; border-top: 1px solid #232426; }
.nav-sep { height: 1px; background: #232426; margin: 12px 18px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 16px; margin-bottom: 2px; color: #b9bcc3; text-decoration: none;
  font-weight: 500; border-left: 3px solid transparent; }
.nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { color: #fff; background: #17181a; }
.nav a[aria-current=page] { color: var(--accent); border-left-color: var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700; color: #fff; background: #3a3d42; flex: none; width: 34px; height: 34px; font-size: .8rem; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: flex-end; align-items: center; padding: 10px 28px; position: relative; z-index: 5; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.usermenu summary::-webkit-details-marker { display: none; }
.chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.menu { position: absolute; right: 0; top: 48px; min-width: 210px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; line-height: 1.3; }
.menu-who span { color: var(--muted); font-size: .8rem; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; font: inherit;
  color: var(--text); text-decoration: none; border-radius: 6px; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--panel-2); }
.menu form { margin: 0; }
.wrap { flex: 1; width: 100%; padding: 0 28px 32px; margin-top: -54px; position: relative; }
.pagehead { margin: 54px 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pagehead h1 { margin: 0; font-size: 1.45rem; font-weight: 700; }
.pagehead p { margin: 4px 0 0; }
.foot { text-align: center; color: var(--muted); font-size: .75rem; padding: 12px; }

/* ---------- settings: inner left tabs ---------- */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; max-width: 1180px; }
.subnav { position: sticky; top: 16px; align-self: start; }
.sub-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.sub-label:first-child { padding-top: 0; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 2px; color: var(--muted); text-decoration: none; border-radius: 6px; font-weight: 500; }
.subnav a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.subnav a:hover { color: var(--text); background: var(--panel); }
.subnav a[aria-current=page] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sbody .pagehead { margin-top: 0; }
.sbody { max-width: 860px; }
.wrap:has(.settings) { padding-top: 54px; }
@media (max-width: 820px) { .settings { grid-template-columns: 1fr; gap: 14px; } .subnav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .sub-label { display: none; } .subnav a { margin: 0; background: var(--panel); } }

/* ---------- home ---------- */
.cols, .pagehead, .wrap > .alert, .wrap > .grid, .wrap > .empty { max-width: 1180px; }
.cols .kv { grid-template-columns: 1fr; gap: 2px; } .cols .kv dd { margin-bottom: 12px; overflow-wrap: anywhere; } .cols .kv dd:last-child { margin-bottom: 0; }
.hero { margin: 0 -28px 22px; padding: 70px 28px 22px; min-height: 180px; background: linear-gradient(90deg, rgba(8,8,9,.75), rgba(8,8,9,0) 60%), #101011 url(/static/hero.webp) 70% center / cover no-repeat;
  border-bottom: 1px solid var(--line); }
.hero .hello { margin: 0 0 4px; color: #c9ccd2; font-size: .95rem; }
.hero h1 { margin: 0; font-size: 1.8rem; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.cols { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.stack { display: grid; gap: 22px; }
.sechead h2 { margin: 0 0 10px; font-size: 1rem; font-weight: 700; }
.qa { display: grid; gap: 8px; }
.qbtn { display: flex; align-items: center; gap: 12px; padding: 11px 15px; color: var(--text); text-decoration: none; font-weight: 500;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.qbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.qbtn:hover { border-color: var(--muted); }
.qbtn.hot { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.list .row { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list .row:first-child { padding-top: 0; } .list .row:last-child { border-bottom: 0; padding-bottom: 0; }
.grow { flex: 1; }
.ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nomargin { margin: 0 !important; }
.empty { text-align: center; padding: 56px 22px; }
.empty svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.empty h3 { margin: 12px 0 6px; font-size: 1.15rem; }
.empty p { margin: 0; }

/* ---------- cards & content ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card h2 { margin: 0 0 14px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 0; }
.chip { padding: 3px 9px; font-size: .8rem; font-weight: 600; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); }
.badge { display: inline-block; padding: 2px 8px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 4px; color: var(--on-accent); background: var(--accent); vertical-align: middle; }
.admin-note { margin: 18px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); font-size: .9rem; }
.soon { border-style: dashed; }
.sessions { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.sessions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.sessions form { margin: 0; }

.meter { height: 5px; border-radius: 3px; background: var(--line); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--err); transition: width .2s, background .2s; }
.meter[data-s="1"] i { width: 25%; } .meter[data-s="2"] i { width: 50%; background: var(--warn); }
.meter[data-s="3"] i { width: 75%; background: var(--ok); } .meter[data-s="4"] i { width: 100%; background: var(--ok); }
#match.good { color: var(--ok); } #match.bad { color: var(--err); }

/* ---------- small screens ---------- */
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid #232426; }
  .brand { padding: 12px 14px; }
  .nav { display: flex; padding: 0 6px; } .nav-bottom { margin: 0; border: 0; padding: 0 6px; }
  .nav a { border-left: 0; border-bottom: 3px solid transparent; padding: 10px 12px; margin: 0; }
  .nav a[aria-current=page] { background: none; border-bottom-color: var(--accent); }
  .nav-sep { display: none; }
  .topbar { padding: 10px 16px; }
  .wrap { padding: 0 16px 32px; margin-top: 0; } .pagehead { margin-top: 22px; }
  .hero { margin: 0 -16px 22px; padding: 40px 16px 22px; min-height: 0; } .hero h1 { font-size: 1.6rem; }
}
