:root {
  --black: #0a0a0a;
  --ink: #171717;
  --grey-1: #f6f6f6;
  --grey-2: #ececec;
  --grey-3: #d9d9d9;
  --grey-5: #8a8a8a;
  --grey-7: #4a4a4a;
  --white: #fff;
  --red: #b42318;
  --green: #067647;
  --amber: #b54708;
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--grey-1); font-size: 14px; line-height: 1.5; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h2 { font-size: 15px; }
h3 { font-size: 14px; margin-bottom: 12px; }
p { margin: 0 0 8px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--grey-5); }
.small { font-size: 12.5px; }
.warn { color: var(--amber); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; color: var(--grey-5); letter-spacing: 0.04em; text-transform: lowercase; margin: 0 0 4px; display: block; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex-shrink: 0; background: var(--black); color: #d4d4d4;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); padding: 4px 8px 22px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--white); color: var(--black);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; position: relative; flex-shrink: 0;
}
.brand-mark i { position: absolute; right: 7px; bottom: 8px; width: 2px; height: 9px; background: var(--black); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.15; }
.brand-text small { font-family: var(--font-mono); font-weight: 400; font-size: 10.5px; color: var(--grey-5); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: #bdbdbd; font-weight: 500;
}
.side-nav a:hover { background: #1c1c1c; color: var(--white); }
.side-nav a.active { background: var(--white); color: var(--black); }
.side-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-label { font-family: var(--font-mono); font-size: 10.5px; color: #6b6b6b; padding: 18px 10px 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.side-user { border-top: 1px solid #262626; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-user-info { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); min-width: 0; }
.side-user-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.side-user-info small { color: var(--grey-5); font-family: var(--font-mono); font-size: 11px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #262626; color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: 11px; background: var(--black); vertical-align: middle; margin-right: 4px; }
.link-btn { background: none; border: 0; color: var(--grey-5); cursor: pointer; font: inherit; font-size: 12px; padding: 4px; }
.link-btn:hover { color: var(--white); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: var(--white); border-bottom: 1px solid var(--grey-2); display: flex; align-items: center;
  gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.menu-btn { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; stroke: var(--black); stroke-width: 2; stroke-linecap: round; }
.crumbs { flex: 1; font-family: var(--font-mono); font-size: 12.5px; color: var(--grey-5); display: flex; gap: 8px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--black); }
.crumbs a::after { content: "/"; margin-left: 8px; color: var(--grey-3); }
.crumbs span { color: var(--black); overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; }
.content { padding: 28px; max-width: 1320px; width: 100%; }

/* ---------- elements ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .muted { margin-top: 6px; max-width: 680px; }
.head-actions { display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--grey-3); background: var(--white); color: var(--black); border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--black); }
.btn-primary { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-primary:hover { background: #2a2a2a; }
.btn-danger { color: var(--red); border-color: #f1c1bc; }
.btn-danger:hover { border-color: var(--red); background: #fef3f2; }
.btn-block { width: 100%; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.icon-btn { border: 0; background: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 18px; color: var(--grey-5); }
.icon-btn:hover { background: var(--grey-2); color: var(--red); }
form.inline, .inline { display: inline; }

.card { background: var(--white); border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-head a { font-size: 12.5px; color: var(--grey-5); }
.grid-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.grid-2 > * { min-width: 0; }
.grid-side { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.grid-side > * { min-width: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--grey-2); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 24px; letter-spacing: -0.02em; font-family: var(--font-mono); font-weight: 500; }
.stat small { color: var(--grey-5); font-size: 12px; }
.stat small a { color: var(--grey-7); }
.stat-label { font-family: var(--font-mono); font-size: 11px; color: var(--grey-5); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-dark { background: var(--black); border-color: var(--black); color: var(--white); }
.stat-dark .stat-label, .stat-dark small { color: #a3a3a3; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--grey-5); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 1px solid var(--grey-2); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--grey-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table td.num { font-family: var(--font-mono); font-size: 13px; }
.table a { text-decoration: none; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--grey-1); }
.row-muted td { color: var(--grey-5); }
.empty { text-align: center; color: var(--grey-5); padding: 28px !important; }

.badge {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; padding: 2px 9px;
  border-radius: 999px; border: 1px solid var(--grey-3); color: var(--grey-7); background: var(--white); text-transform: lowercase; letter-spacing: 0;
  vertical-align: middle;
}
.badge-sent { border-color: var(--black); color: var(--black); }
.badge-paid, .badge-accepted { background: var(--black); color: var(--white); border-color: var(--black); }
.badge-partial { border-style: dashed; border-color: var(--black); color: var(--black); }
.badge-overdue, .badge-declined { border-color: var(--red); color: var(--red); background: #fef3f2; }
.badge-cancelled { text-decoration: line-through; }
.badge-invoiced { background: var(--grey-2); color: var(--black); border-color: var(--grey-2); }
.badge-dark { background: var(--black); color: var(--white); border-color: var(--black); }
h1 .badge { font-size: 12px; }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--grey-7); font-weight: 500; }
.tabs a:hover { background: var(--grey-2); }
.tabs a.active { background: var(--black); color: var(--white); }

.search input { width: 280px; max-width: 100%; }

.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--grey-3); background: var(--white); font-weight: 500; }
.flash-ok { border-color: var(--black); border-left-width: 4px; }
.flash-error { border-color: #f1c1bc; background: #fef3f2; color: var(--red); }
.flash a { color: inherit; }
.flash-key { border-color: var(--black); background: var(--black); color: var(--white); font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.account-grid { align-items: start; grid-template-columns: 1fr 1fr; }
.account-grid .form-card.narrow { max-width: none; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--grey-2); display: flex; flex-direction: column; }
.feed li:last-child { border-bottom: 0; }
.feed small { color: var(--grey-5); font-size: 12px; }

.details { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; margin: 0; }
.details dt { color: var(--grey-5); font-size: 12.5px; }
.details dd { margin: 0; word-break: break-word; }
.note { margin-top: 18px; padding: 12px; background: var(--grey-1); border-radius: 8px; }

.text-red { color: var(--red); }
.table tfoot th { border-top: 2px solid var(--black); border-bottom: 0; color: var(--black); font-size: 12px; }
.table tfoot th.num { text-align: right; }
.row-current td { background: var(--grey-1); font-weight: 600; }

.aging { list-style: none; margin: 0; padding: 0; }
.aging li { display: grid; grid-template-columns: 130px 1fr 130px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--grey-2); }
.aging li:last-child { border-bottom: 0; }
.aging strong { text-align: right; font-weight: 500; font-size: 13px; }
.aging a { text-decoration: none; }
.aging-bar { height: 8px; background: var(--grey-2); border-radius: 99px; overflow: hidden; }
.aging-bar i { display: block; height: 100%; background: var(--black); border-radius: 99px; }
.aging-bar i.late { background: var(--grey-7); }

.legend { font-size: 12px; color: var(--grey-5); display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.lg-in, .bar-in { background: var(--black); }
.lg-out, .bar-out { background: var(--grey-3); }
.chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 180px; margin-bottom: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--grey-2); }
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.chart-bars i { width: 38%; max-width: 18px; border-radius: 3px 3px 0 0; min-height: 1px; }
.chart-col span { font-family: var(--font-mono); font-size: 10.5px; color: var(--grey-5); }
.chart-col.current span { color: var(--black); font-weight: 600; }

/* ---------- software ---------- */
.health { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grey-3); }
.health-up { color: var(--green); }
.health-up::before { background: var(--green); box-shadow: 0 0 0 3px #d1fadf; }
.health-down { color: var(--red); font-weight: 600; }
.health-down::before { background: var(--red); box-shadow: 0 0 0 3px #fee4e2; }
.health-unknown { color: var(--grey-5); }
.chip { display: inline-block; font-family: var(--font-mono); font-size: 11.5px; border: 1px solid var(--grey-3); border-radius: 6px; padding: 1px 7px; margin: 0 4px 4px 0; }
.badge-sw-live { background: var(--black); color: var(--white); border-color: var(--black); }
.badge-sw-development, .badge-sw-testing { border-color: var(--black); color: var(--black); }
.badge-sw-maintenance { border-style: dashed; border-color: var(--black); color: var(--black); }
.badge-sw-paused, .badge-sw-retired { color: var(--grey-5); }
.badge-sw-retired { text-decoration: line-through; }

/* ---------- mail ---------- */
.mail-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.mail-folders { display: flex; flex-direction: column; gap: 2px; padding: 12px; position: sticky; top: 80px; }
.mail-folders .btn { margin-bottom: 10px; }
.mail-folders a:not(.btn) { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--grey-7); font-weight: 500; }
.mail-folders a:not(.btn):hover { background: var(--grey-1); }
.mail-folders a.active { background: var(--black); color: var(--white); }
.mail-list-card { padding: 6px 0; }
.mail-list { list-style: none; margin: 0; padding: 0; }
.mail-list li { border-bottom: 1px solid var(--grey-2); }
.mail-list li:last-child { border-bottom: 0; }
.mail-list a { display: grid; grid-template-columns: 220px minmax(0, 1fr) 80px; gap: 14px; padding: 12px 20px; text-decoration: none; align-items: center; }
.mail-list a:hover { background: var(--grey-1); }
.mail-from, .mail-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--grey-7); }
.mail-date { text-align: right; font-size: 12px; color: var(--grey-5); }
.mail-list li.unread .mail-from, .mail-list li.unread .mail-subject { color: var(--black); font-weight: 700; }
.mail-list li.unread a { box-shadow: inset 3px 0 0 var(--black); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px 6px; }
.mail-read-subject { font-size: 22px; margin-bottom: 18px; }
.mail-meta { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--grey-2); margin-bottom: 16px; }
.mail-meta > div { flex: 1; min-width: 0; word-break: break-word; }
.mail-meta .badge { text-decoration: none; margin-left: 6px; }
.mail-meta-date { white-space: nowrap; }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.attachment { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--grey-3); border-radius: 8px; padding: 8px 12px; text-decoration: none; font-size: 13px; }
.attachment:hover { border-color: var(--black); }
.attachment svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.attachment small { color: var(--grey-5); }
.mail-frame { width: 100%; height: 70vh; border: 1px solid var(--grey-2); border-radius: 8px; background: var(--white); }
.mail-text { white-space: normal; line-height: 1.6; word-break: break-word; }
@media (max-width: 860px) {
  .mail-layout { grid-template-columns: 1fr; }
  .mail-folders { position: static; flex-direction: row; flex-wrap: wrap; }
  .mail-folders .btn { width: 100%; }
  .mail-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .mail-list .mail-subject { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- forms ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
label small { font-weight: 400; color: var(--grey-5); }
input, select, textarea {
  font: inherit; font-weight: 400; font-size: 14px; color: var(--ink); background: var(--white);
  border: 1px solid var(--grey-3); border-radius: 8px; padding: 9px 11px; width: 100%;
}
textarea { resize: vertical; min-height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--black); outline-offset: -1px; border-color: var(--black); }
label.check { flex-direction: row; align-items: center; font-weight: 500; }
label.check input { width: auto; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-card { max-width: 980px; }
.form-card.narrow { max-width: 460px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { grid-template-columns: 2fr 1fr 1fr; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--grey-2); }
.section-title { margin: 26px 0 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey-7); }
.form-card > .section-title:first-of-type { margin-top: 0; }
.inline-form { display: flex; gap: 8px; margin-bottom: 12px; }

.items-table td { padding: 6px 6px; vertical-align: top; }
.items-table textarea { min-height: 38px; }
.items-table input.num { text-align: right; font-family: var(--font-mono); }
.items-table [data-line-total] { padding-top: 15px; white-space: nowrap; }
.w-qty { width: 90px; }
.w-price { width: 150px; }
.w-total { width: 140px; }
.w-x { width: 36px; }
.items-foot { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 24px; gap: 12px; }
.totals-box { display: flex; align-items: baseline; gap: 16px; background: var(--black); color: var(--white); padding: 12px 18px; border-radius: 8px; }
.totals-box span { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: #a3a3a3; }
.totals-box strong { font-size: 20px; font-weight: 500; }

/* ---------- document detail ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.doc-side { position: sticky; top: 80px; }
.doc-side .card { padding: 18px; }
.doc-side form + form { margin-top: 8px; }
.share { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--grey-2); }
.copy-row { display: flex; gap: 6px; margin-bottom: 6px; }
.copy-row input { font-family: var(--font-mono); font-size: 11.5px; padding: 7px 9px; }
.pay-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.pay-summary div { background: var(--grey-1); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; }
.pay-summary span { font-family: var(--font-mono); font-size: 10.5px; color: var(--grey-5); text-transform: uppercase; }
.pay-summary strong { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; }
.pay-summary .pay-balance { background: var(--black); color: var(--white); }
.pay-list { list-style: none; margin: 0 0 12px; padding: 0; }
.pay-list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--grey-2); }
.pay-form { padding-top: 6px; }
.pay-form .form-grid { gap: 10px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 460px; width: 100%; margin: 0 auto; }
.auth-panel h1 { font-size: 30px; margin: 34px 0 6px; }
.auth-panel.center { text-align: center; align-items: center; }
.auth-panel.center h1 { margin: 8px 0 22px; justify-content: center; }
.auth-panel .stack { margin-top: 22px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand .brand-mark { background: var(--black); color: var(--white); }
.auth-brand .brand-mark i { background: var(--white); }
.auth-brand .brand-text small { color: var(--grey-5); }
.auth-side {
  background: var(--black); display: flex; align-items: center; justify-content: center; padding: 48px;
  background-image: linear-gradient(#1a1a1a 1px, transparent 1px), linear-gradient(90deg, #1a1a1a 1px, transparent 1px);
  background-size: 32px 32px;
}
.auth-term { font-family: var(--font-mono); color: #e5e5e5; font-size: 14px; line-height: 1.9; background: #111; border: 1px solid #2a2a2a; border-radius: 10px; padding: 26px 30px; margin: 0; }
.t-dim { color: #6b6b6b; }
.t-ok { color: #fff; }
.auth-page .auth:only-child .auth-panel.center { grid-column: span 2; }
body:not(.auth-page) .auth { grid-template-columns: 1fr; }

/* ---------- public page ---------- */
.public-page { background: var(--grey-2); }
.public-bar { background: var(--black); color: var(--white); display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; }
.public-bar .btn-primary { background: var(--white); color: var(--black); }
.public-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.public-main { max-width: 900px; margin: 0 auto; padding: 28px 16px 60px; }
.public-callout { background: var(--white); border: 1px solid var(--grey-3); border-left: 4px solid var(--black); border-radius: 10px; padding: 18px 20px; margin-bottom: 20px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.public-callout > div { display: flex; flex-direction: column; min-width: 170px; }
.public-callout strong { font-family: var(--font-mono); font-size: 24px; font-weight: 500; }
.public-callout p { flex: 1; min-width: 240px; margin: 0; }
.public-callout p strong { font-size: inherit; }
.public-callout-ok { border-left-color: var(--green); }
.public-actions { display: flex; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-side { position: static; }
  .grid-2, .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 20; transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.4); }
  .menu-btn { display: block; }
  .topbar { padding: 0 16px; }
  .topbar-actions .btn:not(.btn-primary) { display: none; }
  .content { padding: 18px 14px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .search input { width: 100%; }
  .page-head form.search { width: 100%; }
}
