/* Bilz v2 styles: hand-written, no build step (D43). Colours, type and spacing are tokens on :root
   so components never hard-code them; the dark theme only redefines the tokens (spec 25, D110).
   Light is the default. <html data-theme> holds the user's choice: "dark", or "system" to follow
   the device. Customer documents (.invoice) set the light tokens again: they stand for paper. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root,
.invoice {
  /* Surfaces */
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  /* Text */
  --ink: #101828;
  --muted: #5d6676;
  /* Brand: one accent, so the brand chosen for Q10.1 is a small change */
  --accent: #17795e;
  --accent-hover: #11624c;
  --accent-soft: #e6f4ef;
  --accent-ink: #ffffff;
  /* States */
  --ok: #157f4a;
  --ok-soft: #e7f6ee;
  --warn-bg: #fff6df;
  --warn-ink: #7a4b00;
  --danger: #c0352b;
  --danger-ink: #ffffff;
  --danger-soft: #fdecea;
  /* Shape and depth */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
  --shadow-pop: 0 12px 24px -6px rgb(16 24 40 / 16%), 0 4px 8px -4px rgb(16 24 40 / 8%);
  --focus: 0 0 0 3px rgb(23 121 94 / 28%);
  --shadow-input: 0 1px 2px rgb(16 24 40 / 5%);
  --backdrop: rgb(16 24 40 / 40%);
  /* Spacing and type */
  --gap: 16px;
  --sidebar: 248px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* The dark tokens, written twice: once for "dark", once for "system" on a dark device. */
:root[data-theme="dark"] {
  --bg: #0f1214;
  --panel: #171b1e;
  --panel-2: #1c2125;
  --line: #2a3035;
  --line-strong: #3a4147;
  --ink: #eceff1;
  --muted: #9aa4ac;
  --accent: #4cc39b;
  --accent-hover: #6dd3b0;
  --accent-soft: #163229;
  --accent-ink: #06150f;
  --ok: #5fd197;
  --ok-soft: #12291d;
  --warn-bg: #33280f;
  --warn-ink: #f2d38d;
  --danger: #f08a80;
  --danger-ink: #2a0b08;
  --danger-soft: #3a1b18;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-pop: 0 12px 28px -6px rgb(0 0 0 / 60%);
  --focus: 0 0 0 3px rgb(76 195 155 / 35%);
  --shadow-input: 0 1px 2px rgb(0 0 0 / 45%);
  --backdrop: rgb(0 0 0 / 60%);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0f1214;
    --panel: #171b1e;
    --panel-2: #1c2125;
    --line: #2a3035;
    --line-strong: #3a4147;
    --ink: #eceff1;
    --muted: #9aa4ac;
    --accent: #4cc39b;
    --accent-hover: #6dd3b0;
    --accent-soft: #163229;
    --accent-ink: #06150f;
    --ok: #5fd197;
    --ok-soft: #12291d;
    --warn-bg: #33280f;
    --warn-ink: #f2d38d;
    --danger: #f08a80;
    --danger-ink: #2a0b08;
    --danger-soft: #3a1b18;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-pop: 0 12px 28px -6px rgb(0 0 0 / 60%);
    --focus: 0 0 0 3px rgb(76 195 155 / 35%);
    --shadow-input: 0 1px 2px rgb(0 0 0 / 45%);
    --backdrop: rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.125rem;
  font-weight: 650;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
}

p {
  margin: 0 0 0.75em;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

hr {
  height: 1px;
  margin: 6px 0;
  border: 0;
  background: var(--line);
}

/* A real outline, not only a shadow: high-contrast modes drop shadows, and scrolling panels clip them. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  flex: none;
  width: 18px;
  height: 18px;
}

.muted {
  color: var(--muted);
}

.pre {
  white-space: pre-line;
}

.danger-text {
  color: var(--danger);
}

/* Read out, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* App shell: a sidebar beside the page (D109); on phones it slides in from the menu button. */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 18px;
}

.wordmark {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  margin: 18px 10px 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 550;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.nav-item.current {
  background: var(--accent-soft);
  color: var(--accent);
}

.frame {
  min-height: 100vh;
}

.has-shell .frame {
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 60px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(8px);
}

.has-shell .topbar {
  justify-content: flex-end;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions form {
  margin: 0;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.no-shell .page {
  max-width: 960px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.nav-toggle,
.sidebar-close,
.nav-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .has-shell .frame {
    margin-left: 0;
  }

  .has-shell .topbar {
    justify-content: space-between;
  }

  /* Hidden, not just moved off-screen, so its links leave the tab order until it opens. */
  .sidebar {
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
    box-shadow: var(--shadow-pop);
  }

  .nav-open .sidebar {
    visibility: visible;
    transform: none;
    transition: transform 0.2s ease;
  }

  .nav-toggle,
  .sidebar-close {
    display: inline-grid;
  }

  .nav-open .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: var(--backdrop);
  }

  .topbar {
    padding: 8px 12px;
  }

  .page {
    padding: 20px 16px 40px;
  }

  .menu-label {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Menus in the top bar: plain <details>, so they open without JavaScript. */

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-weight: 550;
  cursor: pointer;
}

.menu-button:hover {
  border-color: var(--line-strong);
}

.menu-button .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.menu-button.avatar {
  justify-content: center;
  width: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.menu-panel {
  position: absolute;
  right: 0;
  z-index: 50;
  min-width: 260px;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-pop);
}

.menu-panel form {
  margin: 0;
}

.menu-heading {
  margin: 6px 10px 8px;
  color: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item .icon {
  color: var(--muted);
}

.menu-item:has(.icon) {
  justify-content: flex-start;
}

.menu-item:hover,
.menu-item.current {
  background: var(--panel-2);
}

.menu-item.current {
  font-weight: 600;
}

.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
}

/* Segmented switches: EN / ES (D111) and the theme (D110). */

.segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.segmented button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.segmented button .icon {
  width: 16px;
  height: 16px;
}

.segmented button[aria-pressed="true"] {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

/* Panels and page headers */

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 20px;
}

.panel.narrow {
  max-width: 460px;
  margin-right: auto;
  margin-left: auto;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px var(--gap);
  margin-bottom: 8px;
}

.panel-head h1,
.panel-head h2 {
  margin: 0;
}

.page-actions {
  justify-content: flex-end;
  margin-bottom: var(--gap);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.button.quiet {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--ink);
}

.button.quiet:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--danger-ink);
}

.button.quiet.danger-text {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--danger);
}

.button.quiet.danger-text:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Forms */

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

label,
.label {
  font-size: 0.875rem;
  font-weight: 600;
}

input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"]),
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  box-shadow: var(--shadow-input);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  /* Transparent here, but drawn in high-contrast modes, where the shadow isn't. */
  outline: 2px solid transparent;
  box-shadow: var(--focus);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

input[readonly] {
  background: var(--panel-2);
}

.with-toggle {
  display: flex;
  gap: 6px;
}

.help {
  font-size: 0.8125rem;
}

.help ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 0.8125rem;
}

.has-errors input,
.has-errors select,
.has-errors textarea {
  border-color: var(--danger);
}

.form-errors {
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
}

.form-errors .errorlist {
  font-size: 0.875rem;
}

/* Messages and banners */

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.message,
.banner {
  margin: 0 0 var(--gap);
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--warn-ink) 20%, transparent);
  border-radius: var(--radius);
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.messages .message {
  margin: 0;
}

.message.success {
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
}

.message.error {
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

/* Tables */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table thead th {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.table tbody tr:hover {
  background: var(--panel-2);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table .nowrap {
  white-space: nowrap;
}

.table tfoot th {
  border-bottom: 0;
  font-weight: 650;
}

.table td.actions form,
form.inline {
  display: inline-flex;
  gap: 6px;
  margin: 0;
}

form.inline select {
  width: auto;
}

.table td.actions .button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.8125rem;
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge.good {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Lists, search, tabs, pager */

.search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: var(--gap) 0;
}

.search input[type="search"] {
  flex: 1 1 260px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 16px;
  margin: var(--gap) 0;
}

.tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.tabs a {
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.tabs a.current {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  margin-top: var(--gap);
}

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
}

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  list-style: none;
}

progress {
  width: 100%;
  accent-color: var(--accent);
}

/* Setup wizard */

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 var(--gap);
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.steps li.done a {
  color: var(--ok);
}

.steps li.current a {
  color: var(--ink);
  font-weight: 700;
}

.logo-preview {
  max-width: 160px;
  max-height: 80px;
}

.checklist {
  padding-left: 18px;
}

.checklist .done {
  color: var(--muted);
  text-decoration: line-through;
}

/* Invoices: the editor's grids */

.line-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 16px;
}

/* The invoice and receipt documents (always light: .invoice sets the light tokens above). */

.invoice {
  position: relative;
  color: var(--ink);
}

.invoice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gap);
}

.invoice-logo {
  max-width: 200px;
  max-height: 100px;
}

.invoice-meta {
  text-align: right;
}

.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  max-width: 320px;
  margin: var(--gap) 0 var(--gap) auto;
}

.totals dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}


/* Wide tables scroll inside their panel, never the page. */

.panel:has(> .table),
#results,
#editor {
  overflow-x: auto;
}

@media (max-width: 700px) {
  .panel {
    padding: 18px 16px;
  }

  .invoice-meta {
    text-align: left;
  }

  .details {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .details dd {
    margin-bottom: 8px;
  }
}

/* Dashboard (spec 25, D112) */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px var(--gap);
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0 0 2px;
}

.page-head p {
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
  margin-bottom: 20px;
}

.panel + .stats {
  margin-top: 20px;
}

@media (min-width: 1180px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat.attention {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.stat p {
  margin: 0;
}

.stat-label {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.stat .stat-value {
  margin: 6px 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat.attention .stat-value {
  color: var(--danger);
}

.stat-note {
  font-size: 0.8125rem;
}

.up {
  color: var(--ok);
  font-weight: 600;
}

.down {
  color: var(--danger);
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.grid-2 > .panel + .panel {
  margin-top: 0;
}

.empty {
  margin: 8px 0 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.people {
  margin: 0;
  padding: 0;
  list-style: none;
}

.people li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.people li:last-child {
  border-bottom: 0;
}

@media (max-width: 420px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Object pages: a breadcrumb, the page head, the document, then panels beside each other. */

.breadcrumb {
  margin: 0 0 6px;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
}

.page-head h1 .badge {
  margin-left: 6px;
  vertical-align: middle;
}

.after-doc {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 24px;
}

@media (min-width: 1240px) {
  .after-doc {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side > .panel + .panel {
  margin-top: 0;
}

.section-title {
  margin-top: 24px;
}

.inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.inline-row select {
  width: auto;
  min-width: 160px;
}

/* Something after a table in the same panel gets room to breathe. */
.table + .actions,
.table + form,
.table + p {
  margin-top: 16px;
}

/* A panel under a customer document lines up with it. */
.doc-aside {
  max-width: 880px;
  margin: 20px auto 0;
}

.doc-actions {
  max-width: 880px;
  margin: 0 auto 16px;
}

