:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-muted: #f1f3f0;
  --ink: #171b19;
  --muted: #6b746f;
  --line: #dde2dd;
  --shadow: 0 18px 50px rgba(23, 27, 25, .12);
  --sage-dark: #334c3d;
  --sage-soft: #e4ece5;
  --coral: #e85d4a;
  --coral-soft: #fbe8e4;
  --blue: #3b657a;
  --blue-soft: #e5eef2;
  --danger: #c74738;
  --button-bg: #171b19;
  --button-text: #ffffff;
}

:root[data-theme="dark"] {
  --bg: #111613;
  --surface: #1a211d;
  --surface-muted: #222a25;
  --ink: #f3f5f2;
  --muted: #a4afa8;
  --line: #323c36;
  --shadow: 0 18px 50px rgba(0, 0, 0, .4);
  --sage-dark: #c3d8ca;
  --sage-soft: #26342b;
  --coral: #ff7462;
  --coral-soft: #392522;
  --blue: #86b7ce;
  --blue-soft: #23343c;
  --danger: #ff796a;
  --button-bg: #f3f5f2;
  --button-text: #111613;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; transition: background-color .2s ease, color .2s ease; }
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-frame { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 30px; }
.brand img { width: 42px; height: 42px; border-radius: 9px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 14px; line-height: 1.2; }
.brand span { margin-top: 2px; color: #9eaaa3; font-size: 11px; }

.side-nav { display: grid; gap: 4px; }
.side-nav button { min-height: 46px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 8px; padding: 0 12px; background: transparent; color: #aeb7b2; text-align: left; }
.side-nav button span { width: 22px; color: #66716b; font-size: 10px; }
.side-nav button b { font-size: 12px; font-weight: 700; }
.side-nav button.active { background: #2b312e; color: #fff; }
.side-nav button.active span { color: var(--coral); }
.side-nav button:disabled { cursor: default; opacity: .42; }

.side-foot { margin-top: auto; padding: 14px 10px; color: #9eaaa3; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #63b585; box-shadow: 0 0 0 4px rgba(99,181,133,.12); }

.workspace { min-width: 0; padding: 28px 34px 48px; }
.topbar { min-height: 96px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 5px; color: var(--coral); font-size: 10px; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: 30px; line-height: 1.15; }
h2 { margin-bottom: 0; font-size: 19px; }
.subtitle, .hint { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.toolbar, .actions, .section-head, .payment-controls, .inline-actions { display: flex; align-items: center; gap: 9px; }
.section-head { justify-content: space-between; margin-bottom: 18px; }

input, select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  background: var(--surface);
  color: var(--ink);
}

button {
  min-height: 40px;
  border: 1px solid var(--button-bg);
  border-radius: 7px;
  padding: 8px 13px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 750;
}

button.secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
button.danger { border-color: var(--coral-soft); background: var(--coral-soft); color: var(--danger); }
button.compact { min-height: 34px; padding: 5px 10px; font-size: 11px; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:hover { opacity: .78; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.icon-action { width: 42px; padding: 0; font-size: 19px; }
.logout-action { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }

.login-view { min-height: 430px; display: grid; grid-template-columns: 1.1fr .9fr; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.login-copy { padding: 48px; background: var(--sage-soft); display: flex; flex-direction: column; justify-content: center; }
.login-copy h2 { max-width: 420px; color: var(--ink); font-size: 31px; line-height: 1.15; }
.login-copy > p:last-child { max-width: 430px; margin-top: 14px; color: var(--muted); line-height: 1.55; }
.login-form { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
label { display: grid; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 12px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-grid article { min-height: 126px; position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); display: flex; flex-direction: column; justify-content: flex-end; }
.summary-grid article:nth-child(2) { background: var(--sage-soft); border-color: var(--sage-soft); }
.summary-grid article:nth-child(3) { background: var(--coral-soft); border-color: var(--coral-soft); }
.summary-grid article:nth-child(4) { background: var(--blue-soft); border-color: var(--blue-soft); }
.summary-grid strong { color: var(--ink); font-size: 30px; line-height: 1; }
.summary-grid label { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.metric-index { position: absolute; top: 16px; right: 16px; color: var(--muted); font-size: 10px; }

.content-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; background: var(--surface); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td button { min-height: 32px; padding: 5px 9px; font-size: 11px; }

.method-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.method { min-height: 104px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; }
.method strong { display: block; font-size: 14px; }

.payment-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.payment-method { min-width: 0; min-height: 86px; justify-content: center; padding: 12px; }
.payment-method-card { grid-column: 1 / -1; min-height: 160px; justify-content: space-between; padding: 14px 14px 18px; }
.payment-method-heading { min-width: 0; display: flex; align-items: center; gap: 10px; }
.payment-method-heading strong { min-width: 0; overflow-wrap: anywhere; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 13px; line-height: 1.25; }
.admin-payment-logo { width: 50px; height: 42px; flex: 0 0 50px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e5e7e5; border-radius: 7px; background: #fff; }
.admin-payment-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.admin-card-networks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin-top: 14px; }
.admin-card-network { min-width: 0; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid #dfe3e8; border-radius: 5px; padding: 5px 7px; background: #fff; }
.admin-card-network img { width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.readonly { border-radius: 999px; padding: 5px 9px; background: var(--sage-soft); color: var(--sage-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }

.view-root { min-height: 420px; }
.loading-state, .error-state, .empty-state { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); text-align: center; }
.spinner { width: 24px; height: 24px; border: 2px solid var(--line); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.module-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.search-field { width: min(430px, 100%); margin: 0; }
.search-field input { width: 100%; }
.count-badge, .status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: var(--surface-muted); color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-active, .status-open, .status-confirmed, .status-checked_in { background: var(--sage-soft); color: var(--sage-dark); }
.status-frozen, .status-cancelled, .status-refunded { background: var(--coral-soft); color: var(--danger); }
.status-pending_payment { background: var(--blue-soft); color: var(--blue); }

.resource-list { display: grid; gap: 12px; }
.resource-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface); }
.resource-card-main { display: flex; align-items: center; gap: 14px; }
.resource-copy { flex: 1; min-width: 0; }
.resource-copy h2 { overflow-wrap: anywhere; }
.resource-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.resource-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.resource-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 10px; }
.resource-icon, .avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-dark); font-weight: 850; }
.avatar { border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.card-strip { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 0 0 58px; border-top: 1px solid var(--line); }
.card-strip strong, .card-strip span { display: block; }
.card-strip strong { font-size: 12px; }
.card-strip span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.inline-actions { flex-wrap: wrap; justify-content: flex-end; }

.segmented { width: fit-content; max-width: 100%; display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 8px; background: var(--surface-muted); overflow-x: auto; }
.segmented button { min-height: 36px; border: 0; padding: 6px 14px; background: transparent; color: var(--muted); white-space: nowrap; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-grid .panel { margin: 0; }
.settings-grid .audit-wide { grid-column: 1 / -1; }
.settings-payment-disclosure { overflow: hidden; padding: 0; }
.settings-payment-summary { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; cursor: pointer; list-style: none; }
.settings-payment-summary::-webkit-details-marker { display: none; }
.settings-payment-summary .eyebrow { margin-bottom: 7px; }
.settings-payment-summary h2 { font-family: var(--display-font); font-size: 20px; line-height: 1.15; }
.settings-payment-chevron { width: 22px; height: 22px; flex: 0 0 22px; color: var(--muted); transition: transform .18s ease; }
.settings-payment-disclosure[open] .settings-payment-chevron { transform: rotate(180deg); }
.settings-payment-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.settings-payment-body .payment-catalog { padding-top: 18px; }
.compact-list .resource-card { padding: 12px; }
.compact-list .resource-icon { width: 36px; height: 36px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(7, 10, 8, .62); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--surface); box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { margin: 0; }
.form-grid input, .form-grid select { width: 100%; }
.form-grid select[multiple] { min-height: 126px; }
.course-image-field { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(132px, 180px) 1fr; gap: 12px 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); }
.course-image-label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; }
.course-image-preview { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 28px; }
.course-image-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.course-image-actions { display: grid; justify-items: start; gap: 8px; }
.course-image-actions small { max-width: 34ch; color: var(--muted); line-height: 1.45; }
.course-image-field .form-error { grid-column: 1 / -1; margin: 0; }
.checkbox-field { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
.checkbox-field input { width: auto; min-height: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.form-error { margin: 14px 0 0; color: var(--danger); font-size: 12px; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(420px, calc(100vw - 44px)); border: 1px solid var(--line); border-radius: 8px; padding: 12px 15px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 12px; overflow-wrap: anywhere; }
.toast.error { background: var(--danger); color: #fff; }
.empty-cell { padding: 35px 10px; color: var(--muted); text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:root[data-theme="dark"] .sidebar { background: #0c100e; }
:root[data-theme="dark"] .summary-grid article:nth-child(2) { background: var(--sage-soft); border-color: var(--line); }
:root[data-theme="dark"] .summary-grid article:nth-child(3) { background: var(--coral-soft); border-color: var(--line); }
:root[data-theme="dark"] .summary-grid article:nth-child(4) { background: var(--blue-soft); border-color: var(--line); }

@media (max-width: 1080px) {
  .app-frame { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand div, .side-nav button:not(.active) { font-size: 0; }
  .side-nav button { justify-content: center; }
  .side-nav button span { width: auto; font-size: 10px; }
  .side-foot { display: none; }
  .content-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .audit-wide { grid-column: auto; }
  .card-strip { grid-template-columns: 1fr auto; padding-left: 0; }
  .card-strip .inline-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 760px) {
  .app-frame { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 12px 14px 10px; display: block; }
  .brand { padding: 0; }
  .brand div { display: block; }
  .side-nav { display: flex; gap: 4px; margin-top: 12px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav button { min-width: max-content; min-height: 38px; padding: 0 10px; }
  .side-nav button span { width: auto; }
  .side-nav button b { font-size: 11px; }
  .side-foot { display: none; }
  .workspace { padding: 20px 14px 40px; }
  .topbar, .section-head { align-items: flex-start; flex-direction: column; }
  .toolbar { width: 100%; flex-wrap: wrap; }
  .toolbar select { flex: 1; min-width: 130px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .login-view { grid-template-columns: 1fr; }
  .login-copy, .login-form { padding: 28px; }
  .payment-controls { width: 100%; flex-wrap: wrap; }
  .module-toolbar { align-items: stretch; flex-direction: column; }
  .resource-card-main { align-items: flex-start; flex-wrap: wrap; }
  .resource-card-main > .inline-actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
  .card-strip { grid-template-columns: 1fr; }
  .card-strip .inline-actions { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .course-image-field { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .summary-grid { grid-template-columns: 1fr; }
  .side-nav button { padding-inline: 9px; }
  .side-nav button span { display: none; }
  .logout-action span:last-child { display: none; }
  .logout-action { width: 42px; justify-content: center; padding: 0; }
  .resource-card-main > .inline-actions { padding-left: 0; }
}

/* 2026 editorial studio refresh — shared with the native iOS palette. */
:root {
  --bg: #f6f4ee;
  --surface: #fffefa;
  --surface-muted: #edf1ec;
  --ink: #183126;
  --muted: #68736c;
  --line: #d7dcd5;
  --shadow: 0 14px 34px rgba(24, 49, 38, .08);
  --sage-dark: #31513f;
  --sage-soft: #e6ece6;
  --coral: #e76553;
  --coral-soft: #fae9e4;
  --blue: #426c72;
  --blue-soft: #e8eff0;
  --danger: #b94b3e;
  --button-bg: #31513f;
  --button-text: #fffefa;
  --display-font: "Iowan Old Style", Baskerville, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  --bg: #101712;
  --surface: #172019;
  --surface-muted: #202a22;
  --ink: #f2eee4;
  --muted: #a5aea7;
  --line: #344038;
  --shadow: 0 16px 40px rgba(0, 0, 0, .35);
  --sage-dark: #c5d6c8;
  --sage-soft: #26342a;
  --coral: #f07b68;
  --coral-soft: #3d2823;
  --blue: #91bcc0;
  --blue-soft: #223337;
  --danger: #ff8878;
  --button-bg: #c5d6c8;
  --button-text: #152018;
}

body {
  min-width: 320px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

.app-frame { grid-template-columns: 258px minmax(0, 1fr); }

.sidebar {
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.brand { gap: 12px; padding: 0 10px 38px; }
.brand img { width: 38px; height: 38px; border-radius: 6px; }
.brand strong { max-width: 150px; font-family: var(--display-font); font-size: 15px; font-weight: 700; line-height: 1.08; }
.brand span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.side-nav { gap: 7px; }
.side-nav button {
  min-height: 48px;
  position: relative;
  border-radius: 5px;
  padding: 0 13px;
  color: var(--muted);
}
.side-nav button span { color: #929b94; font-variant-numeric: tabular-nums; }
.side-nav button b { font-size: 12px; letter-spacing: .02em; }
.side-nav button.active {
  background: var(--sage-soft);
  color: var(--sage-dark);
  box-shadow: inset 3px 0 0 var(--sage-dark);
}
.side-nav button.active span { color: var(--coral); }
.side-nav button:not(:disabled):hover { background: var(--surface-muted); opacity: 1; }
.side-foot { color: var(--muted); letter-spacing: .03em; }

.workspace { padding: 30px clamp(24px, 3vw, 52px) 56px; }
.topbar {
  min-height: 102px;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { margin-bottom: 7px; font-size: 9px; letter-spacing: .16em; }
h1, h2 { font-family: var(--display-font); font-weight: 700; letter-spacing: -.018em; }
h1 { margin-bottom: 6px; font-size: clamp(30px, 3vw, 42px); }
h2 { font-size: 21px; }
.subtitle, .hint { font-size: 12px; }

input, select, button { min-height: 42px; border-radius: 5px; }
button { letter-spacing: .01em; }
button:not(.secondary):not(.danger):hover { background: var(--coral); border-color: var(--coral); opacity: 1; }
button.secondary:hover { border-color: var(--sage-dark); color: var(--sage-dark); opacity: 1; }
.icon-action { width: 42px; }

.login-view { min-height: min(650px, calc(100vh - 188px)); border-radius: 6px; box-shadow: var(--shadow); }
.login-copy { padding: clamp(36px, 6vw, 76px); background: var(--sage-soft); }
.login-copy h2 { font-size: clamp(34px, 4vw, 50px); }
.login-form { padding: clamp(36px, 6vw, 76px); }

.summary-grid { gap: 14px; margin-bottom: 20px; }
.summary-grid article {
  min-height: 144px;
  border-radius: 6px;
  padding: 20px;
  background: var(--surface);
  justify-content: space-between;
}
.summary-grid article:nth-child(n) { background: var(--surface); border-color: var(--line); }
.summary-grid strong { margin-top: auto; font-family: var(--display-font); font-size: 42px; font-weight: 700; }
.summary-grid label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.metric-index { top: 18px; right: 18px; color: var(--coral); font-weight: 850; letter-spacing: .08em; }

.overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(330px, 1fr);
  gap: 18px;
}
.overview-grid .panel { min-width: 0; margin: 0; }
.audit-panel { margin-top: 18px; }
.panel { border-radius: 7px; padding: 22px; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 20px; }

table { font-size: 12px; }
th { padding-top: 9px; padding-bottom: 9px; font-size: 9px; letter-spacing: .09em; }
td { padding-top: 14px; padding-bottom: 14px; }
.availability-table { min-width: 620px; table-layout: fixed; }
.availability-table th:nth-child(1) { width: 28%; }
.availability-table th:nth-child(2),
.availability-table th:nth-child(3) { width: 11%; }
.availability-table th:nth-child(4) { width: 19%; }
.availability-table th:nth-child(5) { width: 31%; }
.availability-table .booking-count {
  color: var(--coral);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
tbody tr { transition: background-color .16s ease; }
tbody tr:hover { background: var(--surface-muted); }

.method { min-height: 98px; border-radius: 5px; }
.resource-card { border-radius: 6px; }
.resource-icon, .avatar { border-radius: 5px; }
.avatar { border-radius: 50%; }
.segmented { border-radius: 5px; }
.segmented button { border-radius: 3px; }
.loading-state, .error-state, .empty-state { border-radius: 7px; }
.modal { border-radius: 7px; }

:root[data-theme="dark"] .sidebar { background: var(--surface); }
:root[data-theme="dark"] .summary-grid article:nth-child(n) { background: var(--surface); border-color: var(--line); }

@media (max-width: 1320px) {
  .app-frame { grid-template-columns: 220px minmax(0, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .app-frame { grid-template-columns: 82px minmax(0, 1fr); }
  .brand { justify-content: center; padding-inline: 0; }
  .brand img { width: 36px; height: 36px; }
  .brand div { display: none; }
  .side-nav button { justify-content: center; padding-inline: 8px; }
  .side-nav button b { display: none; }
  .side-nav button span { font-size: 11px; }
}

@media (max-width: 760px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 14px 9px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { justify-content: flex-start; }
  .brand div { display: block; }
  .side-nav { margin-top: 10px; }
  .side-nav button { min-height: 42px; }
  .side-nav button b { display: block; }
  .workspace { padding: 22px 16px 42px; }
  .topbar { min-height: auto; align-items: flex-start; padding-bottom: 20px; }
  .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .summary-grid article { min-height: 118px; padding: 16px; }
  .summary-grid strong { font-size: 34px; }
  .overview-grid { grid-template-columns: 1fr; }
  .login-view { min-height: 0; }
  .login-copy, .login-form { padding: 32px 26px; }
}

@media (max-width: 460px) {
  h1 { font-size: 31px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid label { font-size: 9px; }
  .panel { padding: 18px 14px; }
  .payment-catalog { grid-template-columns: 1fr; }
  .payment-method-card { grid-column: auto; }
  .admin-card-networks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-payment-disclosure { padding: 0; }
  .settings-payment-summary { min-height: 78px; padding: 18px 14px; }
  .settings-payment-body { padding: 0 14px 18px; }
  .toolbar { gap: 7px; }
}
