:root {
  color-scheme: light;
  --canvas: #f3f6f5;
  --panel: #ffffff;
  --panel-soft: #f8faf9;
  --ink: #0b1824;
  --ink-soft: #293845;
  --muted: #6c7882;
  --line: #dce4e1;
  --line-strong: #cbd7d3;
  --navy: #07111c;
  --navy-soft: #102331;
  --mint: #4ee5a2;
  --mint-strong: #19bd79;
  --mint-pale: #e8fbf2;
  --blue: #3478f6;
  --blue-pale: #edf4ff;
  --amber: #d97706;
  --amber-pale: #fff8e7;
  --red: #c7354b;
  --red-pale: #fff0f2;
  --green: #087d51;
  --shadow-sm: 0 1px 2px rgba(7, 17, 28, 0.04), 0 8px 24px rgba(7, 17, 28, 0.04);
  --shadow-lg: 0 24px 70px rgba(4, 13, 22, 0.2);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-base: "Vazirmatn", "IBM Plex Sans Arabic", Tahoma, Arial, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(78, 229, 162, 0.1), transparent 23rem),
    var(--canvas);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

:focus-visible {
  outline: 3px solid rgba(52, 120, 246, 0.28);
  outline-offset: 2px;
}

.app-shell {
  width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.loading-state {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.loading-mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--mint-strong);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
}

.brand-title {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.8px;
}

.brand-subtitle {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.brand-on-dark .brand-title {
  color: #fff;
}

.brand-on-dark .brand-subtitle {
  color: #9cb0bd;
}

/* Login and product introduction */
.auth-layout {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(380px, 0.74fr);
  overflow: hidden;
  border: 1px solid #1a2c38;
  border-radius: 28px;
  background: var(--navy);
  box-shadow: var(--shadow-lg);
}

.product-pane {
  min-width: 0;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  padding: 34px 42px 38px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    var(--navy);
  background-size: 46px 46px;
}

.product-pane::after {
  content: "SSL";
  position: absolute;
  left: -28px;
  bottom: -80px;
  color: rgba(255, 255, 255, 0.025);
  font-family: Arial, sans-serif;
  font-size: 270px;
  font-weight: 900;
  letter-spacing: -22px;
  pointer-events: none;
}

.auth-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.service-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: #b8c9d2;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  white-space: nowrap;
}

.service-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(78, 229, 162, 0.11);
}

.service-pill.light {
  color: var(--green);
  border-color: #bdebd5;
  background: var(--mint-pale);
}

.hero-copy {
  width: min(700px, 94%);
  margin: auto 0 34px;
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.hero-copy h1 {
  margin: 18px 0 20px;
  font-size: clamp(44px, 5.6vw, 78px);
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: -2.5px;
}

.hero-copy h1 em {
  color: var(--mint);
  font-style: normal;
}

.hero-copy p {
  width: min(610px, 100%);
  margin: 0;
  color: #afc0ca;
  font-size: 16px;
  line-height: 2;
}

.product-flow {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.product-flow li {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  background: rgba(10, 28, 40, 0.88);
}

.product-flow li > b {
  color: var(--mint);
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.product-flow strong,
.product-flow small {
  display: block;
}

.product-flow strong {
  color: #fff;
  font-size: 13px;
}

.product-flow small {
  margin-top: 5px;
  color: #8298a6;
  font-size: 10px;
}

.auth-side {
  display: grid;
  align-items: center;
  padding: 34px;
  background: #f4f7f6;
}

.auth-card {
  width: 100%;
  padding: 34px;
  border-radius: 20px;
}

.auth-card-head {
  margin-bottom: 28px;
}

.auth-kicker,
.section-kicker {
  color: var(--green);
}

.auth-card h2,
.section h2,
.section-heading h2 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: -0.4px;
}

.auth-card-head p,
.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.auth-card-head p b {
  color: var(--ink-soft);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  direction: ltr;
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4afb5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.1);
}

.field input[readonly] {
  color: var(--muted);
  background: #f5f7f6;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 56px;
}

.input-hint {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  direction: ltr;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.otp-input {
  letter-spacing: 8px;
  text-align: center !important;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.field textarea {
  min-height: 160px;
  padding: 13px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.ghost-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.primary-btn {
  color: #062017;
  background: var(--mint);
  box-shadow: 0 7px 18px rgba(25, 189, 121, 0.15);
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: #38d894;
  box-shadow: 0 9px 22px rgba(25, 189, 121, 0.22);
}

.secondary-btn {
  color: #08704a;
  border-color: #bcebd5;
  background: var(--mint-pale);
}

.danger-btn {
  color: var(--red);
  border-color: #f3c9d0;
  background: var(--red-pale);
}

.ghost-btn {
  color: var(--ink-soft);
  border-color: var(--line-strong);
  background: #fff;
}

.ghost-btn:hover,
.secondary-btn:hover {
  border-color: #9fb2ac;
  background: var(--panel-soft);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  transform: none;
  opacity: 0.52;
  box-shadow: none;
}

.form-actions,
.domain-actions,
.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.auth-submit {
  min-width: 156px;
}

.full-btn {
  width: 100%;
}

.auth-footnote {
  margin: 22px 0 0;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
  text-align: center;
}

.notice,
.error {
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.8;
}

.notice {
  color: #146148;
  border-color: #bcebd5;
  background: var(--mint-pale);
}

.error {
  color: #98293b;
  border-color: #f1c5cc;
  background: var(--red-pale);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  transform: translateX(-50%);
  color: var(--ink-soft);
  border: 1px solid;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(7, 17, 28, 0.18);
  font-size: 12px;
  text-align: center;
  animation: toast-enter 0.18s ease-out both;
}

.toast-success {
  color: #075e3c;
  border-color: #92dbb9;
  background: #effcf6;
}

.toast-error {
  color: #8e2638;
  border-color: #edb9c2;
  background: #fff4f5;
}

@keyframes toast-enter {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Dashboard */
.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-radius: 18px;
}

.topbar-main,
.user-strip {
  display: flex;
  align-items: center;
}

.topbar-main {
  gap: 18px;
}

.user-strip {
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #07583b;
  border-radius: 50%;
  background: var(--mint-pale);
  font-size: 11px;
  font-weight: 900;
}

.user-mobile {
  color: var(--ink-soft);
  font-size: 11px;
}

.dashboard-intro {
  padding: 54px 4px 28px;
}

.dashboard-intro h1 {
  margin: 0 0 7px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.35;
  letter-spacing: -1.2px;
}

.dashboard-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.metric {
  min-height: 126px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.metric::after {
  content: "";
  width: 7px;
  height: 7px;
  position: absolute;
  top: 20px;
  left: 18px;
  border-radius: 50%;
  background: var(--line-strong);
}

.metric-primary {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.metric-primary::after {
  background: var(--mint);
}

.metric-warning::after {
  background: var(--amber);
}

.metric > span,
.metric > small,
.metric > strong {
  display: block;
}

.metric > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-primary > span,
.metric-primary > small {
  color: #a9bbc6;
}

.metric > strong {
  margin: 8px 0 5px;
  font-size: 31px;
  line-height: 1;
}

.metric > small {
  color: #8a959d;
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 326px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.dashboard-feedback {
  margin: 0 0 18px;
}

.sidebar-stack,
.domain-list,
.domains-section {
  display: grid;
  gap: 14px;
}

.section {
  padding: 22px;
}

.add-domain-panel {
  border-top: 3px solid var(--mint-strong);
}

.add-domain-panel h2 {
  margin-top: 0;
}

.target-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.target-box span {
  color: var(--muted);
  font-size: 10px;
}

.target-box strong {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-align: left;
}

.section-heading {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.count-pill {
  padding: 8px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  white-space: nowrap;
}

.domain-item {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.domain-head,
.reminder-head,
.dns-head,
.archive-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.domain-name {
  min-width: 0;
}

.domain-name strong {
  display: block;
  direction: ltr;
  color: var(--ink);
  font-family: Arial, sans-serif;
  font-size: 19px;
  text-align: left;
  overflow-wrap: anywhere;
}

.domain-name span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.ready { color: #8d5b05; border-color: #f1d28f; background: var(--amber-pale); }
.badge.pending_dns_challenge { color: #145da8; border-color: #bdd5f6; background: var(--blue-pale); }
.badge.issuing { color: #5546a7; border-color: #d3cbfb; background: #f3f0ff; }
.badge.issued { color: var(--green); border-color: #bcebd5; background: var(--mint-pale); }
.badge.failed { color: #992d40; border-color: #efc1c9; background: var(--red-pale); }
.badge.expired { color: #9b4f18; border-color: #efc7a6; background: #fff4eb; }

.domain-progress {
  display: grid;
  grid-template-columns: auto minmax(20px, 1fr) auto minmax(20px, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.progress-step {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #9aa4aa;
  font-size: 9px;
  white-space: nowrap;
}

.progress-step i {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 2px solid #c9d3d0;
  border-radius: 50%;
  background: #fff;
}

.progress-step.is-done,
.progress-step.is-current {
  color: var(--ink-soft);
  font-weight: 800;
}

.progress-step.is-done i {
  border-color: var(--mint-strong);
  background: var(--mint-strong);
  box-shadow: inset 0 0 0 3px #fff;
}

.progress-step.is-current i {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.1);
}

.progress-line {
  height: 2px;
  margin-top: 6px;
  background: #dbe3e0;
}

.progress-line.is-done {
  background: var(--mint-strong);
}

.dns-box {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid #cddbd6;
  border-radius: var(--radius-sm);
  background: #f7faf9;
}

.acme-dns-box {
  border-color: #bfd4f4;
  background: #f5f8ff;
  box-shadow: inset 3px 0 0 var(--blue);
}

.acme-dns-box .dns-guidance {
  color: #164b86;
  border-color: #c8daf6;
  background: var(--blue-pale);
}

.acme-dns-box .dns-guidance span {
  color: #466786;
}

.acme-challenge-status {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: #315472;
  border: 1px solid #cfddf2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.acme-challenge-status strong {
  font-size: 10px;
}

.acme-challenge-status span {
  font-size: 10px;
  line-height: 1.8;
}

.acme-challenge-status small {
  color: var(--muted);
  font-size: 9px;
}

.acme-challenge-status.has-error {
  color: #825005;
  border-color: #efd08c;
  background: var(--amber-pale);
}

.dns-head {
  align-items: center;
  padding-bottom: 4px;
}

.dns-head strong,
.dns-head .section-kicker {
  display: block;
}

.dns-head strong {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.dns-type {
  padding: 4px 8px;
  direction: ltr;
  color: var(--green);
  border: 1px solid #bcebd5;
  border-radius: 6px;
  background: var(--mint-pale);
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
}

.dns-guidance {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: #173f30;
  border: 1px solid #bcebd5;
  border-radius: 8px;
  background: var(--mint-pale);
}

.dns-guidance strong {
  font-size: 11px;
}

.dns-guidance span {
  color: #3e6255;
  font-size: 10px;
  line-height: 1.8;
}

.dns-guidance code {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dns-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 7px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dns-row > span,
.status-line {
  color: var(--muted);
  font-size: 10px;
}

.dns-row code {
  direction: ltr;
  color: #132835;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  text-align: left;
  overflow-wrap: anywhere;
}

.copy-btn {
  min-width: 42px;
  height: 30px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  font-size: 9px;
  font-weight: 800;
}

.copy-btn:hover {
  border-color: #9fb2ac;
  background: #fff;
}

.dns-advanced {
  padding: 0 7px;
  border: 1px dashed #c7d5d0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.dns-advanced summary {
  padding: 10px 2px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.dns-advanced p {
  margin: 0 2px 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.9;
}

.dns-advanced .dns-row {
  margin-bottom: 7px;
}

.status-line {
  line-height: 1.8;
}

.ssl-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #c3e7d5;
  border-radius: var(--radius-sm);
  background: #c3e7d5;
}

.ssl-summary > div {
  min-height: 68px;
  padding: 12px;
  background: #f2fcf7;
}

.ssl-summary span,
.reminder-head span,
.archive-row span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.ssl-summary strong,
.archive-row strong {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.reminder-box,
.download-log,
.archive-list {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.reminder-box {
  border-color: #eedcb7;
  background: #fffbf0;
}

.reminder-head strong,
.archive-title {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
}

.mini-list,
.reminder-log,
.archive-list {
  display: grid;
  gap: 7px;
}

.mini-row,
.archive-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
}

.mini-row span {
  color: var(--muted);
  font-size: 9px;
}

.mini-row strong {
  color: var(--ink-soft);
  font-size: 9px;
  white-space: nowrap;
}

.audit-row span {
  overflow-wrap: anywhere;
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.compact-btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 9px;
}

.certificate-view {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.empty-state {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
  text-align: right;
}

.empty-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--mint);
  border-radius: 18px;
  background: var(--navy);
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.empty-state strong,
.empty-state p {
  display: block;
  margin: 0;
}

.fatal-state {
  width: min(560px, 100%);
  margin: 16vh auto 0;
  background: #fff;
}

.fatal-state .primary-btn {
  margin-top: 16px;
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 14px;
}

.empty-state p {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.8;
}

/* Operations dashboard */
.admin-token-panel {
  width: min(450px, 100%);
  margin: 15vh auto 0;
}

.admin-token-panel .brand {
  margin-bottom: 28px;
}

.admin-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
}

.admin-heading {
  margin: 0 0 10px;
  font-size: 19px;
}

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

  .product-pane {
    min-height: 650px;
  }

  .auth-side {
    padding: 44px max(24px, 12vw);
  }

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

  .dashboard-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 680px) {
  .app-shell {
    width: min(100vw - 20px, 1240px);
    padding: 10px 0 28px;
  }

  .auth-layout {
    min-height: calc(100vh - 20px);
    border-radius: 20px;
  }

  .product-pane {
    min-height: 590px;
    padding: 24px 20px;
  }

  .auth-brandbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-copy {
    width: 100%;
    margin-top: auto;
  }

  .hero-copy h1 {
    font-size: 43px;
    letter-spacing: -1.5px;
  }

  .hero-copy p {
    font-size: 13px;
  }

  .product-flow {
    grid-template-columns: 1fr;
  }

  .product-flow li {
    min-height: 64px;
    padding: 12px 15px;
  }

  .auth-side {
    padding: 20px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-main,
  .user-strip {
    justify-content: space-between;
  }

  .dashboard-intro {
    padding: 38px 2px 24px;
  }

  .dashboard-intro h1 {
    font-size: 31px;
  }

  .metrics,
  .sidebar-stack {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 106px;
  }

  .domain-item {
    padding: 15px;
  }

  .domain-head,
  .reminder-head,
  .archive-row {
    align-items: stretch;
    flex-direction: column;
  }

  .domain-progress {
    padding-inline: 8px;
  }

  .progress-step span {
    font-size: 8px;
  }

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

  .dns-row > span {
    grid-column: 1 / -1;
  }

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

  .domain-actions > * {
    flex: 1 1 auto;
  }

  .mini-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast {
    left: 12px;
    right: 12px;
    max-width: none;
    transform: none;
  }

  @keyframes toast-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

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