:root {
  color-scheme: light;
  color: #1b283a;
  background: #f7f9fc;
  font: 14px/1.5 system-ui, sans-serif;
  --blue: #325f96;
  --soft: #e5edf7;
  --line: #dfe6ef;
  --muted: #516174;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #285183; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.25; letter-spacing: -.02em; }
h2 { font-size: 17px; }
header p, .muted, small { color: var(--muted); }
header p { margin-top: 5px; }
button, input, select, textarea { font: inherit; color: inherit; }
.shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100vh; }
.shell > main { padding: 30px clamp(16px, 3vw, 42px); }
.shell > aside { display: flex; flex-direction: column; padding: 25px 16px; background: #fbfcfe; }
.brand { color: inherit; font-weight: 750; }
.shell aside nav { margin-top: 34px; display: grid; gap: 5px; }
nav a, .plain { padding: 9px 12px; border-radius: 9px; color: inherit; }
.overview nav a:first-child, .requests nav a:last-child { background: var(--soft); font-weight: 650; }
aside form { margin-top: auto; }
.preview { color: var(--muted); margin: 16px 0; padding: 8px 10px; background: #edf2f8; border-radius: 7px; font-size: 12px; }
.plain { border: 0; background: none; cursor: pointer; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 14px; margin: 21px 0; }
.filters label, .reply { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.filters input, .filters select, textarea { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; background: white; min-width: 0; }
.button { display: inline-flex; align-items: center; padding: 8px 12px; min-height: 37px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #285183; font-weight: 600; cursor: pointer; }
.button:hover { background: #eef4fb; text-decoration: none; }
.primary, .primary:hover { background: var(--blue); color: white; border-color: var(--blue); }
.danger { color: #983c39; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.public-metrics { margin-top: 21px; }
.kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 17px; }
.kpi strong, .big { font-size: 32px; font-weight: 700; }
.emphasis { background: var(--soft); }
.analysis { display: grid; grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); gap: 16px; margin-top: 16px; }
.analysis section { padding: 19px; }
.analysis ul { padding: 0; list-style: none; }
.analysis li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.chart-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); margin-top: 8px; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 10px; margin-top: 16px; }
.chart-day { text-align: center; color: var(--muted); font-size: 12px; }
.bars { display: flex; align-items: end; justify-content: center; gap: 4px; min-height: 100px; margin-bottom: 7px; border-bottom: 1px solid var(--line); }
.bars svg { width: min(100%, 46px); height: 82px; display: block; }
.topics { margin-top: 16px; padding: 19px; }
.topics ul { list-style: none; padding: 0; }
.topics li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.registry { overflow: auto; }
.meta, .pagination { padding: 13px 16px; display: flex; gap: 8px; align-items: center; }
.row { min-width: 780px; display: grid; grid-template-columns: .7fr 2fr .75fr 1.25fr 1fr .9fr .9fr; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); color: inherit; }
.row small { display: block; }
.table-head { background: #f2f6fa; font-size: 12px; font-weight: 650; }
a.row:hover { background: #f4f8fd; text-decoration: none; }
.ticket { color: #285183; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; white-space: nowrap; border-radius: 5px; padding: 2px 7px; font-size: 12px; background: var(--soft); color: #285183; }
.badge.working { background: #f3ede1; color: #79541b; }
.badge.closed { background: #e8f2ec; color: #2e6854; }
.badge.overdue { background: #f9e9e6; color: #9b3e3c; }
.empty, .notice { padding: 12px; color: var(--muted); }
.scrim { position: fixed; inset: 0; background: rgb(27 40 58 / 25%); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(100%, 500px); overflow: auto; background: white; box-shadow: -6px 0 25px rgb(27 40 58 / 9%); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 24px; border-bottom: 1px solid var(--line); color: var(--muted); }
.drawer-body { padding: 22px 24px; }
.drawer-body > p { margin-top: 8px; }
.fields, .context { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields { padding: 14px; background: #f2f6fa; }
.fields > div:last-child { border-top: 1px solid var(--line); padding-top: 10px; grid-column: 1 / -1; }
dt { font-size: 12px; color: var(--muted); }
dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; }
.context, .action-area { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.action-area form { margin-bottom: 9px; }
.action-area p { margin-block: 6px 10px; }
.reply { margin-bottom: 8px; }
textarea { resize: vertical; width: 100%; }
body:has(.drawer) { overflow: hidden; }
.notice { background: #f2f6fa; border-radius: 7px; }
.signin { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.signin section { width: min(100%, 430px); padding: 26px; }
.signin section > * { margin-bottom: 12px; }
.signin .code { font: 650 27px/1.2 ui-monospace, monospace; letter-spacing: .14em; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .shell > aside { display: flex; flex-direction: row; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 16px; }
  .shell aside nav { margin: 0; display: flex; }
  .shell aside form { margin: 0; }
}
@media (max-width: 620px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis { grid-template-columns: 1fr; }
  .drawer-body, .drawer-head { padding-inline: 16px; }
}
