
:root {
  color-scheme: dark;
  --canvas: #171719; --panel: #202024; --surface: #26262b;
  --ink: #f6f3f4; --muted: #b9b3b8; --line: #3d393f; --accent: #f5aeba;
  font: 16px/1.5 system-ui, sans-serif;
  background: var(--canvas); color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: #77434f; color: var(--ink); }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p, ol, ul, dl, dd { margin: 0; }
h1 { font-size: 1.75rem; letter-spacing: -.025em; line-height: 1.2; }
h2 { font-size: 1rem; font-weight: 700; }
button, input { font: inherit; }
button, input, .plain { min-height: 44px; border-radius: 8px; }
button, .plain { padding: 8px 14px; font-weight: 650; }
button { border: 1px solid var(--accent); background: var(--accent); color: #25181d; cursor: pointer; }
button:hover { background: #ffc1cb; }
input { width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid #666068; color: var(--ink); background: var(--panel); }
input::placeholder { color: var(--muted); opacity: 1; }
.muted, .detail, .count { color: var(--muted); }
.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; align-items: stretch; gap: 24px; background: var(--panel); border-right: 1px solid var(--line); padding: 24px 16px 16px; }
.brand { color: var(--ink); padding-inline: 10px; text-decoration: none; font-size: 1.25rem; font-weight: 750; letter-spacing: -.025em; }
.tabs { display: grid; gap: 4px; }
.tabs a { padding: 9px 10px; border-radius: 8px; min-height: 44px; text-decoration: none; font-weight: 600; color: var(--muted); }
.tabs a:hover { background: var(--surface); color: var(--ink); }
.tabs a[aria-current] { color: var(--accent); background: #392b33; }
.sidebar form { margin-top: auto; }
.plain { display: inline-flex; align-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; }
.plain:hover { background: var(--surface); }
.shell { width: 100%; min-width: 0; padding: 28px clamp(18px, 4vw, 54px) 36px; }
.preview-note { margin: 0 0 10px; color: #f5d9a1; font-size: .85rem; }
.heading { margin: 0 0 20px; }
.heading h1 { display: flex; align-items: baseline; gap: 12px; }
.heading p { margin-top: 6px; }
.count { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.search { flex: 1 1 330px; max-width: 530px; display: flex; gap: 8px; align-items: center; }
.filters, .pager { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters a { padding-block: 8px; }
.filters a[aria-current] { color: var(--ink); font-weight: 650; text-decoration: none; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; scrollbar-color: #625760 var(--canvas); }
table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: .9rem; }
th, td { padding: 13px 16px; text-align: left; vertical-align: middle; }
th { background: var(--panel); color: var(--muted); font-weight: 650; }
td { border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cell-label { display: none; }
.cell-value { min-width: 0; }
tbody tr:hover { background: var(--panel); }
.detail { display: block; font-size: .81rem; margin-top: 3px; }
.order-id, time { font-variant-numeric: tabular-nums; }
table time { white-space: nowrap; }
.person { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.person:hover strong { color: var(--accent); }
.avatar { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #ffdbe0; background: #513945; font-size: .875rem; font-weight: 750; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-large { width: 72px; height: 72px; font-size: 1.35rem; }
.status { display: inline-block; border-radius: 999px; padding: 3px 9px; font-weight: 600; font-size: .8rem; white-space: nowrap; }
.good { color: #b2e6c8; background: #253f34; }
.wait { color: #f5d9a1; background: #4b3826; }
.alert { color: #ffc2cb; background: #542f38; }
.neutral { color: var(--muted); background: var(--surface); }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 26px; color: var(--muted); }
.pager { justify-content: flex-end; padding: 14px 0; }
.back { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 12px; }
.profile-header { display: flex; align-items: center; gap: 16px; padding: 0 0 24px; border-bottom: 1px solid var(--line); }
.profile-header h1 { overflow-wrap: anywhere; }
.profile-header p { margin-top: 3px; }
.profile-grid { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(0, 1.7fr); }
.profile-info { padding: 20px 18px 20px 0; border-right: 1px solid var(--line); }
.profile-activity { padding: 20px 0 20px 22px; }
.profile-grid h2 { margin-bottom: 12px; }
.facts { display: grid; gap: 6px; }
.facts div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 10px; background: var(--panel); border-radius: 6px; font-size: .88rem; }
.facts dt { color: var(--muted); }
.facts dd { text-align: right; overflow-wrap: anywhere; }
.timeline, .profile-orders ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.event { width: fit-content; max-width: 100%; padding: 9px 13px; border-radius: 12px 12px 12px 3px; background: var(--panel); }
.event strong { font-size: .9rem; }
.profile-orders { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.profile-order { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--panel); border-radius: 8px; }
.order-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.login { max-width: 420px; margin: min(15vh, 140px) auto 24px; width: calc(100% - 36px); padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.login form { margin-top: 20px; display: grid; gap: 10px; }
.error { color: #ffc2cb; }
@media (max-width: 940px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar form { margin: 0 0 0 auto; }
  .brand { padding-inline: 0; }
  .tabs { display: flex; gap: 2px; }
}
@media (max-width: 620px) {
  .tabs { order: 1; width: 100%; }
  .tabs a { flex: 1 1 0; padding-inline: 4px; text-align: center; font-size: .875rem; }
  .shell { padding-top: 20px; }
  .heading h1 { font-size: 1.5rem; }
  .toolbar { margin-bottom: 12px; }
  .table-wrap { overflow: visible; border: 0; border-radius: 0; }
  table, tbody { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  tbody { display: grid; gap: 10px; }
  tbody tr { display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 4px 12px 9px; }
  td { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 8px; padding: 6px 0; border: 0; }
  td:first-child { display: block; border-bottom: 1px solid var(--line); margin-bottom: 4px; padding: 6px 0 10px; }
  .cell-label { display: block; color: var(--muted); }
  table time, td .status { white-space: normal; }
  .person { min-height: 44px; width: 100%; }
  .profile-header { gap: 12px; padding-bottom: 16px; }
  .avatar-large { width: 60px; height: 60px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-info { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); }
  .profile-activity { padding-left: 0; }
  .search { flex-wrap: wrap; }
  .search input { flex: 1 1 215px; }
}
