:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #090909;
  --line: #363636;
  --muted: #bdbdbd;
  --gold: #ffb500;
  --text: #fff;
  --green: #ffb500;
  --red: #fff;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: #000; color: var(--text); font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { outline-offset: 3px; }
button { cursor: pointer; border: 1px solid var(--line); background: #121212; color: var(--text); padding: 9px 14px; border-radius: 7px; font-weight: 600; }
button:hover { border-color: var(--gold); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--gold); }
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--gold); color: #000; border-color: var(--gold); }
.primary:hover { background: #ffc640; }
.danger { border-color: var(--gold); color: var(--gold); }
a { color: var(--gold); }
.shell { min-height: 100vh; min-width: 0; }
aside { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; width: 100%; min-width: 0; padding: 12px clamp(18px, 3vw, 56px); background: #000; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; flex: none; min-width: 195px; }
.badge { font-size: 25px; font-weight: 900; background: var(--gold); color: #000; width: 46px; height: 49px; display: grid; place-items: center; clip-path: polygon(0 0,100% 0,100% 80%,50% 100%,0 80%); }
.brand strong { letter-spacing: .12em; font-size: 15px; }
.brand small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
nav { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
nav button { flex: none; white-space: nowrap; background: transparent; border-color: transparent; padding: 10px 12px; color: var(--muted); }
nav button.active { background: #1a1606; color: var(--gold); border-color: #6b4e00; }
.aside-bottom { display: none; }
main { width: min(100%, 1800px); min-width: 0; margin: 0 auto; padding: clamp(20px, 2.5vw, 48px); }
.topline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 30px; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.profile { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 12px; letter-spacing: normal; text-transform: none; }
.profile img, .avatar-fallback { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--gold); color: #000; display: grid; place-items: center; font-weight: 800; }
.version-badge { border: 1px solid var(--line); padding: 3px 7px; border-radius: 5px; color: var(--gold); font-size: 11px; letter-spacing: .03em; text-transform: none; }
.status { display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.dot.off { background: #fff; }
.heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 24px 0; }
.eyebrow { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; margin: 0 0 6px; }
h1 { font-size: clamp(27px, 2.3vw, 38px); letter-spacing: -.035em; line-height: 1.15; margin: 0 0 10px; }
h2 { font-size: 19px; margin: 0 0 16px; }
h3 { font-size: 17px; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.muted, .help { color: var(--muted); }
.notice { padding: 12px 16px; background: #171100; border: 1px solid #805b00; border-radius: 8px; color: #fff; margin-bottom: 22px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin: 28px 0; }
.metric { border: 1px solid var(--line); background: var(--panel); padding: 20px; border-radius: 10px; min-width: 0; }
.metric strong { display: block; font-size: 32px; font-weight: 600; margin-top: 9px; color: var(--gold); }
.metric span { font-size: 12px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 22px; }
.grid > *, .split > *, .two > *, .three-teams > * { min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 11px; padding: 24px; background: var(--panel); margin-bottom: 18px; min-width: 0; overflow-wrap: anywhere; }
.card-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.pill { display: inline-block; padding: 3px 9px; border: 1px solid #715300; background: #231b07; color: var(--gold); border-radius: 20px; font-size: 11px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.pill.warning { background: #1d1d1d; color: #fff; border-color: #777; }
.pill.closed, .pill.cancelled { background: #121212; color: #ddd; border-color: #555; }
.details { display: flex; flex-wrap: wrap; gap: 18px 25px; border-block: 1px solid var(--line); padding: 14px 0; margin: 15px 0; }
.details small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.empty { padding: 30px 15px; text-align: center; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.roster { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 17px; }
.member { font-size: 12px; padding: 5px 9px; border-radius: 5px; background: #131313; border: 1px solid var(--line); }
.member.confirmed { border-color: var(--gold); }
.member.unavailable { border-color: #fff; }
.small { font-size: 12px; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.list-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row p { margin: 4px 0 0; }
label { display: block; font-size: 13px; color: #fff; margin: 15px 0 6px; }
input, textarea, select { width: 100%; min-width: 0; background: #050505; border: 1px solid #666; color: var(--text); padding: 10px 12px; border-radius: 6px; }
textarea { min-height: 110px; resize: vertical; }
select[multiple] { min-height: 135px; }
input[type=checkbox] { width: auto; margin-right: 9px; accent-color: var(--gold); }
.two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.three-teams { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.help { font-size: 12px; margin: 6px 0 0; }
dialog { background: #090909; border: 1px solid var(--gold); border-radius: 12px; color: var(--text); width: min(820px, calc(100vw - 32px)); max-height: min(90vh, 1000px); padding: 28px; }
dialog::backdrop { background: #000c; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.dialog-head h2 { margin: 0; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 12px 22px; background: var(--gold); color: #000; border-radius: 8px; box-shadow: 0 10px 40px #0008; max-width: 90vw; display: none; z-index: 20; }
#toast.error { background: #fff; color: #000; }
.login { max-width: 480px; margin: 15vh auto; padding: 38px; }
.login .brand { margin-bottom: 22px; }
.login a { display: inline-block; text-decoration: none; padding: 11px 18px; border-radius: 7px; }
.loading { padding: 50px; text-align: center; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
td, th { text-align: left; border-bottom: 1px solid var(--line); padding: 12px 10px; }
th { color: var(--muted); }
.table-wrap { overflow: auto; }
.preview { background: #131313; border-left: 4px solid var(--gold); border-radius: 5px; padding: 20px; margin: 16px 0; white-space: pre-wrap; }
.preview h3 { white-space: normal; }
.checklist { max-height: 170px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; }
.checklist label { display: flex; align-items: center; margin: 7px 0; }
.checklist input { flex-shrink: 0; }
.form-error { color: var(--gold); margin-top: 12px; }
.footer { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 25px; color: var(--muted); font-size: 12px; }
.announcement-thumb { display: block; width: min(100%,320px); max-height: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }
.pie-layout { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; }
.pie { width: 210px; height: 210px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.pie span { width: 124px; height: 124px; border-radius: 50%; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.pie small { font-size: 11px; font-weight: 400; color: var(--muted); }
.pie-legend { min-width: min(100%,200px); flex: 1; }
.pie-legend > div { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.pie-legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.pie-legend strong { margin-left: auto; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 750px) { aside { display: block; padding: 10px 16px; } .brand { margin-bottom: 8px; } nav { margin-inline: -4px; } nav button { padding: 8px 10px; } main { padding: 18px; } .heading { align-items: flex-start; flex-direction: column; } .topline { margin-bottom: 18px; } .two, .three-teams { grid-template-columns: 1fr; } .card { padding: 18px; } dialog { padding: 18px; } }
@media (max-width: 480px) { .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; } .metric { padding: 13px; } .metric strong { font-size: 25px; } .profile span:last-child { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pie { width: 180px; height: 180px; } .pie span { width: 106px; height: 106px; } }
