:root {
  color-scheme: light;
  --ink: #070808;
  --surface: #f8f9f2;
  --canvas: #ecefe6;
  --line: #cbd2bf;
  --muted: #596451;
  --accent: #a9da50;
  color: var(--ink);
  background: var(--canvas);
  font: 15px/1.5 "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #5b7c26; outline-offset: 3px; }
.top { background: var(--ink); color: var(--surface); border-bottom: 3px solid var(--accent); }
.top-inner, main { width: min(1080px, calc(100% - 44px)); margin-inline: auto; }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; letter-spacing: -.025em; font-size: 20px; }
.brand span { display: grid; place-items: center; width: 31px; height: 31px; color: var(--ink); background: var(--accent); clip-path: polygon(0 0, 80% 0, 100% 20%, 100% 100%, 20% 100%, 0 80%); }
.top nav, .filters { display: flex; align-items: center; gap: 4px; }
.top nav a, .filters a { padding: 8px 13px; text-decoration: none; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--accent); }
.top nav { flex-wrap: wrap; }
.top-exit { background: transparent; color: inherit; border-color: #525b48; }
.top-exit:hover { color: var(--accent); background: transparent; }
main { padding-block: 30px 48px; }
.heading { border-left: 4px solid var(--accent); padding-left: 15px; margin-bottom: 24px; }
h1 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin: 0; }
h2 { font-size: 20px; margin: 0; overflow-wrap: anywhere; }
.heading p, .muted, small { color: var(--muted); }
.heading p { margin: 7px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--line); }
.panel + .panel { margin-top: 16px; }
.filters { padding: 10px; flex-wrap: wrap; }
.filters a:hover { background: #e9edde; }
.filters a[aria-current] { background: var(--ink); color: var(--surface); }
.filters a[aria-current] small { color: var(--accent); }
.filters small { margin-inline-start: 4px; }
.ticket-list, .metrics { margin: 0; padding: 0; list-style: none; }
.ticket-link { display: grid; grid-template-columns: minmax(0, 1fr) 155px 105px 80px; align-items: center; gap: 15px; padding: 12px 19px; border-top: 1px solid var(--line); text-decoration: none; }
.ticket-link:hover { background: #eef3e4; }
.row-title { min-width: 0; }
.row-title > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time, .metrics span, td:last-child { font-variant-numeric: tabular-nums; }
.row-time { color: var(--muted); font-size: 13px; }
.status { justify-self: end; color: var(--ink); background: #e8ecdf; white-space: nowrap; padding: 3px 7px; font-size: 12px; }
.status.open { background: #f0e5c8; }
.status.in_progress { background: #dcebc6; }
.empty, .pagination { border-top: 1px solid var(--line); padding: 22px; margin: 0; }
.empty { color: var(--muted); }
.pagination { text-align: right; }
.back { display: inline-block; margin-bottom: 12px; }
.detail { padding: 18px 21px; }
.detail-header, .overview-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { margin-block: 4px; font-size: 13px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 17px; padding-block: 15px; border-block: 1px solid var(--line); }
.status-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
select, button { background: var(--surface); color: var(--ink); padding: 8px 12px; border: 1px solid var(--line); font: inherit; }
button { font-weight: 700; background: var(--accent); cursor: pointer; }
button:hover { background: #b8e75f; }
.overview-header { padding-right: 16px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.metrics li { background: var(--surface); padding: 11px 15px; }
.metrics div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; }
.metrics meter { width: 100%; height: 10px; accent-color: #719c2b; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); background: #e9edde; font-weight: 600; }
th:last-child, td:last-child { text-align: right; }
.table-wrap { overflow-x: auto; }
.signin-body { display: grid; min-height: 100dvh; place-items: center; padding: 28px 0; }
.signin-main { width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); background: var(--surface); }
.signin-brand { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 19px 26px; border-bottom: 3px solid var(--accent); background: var(--ink); color: var(--surface); }
.signin-brand p { color: #d6decb; margin: 0; font-size: 13px; }
.signin-card { padding: clamp(22px, 6vw, 35px); }
.signin-card h1 { font-size: clamp(26px, 6vw, 34px); }
.signin-subtitle, .signin-links { margin: 9px 0 0; color: var(--muted); }
.signin-links { margin-top: 18px; }
.signin-error, .success { padding: 10px 13px; background: #f6e4e0; border-left: 3px solid #8c3525; color: #691d12; }
.success { background: #e4f0d0; border-color: #63803c; color: #324620; }
.stack-form { display: grid; align-content: start; gap: 14px; margin-top: 20px; }
.stack-form label { display: grid; gap: 5px; font-weight: 650; }
.stack-form input:not([type=hidden]) { min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); color: var(--ink); background: #fff; font: inherit; font-weight: 400; }
.stack-form > button { min-height: 43px; margin-top: 2px; }
.usage-summary, .usage-forms { display: grid; gap: 12px; margin: 0 0 16px; }
.usage-summary { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.usage-summary div { padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); }
.usage-summary dt { color: var(--muted); }
.usage-summary dd { margin: 2px 0; font-size: 21px; font-variant-numeric: tabular-nums; font-weight: 700; }
.usage-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.usage-forms .panel { margin-top: 0; }
@media (max-width: 640px) {
  .top-inner, main { width: calc(100% - 24px); }
  main { padding-top: 24px; }
  .ticket-link { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 11px; padding: 10px 12px; }
  .row-title { grid-column: 1 / -1; }
  .row-client { grid-column: 1; grid-row: 2; }
  .row-time { grid-column: 1; grid-row: 3; }
  .status { grid-column: 2; grid-row: 2 / 4; }
  .detail { padding-inline: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .top nav a { padding: 5px 8px; }
  .usage-forms { grid-template-columns: minmax(0, 1fr); }
}
