@font-face {
  font-family: "Neutraface Text";
  src: url("/static/fonts/NeutrafaceText-Book.woff2") format("woff2"), url("/static/fonts/NeutrafaceText-Book.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Neutraface Text";
  src: url("/static/fonts/NeutrafaceText-Demi.woff2") format("woff2"), url("/static/fonts/NeutrafaceText-Demi.woff") format("woff");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: "Neutraface Text", "Segoe UI", sans-serif;
  color: #000;
  background: #f5f1eb;
  font-synthesis: none;
  --red: #ac1416;
  --red-bright: #c20e1a;
  --red-dark: #8d1711;
  --beige: #e1d1bd;
  --brown: #6f5137;
  --turquoise: #9bb4b4;
  --blue: #324664;
  --green: #334d33;
  --green-light: #9caf5a;
  --paper: #fff;
  --canvas: #f5f1eb;
  --line: #ddd5ca;
  --muted: #756f68;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 980px; margin: 0; background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 0 24px 26px;
  border-right: 1px solid #d7cabb;
  background: var(--paper);
  color: #000;
}
.sidebar::before { width: calc(100% + 48px); height: 9px; margin-left: -24px; background: var(--red); content: ""; }
.brand { display: flex; align-items: center; gap: 13px; padding: 29px 0 37px; }
.brand-mark {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.brand small { margin-top: 2px; color: var(--brown); font-size: 11px; letter-spacing: .03em; }
nav { display: grid; gap: 3px; }
.nav-item {
  position: relative;
  border: 0;
  border-bottom: 1px solid #ebe5de;
  padding: 14px 8px 13px 20px;
  background: transparent;
  color: #615b55;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}
.nav-item::before {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 6px;
  height: 6px;
  background: var(--beige);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}
.nav-item:hover { color: var(--red); }
.nav-item.is-active { color: var(--red); font-weight: 600; }
.nav-item.is-active::before { background: var(--red); }
.privacy-note { display: flex; align-items: flex-start; gap: 11px; margin-top: auto; border-top: 1px solid var(--beige); padding: 20px 1px 0; }
.privacy-note > span { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 3px; border-radius: 50%; background: var(--green-light); }
.privacy-note strong, .privacy-note small { display: block; }
.privacy-note strong { color: var(--green); font-size: 12px; font-weight: 600; }
.privacy-note small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
main { min-height: 100vh; margin-left: 252px; padding: 0 42px 36px; }
.topbar { display: flex; min-height: 112px; align-items: center; justify-content: space-between; border-bottom: 1px solid #d9cec2; }
.eyebrow { color: var(--red); font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin-top: 5px; font-size: 30px; font-weight: 400; letter-spacing: -.015em; }
h2 { margin-top: 4px; font-size: 19px; font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.mode-badge { border: 0; border-left: 3px solid var(--turquoise); padding: 6px 9px; background: #e9efed; color: var(--green); font-size: 10px; font-weight: 600; letter-spacing: .03em; }
#refresh { border: 1px solid var(--red); padding: 8px 14px; background: transparent; color: var(--red); font-size: 11px; font-weight: 600; }
#refresh:hover { background: var(--red); color: #fff; }
.admin-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; font-weight: 600; }
.admin-identity { display: flex; align-items: center; gap: 9px; margin-left: 3px; }
.admin-identity strong { display: block; max-width: 130px; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#logout { border: 0; padding: 1px 0; background: transparent; color: var(--brown); font-size: 9px; text-decoration: underline; text-underline-offset: 2px; }
#logout:hover { color: var(--red); }
.page { display: none; padding-top: 25px; }
.page.is-active { display: block; }
.notice { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; border-left: 4px solid var(--red); padding: 12px 16px; background: #f0e5d8; color: var(--brown); font-size: 12px; }
.notice strong { color: var(--red-dark); font-weight: 600; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #d9cec2; }
.metric, .panel { background: var(--paper); }
.metric { min-height: 143px; padding: 22px 21px; }
.metric:nth-child(1) { border-top: 4px solid var(--red); }
.metric:nth-child(2) { border-top: 4px solid var(--brown); }
.metric:nth-child(3) { border-top: 4px solid var(--turquoise); }
.metric:nth-child(4) { border-top: 4px solid var(--blue); }
.metric > span { color: #4f4a45; font-size: 12px; }
.metric strong { display: block; margin: 12px 0 7px; color: #000; font-size: 30px; font-weight: 400; letter-spacing: -.025em; }
.metric small, .subtle { color: var(--muted); font-size: 10px; }
.cost-panel { margin-top: 18px; border: 1px solid var(--line); background: var(--paper); }
.cost-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 18px 22px; }
.cost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cost-grid > div { min-height: 112px; border-right: 1px solid var(--line); padding: 19px 22px; }
.cost-grid > div:last-child { border-right: 0; }
.cost-grid span { color: #4f4a45; font-size: 11px; }
.cost-grid strong { display: block; margin: 9px 0 6px; color: var(--green); font-size: 25px; font-weight: 400; }
.cost-grid small { color: var(--muted); font-size: 9px; }
.split-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, .8fr); gap: 18px; margin: 18px 0; }
.panel { border: 1px solid var(--line); padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.legend span { width: 13px; height: 4px; background: var(--red); }
.chart { display: flex; height: 180px; align-items: end; gap: 5px; padding-top: 10px; border-bottom: 1px solid #d8cec3; background: repeating-linear-gradient(to bottom, #fff 0, #fff 43px, #eee9e3 44px); }
.bar { position: relative; min-width: 4px; flex: 1; background: var(--red); opacity: .78; }
.bar:nth-child(4n + 2) { background: var(--red-dark); }
.bar:hover { background: var(--red-bright); opacity: 1; }
.bar::after { position: absolute; right: 50%; bottom: -19px; color: var(--muted); content: attr(data-label); font-size: 8px; transform: translateX(50%); }
.status-list { display: grid; }
.status-list > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 9px; border-bottom: 1px solid #ece6df; padding: 12px 0; color: #5e5852; font-size: 12px; }
.status-list > div:last-child { border: 0; }
.status-list strong { color: #000; font-size: 15px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--turquoise); }
.status-dot.online { background: var(--green-light); }
.status-dot.blocked { background: var(--red); }
.status-dot.warning { background: var(--brown); }
.month-list { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.month { text-align: center; }
.month-track { display: flex; height: 78px; align-items: end; justify-content: center; background: #f0ebe5; overflow: hidden; }
.month-fill { width: 100%; min-height: 3px; background: var(--blue); }
.month:nth-child(3n + 2) .month-fill { background: var(--turquoise); }
.month:nth-child(3n) .month-fill { background: var(--red); }
.month span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-heading { margin: 0; padding: 22px; }
#user-search { width: 235px; border: 0; border-bottom: 1px solid #9a8c7d; padding: 8px 4px; outline: none; background: transparent; font-size: 12px; }
#user-search:focus { border-color: var(--red); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: #eee4d8; color: var(--brown); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
th, td { border-top: 1px solid #e5ddd4; padding: 13px 15px; white-space: nowrap; }
td { color: #4f4a45; font-size: 11px; }
tbody tr:hover { background: #faf7f3; }
.user-cell strong, .user-cell small { display: block; }
.user-cell strong { color: #000; font-size: 12px; font-weight: 600; }
.user-cell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.access-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: #e8eddd; color: var(--green); font-size: 9px; font-weight: 600; }
.access-badge.blocked { background: #f2dede; color: var(--red-dark); }
.access-badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.access-button { border: 1px solid var(--blue); padding: 5px 9px; background: #fff; color: var(--blue); font-size: 9px; font-weight: 600; }
.access-button:hover { background: var(--blue); color: #fff; }
.access-button.danger { border-color: var(--red); color: var(--red); }
.access-button.danger:hover { background: var(--red); color: #fff; }
.access-button:disabled { cursor: wait; opacity: .45; }
.footer-status { min-height: 18px; margin-top: 12px; color: var(--brown); font-size: 10px; text-align: right; }

.login-page { min-width: 0; min-height: 100vh; background: var(--paper); }
.login-page::before { position: fixed; inset: 0 0 auto; height: 9px; background: var(--red); content: ""; }
.login-shell { display: grid; min-height: 100vh; margin: 0; padding: 0; grid-template-columns: minmax(340px, .85fr) minmax(440px, 1.15fr); }
.login-brand { display: flex; min-height: 100vh; flex-direction: column; justify-content: center; padding: 70px clamp(42px, 7vw, 110px); background: #f0e5d8; }
.login-brand-mark { display: grid; width: 54px; height: 54px; margin-bottom: 58px; place-items: center; background: var(--red); color: #fff; font-size: 16px; font-weight: 600; letter-spacing: .08em; }
.login-brand h1 { margin: 9px 0 17px; font-size: clamp(38px, 5vw, 66px); line-height: .95; }
.login-brand > p:last-child { max-width: 410px; color: var(--brown); font-size: 16px; line-height: 1.55; }
.login-card { width: min(430px, calc(100% - 80px)); margin: auto; border-top: 5px solid var(--red); padding: 39px 0 0; }
.login-card h2 { margin: 9px 0 15px; font-size: 34px; }
.login-card > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.55; }
.login-card form { display: grid; margin: 30px 0 31px; }
.login-card label { margin: 15px 0 7px; color: var(--brown); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.login-card input { width: 100%; border: 1px solid #cfc4b8; padding: 12px 13px; background: #fff; color: #000; font-size: 14px; outline: none; }
.login-card input:focus { border-color: var(--red); box-shadow: inset 3px 0 var(--red); }
.login-error { min-height: 18px; margin: 10px 0 3px; color: var(--red-dark); font-size: 11px; }
.login-card form button { width: 100%; border: 1px solid var(--red); padding: 14px 18px; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; }
.login-card form button:hover { background: var(--red-dark); }
.login-card form button:disabled { cursor: wait; opacity: .65; }
.login-security { display: flex; gap: 11px; border-top: 1px solid var(--beige); padding-top: 20px; }
.login-security > span { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 3px; border-radius: 50%; background: var(--green-light); }
.login-security strong, .login-security small { display: block; }
.login-security strong { color: var(--green); font-size: 11px; font-weight: 600; }
.login-security small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .cost-heading { align-items: flex-start; flex-direction: column; }
  .split-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 70px 32px 48px; }
  .login-brand-mark { margin-bottom: 38px; }
  .login-card { width: calc(100% - 64px); margin: 55px 32px 70px; }
}
