@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: #13213c;
  background: #eff3f9;
  font-synthesis: none;
  --ink: #13213c;
  --muted: #52617a;
  --navy: #0b152b;
  --blue: #183bd7;
  --blue-dark: #122aaa;
  --cyan: #69ebf4;
  --violet: #7247e9;
  --border: #d8e1ef;
  --surface: #fff;
  --wash: #f4f7fc;
  --danger: #a1283f;
  --focus: #2855ed;
  --radius: 14px;
  --shadow: 0 2px 4px #162c5410, 0 12px 30px #162c5406;
  --gutter: clamp(18px, 3vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 4vw, 3.4rem); letter-spacing: -.065em; font-weight: 780; }
h2 { font-size: 1.26rem; letter-spacing: -.035em; font-weight: 730; }
h3 { font-size: .95rem; line-height: 1.35; font-weight: 700; }
p { line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-inline-size: 100%; block-size: auto; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
button, a { touch-action: manipulation; }
[hidden] { display: none !important; }
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  clip-path: inset(50%);
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 100;
  inset-inline-start: 16px;
  inset-block-start: -100px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
}
.skip-link:focus { inset-block-start: 16px; }
.muted { color: var(--muted); }
.icon { display: block; inline-size: 19px; block-size: 19px; flex: none; }

.brand { display: grid; justify-items: start; gap: 12px; inline-size: fit-content; }
.brand-logo { inline-size: 176px; }
.brand-signature { display: grid; gap: 3px; inline-size: 168px; }
.brand-kaos { color: #14213c; font-size: .64rem; font-weight: 780; letter-spacing: .18em; padding-inline-start: 2px; }
.brand-signature img { inline-size: 100%; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 44px;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 670;
  line-height: 1.2;
  text-align: center;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.button.primary { color: white; border-color: #2039ce; background: linear-gradient(115deg, #123ccf 8%, #4530cf 100%); box-shadow: 0 4px 10px #193bcc23; }
.button.primary:hover:not(:disabled) { background: linear-gradient(115deg, #102ba9, #3928b7); box-shadow: 0 5px 13px #193bcc33; }
.button.secondary { background: white; border-color: #c6d3e7; color: #233a63; }
.button.secondary:hover:not(:disabled) { background: #eef3ff; border-color: #9eb2de; }
.button.quiet { color: #405375; }
.button.quiet:hover:not(:disabled) { background: #eaf0fa; color: var(--ink); }
.button.danger { color: var(--danger); background: #fff8f9; border-color: #ebc3cb; }
.button.danger:hover:not(:disabled) { background: #ffe9ed; }
.button.small { min-block-size: 36px; font-size: .77rem; padding: 7px 10px; }
.full { inline-size: 100%; }

.auth-view {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
  min-block-size: 100vh;
  min-block-size: 100svh;
  background: white;
}
.auth-hero, .page-heading {
  --focus: #8cecf5;
  background-color: var(--navy);
  background-image: linear-gradient(90deg, #0b152b 3%, #0b152be8 30%, #0b152b42 72%, #0b152b00), url("/brand/denk-folio.webp");
  background-position: center, right center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #f9fbff;
}
.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(30px, 6vw, 105px);
  background-image: linear-gradient(138deg, #0b152b 6%, #0b152b80 47%, #0b152b08 90%), url("/brand/denk-folio.webp");
  background-position: center, 65% 50%;
}
.auth-headline { font-size: clamp(2.45rem, 5.6vw, 5.8rem); font-weight: 800; line-height: 1.02; letter-spacing: -.075em; text-wrap: balance; text-shadow: 0 3px 22px #0710269c; }
.auth-headline span { color: var(--cyan); }
.auth-intro { max-inline-size: 320px; margin-block-start: 23px; color: #e1eafa; font-size: 1rem; text-shadow: 0 2px 8px #06132d; }
.auth-main { display: grid; place-items: center; padding: clamp(26px, 5vw, 80px); }
.auth-card { inline-size: min(100%, 412px); }
.auth-card .brand { margin-block-end: 44px; }
.auth-card .brand-logo { inline-size: 222px; }
.auth-card .brand-signature { inline-size: 215px; }
.auth-card h1 { font-size: clamp(1.9rem, 3vw, 2.6rem); letter-spacing: -.055em; }
.auth-description { color: var(--muted); margin-block: 10px 28px; }
.auth-note { margin-block-start: 27px; padding-block-start: 15px; border-block-start: 1px solid var(--border); color: var(--muted); font-size: .81rem; }
#login-form .button.primary { min-block-size: 49px; justify-content: space-between; padding-inline: 16px; }
.password-field, .code-field { display: flex; gap: 8px; }
.password-field input, .code-field input { min-inline-size: 0; flex: 1 1 0; }
.password-field .button { border-color: #c0cee5; background: var(--wash); flex: none; }

.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-block-size: 100vh; }
.sidebar {
  --focus: #8cecf5;
  display: flex;
  flex-direction: column;
  position: sticky;
  inset-block-start: 0;
  min-inline-size: 0;
  block-size: 100vh;
  block-size: 100dvh;
  overflow-y: auto;
  padding: 24px 15px 16px;
  color: #f7faff;
  background: linear-gradient(166deg, #101e39, var(--navy) 56%, #111632);
  border-inline-end: 1px solid #273955;
}
.sidebar .brand { padding: 14px 15px 13px; margin: 0 2px 26px; background: white; border-radius: 10px; gap: 9px; inline-size: auto; }
.sidebar .brand-logo { inline-size: 157px; }
.sidebar .brand-signature { inline-size: 149px; }
.sidebar nav { display: grid; gap: 6px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  min-block-size: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #c6d3ea;
  font-size: .87rem;
  font-weight: 550;
}
.nav-link .icon { color: #94aed8; }
.nav-link:hover { background: #1e3052; color: white; }
.nav-link[aria-current="location"] { color: white; border-color: #35588d; background: linear-gradient(98deg, #1c4384, #202953); box-shadow: inset 3px 0 #69ebf4; }
.nav-link[aria-current="location"] .icon { color: var(--cyan); }
.sidebar-bottom { display: flex; align-items: center; gap: 9px; margin-block-start: auto; padding-block-start: 14px; border-block-start: 1px solid #2b3a56; font-size: .77rem; }
.sidebar-bottom .button { margin-inline-start: auto; color: #cfdbf2; padding-inline: 9px; }
.sidebar-bottom .button:hover:not(:disabled) { background: #203253; color: white; }
.owner-avatar { display: grid; place-items: center; border-radius: 8px; inline-size: 32px; block-size: 32px; flex: none; background: #22385d; color: #b3d5ff; }

.main-content { min-inline-size: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-block-size: 66px;
  padding: 10px var(--gutter);
  background: white;
  border-block-end: 1px solid var(--border);
}
.topbar p { color: var(--muted); font-size: .84rem; }
.topbar p strong { color: var(--ink); letter-spacing: .035em; }
.topbar p span { padding-inline: 8px; color: #62748e; }
.sync-area { display: flex; align-items: center; gap: 12px; }
.sync-state { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.sync-state::before { content: ""; inline-size: 7px; block-size: 7px; flex: none; border-radius: 50%; background: #60728e; }
.sync-state.online { color: #236549; }
.sync-state.online::before { background: #168554; box-shadow: 0 0 0 3px #e4f5ed; }
.sync-state.offline { color: #8a4a10; }
.sync-state.offline::before { background: #b15e18; }

.content-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 26px var(--gutter) 19px;
  max-inline-size: 1680px;
  margin-inline: auto;
}
section { scroll-margin-block-start: 18px; }
.page-heading {
  display: flex;
  align-items: center;
  padding: clamp(24px, 3vw, 43px);
  min-block-size: 226px;
  border: 1px solid #223655;
  border-radius: 17px;
  margin-block-end: 18px;
  box-shadow: var(--shadow);
  background-size: cover, auto 163%;
  background-position: center, right 57%;
}
.overview-copy { max-inline-size: 580px; }
.page-heading p { margin-block-start: 11px; color: #e0eafa; font-size: .94rem; }
.page-heading .button { margin-block-start: 19px; }
.page-heading .button.primary { color: #101e42; background: #eff8ff; border-color: #eff8ff; box-shadow: none; }
.page-heading .button.primary:hover:not(:disabled) { background: #bdeffb; border-color: #bdeffb; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 16px;
  min-inline-size: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.metric-label { color: #384969; font-size: .79rem; font-weight: 650; }
.metric-icon { display: grid; place-items: center; flex: none; inline-size: 33px; block-size: 33px; border-radius: 8px; color: #244fce; background: #edf2ff; }
.metric:nth-child(2) .metric-icon { color: #00768c; background: #e5f7fa; }
.metric:nth-child(3) .metric-icon, .metric.accent .metric-icon { color: #5b39c0; background: #efe9ff; }
.metric > strong { font-size: 1.86rem; font-weight: 750; line-height: 1.2; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric-note { color: var(--muted); font-size: .73rem; line-height: 1.4; margin-block-start: auto; }
.metric.accent { background: linear-gradient(145deg, #fff, #f2efff); border-color: #ded6fa; }
.metric .model-name { font-size: 1.02rem; letter-spacing: -.025em; line-height: 1.35; color: #432b9b; }

.panel { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(17px, 2vw, 25px); min-inline-size: 0; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 15px; }
.count-badge { display: inline-grid; place-items: center; min-inline-size: 29px; min-block-size: 29px; padding: 3px 7px; color: #284a9e; background: #edf2ff; border: 1px solid #dce6fb; border-radius: 7px; font-size: .79rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.section-description { color: var(--muted); margin-block-end: 17px; font-size: .85rem; }
.panel-footnote { color: var(--muted); margin-block-start: 15px; font-size: .76rem; line-height: 1.55; }
.offices-list { display: grid; gap: 12px; }
.office-card { padding: 15px; background: #fcfdff; border: 1px solid var(--border); border-inline-start: 3px solid #5e79df; border-radius: 10px; }
.office-top, .office-identity { display: flex; align-items: flex-start; gap: 10px; min-inline-size: 0; }
.office-top { justify-content: space-between; flex-wrap: wrap; }
.office-avatar { display: grid; place-items: center; inline-size: 36px; block-size: 36px; flex: none; border-radius: 9px; background: #e9efff; color: #2a45ad; font-size: .8rem; font-weight: 750; }
.office-identity p { font-size: .75rem; margin-block-start: 3px; color: var(--muted); }
.office-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px 9px; }
.badge { display: inline-flex; align-items: center; gap: 5px; max-inline-size: 100%; border-radius: 6px; padding: 4px 7px; font-size: .71rem; font-weight: 650; line-height: 1.35; background: #eaf0f8; color: #3d5070; }
.badge.success { background: #e5f6ed; color: #1c6345; }
.badge.warning { background: #fff2d9; color: #78480e; }
.badge.error { background: #ffebef; color: #9d2a42; }
.badge.running { background: #e8eeff; color: #2949b0; }
.office-rules-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-wrap; font-size: .8rem; color: var(--muted); }
.office-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-block-start: 10px; padding-block-start: 8px; border-block-start: 1px solid var(--border); }
.office-actions > div { display: flex; flex-wrap: wrap; gap: 3px; }

.field { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; margin-block-end: 15px; }
label, legend { font-size: .85rem; font-weight: 650; }
.required { color: var(--muted); font-size: .74rem; font-weight: 400; }
:where(input:not([type="checkbox"], [type="radio"]), textarea, select) {
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  padding: 9px 11px;
  border: 1px solid #7f91ae;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}
:where(input, textarea, select):disabled { background: #edf1f7; color: var(--muted); }
textarea { resize: vertical; min-block-size: 100px; }
input::placeholder, textarea::placeholder { color: #5b6b84; font-size: .83rem; opacity: 1; }
:where(input, textarea, select)[aria-invalid="true"], :where(input, textarea, select):user-invalid { border-color: var(--danger); }
:where(input[type="radio"], input[type="checkbox"]) { flex: none; accent-color: var(--blue); inline-size: 18px; block-size: 18px; margin: 0; cursor: pointer; }
.hint { color: var(--muted); font-size: .77rem; line-height: 1.5; }
.budget { min-inline-size: 0; margin: 0 0 15px; padding: 11px 12px 13px; background: #fafbff; border: 1px solid var(--border); border-radius: 9px; }
.budget legend { padding-inline: 5px; }
.check-row { display: flex; align-items: center; gap: 8px; min-block-size: 38px; cursor: pointer; }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.budget .field { margin-block-end: 8px; }
.notice { margin-block-end: 16px; padding: 12px 14px; border: 1px solid; border-radius: 9px; font-size: .85rem; line-height: 1.55; }
.notice.warning, .capability { color: #71440f; background: #fff8eb; border-color: #e7c995; }
.error-text { margin-block: 8px 12px; padding: 10px 12px; border: 1px solid #efc6cf; border-radius: 8px; color: var(--danger); background: #fff2f5; font-size: .83rem; white-space: pre-wrap; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 26px 15px; border: 1px dashed #b9c9e6; border-radius: 10px; background: #f7faff; text-align: center; }
.empty-symbol { display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 10px; background: #e8efff; color: #294ac1; font-size: 1.3rem; }
.empty-state p { max-inline-size: 335px; color: var(--muted); font-size: .85rem; }
.empty-state .button { margin-block-start: 7px; }
.empty-inline { padding: 16px; color: var(--muted); background: var(--wash); border-radius: 8px; font-size: .84rem; }

.table-wrapper { overflow: auto; max-inline-size: 100%; max-block-size: 580px; border: 1px solid var(--border); border-radius: 9px; }
table { border-collapse: separate; border-spacing: 0; inline-size: 100%; font-size: .83rem; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 12px; border-block-end: 1px solid #e5ebf4; text-align: start; vertical-align: middle; white-space: nowrap; }
thead { position: sticky; inset-block-start: 0; z-index: 1; }
thead th { background: #eaf0fa; color: #384c6f; font-size: .76rem; font-weight: 700; }
tbody tr:nth-child(even) { background: #f5f8fc; }
tbody tr:hover { background: #edf3ff; }
tbody th { font-weight: 620; max-inline-size: 300px; overflow-wrap: anywhere; white-space: normal; }
tbody tr:last-child > * { border-block-end: 0; }
.table-title { display: block; max-inline-size: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-subtitle { display: block; color: var(--muted); margin-block-start: 3px; font-size: .73rem; font-weight: 400; }
.table-actions { display: flex; justify-content: flex-end; gap: 5px; }
.table-step { display: block; font-weight: 650; margin-block-end: 4px; }
.tool-badge { max-inline-size: 240px; white-space: normal; font-family: Consolas, ui-monospace, monospace; }
.cost-cell .table-subtitle { max-inline-size: 210px; white-space: normal; }
.price-source { white-space: normal; min-inline-size: 145px; max-inline-size: 300px; }
.usage-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 13px; margin-block: 14px; background: var(--wash); border: 1px solid var(--border); border-radius: 9px; }
.usage-filters .field { margin: 0; flex: 1 1 145px; max-inline-size: 235px; }
.usage-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 1px; margin-block-start: 16px; overflow: hidden; background: var(--border); border: 1px solid var(--border); border-radius: 9px; }
.usage-summary > div { display: grid; align-content: start; gap: 5px; padding: 12px; background: white; }
.usage-summary span { color: var(--muted); font-size: .76rem; }
.usage-summary strong { font-size: 1.14rem; font-variant-numeric: tabular-nums; }
.cost-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); gap: 12px; margin-block: 15px; }
.cost-overview > div { min-inline-size: 0; padding: 15px; color: #30256c; border: 1px solid #dcd4fa; border-radius: 10px; background: #f4f0ff; overflow-wrap: anywhere; }
.cost-card-title { font-size: .8rem; font-weight: 650; }
.cost-overview strong { display: block; font-size: 1.55rem; margin-block: 4px; font-variant-numeric: tabular-nums; }
.cost-overview > .provider-balance { color: #233a63; border-color: #c6d3e7; background: #eef5fc; }
.balance-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.balance-heading button[aria-disabled="true"] { cursor: wait; }
.balance-breakdown { display: flex; flex-wrap: wrap; column-gap: 18px; row-gap: 5px; margin: 4px 0 8px; font-size: .76rem; }
.balance-breakdown dt { color: var(--muted); }
.balance-breakdown dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
#tariff-comparison .panel-footnote a { color: #253f77; text-decoration: underline; text-underline-offset: .16em; }
.usage-subheading { margin-block: 19px 9px; }
.usage-subheading + .hint { margin-block-end: 9px; }
.recent-usage { margin-block-start: 16px; border-block-start: 1px solid var(--border); }
.recent-usage summary { min-block-size: 44px; padding: 11px 0; cursor: pointer; color: #253f77; font-size: .87rem; font-weight: 650; }
.price-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#pricing-form { max-inline-size: 820px; }
.page-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .75rem; }
.page-footer > span:first-child { font-weight: 650; }

.dialog {
  inline-size: min(620px, calc(100% - 28px));
  max-block-size: calc(100svh - 32px);
  overflow: auto;
  padding: clamp(16px, 3vw, 28px);
  color: var(--ink);
  background: white;
  border: 1px solid #ccd9ef;
  border-block-start: 4px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: 0 24px 90px #0813275c;
}
.dialog::backdrop { background: #0b152bb8; }
#support-dialog:modal { overscroll-behavior: contain; }
#support-dialog::backdrop { overflow: hidden; overscroll-behavior: contain; }
#support-review-result { white-space: pre-wrap; overflow-wrap: anywhere; }
#chat-history { list-style: none; padding: 0; margin-block: .75rem; max-block-size: 40vh; overflow-y: auto; }
#chat-history li { padding-block: .6rem; border-block-end: 1px solid var(--border); }
#chat-history p { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: .3rem; }
.dialog.narrow { inline-size: min(470px, calc(100% - 28px)); }
.dialog.wide { inline-size: min(880px, calc(100% - 28px)); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 15px; }
.dialog-heading .button { min-inline-size: 44px; padding: 9px; background: var(--wash); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-block-start: 19px; }
.dialog p { font-size: .87rem; margin-block-end: 10px; }
.dialog p.hint { font-size: .78rem; margin-block-end: 0; }
.capability { padding: 12px; border-width: 1px; border-style: solid; border-radius: 9px; }
.capability p { font-size: .78rem; margin: 5px 0 0; }
.checkbox-row { display: flex; align-items: center; gap: 10px; min-block-size: 36px; }
.checkbox-row label { cursor: pointer; }
.code-field { margin-block: 7px 10px; }
.code-field input { font-family: Consolas, ui-monospace, monospace; font-weight: 700; text-align: center; color: var(--blue-dark); background: var(--wash); }
.wa-qr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 12px; }
.wa-qr-stage { display: grid; place-items: center; min-block-size: 276px; padding: 12px; margin-block: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-align: center; }
#wa-qr-img { display: block; inline-size: 252px; block-size: 252px; image-rendering: pixelated; }
.wa-qr-code-box { margin-block: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--wash); }
.wa-qr-reset-form { margin-block-start: 14px; padding-block-start: 12px; border-block-start: 1px solid var(--border); }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-block-end: 13px; border-block-end: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.detail-section { margin-block-start: 18px; }
.detail-section h3 { margin-block-end: 7px; }
.detail-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-note, .job-usage-total { padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--wash); }
.detail-note { color: var(--muted); }
.job-usage-total { color: #3c2c83; font-weight: 700; background: #f2eeff; }
.action-record { border: 1px solid var(--border); border-radius: 8px; margin-block-end: 8px; }
.action-record summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-block-size: 44px; padding: 9px 12px; cursor: pointer; font-size: .84rem; }
.action-record summary::before { content: "▸"; color: var(--muted); }
.action-record[open] summary::before { content: "▾"; }
.action-record time { margin-inline-start: auto; color: var(--muted); font-size: .74rem; }
.action-record pre { margin: 0; padding: 13px; max-block-size: 330px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #eff3fa; border-block-start: 1px solid var(--border); font: .78rem/1.55 Consolas, ui-monospace, monospace; }
#job-detail[aria-busy="true"] { cursor: progress; }
.toast { position: fixed; z-index: 20; inset-inline: 16px; inset-block-end: 16px; margin-inline: auto; inline-size: fit-content; max-inline-size: min(560px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid #3f5e9f; border-radius: 10px; background: #15284d; box-shadow: 0 8px 25px #12234c3c; color: white; font-size: .85rem; white-space: pre-wrap; }
.toast.error { background: #84263a; border-color: #9b3f53; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .sidebar .brand { padding-inline: 12px; }
}
@media (max-width: 920px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; block-size: auto; padding: 10px var(--gutter); border-inline-end: 0; }
  .sidebar .brand { inline-size: fit-content; margin: 0; padding: 7px 10px; display: flex; align-items: center; gap: 9px; }
  .sidebar .brand-logo { inline-size: 88px; }
  .sidebar .brand-signature { inline-size: 99px; }
  .sidebar .brand-kaos { font-size: .49rem; }
  .sidebar nav { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-link { gap: 7px; padding: 8px; }
  .sidebar-bottom { margin: 0; border: 0; padding: 0; }
  .sidebar-bottom > strong, .owner-avatar { display: none; }
  .auth-hero { padding-inline: clamp(22px, 4vw, 70px); }
}
@media (max-width: 680px) {
  .auth-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-hero { min-block-size: 225px; padding: 25px var(--gutter); background-position: center, 75% 52%; }
  .auth-headline { font-size: clamp(2.1rem, 8vw, 3.4rem); }
  .auth-intro { margin-block-start: 13px; font-size: .9rem; }
  .auth-main { place-items: start center; padding: 24px var(--gutter); }
  .auth-card .brand { margin-block-end: 24px; }
  .auth-card .brand-logo { inline-size: 165px; }
  .auth-card .brand-signature { inline-size: 160px; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-link { font-size: .8rem; }
  .topbar { padding-block: 8px; }
  .sync-area { gap: 8px; }
  .sync-area .button { padding-inline: 9px; }
  .content-body { padding-block-start: 16px; gap: 15px; }
  .page-heading { min-block-size: 198px; background-size: cover, auto 120%; background-image: linear-gradient(90deg, #0b152b 6%, #0b152be8 43%, #0b152b55), url("/brand/denk-folio.webp"); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 9px 11px; }
  .metric-label { font-size: .73rem; }
  .metric-icon { inline-size: 27px; block-size: 27px; }
  .metric-icon .icon { inline-size: 16px; block-size: 16px; }
  .table-title { max-inline-size: 180px; }
  .usage-filters .field { max-inline-size: none; }
  .usage-filters .field:first-child { flex-basis: 100%; }
  .price-rates { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}
@media (max-width: 390px) {
  .topbar > p { flex-basis: 100%; }
  .sidebar .brand-signature { inline-size: 85px; }
  .sidebar .brand-logo { inline-size: 77px; }
  #pricing-form .two-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (pointer: coarse) {
  .button.small, .check-row { min-block-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
@media (forced-colors: active) {
  .nav-link[aria-current="location"] { border-color: Highlight; }
  .button.primary { border-color: ButtonText; }
}

