/* Presentation adapted from Dokploy layouts (see NOTICE.md); Olodesk dashboard
   components and responsive styles. Tokens live in theme.css. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sidebar);
  color: var(--foreground);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; color: var(--text-strong); }
h2 { font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; color: var(--text-strong); }
h3 { font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--text-strong); }
a { color: inherit; text-decoration: none; }
svg { width: 16px; height: 16px; flex-shrink: 0; }
img { display: block; }
code { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--muted-foreground); }
.subtle { color: var(--text-subtle); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
::selection { background: var(--brand-orange-tint); color: var(--brand-orange-deep); }

/* Every interactive element announces itself. */
button:not(:disabled), a[href], label[for], summary, select, [role="tab"], [role="button"],
input[type="checkbox"], input[type="radio"], .file-picker { cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }
:focus { outline: none; }
/* Outline, not box-shadow, so the ring never fights a component's own shadow. */
:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand-orange) 70%, transparent); outline-offset: 2px; }
.input:focus-visible, .input-affix .input:focus-visible, .choice input:focus-visible { outline: none; }

/* ---------- Buttons ---------- */
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text-strong); --btn-border: var(--border); --btn-hover: var(--surface-hover);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: var(--radius-md);
  border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg);
  font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; user-select: none;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--motion-quick) ease, border-color var(--motion-quick) ease, color var(--motion-quick) ease, box-shadow var(--motion-standard) ease, transform var(--motion-quick) var(--ease-out);
}
.btn:hover:not(:disabled) { background: var(--btn-hover); }
a.btn { text-decoration: none; }
/* The Pods tab's two buttons (Status always, Open when the pod has a page) sit side by side. */
.pod-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; box-shadow: none; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--primary-foreground); --btn-border: var(--primary); --btn-hover: #2a2d45; box-shadow: 0 1px 2px rgb(17 19 37 / .18), inset 0 1px 0 rgb(255 255 255 / .08); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--secondary-foreground); box-shadow: none; }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: var(--danger); --btn-hover: var(--danger-strong); }
.btn-danger-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--danger); --btn-hover: var(--danger-soft); box-shadow: none; }
.btn-danger-outline { --btn-fg: var(--danger); --btn-hover: var(--danger-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--radius-sm); gap: 6px; }
.btn-lg { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.file-picker:has(input:focus-visible) { outline: 2px solid color-mix(in srgb, var(--brand-orange) 70%, transparent); outline-offset: 2px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }
.btn-icon svg { width: 16px; height: 16px; }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"] > * { visibility: hidden; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: olo-spin .6s linear infinite;
}
@keyframes olo-spin { to { transform: rotate(360deg); } }

/* ---------- Form controls ---------- */
.input {
  width: 100%; height: 38px; padding: 0 12px; font: inherit; font-size: 14px; color: var(--text-strong);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--motion-quick) ease, box-shadow var(--motion-quick) ease;
}
.input::placeholder { color: var(--text-subtle); }
.input:hover { border-color: #c5c9d3; }
.input:focus-visible { border-color: var(--brand-orange); box-shadow: var(--focus-ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }
.input:disabled { background: var(--surface-sunken); color: var(--muted-foreground); border-color: var(--border); box-shadow: none; cursor: not-allowed; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 14px; }
input[type="number"].input { font-variant-numeric: tabular-nums; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--brand-orange); }
.check-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; color: var(--secondary-foreground); cursor: pointer; user-select: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field, .field-row + .field, .field + .field-row, .field-row + .field-row { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* Side-by-side fields align on one line; only stacked fields get the vertical gap. */
.field-row > .field, .server-grid > .field { margin-top: 0; }
.field-label { font-size: 13px; font-weight: 500; color: var(--text-strong); display: flex; justify-content: space-between; align-items: baseline; }
.field-hint { font-size: 12px; color: var(--muted-foreground); }
.field-error { font-size: 12.5px; color: var(--danger); }
.form-error { margin-top: 14px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .input-icon { position: absolute; left: 11px; color: var(--text-subtle); pointer-events: none; }
.input-wrap > .input-icon + .input { padding-left: 34px; }
.input-wrap > .input-action { position: absolute; right: 4px; }
.input-wrap > .input:has(+ .input-action) { padding-right: 40px; }
.input-affix { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; transition: border-color var(--motion-quick) ease, box-shadow var(--motion-quick) ease; }
.input-affix:focus-within { border-color: var(--brand-orange); box-shadow: var(--focus-ring); }
.input-affix .input { border: 0; box-shadow: none; border-radius: 0; min-width: 0; }
.input-affix .input:focus-visible { box-shadow: none; }
.input-affix .affix { display: flex; align-items: center; padding: 0 11px; background: var(--surface-sunken); color: var(--muted-foreground); font-size: 13px; white-space: nowrap; }
.input-affix .affix:first-child { border-right: 1px solid var(--border); }
.input-affix .affix:last-child { border-left: 1px solid var(--border); }
input[type="search"]::-webkit-search-cancel-button { display: none; }

/* ---------- Alerts / inline messages ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-md); font-size: 13px; border: 1px solid transparent; }
.alert svg { margin-top: 1px; }
.alert-body { flex: 1; min-width: 0; }
.alert-error { background: var(--danger-soft); color: var(--danger-strong); border-color: color-mix(in srgb, var(--danger) 18%, transparent); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.alert-success strong { color: var(--text-strong); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 20%, transparent); }
.alert-info { background: var(--brand-orange-tint); color: var(--text-strong); border-color: color-mix(in srgb, var(--brand-orange) 18%, transparent); }
.alert-info svg { color: var(--brand-orange-deep); }
.alert .btn { margin: -4px -4px -4px 0; }
.alert.shake { animation: olo-shake 360ms var(--ease-out); }
@keyframes olo-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-neutral { background: var(--surface-hover); color: var(--muted-foreground); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-brand { background: var(--brand-orange-tint); color: var(--brand-orange-deep); }
.badge-brand::before { display: none; }
.kbd-count { display: inline-flex; min-width: 20px; height: 18px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--surface-active); color: var(--muted-foreground); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Brand ---------- */
/* The website's own logo (od-website/assets/images/logo.jpg), white knocked out around the squares. */
.brand-logo { display: block; width: auto; height: 28px; align-self: flex-start; }

/* ---------- Avatar ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--brand-orange-deep); background: var(--brand-orange-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-orange) 22%, transparent); text-transform: uppercase; }

/* ---------- Dashboard shell ---------- */
.app { display: flex; min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; width: 248px; flex-shrink: 0; display: flex; flex-direction: column; padding: 18px 12px 12px; color: var(--sidebar-foreground); }
.sidebar-brand { padding: 4px 10px 22px; }
.nav-label { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px;
  border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; color: var(--secondary-foreground); text-align: left;
  transition: background-color var(--motion-quick) ease, color var(--motion-quick) ease;
}
.nav-item svg { width: 17px; height: 17px; color: var(--text-subtle); transition: color var(--motion-quick) ease; }
.nav-item:hover { background: var(--surface-hover); color: var(--text-strong); }
.nav-item:hover svg { color: var(--secondary-foreground); }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.nav-item[aria-current="page"] svg { color: var(--brand-orange); }
.nav-item:active { transform: scale(.985); }
.sidebar-footer { margin-top: auto; padding-top: 12px; }
.account-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md); }
.account-card .account-meta { flex: 1; min-width: 0; line-height: 1.3; }
.account-card .account-name { display: block; font-size: 13px; font-weight: 500; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card .account-sub { font-size: 11.5px; color: var(--text-subtle); }
.sidebar-support { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border-radius: var(--radius-sm); font-size: 12.5px; color: var(--muted-foreground); transition: background-color var(--motion-quick) ease, color var(--motion-quick) ease; }
.sidebar-support:hover { background: var(--surface-hover); color: var(--text-strong); }
.sidebar-support svg { width: 15px; height: 15px; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 8px 8px 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 32px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(180%) blur(12px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.topbar-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); min-width: 0; }
.topbar-crumbs .crumb-current { color: var(--text-strong); font-weight: 500; }
.topbar-crumbs svg { width: 14px; height: 14px; color: var(--text-subtle); }
.menu-toggle { display: none; }
/* Left-aligned under the topbar crumbs; the cap only limits line length on very wide screens. */
.content { width: 100%; max-width: 1180px; padding: 32px 32px 56px; }
.view { animation: olo-view-in var(--motion-enter) var(--ease-out) both; }
@keyframes olo-view-in { from { opacity: 0; transform: translateY(6px); } }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-header p { margin-top: 4px; color: var(--muted-foreground); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; max-width: 100%; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 0; }
.card-header p { margin-top: 3px; font-size: 13px; color: var(--muted-foreground); max-width: 62ch; }
.card-body { padding: 18px 20px 20px; }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-sunken); border-radius: 0 0 var(--radius-lg) var(--radius-lg); font-size: 12.5px; color: var(--muted-foreground); }
.card-footer.end { justify-content: flex-end; }
.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 640px); gap: 16px 32px; }
.settings-grid + .settings-grid { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); }
.settings-grid > header h2 { margin-bottom: 4px; }
.settings-grid > header p { font-size: 13px; color: var(--muted-foreground); }
.definition { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13.5px; }
.definition dt { color: var(--muted-foreground); }
.definition dd { margin: 0; color: var(--text-strong); font-weight: 500; overflow-wrap: anywhere; }
/* Settings > Account (assets/settings.js): every detail we hold, and requests waiting for approval. */
.account-list { grid-template-columns: 170px minmax(0, 1fr); }
.account-list .account-empty { color: var(--text-subtle); font-weight: 400; }
.account-list .account-line { display: block; }
.account-list .account-sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.account-list .mono-value { font-family: var(--font-mono); font-size: 12.5px; }
.account-form-group { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.account-form-heading { font-size: 13.5px; font-weight: 600; color: var(--text-strong); margin: 0; }
.account-form-group + .field { margin-top: 12px; }
[data-account-footer] .btn { flex-shrink: 0; }

/* ---------- Segmented control ---------- */
.segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 2px; padding: 3px; border-radius: var(--radius-md); background: var(--surface-hover); border: 1px solid var(--border); }
.segmented button { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); transition: background-color var(--motion-quick) ease, color var(--motion-quick) ease, box-shadow var(--motion-quick) ease; }
.segmented button svg { width: 14px; height: 14px; }
.segmented button:hover { color: var(--text-strong); }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { width: 280px; max-width: 100%; }
.toolbar .search .input { height: 34px; font-size: 13px; }
.toolbar-spacer { flex: 1; }
.toolbar-meta { font-size: 12.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

/* ---------- Data table ---------- */
.table-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-xs); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.data-table th { height: 38px; padding: 0 16px; text-align: left; font-size: 12px; font-weight: 500; color: var(--muted-foreground); background: var(--surface-sunken); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { height: 52px; padding: 8px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--secondary-foreground); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color var(--motion-quick) ease; }
.data-table tbody tr:hover { background: var(--surface-sunken); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.data-table time, .data-table .when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-primary { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text-strong); font-weight: 500; }
.cell-primary .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-sub { display: block; font-size: 12px; color: var(--muted-foreground); font-weight: 400; margin-top: 1px; }
.row-actions { display: inline-flex; gap: 2px; opacity: 0; transition: opacity var(--motion-quick) ease; }
.data-table tr:hover .row-actions, .data-table tr:focus-within .row-actions { opacity: 1; }
@media (hover: none) { .row-actions { opacity: 1; } }
.row-actions .btn { color: var(--muted-foreground); }
.row-actions .btn:hover { color: var(--text-strong); }
.row-actions .btn.danger:hover { color: var(--danger); background: var(--danger-soft); }
.row-link { display: flex; align-items: center; gap: 12px; min-width: 0; font-weight: 500; color: var(--text-strong); text-align: left; border-radius: 6px; }
.row-link:hover .name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.clickable-row { cursor: pointer; }
.file-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; background: var(--surface-hover); color: var(--muted-foreground); }
.file-icon svg { width: 16px; height: 16px; }
.file-icon.folder { background: var(--brand-orange-tint); color: var(--brand-orange); }
.file-icon.image { background: #eef4ff; color: #3b63d9; }
.file-icon.doc { background: #fdeeec; color: #c2410c; }
.file-icon.archive { background: #f3effd; color: #6d4bd1; }
.file-icon.data { background: #e9f7ef; color: #15803d; }
.rename-input { height: 32px; font-size: 13.5px; max-width: 360px; }
/* Storage: fixed columns, and a long file or folder name wraps rather than
   widening the table. */
.files-table { table-layout: fixed; }
.files-table th:nth-child(2) { width: 92px; }
.files-table th:nth-child(3) { width: 124px; }
.files-table th:nth-child(4) { width: 152px; }
.files-table .cell-primary .name, .files-table .row-link .name { min-width: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; }

/* Skeleton loading */
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-hover) 0%, var(--surface-active) 50%, var(--surface-hover) 100%); background-size: 200% 100%; animation: olo-shimmer 1.3s ease-in-out infinite; }
.skeleton.box { width: 32px; height: 32px; border-radius: 8px; }
@keyframes olo-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* Empty state */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 24px; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px; background: var(--surface-sunken); border: 1px solid var(--border); color: var(--muted-foreground); box-shadow: var(--shadow-xs); }
.empty-icon svg { width: 22px; height: 22px; }
.empty h3 { font-size: 15px; margin-bottom: 4px; }
.empty p { max-width: 42ch; color: var(--muted-foreground); font-size: 13.5px; }
.empty .btn { margin-top: 18px; }
td.empty-cell { padding: 0; height: auto; }
td.empty-cell:hover, tr:has(> td.empty-cell):hover { background: transparent; }

/* ---------- Storage ---------- */
.storage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.bucket-hint { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-foreground); }
.bucket-hint svg { width: 14px; height: 14px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13px; min-height: 28px; }
.breadcrumb button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 7px; border-radius: 6px; color: var(--muted-foreground); font-weight: 500; transition: background-color var(--motion-quick) ease, color var(--motion-quick) ease; }
.breadcrumb button:hover { background: var(--surface-hover); color: var(--text-strong); }
.breadcrumb button[aria-current="location"] { color: var(--text-strong); cursor: default; background: none; }
.breadcrumb .sep { color: var(--border-strong); display: inline-flex; }
.breadcrumb .sep svg { width: 14px; height: 14px; }
.drop-zone { position: relative; }
.drop-overlay { position: absolute; inset: -6px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--brand-orange); border-radius: calc(var(--radius-lg) + 4px); background: color-mix(in srgb, var(--brand-orange-tint) 88%, transparent); color: var(--brand-orange-deep); font-weight: 500; pointer-events: none; opacity: 0; transform: scale(.99); transition: opacity var(--motion-standard) var(--ease-out), transform var(--motion-standard) var(--ease-out); }
.drop-overlay svg { width: 28px; height: 28px; }
.drop-zone.is-dragging .drop-overlay { opacity: 1; transform: none; }
.load-more { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--border); }
.slug-card { max-width: 560px; }
.slug-preview { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px dashed var(--border-strong); font-size: 12.5px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.slug-preview strong { color: var(--text-strong); font-weight: 600; }

/* Upload tray */
.upload-tray { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: olo-pop-in var(--motion-standard) var(--ease-out) both; }
.upload-tray header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.upload-list { max-height: 240px; overflow-y: auto; padding: 6px 0; }
.upload-item { padding: 8px 14px; font-size: 12.5px; }
.upload-item .row { display: flex; justify-content: space-between; gap: 10px; }
.upload-item .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-weight: 500; }
.upload-item .status { color: var(--muted-foreground); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.upload-item.done .status { color: var(--success); }
.upload-item.failed .status { color: var(--danger); }
.progress { height: 4px; margin-top: 6px; border-radius: 99px; background: var(--surface-hover); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand-orange); transition: width 160ms linear; }
.upload-item.done .progress > span { background: var(--success); }
.upload-item.failed .progress > span { background: var(--danger); }

/* ---------- Emails ---------- */
.recipient { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-strong); font-weight: 500; }
.recipient .addr { min-width: 0; overflow-wrap: anywhere; }
.recipient .more-chip { flex-shrink: 0; }
.more-chip { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--muted-foreground); background: var(--surface-hover); border-radius: 999px; padding: 1px 7px; }
/* Emails and Texts logs: fixed columns, so a long address or subject can
   never push the table wider than its card. Addresses wrap; a subject or
   message shows two lines at most (all of it in the tooltip). */
.emails-table { table-layout: fixed; }
.emails-table th:nth-child(1) { width: 30%; }
.emails-table th:nth-child(3) { width: 116px; }
.emails-table th:nth-child(4) { width: 112px; }
.subject .text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; color: var(--secondary-foreground); }
.subject .err { display: block; margin-top: 2px; font-size: 12px; color: var(--danger); overflow-wrap: anywhere; }
.subject .from { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; }

/* ---------- Integrations ---------- */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: stretch; gap: 16px; }
.integration-card { display: flex; flex-direction: column; min-height: 220px; padding: 20px; gap: 14px; transition: border-color var(--motion-standard) ease, box-shadow var(--motion-standard) ease, transform var(--motion-standard) var(--ease-out); }
.integration-connections { display: flex; flex-direction: column; gap: 10px; max-height: 224px; overflow-y: auto; }
@media (hover: hover) { .integration-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); } }
.integration-head { display: flex; align-items: flex-start; gap: 12px; }
/* A title with no description sits centred against its logo. */
.integration-head:not(:has(p)) { align-items: center; }
/* Pods carry only a title and one action -- no reserved height. */
.pod-card { min-height: 0; }
.integration-head .titles { flex: 1; min-width: 0; }
.integration-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.integration-head p { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.integration-logo { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.integration-logo img { width: 26px; height: 26px; }
.integration-logo svg { width: 22px; height: 22px; }
.connection { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px solid var(--border); }
.connection.clickable { cursor: pointer; transition: border-color var(--motion-standard) ease; }
.connection.clickable:focus-visible { outline: none; box-shadow: var(--focus-ring); }
@media (hover: hover) { .connection.clickable:hover { border-color: var(--border-strong); } }
.connection .meta { flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; }
.connection .meta strong { display: block; font-weight: 500; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection .meta span { font-size: 12px; color: var(--muted-foreground); }
.connection > svg { color: var(--success); }
.integration-foot { margin-top: auto; display: flex; gap: 8px; }
.integration-foot .btn { flex: 1; }
/* Integrations and Pods tables (assets/integrations.js, assets/pods.js): one
   <tbody> per app or pod -- its row, then a row per connected account (or the
   pod's report line), indented under it. Fixed column widths keep every group
   laid out the same; a long name wraps instead of being cut off. When the
   table has 640px or less of room it turns into cards (the @container rules
   below), whatever the window size. */
.int-card { container-type: inline-size; }
.integrations-table { table-layout: fixed; }
.integrations-table .int-col-status { width: 180px; }
.integrations-table .int-col-actions { width: 176px; }
.pod-list .int-col-actions { width: 208px; }
.integrations-table .cell-primary .name, .integrations-table .row-link .name { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.integrations-table .int-app:hover { background: transparent; }
.integrations-table tbody:not(:last-child) tr:last-child td { border-bottom: 1px solid var(--border); }
.int-logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs); }
.int-logo img { width: 20px; height: 20px; }
.int-logo svg { width: 18px; height: 18px; color: var(--muted-foreground); }
.int-conn .row-link { width: 100%; padding-left: 16px; font-weight: 400; }
.int-branch { width: 16px; height: 14px; margin-top: -12px; flex-shrink: 0; border-left: 1.5px solid var(--border-strong); border-bottom: 1.5px solid var(--border-strong); border-bottom-left-radius: 6px; }
.int-conn .when { font-size: 13px; color: var(--muted-foreground); }
@container (max-width: 640px) {
  .int-card .integrations-table colgroup, .int-card .integrations-table thead { display: none; }
  .int-card .integrations-table, .int-card .integrations-table tbody { display: block; width: 100%; }
  /* A wrapping row: the name and its button on the first line, then (after
     the zero-height ::before, a line break) the status or the account's date. */
  .int-card .integrations-table tr { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .int-card .integrations-table tr::before { content: ""; order: 1; flex: 0 0 100%; height: 0; }
  .int-card .integrations-table tbody:last-child tr:last-child { border-bottom: 0; }
  .int-card .integrations-table tr td, .int-card .integrations-table tbody:not(:last-child) tr:last-child td { display: block; width: auto; height: auto; margin: 0; padding: 0; border: 0; }
  .int-card .integrations-table tr td:first-child { flex: 1 1 0; min-width: 0; }
  .int-card .integrations-table tr td.col-actions { position: static; flex: 0 0 auto; width: auto; }
  .int-card .integrations-table tr td.col-actions:empty { display: none; }
  .int-card .integrations-table tr td:nth-child(2) { order: 2; flex: 1 1 auto; min-width: 0; padding-left: 44px; }
  .int-card .integrations-table tr td:nth-child(2):empty { display: none; }
  /* A pod has up to three buttons: the name gets the whole first line, and
     the buttons sit at the end of the status line (or under it). */
  .int-card .pod-list tr.int-app td:first-child { flex-basis: 100%; }
  .int-card .pod-list tr.int-app td.col-actions { order: 3; margin-left: auto; }
}
.pod-flagged { color: var(--danger); font-weight: 600; }
/* Integrations: Connected, then the apps not connected yet, each with its own search (assets/integrations.js) */
.int-section + .int-section { margin-top: 28px; }
.int-section-head { align-items: flex-end; }
.int-section-title h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.int-section-title p { margin: 2px 0 0; font-size: 13px; color: var(--muted-foreground); }
.int-no-match { display: block; padding: 18px 20px; }
.int-check-summary { margin-bottom: 12px; }
.int-check-summary:focus { outline: none; }
.int-check-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.int-check-list li { display: flex; align-items: center; gap: 10px; }
.int-check-what { flex: 1; min-width: 0; display: grid; gap: 1px; overflow-wrap: anywhere; }
.int-check-what strong { color: var(--text-strong); font-weight: 600; }
.int-check-list .btn { margin: 0; flex: none; }
/* A pod's dialog: needs attention, how it works, activity (assets/pods.js) */
.pod-attention { margin-top: 16px; }
.pod-attention ul { margin: 4px 0 0; padding-left: 18px; }
.pod-attention p { margin: 6px 0 0; }
.pod-attention-actions { margin-top: 10px; }
/* The on/off toggle on a pod's row (Olo.onOffSwitch in app.js): green and "On", or grey and "Off". */
.olo-switch { display: inline-flex; align-items: center; gap: 8px; padding: 2px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); cursor: pointer; border-radius: 999px; }
.olo-switch-track { position: relative; width: 38px; height: 22px; flex-shrink: 0; border-radius: 999px; background: var(--border-strong); transition: background-color .15s ease; }
.olo-switch-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s ease; }
.olo-switch[aria-checked="true"] { color: var(--success); }
.olo-switch[aria-checked="true"] .olo-switch-track { background: var(--success); }
.olo-switch[aria-checked="true"] .olo-switch-knob { transform: translateX(16px); }
.olo-switch-label { min-width: 22px; text-align: left; }
.olo-switch:hover:not(:disabled) .olo-switch-track { filter: brightness(.95); }
.olo-switch:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.olo-switch:disabled { cursor: not-allowed; opacity: .55; }
.olo-switch[aria-busy="true"] { cursor: progress; opacity: .7; }
.pod-toggle-cell { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.confirm-points { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--muted-foreground); }
@media (prefers-reduced-motion: reduce) { .olo-switch-track, .olo-switch-knob { transition: none; } }
.pod-steps { margin: 0; list-style: none; gap: 8px; }
.pod-step { display: flex; gap: 10px; align-items: baseline; font-size: 13px; line-height: 1.45; }
.pod-step-kind { flex: 0 0 64px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
.pod-step-when .pod-step-kind { color: var(--brand-orange-deep); }
.pod-step-then .pod-step-kind { color: var(--success); }
.pod-activity { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pod-event { display: flex; gap: 10px; align-items: baseline; }
.pod-event .when { flex: 0 0 96px; color: var(--muted-foreground); }
.pod-event > span:last-child, .pod-step > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.pod-event-problem { color: var(--danger); }
@media (max-width: 560px) {
  .pod-step { flex-direction: column; gap: 2px; }
  .pod-step-kind { flex-basis: auto; }
}

/* Preset / radio cards (Connect dialog) */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; display: block; padding: 12px 12px 12px 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); transition: border-color var(--motion-quick) ease, box-shadow var(--motion-quick) ease, background-color var(--motion-quick) ease; }
.choice:hover { border-color: #c5c9d3; }
.choice input { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; margin: 0; appearance: none; -webkit-appearance: none; border: 1.5px solid var(--border-strong); border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 0 var(--surface); transition: border-color var(--motion-quick) ease, background-color var(--motion-quick) ease, box-shadow var(--motion-quick) var(--ease-out); }
.choice:hover input:not(:disabled) { border-color: #b3b8c4; }
.choice input:checked { border-color: var(--brand-orange); background: var(--brand-orange); box-shadow: inset 0 0 0 4px var(--surface); }
.choice input:disabled { background: var(--surface-sunken); border-color: var(--border); cursor: not-allowed; }
.choice strong { display: block; font-size: 13px; font-weight: 600; color: var(--text-strong); }
.choice:has(input:checked) { border-color: var(--brand-orange); background: color-mix(in srgb, var(--brand-orange-tint) 55%, var(--surface)); box-shadow: 0 0 0 1px var(--brand-orange); }
.choice:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.choice[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.choice[aria-disabled="true"]:hover { border-color: var(--border-strong); }
/* Private Custom App setup steps (Shopify private distribution) */
.setup-steps { margin-top: 18px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px solid var(--border); }
.setup-steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; color: var(--secondary-foreground); }
.setup-steps-list li::marker { color: var(--text-subtle); font-weight: 600; }
.step-label { display: block; }
.copy-field { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.copy-field code { flex: 1; min-width: 0; padding: 4px 0; background: none; font-size: 12px; color: var(--text-strong); white-space: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 20px), transparent); }
.copy-field code::-webkit-scrollbar { display: none; }
.copy-field .btn-icon.copied { color: var(--success); }
.copy-field .btn { flex-shrink: 0; }
/* A full address to copy, shown whole: it wraps instead of scrolling (a webhook's address). */
.copy-field.wrap code { white-space: normal; overflow: visible; overflow-wrap: anywhere; word-break: break-all; line-height: 1.5; -webkit-mask-image: none; mask-image: none; }
.mono-input { font-family: var(--font-mono); font-size: 13px; }
.scope-group-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-subtle); margin-top: 6px; }
.scope-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-strong); }
.scope-row small { display: block; font-size: 12px; color: var(--muted-foreground); }
.scope-row .check { display: inline-flex; width: 15px; margin-top: 2px; color: var(--success); flex-shrink: 0; }
.scope-row .check svg { width: 15px; height: 15px; }
.scope-core { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px solid var(--border); }

/* Dialog content blocks: a titled section over a sunken panel */
.dialog-section { margin-top: 20px; }
.dialog-section-title { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-strong); }
.dialog-section > .alert { margin-top: 10px; }
.panel { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px solid var(--border); }
.panel-empty { font-size: 13px; color: var(--muted-foreground); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; font-size: 13px; }
.kv > .k { flex-shrink: 0; color: var(--muted-foreground); }
.kv > .v { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; text-align: right; color: var(--text-strong); font-weight: 500; overflow-wrap: anywhere; }
.kv > .v.mono { font-family: var(--font-mono); font-size: 12.5px; font-weight: 400; }
/* A chosen Drive file: its name and long ID take the room; the kind ("Document") and Remove never wrap. */
.kv.file-row > .k { flex: 1 1 auto; min-width: 0; }
.kv.file-row > .v { flex-shrink: 0; white-space: nowrap; }
.kv-edit { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.kv-edit .input { height: 32px; font-size: 13px; }
.kv-edit .btn { height: 32px; }
/* A secret field's own Show button sits at the right edge: its tip opens leftwards, so it never widens the dialog. */
.kv-edit > [data-tip]:last-child::after { left: auto; right: 0; transform: translate(0, 3px); }
.kv-edit > [data-tip]:last-child:hover::after, .kv-edit > [data-tip]:last-child:focus-visible::after { transform: translate(0, 0); }
.kv + .field-error { margin-top: -4px; text-align: right; }
.test-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; font-size: 13px; color: var(--text-strong); }
.test-row .result { flex: 1; min-width: 0; text-align: right; font-size: 12.5px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.test-row .result.error { color: var(--danger); }
.test-row .btn { flex-shrink: 0; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; height: 32px; font-size: 13px; }
.inline-form .btn { height: 32px; flex-shrink: 0; }
.form-section-title { margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-strong); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.server-grid { display: grid; grid-template-columns: minmax(0, 1fr) 96px 168px; gap: 10px; align-items: start; }
.server-grid + .field, .field + .server-grid { margin-top: 14px; }

/* ---------- Settings: API key ---------- */
.key-field { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-sunken); }
.key-field code { flex: 1; min-width: 0; padding: 0; background: none; font-size: 13px; color: var(--text-strong); letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-field code.revealed { white-space: normal; overflow-wrap: anywhere; }
.key-field .btn { flex-shrink: 0; }

/* ---------- Dialog ---------- */
dialog.dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); color: var(--foreground); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.dialog.wide { width: min(540px, calc(100vw - 32px)); }
dialog.dialog.wider { width: min(1120px, calc(100vw - 32px)); }
/* flex-basis auto, not 0: the dialog has no set height (only a max-height), and Safari/WebKit sizes a
   0-basis child of such a column to nothing, so the dialog showed as a 2px line on iPhones. */
dialog.dialog > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
dialog.dialog[open] { display: flex; flex-direction: column; animation: olo-pop-in var(--motion-standard) var(--ease-out) both; }
dialog.dialog::backdrop { background: rgb(17 19 37 / .38); backdrop-filter: blur(2px); animation: olo-fade-in var(--motion-standard) ease both; }
dialog.dialog.closing { animation: olo-pop-out 140ms ease-in both; }
dialog.dialog.closing::backdrop { animation: olo-fade-out 140ms ease-in both; }
.dialog-body { flex: 1 1 auto; min-height: 0; padding: 22px 22px 6px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-body[tabindex="-1"]:focus { outline: none; }
.dialog-body > h2 + p { margin-top: 6px; color: var(--muted-foreground); font-size: 13.5px; }
.dialog-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px; background: var(--surface-sunken); border: 1px solid var(--border); }
.dialog-icon.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.dialog-icon svg { width: 20px; height: 20px; }
.dialog-actions { flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 16px 22px 20px; }
.dialog-actions .push-left { margin-right: auto; }
.dialog-body.scrolls + .dialog-actions { padding-top: 14px; border-top: 1px solid var(--border); }
@keyframes olo-pop-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes olo-pop-out { to { opacity: 0; transform: translateY(4px) scale(.98); } }
@keyframes olo-fade-in { from { opacity: 0; } }
@keyframes olo-fade-out { to { opacity: 0; } }

/* ---------- Toasts ---------- */
.toast-region { position: fixed; left: 50%; bottom: 20px; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 12px; background: #16182a; color: #f4f5f9; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); pointer-events: auto; animation: olo-toast-in 260ms var(--ease-out) both; }
.toast svg { width: 16px; height: 16px; }
.toast.success svg { color: #4ade80; }
.toast.error svg { color: #f87171; }
.toast.info svg { color: #a5b4fc; }
.toast.leaving { animation: olo-toast-out 180ms ease-in both; }
@keyframes olo-toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes olo-toast-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Tooltip (CSS only, for icon buttons) */
[data-tip] { position: relative; }
@media (hover: hover) {
  [data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 20; padding: 4px 8px; border-radius: 6px; background: #16182a; color: #fff; font-size: 11.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 3px); transition: opacity var(--motion-quick) ease, transform var(--motion-quick) ease; transition-delay: 0s; }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); transition-delay: 350ms; }
}

/* ---------- Subscription ---------- */
.sub-list { max-width: 720px; }
.sub-details { display: flex; flex-direction: column; gap: 4px; }
.sub-details > .alert { margin-bottom: 10px; }
.card-header h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.card-footnote { flex: 1 1 220px; max-width: 46ch; }
.sub-intro { max-width: 920px; margin-bottom: 20px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; max-width: 920px; }
.plan-grid .card + .card { margin-top: 0; }
.plan-card { display: flex; flex-direction: column; padding: 24px; }
.plan-card.featured { border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-orange) 25%, transparent), var(--shadow-sm); }
.plan-card header .badge { margin-bottom: 10px; }
.plan-card h3 { font-size: 17px; }
.plan-card header p { margin-top: 4px; font-size: 13px; color: var(--muted-foreground); min-height: 2.8em; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.plan-price strong { font-size: 32px; font-weight: 650; letter-spacing: -.03em; color: var(--text-strong); }
.plan-price span { font-size: 14px; color: var(--muted-foreground); }
.plan-note { margin: 2px 0 18px; font-size: 13px; color: var(--muted-foreground); }
.plan-includes { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.plan-includes-title { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--text-strong); }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; color: var(--text-strong); }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; }
.plan-features svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; color: var(--brand-orange); }
.plan-footnote { max-width: 920px; margin-top: 16px; font-size: 12.5px; color: var(--muted-foreground); }
.sub-form { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.sub-form .field + .field, .sub-form .field-row + .field, .sub-form .field + .field-row { margin-top: 0; }
.sub-tax { display: flex; flex-direction: column; gap: 10px; }
.sub-tax .field + .field { margin-top: 0; }
.sub-no-tax { min-height: 32px; }
.tier-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tier { position: relative; cursor: pointer; }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier span { display: flex; align-items: center; justify-content: center; height: 38px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text-strong); transition: border-color var(--motion-quick) ease, background-color var(--motion-quick) ease, box-shadow var(--motion-quick) ease; }
.tier:hover span { border-color: var(--border-strong); }
.tier input:checked + span { border-color: var(--brand-orange); background: var(--brand-orange-tint); box-shadow: 0 0 0 1px var(--brand-orange); }
.tier input:focus-visible + span { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); background: var(--surface-sunken); font-size: 13.5px; color: var(--muted-foreground); white-space: nowrap; }
.input-prefix > .input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; }
.input-prefix[hidden] { display: none; }
.sub-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-sunken); font-size: 13px; color: var(--muted-foreground); }
.sub-total strong { font-size: 15px; color: var(--text-strong); }
.sub-checkout { margin-top: 16px; }
.sub-checkout-mount { min-height: 420px; }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100svh; background: var(--surface); }
.login-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; background: #16182a; color: #f4f5f9; isolation: isolate; }
.login-aside::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 55% at 85% 100%, rgb(255 122 41 / .55), transparent 70%), radial-gradient(ellipse 50% 45% at 10% 0%, rgb(255 171 107 / .18), transparent 70%); }
.login-aside::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.login-pitch h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.03em; font-weight: 600; color: #fff; max-width: 18ch; text-wrap: balance; }
.login-pitch p { margin-top: 12px; max-width: 40ch; color: rgb(244 245 249 / .7); font-size: 15px; }
.login-features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 420px; }
.login-features li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); font-size: 13px; font-weight: 500; color: rgb(244 245 249 / .9); }
.login-features svg { color: var(--brand-orange-soft); }
.login-aside footer { font-size: 12px; color: rgb(244 245 249 / .5); }
.login-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; }
.login-form { width: 100%; max-width: 360px; }
.login-form .login-logo { display: none; margin-bottom: 24px; }
.login-form h1 { font-size: 24px; }
.login-form > p:not(.login-help) { margin-top: 6px; margin-bottom: 28px; color: var(--muted-foreground); }
.login-form .btn-primary { margin-top: 22px; }
.login-form .alert { margin-top: 16px; }
.login-help { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); text-align: center; }
.login-help a { color: var(--text-strong); font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: text-decoration-color var(--motion-quick) ease; }
.login-help a:hover { text-decoration-color: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: minmax(0, 640px); gap: 14px; }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-form .login-logo { display: block; }
  .app { display: block; }
  /* Pinned to the top and bottom of what is on screen, with no height of its own: a set height
     (100svh) is the screen with the browser's bars showing, so once a phone browser hides them
     the drawer stopped short of the bottom. It scrolls on a short screen (a phone on its side)
     and keeps clear of the home indicator and notch. */
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 80; height: auto; width: 272px; overflow-y: auto; overscroll-behavior: contain; padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); padding-left: max(12px, env(safe-area-inset-left)); background: var(--sidebar); border-right: 1px solid var(--border); transform: translateX(-100%); visibility: hidden; transition: transform 280ms var(--ease-out), visibility 0s linear 280ms, box-shadow 280ms ease; }
  .nav-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); transition: transform 280ms var(--ease-out), visibility 0s, box-shadow 280ms ease; }
  .nav-scrim { position: fixed; inset: 0; z-index: 70; background: rgb(17 19 37 / .35); opacity: 0; pointer-events: none; transition: opacity 240ms ease; }
  .nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .workspace { margin: 0; border: 0; border-radius: 0; min-height: 100svh; box-shadow: none; }
  .topbar { padding: 0 12px 0 8px; border-radius: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 22px 16px 48px; }
  .page-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 640px) {
  h1 { font-size: 20px; }
  .toolbar .search { width: 100%; }
  .toolbar .segmented { width: 100%; }
  .toolbar .segmented button { flex: 1 1 auto; justify-content: center; gap: 5px; padding: 0 8px; }
  .storage-bar { flex-direction: column; align-items: flex-start; }
  /* Tables become stacked cards on phones -- no sideways scrolling. */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table td { height: auto; padding: 0; border: 0; }
  .data-table td + td { margin-top: 4px; }
  .data-table td[data-label]:not(:first-child) { font-size: 12.5px; color: var(--muted-foreground); }
  .data-table .col-actions { position: absolute; right: 8px; top: 12px; width: auto; }
  /* The name gets the whole first line; size, date and the file's buttons
     share the second (the buttons drop to a third line if they don't fit). */
  .files-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
  .files-table td:first-child { flex: 1 1 100%; }
  .files-table td:not(:first-child) { width: auto; }
  .files-table td[data-label="Size"] { padding-left: 44px; margin: 0; }
  .files-table td[data-label="Modified"] { margin: 0; }
  .files-table td[data-label="Modified"]::before { content: "·"; margin: 0 6px; }
  .files-table .clickable-row td[data-label="Size"] { display: none; }
  .files-table .clickable-row td[data-label="Modified"] { padding-left: 44px; }
  .files-table .clickable-row td[data-label="Modified"]::before { content: none; }
  .files-table td.col-actions { position: static; width: auto; margin: 0 0 0 auto; }
  .emails-table td[data-label="Status"] { position: absolute; right: 14px; top: 12px; width: auto; margin: 0; }
  .emails-table .recipient { padding-right: 84px; }
  .definition { grid-template-columns: 1fr; gap: 2px; }
  .definition dd + dt { margin-top: 10px; }
  .choice-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .server-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .server-grid > :first-child { grid-column: 1 / -1; }
  .dialog-body { padding: 20px 18px 6px; }
  .dialog-actions { padding: 14px 18px 18px; }
  .dialog-actions .btn { flex: 1 1 auto; }
  .dialog-actions .push-left { flex: 1 1 100%; order: 1; margin-right: 0; }
  .kv { flex-direction: column; align-items: flex-start; gap: 2px; }
  .kv > .v { justify-content: flex-start; text-align: left; }
  .kv-edit { width: 100%; }
  .kv + .field-error { text-align: left; }
  .test-row { flex-wrap: wrap; }
  .test-row .result { order: 3; flex-basis: 100%; text-align: left; }
  .test-row .result:empty { display: none; }
  .upload-tray { right: 16px; left: 16px; width: auto; bottom: 16px; }
  .toast-region { bottom: 16px; }
}

/* Pod report tables (assets/pods.js): a row the app flagged -- e.g. an order
   with no reachable email or phone -- is red so nothing slips by unseen. */
.pod-table tbody tr.row-flagged { background: var(--danger-soft); }
.pod-table tbody tr.row-flagged:hover { background: var(--danger-soft); }
.pod-table tbody tr.row-flagged td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.pod-table .cell-missing { color: var(--danger); font-weight: 600; }
.pod-table .cell-empty { color: var(--muted-foreground); }
/* Never a sideways scroll: long values (an email, a name) wrap, and when the
   report has 900px or less of room each row becomes a card listing its
   columns as "label  value" lines (the @container rules below). */
.pod-records { container-type: inline-size; }
.pod-table td { overflow-wrap: anywhere; }
@container (max-width: 900px) {
  .pod-records .pod-table thead { display: none; }
  .pod-records .pod-table, .pod-records .pod-table tbody { display: block; width: 100%; }
  .pod-records .pod-table tbody tr { position: static; display: block; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .pod-records .pod-table tbody tr:last-child { border-bottom: 0; }
  .pod-records .pod-table tbody tr.row-flagged { box-shadow: inset 3px 0 0 var(--danger); }
  .pod-records .pod-table tbody tr td[data-label] { display: grid; grid-template-columns: minmax(80px, 32%) minmax(0, 1fr); justify-items: start; align-items: center; gap: 12px; width: auto; height: auto; margin: 0; padding: 3px 0; border: 0; box-shadow: none; font-size: 13px; color: var(--secondary-foreground); }
  .pod-records .pod-table tbody tr td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--muted-foreground); }
  .pod-records .pod-table tbody tr td[data-label]:first-child { display: block; padding: 0 0 6px; font-weight: 500; color: var(--text-strong); }
  .pod-records .pod-table tbody tr td[data-label]:first-child::before { content: none; }
  .pod-records .pod-table tbody tr.is-open { border-bottom: 0; padding-bottom: 4px; }
  .pod-records .pod-table tbody tr.pod-detail-row > td { display: block; height: auto; padding: 4px 0 0; border: 0; }
}
/* A row with details opens under itself (the Nuki pod's orders: the order, door code, email, text). */
.pod-records-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--muted-foreground); }
.pod-table .pod-row-toggle { gap: 6px; font-weight: 500; }
.pod-row-chevron { display: inline-flex; flex: none; color: var(--muted-foreground); transition: transform .15s ease; }
.pod-row-chevron svg { width: 14px; height: 14px; }
.pod-table tr.is-open .pod-row-chevron { transform: rotate(90deg); }
.pod-table tr.is-open > td { border-bottom-color: transparent; }
.pod-table tr.pod-detail-row:hover { background: none; }
.pod-table tr.pod-detail-row > td { height: auto; padding: 4px 16px 16px; white-space: normal; }
.pod-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.pod-details-section { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); min-width: 0; }
.pod-details-section h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted-foreground); }
.pod-details-section dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.pod-details-section dt { color: var(--muted-foreground); }
.pod-details-section dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .pod-row-chevron { transition: none; } }
@media (max-width: 640px) {
  .pod-table tr.pod-detail-row { padding-top: 0; }
  .pod-table tr.pod-detail-row > td { padding: 0; }
  .pod-details-section dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pod-details-section dd + dt { margin-top: 6px; }
}

/* Owner management console (admin.html / admin.js). */
.admin-boot { display: grid; place-items: center; min-height: 100svh; color: var(--muted-foreground); font-size: 14px; }
.admin-boot[hidden], .login.solo[hidden], .app[hidden] { display: none; }
.login.solo { grid-template-columns: minmax(0, 1fr); }
.login.solo .login-form .login-logo { display: block; }
button.sidebar-support { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; font-size: 12.5px; }
.sidebar-support[aria-current="page"] { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.sidebar-support[aria-current="page"] svg { color: var(--brand-orange); }
/* Client portal Contact Support (assets/support.js). */
.support-ticket { max-width: 720px; }
.support-textarea { height: auto; min-height: 160px; padding-top: 10px; padding-bottom: 10px; resize: vertical; line-height: 1.5; }
.support-sent { display: flex; gap: 12px; align-items: flex-start; }
.support-sent .dialog-icon { flex: none; margin: 0; }
.support-sent h2 { font-size: 16px; margin-bottom: 4px; }
.support-sent p { color: var(--muted-foreground); font-size: 13.5px; }
/* Admin console Subscriptions (admin-assets/subscriptions.js). */
.subs-account-switch { margin: -8px 0 16px; }
.subs-synced { align-self: center; font-size: 12.5px; }
.subs-body { display: flex; flex-direction: column; gap: 28px; }
.acct-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.acct-badge.acct-a { background: var(--brand-orange-tint); color: var(--brand-orange-deep); }
.acct-badge.acct-b { background: #eef1fe; color: #3949ab; }
.subs-sync { display: flex; flex-direction: column; gap: 10px; }
.sync-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sync-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); font-size: 13px; }
.sync-count { font-weight: 500; color: var(--text-strong); }
.sync-bad { color: var(--danger); font-weight: 500; cursor: help; }
.subs-body > .card + .card { margin-top: 0; }
/* Nine cards: a full 3 x 3 on desktop and tablet, 2 across on phones. */
.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi-grid > .card + .card { margin-top: 0; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-width: 0; }
.kpi-label { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); }
.kpi-value { font-size: 24px; font-weight: 650; letter-spacing: -.01em; color: var(--text-strong); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-sub { padding-bottom: 4px; font-size: 12.5px; color: var(--muted-foreground); }
.kpi-up .kpi-sub { color: var(--success); }
.kpi-down .kpi-sub { color: var(--danger); }
.kpi-warn .kpi-sub { color: var(--warning); }
.kpi-split { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.subs-section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.subs-section.card { padding: 18px 20px 16px; }
.subs-section-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.subs-section-head h2 { font-size: 16px; font-weight: 600; color: var(--text-strong); }
.subs-section-head p { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); }
.subs-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subs-toolbar { margin-bottom: 0; }
/* The page-level error banner (inlineError) keeps its distance from what follows. */
.view > .alert { margin-bottom: 16px; }
.subs-plan-filter { width: 220px; max-width: 100%; }
.subs-plan-filter .picker-trigger { height: 34px; font-size: 13px; }
/* A filter row wraps onto a second line rather than running off the edge. */
.subs-filter-row { min-width: 0; }
.subs-filter-row .segmented { flex-wrap: wrap; }
.subs-filter-row .segmented button { white-space: nowrap; }
.table-scroll { min-width: 0; }
.subs-table { min-width: var(--table-min, 860px); table-layout: fixed; }
.subs-table th { overflow: hidden; }
/* Long values wrap rather than end in an ellipsis (owner, 2026-10-02: nothing cut off). */
.subs-table td { white-space: normal; overflow-wrap: anywhere; }
.subs-table .badge, .subs-table .btn, .subs-table td.num, .subs-table .th-sort { white-space: nowrap; overflow-wrap: normal; }
.subs-invoices { min-width: 620px; table-layout: fixed; }
.subs-invoices td { white-space: normal; overflow-wrap: anywhere; }
.subs-ends { color: var(--warning); font-weight: 500; }
.subs-link { color: var(--text-strong); font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.subs-link:hover { text-decoration-color: currentColor; }
.alert .subs-link { color: inherit; }
.subs-table .num, .subs-invoices .num { text-align: right; font-variant-numeric: tabular-nums; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.th-sort:hover { color: var(--text-strong); }
.th-arrow { font-size: 11px; opacity: .45; }
th[aria-sort] .th-arrow { opacity: 1; color: var(--brand-orange-deep); }
th.num .th-sort { flex-direction: row-reverse; }
.subs-customer { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.subs-customer .name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.subs-client { display: inline-flex; align-items: center; flex-shrink: 0; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--success-soft); color: var(--success); }
.subs-customer .name { overflow-wrap: anywhere; font-weight: 500; color: var(--text-strong); }
.subs-customer .sub { overflow-wrap: anywhere; font-size: 12px; color: var(--muted-foreground); }
.subs-plan, .subs-reason { display: block; overflow-wrap: anywhere; }
/* A sub line holding badges or a button next to words (Users: plan and access, name on invoices). */
.subs-customer .sub.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; }
.user-row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.user-row-actions .btn { color: var(--muted-foreground); }
.user-row-actions .btn:hover { color: var(--text-strong); }
.btn.is-disabled { opacity: .4; cursor: not-allowed; }
.btn.is-disabled:hover { background: none; }
.pw-reveal { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--muted); font-size: 16px; color: var(--text-strong); user-select: all; overflow-wrap: anywhere; }
.pw-reveal-note { margin-top: 8px; font-size: 12.5px; }
.subs-badges { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.subs-empty { display: block; padding: 22px 16px; font-size: 13px; color: var(--muted-foreground); text-align: center; }
.subs-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted-foreground); }
.rev-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 200px; padding-top: 8px; }
.rev-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.rev-bar { display: flex; flex-direction: column-reverse; width: 100%; max-width: 44px; height: 140px; border-radius: 6px; background: var(--surface-sunken); overflow: hidden; }
.rev-seg { display: block; width: 100%; }
.rev-seg.acct-a, .rev-legend i.acct-a { background: var(--brand-orange); }
.rev-seg.acct-b, .rev-legend i.acct-b { background: #6b7cf0; }
.rev-amount { min-height: 14px; font-size: 11px; color: var(--muted-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rev-label { font-size: 11.5px; color: var(--muted-foreground); }
.rev-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted-foreground); }
.rev-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rev-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.subs-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.subs-detail-head p { margin-top: 3px; font-size: 13px; overflow-wrap: anywhere; }
.subs-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 18px; }
.subs-detail-head > div:first-child { min-width: 0; }
.subs-detail-head h2 { font-size: 18px; overflow-wrap: anywhere; }
.subs-detail .panel { gap: 2px; }
.subs-problem { margin-top: 18px; }
.subs-problem .alert-body { display: flex; flex-direction: column; gap: 4px; }
.subs-note { margin-top: 10px; font-size: 12.5px; }
.subs-dialog-links { display: flex; flex-wrap: wrap; gap: 8px; margin-right: auto; }
.btn-trail { display: inline-flex; color: var(--text-subtle); }
.btn-trail svg { width: 14px; height: 14px; }

/* Admin console Customer taxes (admin-assets/taxes.js); tables, sections and
   the detail window reuse the Subscriptions classes above. */
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.tax-id-line { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; }
.tax-id-line .mono { overflow: hidden; text-overflow: ellipsis; }
.tax-id-line.bad .mono { color: var(--danger); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.tax-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.tax-dot.verified { background: var(--success); }
.tax-dot.pending { background: var(--warning); }
.tax-dot.unverified { background: var(--danger); }
.tax-subhead { margin-top: 10px; }
.tax-subhead h3 { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.tax-subhead p { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); max-width: 900px; }
.tax-principles { padding: 16px 20px; }
.tax-principles h3 { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.tax-principles ul { margin: 8px 0 10px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; color: var(--secondary-foreground); }
.tax-principles p { font-size: 12.5px; }
.tax-issues .alert-body ul { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.subs-detail > .alert { margin-bottom: 14px; }
.tax-ids { gap: 0; }
.tax-id-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tax-id-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.tax-id-value { font-size: 14px; font-weight: 500; color: var(--text-strong); overflow-wrap: anywhere; }
.tax-id-registered { color: var(--secondary-foreground); overflow-wrap: anywhere; }
.tax-id-actions { display: flex; gap: 6px; }
.tax-add { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.tax-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tax-add-type { flex: 0 0 240px; min-width: 0; }
.tax-add-type .input { width: 100%; }
.tax-add-row > .input { flex: 1 1 200px; min-width: 0; }
.tax-hint { margin: -2px 0 10px; font-size: 12.5px; }
.tax-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tax-choices .choice .muted { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; }
.tax-rec { margin-left: 6px; height: 18px; font-size: 10.5px; vertical-align: 1px; }
.tax-status .form-actions, .tax-company .form-actions { margin-top: 12px; }
.tax-check { margin-top: 12px; }
.tax-more { margin-top: 18px; }
.tax-more > summary { cursor: pointer; font-size: 13px; font-weight: 500; color: var(--secondary-foreground); }
.tax-more[open] > summary { margin-bottom: 4px; }
@media (max-width: 720px) {
  .tax-choices { grid-template-columns: 1fr; }
  .tax-add-type { flex: 1 1 100%; }
  .tax-id-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tax-id-actions { grid-column: 1 / -1; }
}

/* Subscriptions tables on phones: each row is a card -- the customer on top,
   then one "label ... value" line per column (the shared rules above hide
   the header row, so the labels come from data-label). */
@media (max-width: 640px) {
  .subs-account-switch .segmented { display: flex; }
  .subs-account-switch .segmented button { flex: 1; justify-content: center; }
  .subs-more { padding: 10px 14px; }
  .subs-dialog-links { flex: 1 1 100%; margin-right: 0; }
  .subs-dialog-links .btn { flex: 1 1 0; }
}

/* Console tables never scroll sideways: when a table's card is narrower than
   its columns need, and always on a phone, tables.js (fitCards) gives the card
   .as-cards and every row becomes a card -- the customer on top, then one
   "label ... value" line per column, long values wrapping. */
.as-cards .data-table thead, .as-cards .data-table colgroup { display: none; }
.as-cards .data-table, .as-cards .data-table tbody, .as-cards .data-table tr, .as-cards .data-table td { display: block; width: 100%; }
.as-cards .data-table { min-width: 0; }
.as-cards .data-table tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.as-cards .data-table tbody:last-child tr:last-child { border-bottom: 0; }
.as-cards .data-table td { height: auto; padding: 0; border: 0; white-space: normal; overflow: visible; }
.as-cards .data-table td.phone-hide { display: none; }
.as-cards .data-table td { overflow-wrap: anywhere; }
.as-cards .data-table td.when { white-space: normal; }
.as-cards .data-table td[data-label]:not(:first-child):not(.col-actions) {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 24px; margin-top: 2px;
  font-size: 13px; color: var(--secondary-foreground); text-align: right;
}
.as-cards .data-table td[data-label]:not(:first-child):not(.col-actions)::before {
  content: attr(data-label); flex-shrink: 0; font-size: 12.5px; color: var(--muted-foreground); text-align: left;
}
.as-cards .subs-table td:first-child { margin-bottom: 6px; }
.as-cards .subs-table .subs-customer .name { font-size: 14px; }
.as-cards .subs-customer .name, .as-cards .subs-customer .sub, .as-cards .subs-table .name { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.as-cards .subs-plan, .as-cards .subs-reason { min-width: 0; overflow: visible; white-space: normal; overflow-wrap: anywhere; text-align: right; }
.as-cards .subs-invoices td:first-child { font-weight: 500; margin-bottom: 4px; }
.as-cards .data-table td.actions-cell { margin-top: 8px; text-align: left; }
/* Console tables as cards, compact: on a card wider than a phone, the first
   column runs across the top and the other columns become small "label over
   value" facts side by side, as many to a line as fit. On a phone each stays
   one "label ... value" line (above). Pods keep their own grid (pod-row). */
.subs-table-card { container: tablecard / inline-size; }
@container tablecard (min-width: 480px) {
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 20px; }
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) > td:first-child,
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) > td.empty-cell { grid-column: 1 / -1; margin-bottom: 0; }
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) > td[data-label]:not(:first-child):not(.col-actions) {
    width: auto; min-width: 0; margin: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; text-align: left;
  }
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) > td[data-label]:not(:first-child):not(.col-actions)::before { font-size: 11.5px; }
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) .subs-plan,
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) .subs-reason { text-align: left; }
  .as-cards .subs-table tbody tr:not(.pod-row):not(.pod-group) > td.col-actions { grid-column: 1 / -1; width: auto; }
}
/* Users: the row's two icon buttons sit in the card's top-right corner. */
.as-cards .users-table tbody tr > td.col-actions { position: absolute; top: 8px; right: 8px; width: auto; margin: 0; }
.as-cards .users-table tbody tr > td:first-child { padding-right: 76px; }
/* Its last button is at the table's right edge: its tip opens leftwards. */
.user-row-actions [data-tip]:last-child::after { left: auto; right: 0; transform: translate(0, 3px); }
.user-row-actions [data-tip]:last-child:hover::after, .user-row-actions [data-tip]:last-child:focus-visible::after { transform: translate(0, 0); }
.subs-invoices td:first-child { white-space: normal; overflow-wrap: anywhere; }

/* The console's Pods tables as cards (see .as-cards above): one compact card
   per pod. Its name comes first with its buttons beside it (under the grid on
   a phone), then every column as a small label over its value in an even
   grid: 7 across on a wide card, 4 on a narrower one, 3 or 2 on a phone. In
   the One list view the Client joins the top line. Container queries, so the
   grid follows the card's own width. */
.pods-card { container-type: inline-size; }
.as-cards .pods-table tr.pod-group td { padding: 12px 14px; }
.as-cards .pod-group-head { flex-wrap: wrap; row-gap: 6px; }
.as-cards .pod-group-title { flex: 1 1 160px; }
.as-cards .pod-group-title strong, .as-cards .pod-group-title .muted { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.as-cards .pod-group-head .toolbar-spacer { display: none; }
.as-cards .pod-group-count { margin-left: auto; }
.as-cards .data-table tr.pod-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; padding: 12px 14px 14px; }
.as-cards .data-table tr.pod-row td { width: auto; min-width: 0; margin: 0; white-space: normal; overflow: visible; }
.as-cards .data-table tr.pod-row td:first-child { grid-row: 1; grid-column: 1 / -1; align-self: center; }
.as-cards .data-table tr.pod-row td[data-label="Client"] { grid-column: 1 / -1; }
.as-cards .data-table tr.pod-row td.pod-col-actions { grid-column: 1 / -1; order: 1; position: static; }
.as-cards .data-table tr.pod-row td.pod-col-actions .pod-actions { justify-content: flex-start; flex-wrap: wrap; }
.as-cards .data-table tr.pod-row td[data-label]:not(:first-child):not(.pod-col-actions) {
  display: block; min-height: 0; margin: 0; font-size: 13px; color: var(--secondary-foreground); text-align: left;
}
.as-cards .data-table tr.pod-row td[data-label]:not(:first-child):not(.pod-col-actions)::before {
  content: attr(data-label); display: block; margin-bottom: 5px; font-size: 11.5px; font-weight: 500; line-height: 1.3; color: var(--muted-foreground);
}
.as-cards .pods-table .pod-indent { padding-left: 0; }
.as-cards .pods-table .pod-indent .int-branch { display: none; }
.as-cards tr.pod-row .pod-sub { white-space: normal; overflow-wrap: anywhere; }
.as-cards tr.pod-row .subs-customer .sub { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.as-cards .pods-table .pod-actions .btn:not(.btn-icon) { display: none; }
@container (min-width: 372px) {
  .as-cards .data-table tr.pod-row { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; }
}
@container (min-width: 520px) {
  .as-cards .data-table tr.pod-row { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 14px; }
  .as-cards .data-table tr.pod-row td:first-child { grid-column: 1 / 3; }
  .as-cards .data-table tr.pod-row td.pod-col-actions { grid-row: 1; grid-column: 3 / -1; order: 0; align-self: center; }
  .as-cards .data-table tr.pod-row td.pod-col-actions .pod-actions { justify-content: flex-end; }
}
@container (min-width: 900px) {
  .as-cards .data-table tr.pod-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .as-cards .data-table tr.pod-row td:first-child { grid-column: 1 / 6; }
  .as-cards .data-table tr.pod-row td[data-label="Client"] { grid-row: 1; grid-column: 4 / 6; }
  .as-cards .data-table tr.pod-row:has(td[data-label="Client"]) td:first-child { grid-column: 1 / 4; }
  .as-cards .data-table tr.pod-row td.pod-col-actions { grid-column: 6 / -1; }
}

/* Admin console Secrets (admin-assets/console.js): one table, app > account >
   key. Names and values wrap rather than being cut off. When the table has
   less than 760px of room, every row becomes a two-line card: the name and its
   buttons, then the status and the value. A container query, so it follows the
   table's own width whether the sidebar is showing or not. */
.vault-card { container-type: inline-size; }
.vault-table { table-layout: fixed; }
.vault-table .vault-col-name { width: 32%; }
.vault-table .vault-col-status { width: 172px; }
.vault-table .vault-col-actions { width: 196px; }
.vault-table tr:hover { background: transparent; }
.vault-table tbody:not(:last-child) tr:last-child td { border-bottom: 1px solid var(--border); }
.vault-table .vault-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.vault-table .cell-primary { align-items: center; }
.vault-table .cell-primary .name { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.vault-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vault-name .name { min-width: 0; overflow-wrap: anywhere; font-weight: 500; color: var(--text-strong); }
.vault-acct .vault-name { padding-left: 16px; }
.vault-table .lvl-2 td:first-child { padding-left: 60px; }
.vault-table .lvl-3 td:first-child { padding-left: 76px; }
.vault-field .vault-name .name { font-weight: 400; }
.vault-mono { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.vault-mark { display: inline-flex; flex-shrink: 0; }
.vault-mark svg { width: 15px; height: 15px; }
.vault-mark.ok { color: var(--success); }
.vault-mark.warn { color: var(--warning); }
/* A long value (a publishable key, a client ID) shows two lines at most; the
   whole of it is in the tooltip, and in the Replace dialog when it isn't secret. */
.vault-table .vault-value { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.vault-table .vault-value.empty { display: block; }
.vault-table .vault-grouphead td { height: 40px; }
.vault-table .vault-group { margin: 0; }
.vault-table .vault-result-row td { height: auto; padding-top: 10px; padding-bottom: 10px; }
.vault-table .vault-result { margin: 0; }
.vault-table .vault-empty { padding: 0; }
@container (max-width: 760px) {
  .vault-card .vault-table colgroup, .vault-card .vault-table thead { display: none; }
  .vault-card .vault-table, .vault-card .vault-table tbody { display: block; width: 100%; }
  /* A wrapping row: name and buttons on the first line, then (after the
     zero-height ::before, a line break) the status, with the value beside it
     when there is room and under it when there isn't. */
  .vault-card .vault-table tr { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; width: 100%; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .vault-card .vault-table tr::before { content: ""; order: 1; flex: 0 0 100%; height: 0; }
  .vault-card .vault-table tbody:last-child tr:last-child { border-bottom: 0; }
  .vault-card .vault-table tr td, .vault-card .vault-table tbody:not(:last-child) tr:last-child td { display: block; width: auto; height: auto; margin: 0; padding: 0; border: 0; }
  .vault-card .vault-table tr td:first-child { flex: 1 1 0; min-width: 0; padding-left: 0; }
  .vault-card .vault-table td.col-actions { position: static; flex: 0 0 auto; width: auto; }
  .vault-card .vault-table td[data-label="Status"] { order: 2; flex: 0 0 auto; max-width: 100%; margin-top: 3px; }
  .vault-card .vault-table td[data-label="Value"] { order: 3; flex: 1 1 140px; min-width: 0; margin-top: 3px; }
  .vault-card .vault-table td[data-label="Value"]:empty { display: none; }
  .vault-card .vault-table .int-app td[data-label="Status"] { padding-left: 44px; }
  .vault-card .vault-table .vault-acct td[data-label="Status"] { padding-left: 40px; }
  .vault-card .vault-table tr.lvl-2, .vault-card .vault-table tr.lvl-3 { padding-left: 30px; }
}
}
.vault-list { display: flex; flex-direction: column; gap: 16px; }
.vault-list .empty { margin: 48px auto; }
.vault-account { overflow: hidden; }
.vault-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface-sunken); }
.vault-titles h3 { font-size: 15px; }
.vault-titles p { margin-top: 2px; font-size: 12.5px; color: var(--muted-foreground); }
.vault-head .vault-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.vault-body { padding: 4px 20px 8px; }
.vault-group { margin: 16px 0 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-foreground); }
.vault-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 8px 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.vault-row:last-child { border-bottom: 0; }
.vault-label { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; font-weight: 500; color: var(--text-strong); }
.vault-note { font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.vault-note.ok { color: var(--success); }
.vault-note.warn { color: var(--warning); }
.vault-current { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vault-value { padding: 0; background: none; font-size: 13px; color: var(--text-strong); overflow-wrap: anywhere; letter-spacing: .01em; }
.vault-value.empty { color: var(--muted-foreground); }
.vault-row .vault-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.vault-empty { padding: 16px 0; color: var(--muted-foreground); font-size: 13px; }
@media (max-width: 720px) {
  .vault-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-grid > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi { padding: 12px 14px; }
  .kpi-value { font-size: 20px; }
  .rev-chart { gap: 4px; height: 160px; }
  .rev-bar { height: 124px; }
  .rev-amount { display: none; }
  .rev-label { font-size: 10.5px; }
  .subs-plan-filter { width: 100%; }
  .vault-row .vault-actions { justify-content: flex-start; }
  .vault-head { align-items: flex-start; flex-direction: column; }
}

.topbar-spacer { flex: 1; }
.signin-chip { border: 0; cursor: pointer; font: inherit; font-size: 12px; font-weight: 500; }
.nav-item .badge { margin-left: auto; height: 20px; padding: 0 8px; }
.nav-item .badge::before { display: none; }
.back-link { display: inline-block; margin-bottom: 6px; font-size: 13px; color: var(--muted-foreground); text-decoration: none; }
.back-link:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.app-grid[hidden], .vault-list[hidden] { display: none; }
.app-grid > .card + .card { margin-top: 0; }
.app-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; padding: 20px; font: inherit; text-align: left; color: inherit; cursor: pointer; transition: border-color var(--motion-quick) ease, box-shadow var(--motion-quick) ease; }
.app-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.app-tile h3 { font-size: 16px; }
.app-tile p { font-size: 13px; color: var(--muted-foreground); }
.app-tile .app-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 12px; font-size: 12.5px; color: var(--muted-foreground); }
.vault-group-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 2px; }
.vault-group-row .vault-group { margin: 0; }
.vault-result { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 4px; padding: 9px 12px; border-radius: var(--radius-md, 8px); font-size: 12.5px; background: var(--surface-sunken); color: var(--muted-foreground); overflow-wrap: anywhere; }
.vault-result.ok { background: var(--success-soft); color: var(--success); }
.vault-result.warn { background: var(--warning-soft); color: var(--warning); }
.vault-result.bad { background: var(--danger-soft); color: var(--danger); }
.sender-note { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-md, 8px); background: var(--surface-sunken); font-size: 13px; color: var(--muted-foreground); }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell .btn + .btn { margin-left: 6px; }
.sender-code { font-size: 13px; font-weight: 600; color: var(--text-strong); }
/* Console Approvals view: customer information updates above text senders. */
.approvals-section + .approvals-section { margin-top: 32px; }
/* Long addresses, emails and notes wrap inside their cell. */
.approvals-section .data-table td, [data-admin-panel="activity"] .data-table td { overflow-wrap: anywhere; }
.approvals-section-head { margin-bottom: 12px; }
.approvals-section-head-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.approvals-section-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 600; color: var(--text-strong); }
.approvals-section-head p { margin: 4px 0 0; max-width: 820px; font-size: 13px; color: var(--muted-foreground); }
.approvals-section [data-changes-error], .approvals-section [data-senders-error], .approvals-section [data-sessions-error], .approvals-section [data-activity-error] { margin-bottom: 12px; }
.change-value { display: inline-block; max-width: 280px; overflow-wrap: anywhere; color: var(--text-strong); }
.change-value.is-empty { color: var(--text-subtle); font-style: italic; }
.approvals-table tr.change-done .change-value { color: var(--muted-foreground); }
.change-decided { display: block; margin-top: 4px; }
.change-compare { margin: 4px 0 16px; grid-template-columns: 90px minmax(0, 1fr); }
.sender-countries { display: grid; gap: 8px; margin: 0 0 16px; }
.sender-country-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-md, 8px); }
.sender-country-name { font-size: 14px; font-weight: 500; color: var(--text-strong); min-width: 140px; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.sender-disclaimer { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--brand-orange-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-sunken); font-size: 12.5px; line-height: 1.5; color: var(--muted-foreground); }
.sender-disclaimer + .field-error { margin-top: 12px; }
.card-body > .field + .field { margin-top: 18px; }
/* Texts tab: the two text-sender choices, each a set of option cards. */
.sender-choice { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.sender-choice > legend { width: 100%; margin-bottom: 8px; padding: 0; }
.sender-choice-hint { margin: -4px 0 8px; }
.choice small { display: block; margin-top: 2px; }
.sender-detail { margin-top: 12px; }
.sender-choices { display: grid; gap: 2px; }
.choice-list { display: grid; gap: 8px; margin-top: 6px; }

/* Searchable picker (country lists): a trigger that looks like an input, a
   dropdown with a search box and a keyboard-navigable listbox. */
.picker { position: relative; }
.picker-trigger { display: flex; align-items: center; text-align: left; padding-right: 34px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 14px; }
.picker-trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-trigger-label.is-placeholder { color: var(--text-subtle); }
.picker-dropdown { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 100%; min-width: 260px; padding: 8px; background: var(--popover, var(--surface)); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.picker-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.picker-list li[data-code] { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.4; color: var(--text-strong); cursor: pointer; }
.picker-list li[data-code]:hover, .picker-list li.is-active { background: var(--brand-orange-tint); }
.picker-list li[aria-selected="true"] { font-weight: 600; color: var(--brand-orange-deep); }
.picker-option-meta { color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.picker-empty { padding: 12px; font-size: 13px; color: var(--muted-foreground); text-align: center; }
.number-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-foreground); font-weight: 400; overflow-wrap: anywhere; }
.number-list { display: grid; gap: 4px; min-width: 0; }
.number-list .number-note { margin-top: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-row:empty { display: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--brand-orange-tint); color: var(--brand-orange-deep); font-size: 13px; font-weight: 500; }
.tag-remove { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 6px; border-radius: 999px; }
.tag-remove:hover, .tag-remove:focus-visible { background: rgba(0, 0, 0, 0.08); }

/* Password reset (forgot-password.html / reset-password.html / login link). */
.field-link { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; border-radius: 4px; }
.field-link:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.login-form > p.reset-resend { margin-top: -12px; }
.link-button { border: 0; padding: 0; background: none; font: inherit; color: var(--text-strong); font-weight: 500; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { text-decoration-color: currentColor; }
.link-button:disabled { color: var(--muted-foreground); cursor: default; text-decoration: none; }
.pw-rules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px; color: var(--muted-foreground); }
.pw-rules li { display: flex; align-items: center; gap: 6px; transition: color var(--motion-quick) ease; }
.pw-rules li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; transition: background var(--motion-quick) ease; }
.pw-rules li.is-met { color: var(--success); }
.pw-rules li.is-met::before { background: var(--success); }
.login-form > .btn-block + .login-help { margin-top: 24px; }

/* ---- console: Users (admin-assets/users.js) ---------------------------- */
.users-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row-muted td { color: var(--muted-foreground); }
.user-form { display: flex; flex-direction: column; gap: 14px; }
.user-group { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
.user-group > legend { padding: 0 6px; margin-left: -6px; font-size: 12.5px; font-weight: 600; color: var(--text-strong); }
.user-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.user-grid > .field { margin-top: 0; min-width: 0; }
.user-grid > .field-wide, .user-grid > .field-hint.field-wide { grid-column: 1 / -1; }
.user-grid > .field-hint { margin: 0; }
.user-invoice-preview { display: block; padding: 9px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); background: var(--surface-sunken); font-size: 13px; font-weight: 500; color: var(--text-strong); overflow-wrap: anywhere; }
.user-invoice-preview.muted { font-weight: 400; color: var(--muted-foreground); }
.user-proposed-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.user-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.user-form-actions .toolbar-spacer { flex: 1; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-password { overflow-wrap: anywhere; }
.user-password.revealed { user-select: all; color: var(--text-strong); }
@media (max-width: 900px) {
  .users-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .user-grid { grid-template-columns: minmax(0, 1fr); }
  .user-group { padding: 12px 12px 14px; }
  .user-form-actions .btn { flex: 1 1 auto; }
  .user-actions .btn { flex: 1 1 100%; }
}

/* Admin console Pods (admin-assets/pods.js): the table reuses the
   Subscriptions table and the Integrations grouping (client > pod). */
.pods-monitor-chip { align-self: center; }
.pods-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pods-table tr.pod-group:hover { background: transparent; }
.pods-table tr.pod-group td { height: auto; padding: 12px 16px; background: var(--surface-sunken); }
.pods-table tbody.pod-tbody + tbody.pod-tbody tr.pod-group td { border-top: 1px solid var(--border); }
.pods-table td { height: 60px; }
.pods-table td.pod-col-actions { overflow: visible; }
/* Nine columns fit the console's widest page (1116px) with tighter side
   padding; long names and status lines wrap rather than being cut off. */
.pods-table th, .pods-table td { padding-left: 8px; padding-right: 8px; }
.pods-table th:first-child, .pods-table td:first-child { padding-left: 16px; }
.pods-table th:last-child, .pods-table td:last-child { padding-right: 16px; }
.pods-table td { white-space: normal; }
.pods-table .subs-customer .name, .pods-table .subs-customer .sub, .pods-table .pod-sub { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.pods-table .pod-version, .pods-table .pod-usage-line { flex-wrap: wrap; column-gap: 6px; row-gap: 0; }
.pods-card .pod-bars { gap: 1px; }
.pod-group-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pod-group-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pod-group-title .name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pod-group-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--text-strong); }
.pod-group-title .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.pod-group-count { font-size: 12.5px; white-space: nowrap; }
.pod-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-orange-tint); color: var(--brand-orange-deep); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.pod-avatar.platform { background: #eef1fe; color: #3949ab; }
.pod-avatar.unlisted { background: var(--warning-soft); color: var(--warning); }
.pod-indent { display: flex; align-items: center; gap: 0; min-width: 0; padding-left: 14px; }
.pod-indent .int-branch { margin-right: 8px; }
.pod-name-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pod-kind { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--muted-foreground); box-shadow: var(--shadow-xs); }
.pod-kind svg { width: 16px; height: 16px; }
.pod-name-cell .sub.mono { font-size: 11.5px; }
.pod-tag { display: inline-flex; align-items: center; flex-shrink: 0; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--brand-orange-tint); color: var(--brand-orange-deep); }
.pod-tag.warn { background: var(--warning-soft); color: var(--warning); }
.pod-tag.bad { background: var(--danger-soft); color: var(--danger); }
.pod-tag.muted-tag { background: var(--surface-sunken); color: var(--muted-foreground); }
.pod-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.pod-sub { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted-foreground); }
.pod-sub.warn { color: var(--warning); }
.pod-sub.bad { color: var(--danger); }
.pod-sub.ok { color: var(--success); }
.pod-busy { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-orange-deep); font-weight: 500; }
.pod-spinner { width: 11px; height: 11px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pod-spin .8s linear infinite; }
@keyframes pod-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pod-spinner { animation-duration: 2.4s; } }
.pod-replicas { font-size: 14px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.pod-replicas.bad { color: var(--danger); }
.pod-nodes { display: flex; flex-wrap: wrap; gap: 4px; }
.pod-node { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-hover); color: var(--secondary-foreground); }
.pod-node-a { background: var(--brand-orange-tint); color: var(--brand-orange-deep); }
.pod-node-b { background: #eef1fe; color: #3949ab; }
.pod-node-c { background: #e8f6f4; color: #0f766e; }
.pod-bars { display: flex; align-items: flex-end; gap: 1.5px; height: 16px; }
.pod-bar { width: 3px; height: 100%; border-radius: 1px; background: var(--success); }
.pod-bar.warn { background: #f59e0b; }
.pod-bar.bad { background: var(--danger); }
.pod-bar.none { height: 40%; background: var(--border-strong); }
.pod-meter { display: block; width: 100%; max-width: 110px; height: 4px; border-radius: 99px; background: var(--surface-hover); overflow: hidden; }
.pod-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--success); }
.pod-meter.warn > span { background: #f59e0b; }
.pod-meter.bad > span { background: var(--danger); }
.pod-usage-line { display: flex; gap: 6px; font-size: 12.5px; color: var(--text-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pod-version { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; font-size: 12px; }
.pod-version .mono { font-size: 12.5px; color: var(--text-strong); }
.pod-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.pod-menu { position: fixed; z-index: 90; min-width: 240px; padding: 5px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-lg); animation: olo-pop-in var(--motion-quick) var(--ease-out) both; }
.pod-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13px; color: var(--text-strong); text-align: left; text-decoration: none; cursor: pointer; }
.pod-menu-item svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--muted-foreground); }
.pod-menu-item:hover:not(:disabled), .pod-menu-item:focus-visible { background: var(--surface-hover); outline: none; }
.pod-menu-item:disabled { color: var(--text-subtle); cursor: not-allowed; }
.pod-menu-item.danger:not(:disabled), .pod-menu-item.danger:not(:disabled) svg { color: var(--danger); }
.pod-menu-sep { height: 1px; margin: 5px 4px; background: var(--border); }
.pod-servers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pod-servers > .card + .card { margin-top: 0; }
.pod-server { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; min-width: 0; }
.pod-server-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pod-server-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-sunken); border: 1px solid var(--border); color: var(--muted-foreground); }
.pod-server-icon svg { width: 17px; height: 17px; }
.pod-server-title { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.pod-server-title strong { font-size: 14px; color: var(--text-strong); }
.pod-server-title .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.pod-server-count { font-size: 13px; color: var(--secondary-foreground); }
.pod-server-count strong { font-size: 18px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.pod-server-lines { display: flex; flex-direction: column; gap: 8px; }
.pod-node-line { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 2px 10px; font-size: 12.5px; }
.pod-node-line .k { color: var(--muted-foreground); }
.pod-node-line .v { text-align: right; color: var(--text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-node-line .pod-meter { grid-column: 1 / -1; max-width: none; }
.pod-server-note { font-size: 12.5px; line-height: 1.5; }
.pod-server-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; }
.pod-recent td { height: 44px; }
.pod-recent-error { margin-top: 3px; max-width: 360px; }
.pod-dialog .dialog-body { padding-bottom: 14px; }
.pod-actionbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-sunken); }
.pod-actionbar[hidden] { display: none; }
.pod-bar-note { font-size: 12.5px; margin-left: 4px; }
.pod-tabs { margin-top: 14px; }
.pod-tab-body { margin-top: 4px; min-height: 280px; }
.pod-tab-body > .subs-detail, .pod-tab-body > .table-card, .pod-tab-body > .panel, .pod-tab-body > .pod-logs-wrap { margin-top: 12px; }
.pod-about { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.5; color: var(--secondary-foreground); }
.pod-about strong { color: var(--text-strong); font-weight: 600; }
.pod-notes { white-space: pre-wrap; }
.pod-ok { color: var(--success); }
.pod-bad { color: var(--danger); }
.pod-kv-meter { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pod-kv-meter .pod-meter { width: 110px; }
.pod-tasks { table-layout: auto; }
.pod-tasks td { height: 44px; font-size: 13px; }
.pod-wrap { white-space: normal; overflow-wrap: anywhere; }
.pod-wrap .pod-sub { white-space: normal; margin-top: 3px; }
.pod-logs-wrap { display: flex; flex-direction: column; gap: 8px; }
.pod-logs-controls { display: flex; flex-direction: column; gap: 8px; }
.pod-logs-picks { display: grid; grid-template-columns: 170px 170px minmax(0, 1fr); gap: 8px; }
.pod-logs-picks .input { height: 34px; font-size: 13px; }
.pod-logs-picks .search { width: auto; }
.pod-logs-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pod-logs-status { min-height: 16px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pod-logs { height: min(56svh, 520px); overflow: auto; padding: 8px 0; border-radius: var(--radius-md); background: #16182a; color: #d6d9e6; font-family: var(--font-mono); font-size: 12px; line-height: 1.55; }
.pod-logs:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pod-log { display: flex; gap: 10px; padding: 0 12px; }
.pod-log:hover { background: rgb(255 255 255 / .05); }
.pod-log.err { background: rgb(209 44 31 / .16); color: #ffc9c3; }
.pod-log.warn { color: #fcd9a5; }
.pod-log-time { flex-shrink: 0; color: #8a8fa8; font-variant-numeric: tabular-nums; }
.pod-log-rep { flex-shrink: 0; color: #a5b1f5; }
.pod-log-text { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pod-log mark { padding: 0 1px; border-radius: 2px; background: #ffb86b; color: #16182a; }
.pod-logs-empty { padding: 28px 16px; text-align: center; font-family: var(--font-sans, inherit); font-size: 13px; color: #a3a8bf; }
.pod-logs-empty.bad { color: #ffc9c3; }
.pod-strip { display: grid; grid-template-columns: repeat(288, minmax(0, 1fr)); gap: 0; height: 28px; overflow: hidden; border-radius: 6px; background: var(--surface-hover); }
.pod-strip-cell { background: var(--success); }
.pod-strip-cell.warn { background: #f59e0b; }
.pod-strip-cell.bad { background: var(--danger); }
.pod-strip-cell.none { background: transparent; }
.pod-strip-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11.5px; }
.pod-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.pod-charts > .card + .card { margin-top: 0; }
.pod-chart { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 12px; min-width: 0; }
.pod-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted-foreground); }
.pod-chart-head strong { font-size: 16px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.pod-chart-svg { display: block; width: 100%; height: 90px; overflow: visible; }
.pod-chart-svg .area { fill: color-mix(in srgb, var(--brand-orange) 14%, transparent); stroke: none; }
.pod-chart-svg .line { fill: none; stroke: var(--brand-orange); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pod-chart-svg .limit { fill: none; stroke: var(--danger); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.pod-chart-foot { display: flex; justify-content: space-between; font-size: 11.5px; }
.pod-chart-note { padding: 24px 0; text-align: center; font-size: 12.5px; }
.pod-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; }
.pod-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; font-size: 11.5px; }
.pod-day strong { font-size: 12px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.pod-day-bar { display: block; width: 100%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: var(--success); }
.pod-day-bar.warn { background: #f59e0b; }
.pod-day-bar.bad { background: var(--danger); }
.pod-day-bar.none { background: var(--border-strong); }
.pod-foot-note { margin-top: 14px; font-size: 12.5px; line-height: 1.5; }
.pod-chips { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.pod-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); font-size: 11.5px; font-weight: 400; color: var(--secondary-foreground); }
.pod-env-note { font-size: 12px; }
.panel > .pod-chips { justify-content: flex-start; }
.pod-textarea { height: auto; min-height: 72px; padding-top: 8px; padding-bottom: 8px; resize: vertical; line-height: 1.45; }
@media (max-width: 1100px) {
  .pods-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pod-servers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pod-servers, .pod-charts { grid-template-columns: minmax(0, 1fr); }
  .pod-logs-picks { grid-template-columns: 1fr 1fr; }
  .pod-logs-picks .search { grid-column: 1 / -1; }
  .pod-strip { grid-template-columns: repeat(144, minmax(0, 1fr)); }
  .pod-strip-cell:nth-child(odd) { display: none; }
  .pod-actionbar .btn { flex: 1 1 calc(50% - 6px); }
}
/* Pods on phones: each pod is a card. Name and actions on top, then one
   "label ... value" line per column; the client heading spans the card. */
@media (max-width: 640px) {
  .pod-group-count { display: none; }
  .pod-recent-error { max-width: none; }
  .pod-days { gap: 4px; }
}

/* Customers and Users (console): the external ID, or a warning where it is missing; notes */
.ext-missing { display: inline-flex; align-items: center; gap: 4px; color: var(--warning) !important; font-weight: 500; }
.ext-missing svg { width: 13px; height: 13px; flex: none; }
.cust-notes-cell { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.35; color: var(--muted-foreground); overflow-wrap: anywhere; }
.cust-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.cust-stripe-list { display: flex; flex-direction: column; gap: 6px; }
.cust-stripe-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.cust-dupe { color: var(--warning); font-size: 12.5px; }
.cust-guess { display: flex; align-items: flex-start; gap: 6px; color: var(--warning); }
.cust-guess svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.cust-emails { display: flex; flex-wrap: wrap; gap: 6px; }
.cust-emails .tag { padding: 3px 10px; background: var(--surface); color: var(--text-strong); border: 1px solid var(--border); font-size: 12.5px; overflow-wrap: anywhere; }
.cust-emails .cust-primary-email { background: var(--success-soft); color: var(--success); border-color: transparent; font-weight: 600; }
.cust-primary-label { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--success); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; }
.cust-more-emails { color: var(--text-subtle); }
.ext-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.ext-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; color: var(--text-strong); overflow-wrap: anywhere; }
.cust-exact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-md); background: var(--brand-orange-tint); font-size: 13.5px; color: var(--text-strong); }
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; height: auto; min-height: 38px; padding: 5px 8px; cursor: text; }
.tag-input:focus-within { border-color: var(--brand-orange); box-shadow: var(--focus-ring); }
.tag-input-tags { display: contents; }
.tag-input .tag { font-size: 12.5px; padding-top: 2px; padding-bottom: 2px; }
.tag-input-field { flex: 1 1 140px; min-width: 120px; height: 26px; border: 0; padding: 0 2px; background: transparent; color: var(--text-strong); outline: none; }
.tag-input-field::placeholder { color: var(--text-subtle); }

/* Stripe's restricted-key permission list (Integrations → Stripe → Connect). */
.stripe-perms { margin: 8px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 6px; }
.stripe-perms small { display: block; color: var(--muted-foreground); }
/* Calendly's "Check permissions" list: name and message wrap on the left, the badge keeps its own column. */
.perm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-name { min-width: 0; overflow-wrap: anywhere; }
.perm-name .badge { margin-left: 6px; }
.perm-name small { display: block; margin-top: 2px; color: var(--muted-foreground); }
.perm-state { white-space: nowrap; }
