/* Generated by scripts/build-css.sh. Do not edit directly. */

/* tokens.css */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #f8fafc;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.55);
  --surface-muted: rgba(255, 255, 255, 0.36);
  --surface-row-alt: rgba(255, 255, 255, 0.54);
  --panel-border: rgba(255, 255, 255, 0.82);
  --panel-border-hover: rgba(255, 255, 255, 0.96);
  --line: rgba(15, 23, 42, 0.09);
  --nav-hover: rgba(15, 23, 42, 0.055);
  --row-hover: rgba(16, 185, 129, 0.085);
  --green: #10b981;
  --green-dark: #047857;
  --green-light: rgba(16, 185, 129, 0.1);
  --green-hover: rgba(16, 185, 129, 0.16);
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --status-active-ink: #047857;
  --status-active-bg: rgba(16, 185, 129, 0.14);
  --status-completed-ink: #1d4ed8;
  --status-completed-bg: rgba(59, 130, 246, 0.13);
  --status-expired-ink: #b45309;
  --status-expired-bg: rgba(245, 158, 11, 0.15);
  --status-deleted-ink: #be123c;
  --status-deleted-bg: rgba(239, 68, 68, 0.13);
  --sidebar: rgba(255, 255, 255, 0.62);
  --field-bg: rgba(255, 255, 255, 0.76);
  --field-bg-focus: rgba(255, 255, 255, 0.92);
  --table-head-bg: rgba(248, 250, 252, 0.94);
  --toast-bg: rgba(255, 255, 255, 0.94);
  --code-bg: #0f172a;
  --code-ink: #d7f3df;
  --body-bg:
    radial-gradient(at 0% 0%, hsla(158, 90%, 62%, 0.18) 0, transparent 48%),
    radial-gradient(at 100% 0%, hsla(217, 94%, 68%, 0.16) 0, transparent 44%),
    radial-gradient(at 100% 100%, hsla(39, 92%, 60%, 0.14) 0, transparent 42%),
    linear-gradient(135deg, #f8fafc 0%, #eef8f5 52%, #f8fafc 100%);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 80px rgba(15, 23, 42, 0.1);
  --content-max: 1440px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --row-enter-duration: 360ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e5eefb;
    --muted: #94a3b8;
    --paper: #07111f;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.9);
    --surface: rgba(15, 23, 42, 0.68);
    --surface-soft: rgba(15, 23, 42, 0.56);
    --surface-muted: rgba(30, 41, 59, 0.42);
    --surface-row-alt: rgba(30, 41, 59, 0.62);
    --panel-border: rgba(148, 163, 184, 0.18);
    --panel-border-hover: rgba(94, 234, 212, 0.36);
    --line: rgba(148, 163, 184, 0.18);
    --nav-hover: rgba(148, 163, 184, 0.1);
    --row-hover: rgba(45, 212, 191, 0.12);
    --green: #2dd4bf;
    --green-dark: #5eead4;
    --green-light: rgba(45, 212, 191, 0.13);
    --green-hover: rgba(45, 212, 191, 0.2);
    --amber: #fbbf24;
    --red: #fb7185;
    --blue: #60a5fa;
    --status-active-ink: #5eead4;
    --status-active-bg: rgba(45, 212, 191, 0.16);
    --status-completed-ink: #93c5fd;
    --status-completed-bg: rgba(96, 165, 250, 0.18);
    --status-expired-ink: #fcd34d;
    --status-expired-bg: rgba(251, 191, 36, 0.18);
    --status-deleted-ink: #fda4af;
    --status-deleted-bg: rgba(251, 113, 133, 0.18);
    --sidebar: rgba(15, 23, 42, 0.78);
    --field-bg: rgba(15, 23, 42, 0.72);
    --field-bg-focus: rgba(15, 23, 42, 0.92);
    --table-head-bg: rgba(15, 23, 42, 0.96);
    --toast-bg: rgba(15, 23, 42, 0.94);
    --code-bg: #020617;
    --code-ink: #ccfbf1;
    --body-bg:
      radial-gradient(at 0% 0%, hsla(172, 80%, 42%, 0.2) 0, transparent 44%),
      radial-gradient(at 100% 0%, hsla(217, 91%, 60%, 0.16) 0, transparent 44%),
      radial-gradient(at 100% 100%, hsla(39, 92%, 50%, 0.12) 0, transparent 42%),
      linear-gradient(135deg, #020617 0%, #081522 56%, #020617 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 28px 86px rgba(0, 0, 0, 0.36);
  }
}

/* base.css */
* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Outfit", "Avenir Next", sans-serif;
  background: var(--body-bg);
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-optical-sizing: auto;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.026em;
  text-wrap: balance;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.65rem, 6.2vw, 5.6rem);
  line-height: 1.02;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.18;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.logo-icon,
.nav-icon,
.empty-illustration svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* layout.css */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  width: 270px;
  flex: 0 0 270px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  background: var(--sidebar);
  backdrop-filter: blur(22px);
  box-shadow: 20px 0 70px rgba(15, 23, 42, 0.05);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 24px;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sidebar-header span {
  color: var(--muted);
  font-size: 0.78rem;
}

.logo-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 16px;
  color: var(--green-dark);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.12)),
    var(--surface);
  box-shadow: var(--shadow-sm);
  animation: logo-breathe 5.2s ease-in-out infinite;
}

.logo-icon {
  width: 24px;
  height: 24px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

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

.nav-item.active {
  color: var(--green-dark);
  background: var(--green-light);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.nav-icon {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 8px 4px;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 13px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.84rem;
  font-weight: 700;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.service-status-ok {
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--green-dark);
  background: var(--green-light);
}

.service-status-error {
  border-color: rgba(239, 68, 68, 0.28);
  color: var(--red);
  background: rgba(239, 68, 68, 0.09);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: clamp(24px, 3vw, 42px);
}

.view-section {
  display: none;
  width: min(100%, var(--content-max));
  margin: 0 auto;
  animation: view-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero > div:first-child {
  animation: hero-copy-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero h1 {
  color: var(--ink);
  text-shadow: 0 18px 58px rgba(16, 185, 129, 0.12);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero h1 {
    color: transparent;
    background:
      linear-gradient(110deg, var(--ink) 0%, var(--green-dark) 48%, var(--blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.hero .hero-card {
  animation: hero-card-in 520ms 90ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: center;
  margin-bottom: 20px;
}

.dashboard-hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 4.2rem);
  line-height: 1.04;
}

.dashboard-hero .subtitle {
  margin-bottom: 0;
}

.dashboard-hero .hero-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: 14px;
  min-height: 128px;
  padding: 20px;
}

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

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

.dashboard-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.workbench-page {
  display: grid;
  gap: 24px;
}

.workbench-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: stretch;
}

.workbench-hero::before {
  position: absolute;
  inset: -22px -18px auto 18%;
  z-index: -1;
  height: 260px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.24), transparent 46%),
    radial-gradient(circle at 78% 40%, rgba(59, 130, 246, 0.18), transparent 44%);
  filter: blur(18px);
  content: "";
}

.workbench-hero-copy {
  display: grid;
  align-content: center;
  min-height: 270px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 46%),
    var(--surface-soft);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  animation: hero-copy-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workbench-hero h1 {
  color: var(--ink);
  font-size: clamp(2.45rem, 5.4vw, 5rem);
  text-shadow: 0 18px 58px rgba(16, 185, 129, 0.12);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .workbench-hero h1 {
    color: transparent;
    background:
      linear-gradient(110deg, var(--ink) 0%, var(--green-dark) 52%, var(--blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.workbench-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.workbench-badges span {
  display: grid;
  min-width: 132px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  background: var(--surface);
}

.workbench-badges strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.workbench-badges em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.service-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  min-height: 270px;
}

.service-card .health-copy {
  gap: 8px;
}

.workbench-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 20px;
  align-items: start;
}

.workbench-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.workflow-step {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 154px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background:
    linear-gradient(180deg, var(--surface), var(--surface-soft)),
    var(--surface-muted);
}

.workflow-step span {
  width: max-content;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--green-dark);
  background: var(--green-light);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.workflow-step strong {
  color: var(--ink);
}

.workflow-step p {
  font-size: 0.88rem;
}

.single-gap {
  grid-template-columns: minmax(0, 0.55fr);
}

.quick-tips-panel,
.logs-panel,
.mailboxes-panel,
.accounts-panel {
  margin-top: 24px;
}

.workbench-support-grid .quick-tips-panel {
  margin-top: 0;
}

#view-accounts .accounts-panel,
#view-mailboxes .mailboxes-panel {
  margin-top: 0;
}

.token-panel,
.section-head {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.section-head p:not(.eyebrow),
.token-panel p:not(.eyebrow) {
  max-width: 720px;
  margin-top: 8px;
}

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

.control-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px;
  gap: 14px;
  align-items: end;
  margin-top: 18px;
}

.mailbox-controls {
  grid-template-columns: minmax(220px, 0.9fr) 170px minmax(260px, 1fr);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle {
  max-width: 760px;
  margin-top: 14px;
  font-size: 1.04rem;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-card-in {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(1deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes logo-breathe {
  0%,
  100% {
    box-shadow: var(--shadow-sm), 0 0 0 0 rgba(16, 185, 129, 0);
  }

  50% {
    box-shadow: var(--shadow-sm), 0 0 0 8px rgba(16, 185, 129, 0.08);
  }
}

/* forms.css */
button,
input,
select {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 0.78rem 1.08rem;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  cursor: pointer;
  transition:
    transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 150ms ease,
    background 150ms ease,
    opacity 150ms ease;
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.22);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.26);
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

button.ghost {
  color: var(--green-dark);
  background: var(--green-light);
  box-shadow: none;
}

button.ghost:hover {
  background: var(--green-hover);
  box-shadow: none;
}

button.danger {
  background: linear-gradient(135deg, #fb7185, var(--red));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.2);
}

button.mini {
  padding: 0.46rem 0.72rem;
  font-size: 0.78rem;
  box-shadow: none;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 50px;
  padding: 0.78rem 0.92rem;
  color: var(--ink);
  background: var(--field-bg);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  border-radius: 5px;
  padding: 0;
  accent-color: var(--green);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green);
}

input:focus,
select:focus {
  border-color: rgba(16, 185, 129, 0.72);
  background: var(--field-bg-focus);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.compact-form {
  gap: 12px;
  margin-top: 16px;
}

.generate-form {
  grid-template-columns: minmax(0, 1fr) minmax(128px, 168px);
}

.generate-form .field-span,
.generate-form .form-submit {
  grid-column: 1 / -1;
}

.form-submit {
  margin-top: 2px;
}

.read-form {
  grid-template-columns: minmax(124px, 160px) minmax(0, 1fr);
  align-items: end;
}

.read-form .field-span {
  grid-column: 1 / -1;
}

.read-form .field-compact {
  max-width: none;
}

.read-actions {
  grid-column: 2 / -1;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.read-actions {
  align-items: center;
  margin-top: 2px;
}

.read-actions button {
  padding-right: 1.25rem;
  padding-left: 1.25rem;
}

button.soft-action {
  border: 1px solid rgba(16, 185, 129, 0.12);
  color: var(--green-dark);
  background: rgba(16, 185, 129, 0.08);
}

button.soft-action:hover {
  background: var(--green-hover);
}

.token-row {
  display: grid;
  grid-template-columns: minmax(220px, 420px) auto;
  gap: 10px;
}

.switch-row {
  display: flex;
  width: auto;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--green-dark);
  background: var(--green-light);
  cursor: pointer;
}

/* panels.css */
.panel,
.hero-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  transition: box-shadow 240ms ease, transform 240ms ease, border-color 240ms ease;
}

.hero-card:hover,
.stat-card:hover,
.tip-card:hover,
.workflow-step:hover {
  border-color: var(--panel-border-hover);
  box-shadow: var(--shadow-md);
}

.panel {
  padding: 24px;
}

.dashboard-panel {
  position: relative;
  display: grid;
  align-content: start;
  overflow: hidden;
  padding: 26px;
}

.task-panel {
  min-height: 100%;
}

.dashboard-panel::before {
  position: absolute;
  top: 0;
  right: 26px;
  left: 26px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.78), rgba(59, 130, 246, 0.28));
  content: "";
}

.panel-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-kicker {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-index {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green-dark);
  background: var(--green-light);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.panel-note {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.48;
}

.hero-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
  background:
    linear-gradient(135deg, var(--panel-strong), var(--surface-soft)),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 50%);
}

.hero-card.health-ok {
  border-color: rgba(16, 185, 129, 0.32);
  background:
    linear-gradient(135deg, var(--panel-strong), var(--surface-soft)),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.28), transparent 52%);
}

.hero-card.health-error {
  border-color: rgba(239, 68, 68, 0.3);
  background:
    linear-gradient(135deg, var(--panel-strong), var(--surface-soft)),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.2), transparent 52%);
}

.label {
  color: var(--muted);
  font-size: 0.86rem;
}

#serviceState {
  font-size: 1.68rem;
  letter-spacing: -0.04em;
}

.health-ok #serviceState {
  color: var(--green-dark);
}

.health-error #serviceState {
  color: var(--red);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background:
    linear-gradient(180deg, var(--surface), var(--surface-soft)),
    var(--surface-muted);
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.stat-card:hover,
.tip-card:hover,
.workflow-step:hover {
  transform: translateY(-2px);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.86rem;
  letter-spacing: -0.05em;
  transition: color 220ms ease, transform 220ms ease;
  animation: stat-value-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.accounts-list,
.mailboxes-list,
.messages-list,
.result-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-soft);
}

.dashboard-panel .messages-list,
.dashboard-panel .result-card {
  margin-top: 16px;
}

.generated-result {
  min-height: 108px;
  border-left: 4px solid rgba(16, 185, 129, 0.48);
  background:
    linear-gradient(135deg, var(--surface), rgba(16, 185, 129, 0.06)),
    var(--surface-soft);
}

.generated-result > div {
  display: grid;
  gap: 10px;
}

.generated-result strong {
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.messages-list {
  min-height: 108px;
}

.messages-list.empty {
  display: grid;
  align-content: center;
  color: var(--muted);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.tip-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-soft);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tip-card strong {
  display: block;
  margin-bottom: 6px;
}

.tip-card p {
  margin: 0;
}

.message-item {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.message-item:last-child {
  border-bottom: 0;
}

.message-frame {
  width: 100%;
  height: 430px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.messages-list .mail-read-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-left: 16px;
}

.messages-list .mail-read-summary::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), var(--blue));
  content: "";
}

.messages-list .mail-read-summary-title {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.messages-list .mail-read-summary-title strong {
  font-size: 1.08rem;
}

.messages-list .mail-read-summary-title .label {
  overflow-wrap: anywhere;
}

.action-result {
  display: grid;
  gap: 14px;
}

.action-result-head,
.action-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-result-title {
  display: grid;
  gap: 4px;
  margin-right: auto;
}

.action-result-title strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.result-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.result-details summary {
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 800;
}

.code-wait-card,
.code-result {
  display: grid;
  gap: 14px;
}

.code-wait-head,
.code-result-head,
.code-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.code-wait-title,
.code-result-title {
  display: grid;
  gap: 4px;
}

.code-wait-title strong,
.code-result-title strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.code-countdown {
  min-width: 88px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--green-dark);
  background: var(--green-light);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
  text-align: center;
}

.code-progress {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
}

.code-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 260ms ease;
}

.code-result {
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 20px;
  padding: 16px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 42%),
    var(--surface-soft);
}

.code-result-empty {
  border-color: rgba(245, 158, 11, 0.28);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 42%),
    var(--surface-soft);
}

.code-value {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 18px;
  padding: 10px 14px;
  color: var(--green-dark);
  background: var(--green-light);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.code-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@keyframes stat-value-in {
  from {
    opacity: 0.68;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* tables.css */
.table-wrap {
  position: relative;
  overflow-x: auto;
  padding: 0 0 6px;
  scrollbar-gutter: stable;
  scrollbar-color: var(--green-light) transparent;
}

.data-table {
  display: grid;
  min-width: 860px;
  overflow: hidden;
  border-radius: calc(var(--radius-md) - 2px);
}

.account-table {
  min-width: 920px;
}

.mailbox-table {
  min-width: 820px;
}

.table-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.account-table .table-row {
  grid-template-columns: minmax(300px, 2.2fr) 90px 110px 80px 80px minmax(180px, 1fr);
}

.mailbox-table .table-row {
  grid-template-columns: minmax(320px, 2.1fr) 110px 120px 170px 70px minmax(150px, 1fr);
}

.table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--table-head-bg);
}

.account-row,
.mailbox-row {
  background: var(--surface-muted);
  transition: background 160ms ease, box-shadow 160ms ease;
  animation: row-in var(--row-enter-duration) cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--row-enter-index, 0) * 42ms);
}

.account-row:nth-child(odd),
.mailbox-row:nth-child(odd) {
  background: var(--surface-row-alt);
}

.account-row:hover,
.mailbox-row:hover {
  background: var(--row-hover);
  box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.42);
}

.ellipsis {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pager-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

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

.pill {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--green-dark);
  background: var(--green-light);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-active {
  color: var(--status-active-ink);
  background: var(--status-active-bg);
}

.status-completed {
  color: var(--status-completed-ink);
  background: var(--status-completed-bg);
}

.status-expired {
  color: var(--status-expired-ink);
  background: var(--status-expired-bg);
}

.status-deleted,
.status-disabled {
  color: var(--status-deleted-ink);
  background: var(--status-deleted-bg);
}

.copyable {
  position: relative;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(16, 185, 129, 0.6);
  text-decoration-style: dotted;
  text-underline-offset: 4px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

.copyable::after {
  display: inline-flex;
  margin-left: 8px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--green-dark);
  background: var(--green-light);
  content: "copy";
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-1px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.copyable:hover,
.copyable.copied {
  color: var(--green-dark);
  text-decoration-color: var(--green);
}

.copyable:hover::after,
.copyable.copied::after {
  opacity: 1;
  transform: translateY(0);
}

.copyable.copied::after {
  content: "copied";
}

[data-copy].copied:not(.copyable) {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* feedback.css */
.status-dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.status-dot::after {
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid currentColor;
  content: "";
  opacity: 0;
}

.indicator-ok {
  color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.indicator-ok::after {
  animation: status-pulse 1.8s ease-out infinite;
}

.indicator-error {
  color: var(--red);
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.indicator-unknown {
  color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.empty-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 16px;
}

.empty-illustration {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 18px;
  color: var(--green-dark);
  background:
    radial-gradient(circle at 35% 25%, rgba(16, 185, 129, 0.2), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.empty-illustration svg {
  width: 27px;
  height: 27px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.empty-state p {
  margin: 0;
}

pre {
  margin: 18px 0 0;
  min-height: 210px;
  max-height: 360px;
  overflow: auto;
  border-radius: 22px;
  padding: 16px;
  color: var(--code-ink);
  background: var(--code-bg);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.83rem;
  white-space: pre-wrap;
}

.inline-json {
  min-height: auto;
  max-height: 260px;
  margin-top: 12px;
}

.skeleton-wrap {
  overflow: hidden;
}

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

.skeleton-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 110px 160px;
  gap: 14px;
  align-items: center;
  padding: 6px 0;
}

.skeleton {
  display: block;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.46),
    rgba(16, 185, 129, 0.16),
    rgba(255, 255, 255, 0.46)
  );
  background-size: 220% 100%;
  animation: shimmer 1.15s linear infinite;
}

@media (prefers-color-scheme: dark) {
  .skeleton {
    background: linear-gradient(
      90deg,
      rgba(30, 41, 59, 0.72),
      rgba(45, 212, 191, 0.18),
      rgba(30, 41, 59, 0.72)
    );
    background-size: 220% 100%;
  }
}

.skeleton-wide {
  width: min(100%, 520px);
}

.skeleton-mid {
  width: 150px;
}

.skeleton-short {
  width: 86px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--toast-bg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast-content {
  display: grid;
  gap: 4px;
}

.toast-content span {
  color: var(--muted);
  line-height: 1.4;
}

.toast-close {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: var(--surface-soft);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.toast-close:hover {
  color: var(--ink);
  background: var(--surface);
  transform: scale(1.04);
}

.toast-success {
  border-left-color: var(--green);
}

.toast-error {
  border-left-color: var(--red);
}

.toast-info {
  border-left-color: var(--blue);
}

.toast-hiding {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pending-state {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}

.pending-state::before {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(16, 185, 129, 0.18);
  border-top-color: var(--green);
  border-radius: 999px;
  content: "";
  animation: spin 780ms linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes status-pulse {
  0% {
    opacity: 0.42;
    transform: scale(0.7);
  }

  70% {
    opacity: 0;
    transform: scale(1.8);
  }

  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* modal.css */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
  animation: modal-fade-in 180ms ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(680px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--panel-strong);
  box-shadow: var(--shadow-lg);
  animation: modal-slide-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-lg {
  width: min(760px, calc(100vw - 40px));
}

.modal-card-xl {
  width: min(1080px, calc(100vw - 40px));
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
}

.modal-title-row,
.modal-toolbar,
.mail-content-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-row {
  min-width: 0;
}

.modal-title-row h3 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.modal-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 12px;
  color: var(--green-dark);
  background: var(--green-light);
}

.modal-toolbar {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 280px;
}

.modal-toolbar input {
  max-width: 250px;
}

.modal-toolbar select {
  max-width: 150px;
}

.modal-close {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1.24rem;
  line-height: 1;
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
}

.mail-list-body {
  padding: 0;
}

.mail-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 24px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, transform 150ms ease;
}

.mail-row:hover,
.mail-row:focus-visible {
  background: var(--surface-soft);
  box-shadow: none;
  transform: none;
}

.mail-row:active {
  transform: none;
}

.mail-row:last-child {
  border-bottom: 0;
}

.mail-row-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--green-dark);
  background: var(--green-light);
  font-size: 1.05rem;
}

.mail-row-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mail-row-body strong,
.mail-row-snippet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-row-body strong {
  color: var(--ink);
}

.mail-row-snippet {
  color: var(--muted);
  font-size: 0.86rem;
}

.mail-row-arrow {
  color: var(--muted);
  font-size: 1.45rem;
  text-align: right;
}

.mail-read-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mail-read-summary-title {
  display: grid;
  gap: 4px;
}

.modal-detail-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: min(560px, calc(100vh - 210px));
}

.mail-detail-meta {
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 20px 24px;
}

.mail-detail-meta dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 11px 12px;
  margin: 0;
  font-size: 0.92rem;
}

.mail-detail-meta dt {
  color: var(--muted);
}

.mail-detail-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.mail-detail-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.mail-content-header {
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
}

.mail-detail-frame {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  background: var(--panel-strong);
}

.mail-code-extract {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--surface-soft);
}

.mail-code-extract strong {
  color: var(--ink);
}

.mail-code-extract-found {
  border-color: rgba(16, 185, 129, 0.24);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 48%),
    var(--surface-soft);
}

.mail-detail-code-value {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 16px;
  padding: 8px 12px;
  color: var(--green-dark);
  background: var(--green-light);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  overflow-wrap: anywhere;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-slide-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  .modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    width: 100%;
    min-width: 0;
    justify-content: stretch;
  }

  .modal-toolbar input,
  .modal-toolbar select {
    max-width: none;
  }

  .modal-detail-body {
    grid-template-columns: 1fr;
  }

  .mail-detail-meta {
    max-height: 280px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .modal-overlay {
    padding: 12px;
  }

  .modal-card {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .modal-header,
  .modal-footer {
    padding: 14px 16px;
  }

  .modal-toolbar {
    grid-template-columns: 1fr;
  }

  .modal-close {
    width: 100%;
  }

  .mail-row {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 14px 16px;
  }

  .mail-row-icon {
    width: 38px;
    height: 38px;
  }

  .mail-read-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .mail-detail-meta {
    padding: 16px;
  }

  .mail-detail-meta dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* responsive.css */
@media (max-width: 1180px) {
  .dashboard-hero,
  .dashboard-grid,
  .workbench-hero,
  .workbench-command-grid,
  .workbench-support-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

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

@media (max-width: 980px) {
  .layout-wrapper {
    height: auto;
    min-height: 100vh;
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    height: auto;
    min-height: 0;
    flex: none;
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 10px;
    box-shadow: var(--shadow-lg);
  }

  .sidebar-header {
    display: none;
  }

  .sidebar-footer {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    margin-top: 0;
    border-top: 0;
    padding: 0;
  }

  .service-status {
    padding: 9px 12px;
    box-shadow: var(--shadow-md);
  }

  .sidebar-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-item {
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.74rem;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  .main-content {
    width: 100%;
    padding: 24px 18px 28px;
  }

  .hero,
  .grid,
  .control-row,
  .mailbox-controls,
  .stats-row,
  .tips-grid,
  .token-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dashboard-hero .hero-card,
  .workbench-hero .hero-card,
  .generate-form,
  .read-form {
    grid-template-columns: 1fr;
  }

  .read-actions {
    grid-column: 1 / -1;
  }

  .dashboard-hero .hero-card {
    min-height: 0;
  }

  .dashboard-hero .hero-card button,
  .workbench-hero .hero-card button,
  .read-actions button {
    width: 100%;
  }

  .workbench-hero-copy {
    min-height: 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-actions {
    display: grid;
    width: 100%;
    justify-content: stretch;
  }

  .panel-actions button {
    width: 100%;
  }

  .switch-row {
    justify-content: center;
    width: 100%;
    min-height: 44px;
  }

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

  .single-gap {
    grid-template-columns: 1fr;
  }

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

  .code-wait-head,
  .code-result-head,
  .code-value-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast-region {
    right: 12px;
    bottom: calc(116px + env(safe-area-inset-bottom));
    width: min(360px, calc(100vw - 24px));
  }
}

@media (max-width: 620px) {
  .nav-item {
    gap: 4px;
    flex-direction: column;
  }

  h1 {
    font-size: clamp(2.35rem, 16vw, 4.2rem);
  }

  .dashboard-hero h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .workbench-hero h1 {
    font-size: clamp(2.12rem, 13vw, 3.45rem);
  }

  .workbench-badges,
  .workflow-steps,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .workbench-badges {
    display: grid;
  }

  .panel,
  .hero-card {
    border-radius: 22px;
    padding: 18px;
  }

  .dashboard-panel {
    padding: 20px;
  }

  .dashboard-panel::before {
    right: 20px;
    left: 20px;
  }

  .panel-heading {
    gap: 12px;
  }

  .panel-index {
    min-width: 36px;
    padding: 5px 8px;
  }

  .messages-list .mail-read-summary {
    grid-template-columns: 1fr;
  }
}
