:root {
  --bg: #06131d;
  --bg-soft: #0d1e2b;
  --panel: rgba(10, 24, 36, 0.92);
  --panel-soft: rgba(14, 31, 45, 0.82);
  --line: rgba(117, 204, 255, 0.18);
  --line-strong: rgba(117, 204, 255, 0.3);
  --text: #eef8ff;
  --muted: #a8c5d8;
  --accent: #59c8ff;
  --accent-strong: #8fe2ff;
  --accent-soft: rgba(89, 200, 255, 0.16);
  --success: #53d8b3;
  --success-soft: rgba(83, 216, 179, 0.16);
  --warning: #ffd16a;
  --warning-soft: rgba(255, 209, 106, 0.16);
  --danger: #ff9393;
  --danger-soft: rgba(255, 147, 147, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --bg-radial-1: rgba(89, 200, 255, 0.22);
  --bg-radial-2: rgba(143, 226, 255, 0.18);
  --bg-radial-3: rgba(72, 149, 204, 0.18);
  --bg-gradient-start: #040c12;
  --bg-gradient-mid: #07131c;
  --bg-gradient-end: #0c2230;
  --button-ghost-bg: rgba(255, 255, 255, 0.05);
  --icon-button-bg: rgba(255, 255, 255, 0.06);
  --subtle-divider: rgba(255, 255, 255, 0.08);
  --surface-gradient-start: rgba(10, 24, 36, 0.96);
  --surface-gradient-end: rgba(7, 18, 26, 0.9);
  --soft-fill: rgba(255, 255, 255, 0.04);
  --soft-fill-strong: rgba(255, 255, 255, 0.05);
  --soft-fill-stronger: rgba(255, 255, 255, 0.06);
  --field-fill: rgba(255, 255, 255, 0.05);
  --field-fill-focus: rgba(255, 255, 255, 0.08);
  --field-label: #d8efff;
  --status-neutral-text: #e8f6ff;
  --status-success-text: #a9ffe4;
  --status-warning-text: #ffe6a6;
  --status-danger-text: #ffc0c0;
  --accent-pill-text: #b7efff;
  --divider-line: rgba(255, 255, 255, 0.08);
  --empty-border: rgba(117, 204, 255, 0.22);
}

:root[data-theme="light"] {
  --bg: #eef5f9;
  --bg-soft: #ddeaf1;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: rgba(244, 249, 252, 0.9);
  --line: rgba(24, 104, 148, 0.16);
  --line-strong: rgba(24, 104, 148, 0.3);
  --text: #143042;
  --muted: #5a7385;
  --accent: #2e9ed6;
  --accent-strong: #68c8f1;
  --accent-soft: rgba(46, 158, 214, 0.14);
  --success: #2aa67d;
  --success-soft: rgba(42, 166, 125, 0.14);
  --warning: #d29b27;
  --warning-soft: rgba(210, 155, 39, 0.16);
  --danger: #cc6464;
  --danger-soft: rgba(204, 100, 100, 0.14);
  --shadow: 0 24px 60px rgba(32, 70, 94, 0.14);
  --bg-radial-1: rgba(57, 168, 222, 0.18);
  --bg-radial-2: rgba(104, 200, 241, 0.18);
  --bg-radial-3: rgba(83, 171, 214, 0.16);
  --bg-gradient-start: #f8fbfd;
  --bg-gradient-mid: #ecf5fa;
  --bg-gradient-end: #dbe9f2;
  --button-ghost-bg: rgba(20, 48, 66, 0.04);
  --icon-button-bg: rgba(20, 48, 66, 0.05);
  --subtle-divider: rgba(24, 104, 148, 0.12);
  --surface-gradient-start: rgba(255, 255, 255, 0.98);
  --surface-gradient-end: rgba(233, 243, 249, 0.94);
  --soft-fill: rgba(20, 48, 66, 0.03);
  --soft-fill-strong: rgba(20, 48, 66, 0.045);
  --soft-fill-stronger: rgba(20, 48, 66, 0.06);
  --field-fill: rgba(255, 255, 255, 0.8);
  --field-fill-focus: rgba(255, 255, 255, 0.96);
  --field-label: #476478;
  --status-neutral-text: #355164;
  --status-success-text: #1e6f55;
  --status-warning-text: #8a6510;
  --status-danger-text: #9d4b4b;
  --accent-pill-text: #1f6f99;
  --divider-line: rgba(24, 104, 148, 0.12);
  --empty-border: rgba(24, 104, 148, 0.22);
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, var(--bg-radial-1), transparent 24%),
    radial-gradient(circle at 88% 14%, var(--bg-radial-2), transparent 20%),
    radial-gradient(circle at 50% 100%, var(--bg-radial-3), transparent 32%),
    linear-gradient(160deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 34%, var(--bg-gradient-end) 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
input,
textarea,
select {
  border: 0;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.eyebrow,
.section-kicker {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-strong);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(1.3rem, 2vw, 2rem);
}

h3 {
  font-size: 1.08rem;
}

.helper,
.body-copy,
.lede,
.detail-label,
.info-card p,
.metric-card p,
.metric-card span,
.sidebar-admin-head p {
  color: var(--muted);
  line-height: 1.65;
}

.button,
.icon-button,
.nav-link {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.icon-button:hover,
.nav-link:hover {
  transform: translateY(-1px);
}

.button {
  padding: 12px 16px;
  border-radius: 15px;
  font-weight: 700;
  color: #052335;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 34px rgba(89, 200, 255, 0.22);
}

.button-secondary {
  background: linear-gradient(135deg, #7ce8ff, #b8f4ff);
}

.button-ghost {
  color: var(--text);
  background: var(--button-ghost-bg);
  border: 1px solid var(--line);
  box-shadow: none;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--icon-button-bg);
  border: 1px solid var(--line);
  color: var(--text);
}

.subtle-divider {
  height: 1px;
  background: var(--subtle-divider);
}

.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  border: 1px solid var(--line);
  background: var(--soft-fill-strong);
}

.status-pill-neutral,
.status-pill.pending,
.status-pill.todo,
.status-pill.low,
.status-pill.cancelled,
.status-pill.credit,
.status-pill.not_submitted {
  background: var(--soft-fill-stronger);
  color: var(--status-neutral-text);
}

.status-pill-success,
.status-pill.active,
.status-pill.completed,
.status-pill.approved,
.status-pill.paid,
.status-pill.medium {
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
  color: var(--status-success-text);
}

.status-pill-warning,
.status-pill.in_progress,
.status-pill.blocked,
.status-pill.processing,
.status-pill.high,
.status-pill.open,
.status-pill.running {
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
  color: var(--status-warning-text);
}

.status-pill-danger,
.status-pill.disabled,
.status-pill.rejected,
.status-pill.suspended,
.status-pill.blocked,
.status-pill.critical,
.status-pill.closed,
.status-pill.settled,
.status-pill.debit {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--status-danger-text);
}

.pill-cluster,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-panel,
.info-card,
.metric-card,
.record-card,
.form-card,
.detail-box,
.sub-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.feedback-panel,
.record-card,
.form-card,
.sub-card {
  padding: 18px;
}

.feedback-panel p,
.feedback-panel time {
  margin: 0;
}

.feedback-panel time {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.tone-info {
  border-color: rgba(117, 204, 255, 0.2);
}

.tone-success {
  background: var(--success-soft);
  border-color: rgba(83, 216, 179, 0.2);
}

.tone-warning {
  background: var(--warning-soft);
  border-color: rgba(255, 209, 106, 0.2);
}

.tone-danger {
  background: var(--danger-soft);
  border-color: rgba(255, 147, 147, 0.2);
}

.stacked-form,
.page-stack,
.cards-grid,
.cards-stack,
.metrics-grid,
.detail-grid,
.checkbox-grid,
.activity-feed,
.list-stack,
.sidebar-nav,
.nav-links {
  display: grid;
  gap: 14px;
}

.field,
.inline-form {
  display: grid;
  gap: 8px;
}

.field span,
.field-label {
  font-size: 0.84rem;
  color: var(--field-label);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  background: var(--field-fill);
  color: var(--text);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 104px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--line-strong);
  background: var(--field-fill-focus);
  transform: translateY(-1px);
}

.field select option {
  background: var(--bg-soft);
  color: var(--text);
}

.checkbox-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.activity-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(18px, 4vw, 36px);
  background: rgba(6, 18, 28, 0.62);
  backdrop-filter: blur(10px);
}

.activity-modal-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.activity-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activity-modal-head .helper {
  margin: 8px 0 0;
}

.activity-modal-close {
  flex-shrink: 0;
}

.admin-lightbox-card {
  width: min(920px, calc(100vw - 32px));
}

.admin-lightbox .form-card {
  background: transparent;
}

.admin-lightbox .page-stack {
  gap: 16px;
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft-fill);
}

.checkbox-card input {
  margin-top: 2px;
}

.checkbox-card span {
  display: grid;
  gap: 4px;
}

.checkbox-card small {
  color: var(--muted);
  line-height: 1.5;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-layout {
  width: min(1240px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 22px;
}

.brand-panel,
.auth-card,
.sidebar,
.topbar {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--surface-gradient-start), var(--surface-gradient-end)),
    var(--panel);
  box-shadow: var(--shadow);
}

.brand-panel {
  border-radius: 36px;
  padding: 34px;
  display: grid;
  gap: 28px;
  overflow: hidden;
  position: relative;
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 200, 255, 0.28), transparent 70%);
  pointer-events: none;
}

.brand-logo {
  width: min(180px, 42vw);
  filter: drop-shadow(0 14px 34px rgba(89, 200, 255, 0.22));
}

.brand-block,
.auth-panel {
  display: grid;
  gap: 16px;
}

.login-page .brand-panel h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.info-card {
  padding: 18px;
}

.auth-card {
  border-radius: 30px;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.dashboard-page {
  padding: 12px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 12px;
}

.sidebar {
  position: sticky;
  top: 10px;
  min-height: calc(100vh - 20px);
  border-radius: 22px;
  padding: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.sidebar-top,
.sidebar-admin-head,
.topbar,
.card-top,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.sidebar-top {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--subtle-divider);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 1.06rem;
}

.sidebar-logo {
  width: 76px;
  filter: drop-shadow(0 10px 24px rgba(89, 200, 255, 0.24));
}

.sidebar-admin-card {
  padding: 14px 18px 16px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 0;
  border-top: 1px solid var(--subtle-divider);
  border-bottom: 1px solid var(--subtle-divider);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--subtle-divider);
}

.sidebar-logout-button {
  width: 100%;
}

.sidebar-nav,
.nav-section,
.topbar-shortcuts,
.filter-strip {
  display: grid;
}

.sidebar-nav {
  gap: 0;
  padding: 10px 0;
}

.nav-section {
  gap: 0;
  padding: 2px 0 6px;
}

.nav-section-title {
  margin: 0;
  padding: 12px 18px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  opacity: 0.9;
}

.nav-links {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
}

.nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 18px;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  border: 0;
  border-left: 3px solid transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.nav-link.is-active {
  background: rgba(89, 200, 255, 0.14);
  border-left-color: var(--accent);
  color: var(--accent-strong);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.topbar-shortcuts {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  overflow-x: auto;
  padding: 6px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--soft-fill);
}

.nav-shortcut {
  width: auto;
  min-height: 42px;
  white-space: nowrap;
  padding: 10px 16px;
}

.dashboard-main {
  display: grid;
  gap: 12px;
}

.topbar {
  align-items: center;
  border-radius: 22px;
  padding: 14px 16px;
}

.topbar-left,
.topbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.topbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--text);
}

.theme-toggle-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-icon svg {
  width: 18px;
  height: 18px;
}

.theme-toggle-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.topbar-title {
  display: block;
  margin-bottom: 0;
  font-size: 1.02rem;
}

.view-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0 0 14px;
}

.section-block {
  display: grid;
  gap: 12px;
}

.admin-landing-panel,
.admin-overview-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.admin-landing-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
}

.admin-landing-panel h2 {
  margin: 4px 0 6px;
  font-size: 1.08rem;
}

.admin-overview-grid {
  align-items: start;
}

.admin-overview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.overview-list {
  display: grid;
  gap: 0;
}

.overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--divider-line);
}

.overview-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.overview-row span {
  color: var(--muted);
}

.overview-row strong {
  font-size: 0.96rem;
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.metric-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: clamp(1.25rem, 2vw, 1.68rem);
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.filter-strip {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  overflow-x: auto;
  padding: 6px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--soft-fill);
}

.filter-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.filter-pill.is-active {
  background: var(--accent-soft);
  border-color: rgba(89, 200, 255, 0.22);
  color: var(--accent-strong);
}

.transaction-browser-card {
  display: grid;
  gap: 12px;
}

.transaction-search-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.field-grow {
  flex: 1 1 320px;
}

.transaction-list-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.transaction-list-head,
.transaction-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(220px, 1.8fr) minmax(120px, 0.9fr) minmax(110px, 0.8fr) minmax(220px, 1.7fr) minmax(150px, 1fr);
  gap: 14px;
}

.transaction-list-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--field-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.transaction-list-body {
  display: grid;
  gap: 10px;
}

.transaction-row {
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}

.transaction-row:first-child {
  border-top: 1px solid var(--line);
}

.transaction-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.transaction-cell strong,
.transaction-cell code {
  overflow-wrap: anywhere;
}

.transaction-cell span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.transaction-cell-reference code {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.75rem;
}

.transaction-cell-amount strong {
  font-size: 0.9rem;
}

.transaction-amount-active {
  color: var(--success);
}

.transaction-amount-debit {
  color: var(--danger);
}

.transaction-amount-pending {
  color: var(--warning);
}

.plan-editor-layout,
.plan-summary-grid,
.queue-layout,
.queue-panel,
.queue-list,
.queue-detail-panel,
.identity-line {
  display: grid;
  gap: 16px;
}

.plan-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.plan-summary-box {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft-fill);
}

.plan-summary-box span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.plan-summary-box strong {
  font-size: 0.98rem;
}

.plan-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-inline {
  width: auto;
}

.queue-layout {
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.queue-panel,
.queue-detail-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.queue-list {
  gap: 10px;
}

.queue-item-card {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--soft-fill-stronger);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.queue-item-card:hover,
.queue-item-card.is-active {
  border-color: rgba(89, 200, 255, 0.24);
  background: rgba(89, 200, 255, 0.1);
}

.queue-avatar {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(89, 200, 255, 0.14);
  border: 1px solid rgba(89, 200, 255, 0.22);
  color: var(--accent-strong);
  font-weight: 800;
}

.queue-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 1.05rem;
}

.queue-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.queue-copy strong,
.queue-copy span,
.queue-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-copy span,
.queue-copy small {
  color: var(--muted);
  white-space: nowrap;
}

.queue-side {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.identity-line {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.section-head-actions,
.support-reply-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.support-admin-layout,
.support-thread-panel,
.support-thread-feed,
.support-inline-form {
  display: grid;
  gap: 16px;
}

.support-thread-feed {
  max-height: min(56vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.support-thread-message {
  max-width: min(86%, 680px);
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--soft-fill-strong);
}

.support-thread-message.is-user {
  margin-right: auto;
}

.support-thread-message.is-admin {
  margin-left: auto;
  border-color: rgba(89, 200, 255, 0.24);
  background: rgba(89, 200, 255, 0.12);
}

.support-thread-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.support-thread-message p {
  margin: 0;
  line-height: 1.7;
}

.support-thread-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.support-thread-attachment {
  width: 120px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(89, 200, 255, 0.18);
}

.support-thread-attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.support-inline-form textarea {
  min-height: 84px;
  resize: vertical;
}

.support-attach-button,
.support-send-inline {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft-fill-strong);
  color: var(--text);
  cursor: pointer;
}

.support-send-inline {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #082334;
}

.support-draft-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.support-draft-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--button-ghost-bg);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.support-draft-chip-name {
  color: var(--text);
}

.support-draft-chip-size {
  color: var(--muted);
}

.support-draft-chip.is-error {
  border-color: rgba(204, 100, 100, 0.28);
  background: rgba(204, 100, 100, 0.12);
  color: #a23f3f;
}

.support-attach-button svg,
.support-send-inline svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.support-channel-type {
  background: rgba(89, 200, 255, 0.14);
  border-color: rgba(89, 200, 255, 0.24);
  color: var(--accent-pill-text);
}

.compact-info-list {
  display: grid;
  gap: 10px;
  padding: 8px 0;
}

.compact-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider-line);
}

.compact-info-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.compact-info-row span {
  color: var(--muted);
}

.cards-stack {
  display: grid;
  gap: 12px;
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.narrow-section {
  max-width: 760px;
}

.detail-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-box {
  padding: 14px;
}

.detail-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-span-2 {
  grid-column: span 2;
}

.compact-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-search {
  min-width: 260px;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--empty-border);
  color: var(--muted);
}

.record-card-stack {
  gap: 16px;
}

.document-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.document-preview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--soft-fill);
}

.document-preview-card.is-empty {
  justify-content: center;
}

.document-preview-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft-fill);
}

.document-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.document-preview-copy {
  display: grid;
  gap: 6px;
}

.document-preview-copy p {
  margin: 0;
}

.document-preview-copy a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.document-preview-copy a:hover {
  text-decoration: underline;
}

.mobile-only {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1220px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .three-column {
    grid-template-columns: 1fr;
  }

  .queue-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .mobile-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(90vw, 320px);
    min-height: 100vh;
    z-index: 25;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
    border-radius: 0 28px 28px 0;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .topbar,
  .card-top,
  .section-head,
  .sidebar-admin-head {
    flex-direction: column;
  }

  .topbar-right {
    justify-content: flex-start;
  }

  .section-head-actions,
  .support-reply-actions,
  .compact-info-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .transaction-list-head {
    display: none;
  }

  .transaction-row {
    grid-template-columns: 1fr 1fr;
  }

  .transaction-search-form {
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .dashboard-page,
  .login-page {
    padding: 12px;
  }

  .brand-panel,
  .auth-card,
  .topbar,
  .view-panel {
    border-radius: 24px;
    padding: 18px;
  }

  .info-grid,
  .two-column,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }

  .inline-search {
    min-width: 100%;
  }

  .transaction-row {
    grid-template-columns: 1fr;
  }

  .transaction-cell::before {
    content: attr(data-label);
    color: var(--field-label);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
