:root {
  --brand: #ee0b00;
  --brand-dark: #bb0900;
  --canvas: #f9f9fb;
  --surface: #ffffff;
  --ink: #020019;
  --muted: #81819b;
  --line: #e8e8ef;
  --hover: #f2f2f7;
  --success: #418c63;
  --warning: #b46708;
  --danger: #ff234f;
  --layout-width: 1160px;
  --aside-width: 376px;
  --gap: 12px;
  --radius-control: 4px;
  --radius-button: 8px;
  --radius-card: 12px;
}

* { box-sizing: border-box; }
body { min-width: 0; margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.shell { width: var(--layout-width); margin: 0 auto; }
.site-header { position: sticky; z-index: 10; top: 0; height: 50px; background: var(--canvas); }
.header-inner { display: flex; height: 100%; align-items: center; }
.brand { display: flex; width: 76px; height: 24px; align-items: center; opacity: 1; transition: opacity 180ms ease; }
.brand:hover { opacity: .7; }
.brand img { width: 100%; height: 100%; object-fit: contain; }
.page-shell { padding: 16px 0 49px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 772px) var(--aside-width); gap: var(--gap); align-items: start; }
.main-column { min-width: 0; }
.panel, .aside { background: var(--surface); border-radius: var(--radius-card); }
.panel { padding: 28px; }
.aside { position: sticky; top: 66px; padding: 8px; }
.aside-nav { display: grid; gap: 2px; }
.aside-link { display: flex; min-height: 32px; padding: 8px; align-items: center; border-radius: var(--radius-control); color: var(--ink); font-size: 14px; line-height: 16px; transition: background 180ms ease; }
.aside-link:hover, .aside-link.active { background: var(--hover); }
h1, h2 { letter-spacing: 0; line-height: 1.2; }
h1 { margin: 0; font-size: 30px; }
h2 { margin: 0; font-size: 20px; }
.panel-copy { max-width: 600px; margin: 10px 0 0; color: var(--muted); }
.document-form, .auth-form { display: grid; gap: 16px; max-width: 550px; margin-top: 26px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 400; }
input { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); outline: 0; background: var(--canvas); color: var(--ink); font-size: 16px; }
input[type="file"] { padding: 8px 10px; background: var(--surface); font-size: 14px; }
input:hover { border-color: #b3b3c6; }
input:focus { border-color: var(--brand); background: var(--surface); }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid transparent; border-radius: var(--radius-button); font-size: 14px; font-weight: 600; text-decoration: none; }
.button-primary { justify-self: start; background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { margin-top: 26px; border-color: var(--line); background: var(--surface); color: var(--ink); }
.button-secondary:hover { background: var(--hover); }
.form-error { max-width: 550px; margin: 20px 0 0; padding: 12px 16px; border: 1px solid rgb(255 35 79 / 35%); border-radius: var(--radius-button); background: #fff3f5; color: var(--danger); font-size: 14px; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 25px 0 20px; color: var(--success); font-size: 14px; font-weight: 500; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.invoice-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.invoice-data div { min-width: 0; padding: 16px 14px 16px 0; border-bottom: 1px solid var(--line); }
.invoice-data .wide { grid-column: 1 / -1; }
dt { margin-bottom: 4px; color: var(--muted); font-size: 13px; }
dd { margin: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 500; }
.task-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.task-block h2 { margin-bottom: 8px; }
.task-block p { margin: 0 0 20px; color: var(--muted); }
.queue-panel { padding-bottom: 12px; }
.queue { margin-top: 25px; border-top: 1px solid var(--line); }
.queue-row { display: grid; grid-template-columns: 145px minmax(160px, 1fr) 112px 185px; gap: 14px; align-items: center; margin: 0 -12px; padding: 15px 12px; border-bottom: 1px solid var(--line); font-size: 14px; transition: background 150ms ease; }
.queue-row > span { min-width: 0; overflow-wrap: anywhere; }
.queue-row:hover { background: var(--hover); }
.invoice-id { font-weight: 600; }
.queue-status { color: var(--warning); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.back-link { display: inline-flex; margin: 0 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; }
.back-link:hover { color: var(--brand); }
.flag-row { padding-left: 12px !important; border-left: 3px solid var(--brand); background: #fff3f2; }
.flag-row dd { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.logout-form { margin: 14px 8px 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.logout-form button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 14px; }
.logout-form button:hover { color: var(--brand); }
.brand:focus-visible, .aside-link:focus-visible, .button:focus-visible, .back-link:focus-visible, .logout-form button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 1199px) { .shell { width: 100%; padding: 0 16px; } .content-layout { grid-template-columns: minmax(0, 1fr) 300px; } :root { --aside-width: 300px; } }
@media (max-width: 767px) { .shell { padding: 0 12px; } .page-shell { padding-top: 12px; } .content-layout { grid-template-columns: minmax(0, 1fr); } .aside { position: static; order: -1; } .aside-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aside-link { min-height: 40px; } .logout-form { display: none; } .panel { padding: 20px; } h1 { font-size: 25px; } .invoice-data, .queue-row { grid-template-columns: minmax(0, 1fr); gap: 5px; } .invoice-data .wide { grid-column: auto; } .queue-row { margin: 0 -8px; padding: 14px 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }