:root {
  color-scheme: light;
  --surface: #f7f8fb;
  --surface-strong: #ffffff;
  --surface-soft: #f1f3f7;
  --surface-panel: rgba(255, 255, 255, 0.72);
  --text: #16181d;
  --text-muted: #6a6f7b;
  --text-soft: #959baa;
  --primary: #0057b8;
  --primary-deep: #00418a;
  --outline: rgba(109, 118, 138, 0.18);
  --outline-soft: rgba(16, 24, 40, 0.06);
  --shadow-panel: 0 30px 70px -40px rgba(15, 23, 42, 0.28);
  --shadow-card: 0 20px 48px -32px rgba(15, 23, 42, 0.2);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0d111b;
  --surface-strong: #151b28;
  --surface-soft: #111827;
  --surface-panel: rgba(17, 24, 39, 0.74);
  --text: #eef2f7;
  --text-muted: #a8b3c4;
  --text-soft: #718096;
  --primary: #7db4ff;
  --primary-deep: #4f8fe8;
  --outline: rgba(148, 163, 184, 0.24);
  --outline-soft: rgba(226, 232, 240, 0.08);
  --shadow-panel: 0 30px 80px -44px rgba(0, 0, 0, 0.74);
  --shadow-card: 0 24px 58px -40px rgba(0, 0, 0, 0.68);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(170, 199, 255, 0.18), transparent 22%),
    radial-gradient(circle at 100% 0, rgba(233, 240, 255, 0.72), transparent 28%),
    linear-gradient(180deg, #fbfcfe 0%, #f3f5fa 100%);
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(87, 141, 230, 0.2), transparent 26%),
    radial-gradient(circle at 100% 0, rgba(30, 41, 59, 0.9), transparent 32%),
    linear-gradient(180deg, #0b1019 0%, #111827 100%);
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 300px;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  padding: 28px 22px;
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(26px);
  border-right: 1px solid var(--outline-soft);
}

:root[data-theme="dark"] .sidebar {
  background: rgba(15, 23, 42, 0.72);
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sidebar-head {
  display: grid;
  gap: 24px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--outline-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(0, 87, 184, 0.18);
}

.theme-toggle span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 87, 184, 0.1);
  color: var(--primary);
}

.theme-toggle strong {
  font-size: 0.92rem;
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .ghost-button,
:root[data-theme="dark"] .small-action,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .profile-chip,
:root[data-theme="dark"] .hero-metrics article,
:root[data-theme="dark"] .card-top button,
:root[data-theme="dark"] .empty-mark {
  background: rgba(30, 41, 59, 0.72);
}

:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .profile-menu a:hover,
:root[data-theme="dark"] .profile-menu button:hover {
  background: rgba(51, 65, 85, 0.78);
}

.plan-card,
.panel,
.hero-panel,
.identity-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface-panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-panel);
}

:root[data-theme="dark"] .plan-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .hero-panel,
:root[data-theme="dark"] .identity-card,
:root[data-theme="dark"] .domain-card {
  border-color: rgba(148, 163, 184, 0.18);
}

.plan-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.plan-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.plan-card p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.eyebrow {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--text-muted);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
}

:root[data-theme="dark"] .nav-item.is-active,
:root[data-theme="dark"] .mobile-dashboard-nav button.is-active,
:root[data-theme="dark"] .status-pill.is-live {
  background: rgba(125, 180, 255, 0.14);
}

.nav-item.is-active {
  background: rgba(0, 87, 184, 0.1);
  color: var(--primary);
}

.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.icon-svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.hidden {
  display: none !important;
}

.sidebar-foot {
  display: grid;
  gap: 18px;
  margin-top: auto;
}

.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary);
  box-shadow: 0 12px 28px -24px rgba(0, 87, 184, 0.4);
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  box-shadow: 0 18px 34px -24px rgba(0, 87, 184, 0.9);
}

.ghost-button:hover,
.primary-button:hover,
.icon-button:hover,
.identity-card:hover,
.is-empty:hover {
  transform: translateY(-1px);
}

.support-links {
  display: grid;
  gap: 10px;
}

.support-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.content-shell {
  grid-column: 2;
  min-width: 0;
  padding: 28px;
}

.hero-copy h2,
.section-head h3,
.card-body h4 {
  margin: 0;
  letter-spacing: -0.05em;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 26px -20px rgba(15, 23, 42, 0.34);
}

.icon-button span,
.activity-dot {
  display: block;
  border-radius: 999px;
  background: var(--primary);
}

.icon-button span {
  width: 10px;
  height: 10px;
  margin: 0 auto;
}

.profile-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.82);
}

.profile-chip-button {
  justify-content: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: 0 12px 26px -22px rgba(15, 23, 42, 0.34);
}

.profile-menu-wrap {
  position: relative;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  display: grid;
  min-width: 190px;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 54px -34px rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .profile-menu,
:root[data-theme="dark"] .mobile-dashboard-nav {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.92);
}

.profile-menu a,
.profile-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.2;
}

.profile-menu a:hover,
.profile-menu button:hover {
  background: rgba(0, 87, 184, 0.08);
  color: var(--primary);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #111827, #4b5563);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  overflow: hidden;
}

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

.avatar.soft {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #dbe7ff, #f4f6fb);
  color: var(--primary);
}

:root[data-theme="dark"] .avatar.soft {
  background: linear-gradient(135deg, rgba(64, 100, 170, 0.72), rgba(30, 41, 59, 0.94));
}

.profile-chip strong,
.contact-person strong {
  display: block;
  font-size: 0.96rem;
}

.profile-chip span,
.contact-person p,
.activity-item p,
.card-body p,
.card-meta span {
  color: var(--text-muted);
}

.profile-chip span,
.contact-person p {
  font-size: 0.84rem;
}

.dashboard-main {
  display: grid;
  gap: 24px;
  padding-top: 24px;
}

.dashboard-view {
  display: grid;
  gap: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
  padding: 34px;
  border-radius: var(--radius-xl);
}

.hero-copy h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
}

.hero-metrics {
  display: grid;
  gap: 14px;
}

.hero-panel.is-empty-dashboard .hero-metrics {
  display: none;
}

.hero-panel.is-empty-dashboard {
  grid-template-columns: minmax(0, 1fr);
}

.hero-panel.is-empty-dashboard .hero-copy {
  max-width: 760px;
}

.hero-panel.is-empty-dashboard .hero-copy h2 {
  max-width: 620px;
}

.hero-panel.is-stats-dashboard .hero-actions {
  display: none;
}

.hero-panel.is-stats-dashboard {
  grid-template-columns: 1fr;
}

.hero-panel.is-stats-dashboard .hero-copy {
  display: none;
}

.hero-panel.is-stats-dashboard .hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-panel.is-stats-dashboard .hero-metrics article {
  min-height: 132px;
}

.hero-metrics article,
.panel,
.identity-card,
.contact-row {
  border-radius: var(--radius-lg);
}

.hero-metrics article {
  display: grid;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.28);
}

:root[data-theme="dark"] .hero-metrics article {
  box-shadow: 0 18px 44px -34px rgba(0, 0, 0, 0.82);
}

.hero-metrics strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.hero-metrics span {
  color: var(--text-muted);
}

.section-block,
.dashboard-grid {
  display: grid;
  gap: 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-head h3 {
  margin-top: 8px;
  font-size: 1.7rem;
}

.section-head p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-head a {
  color: var(--primary);
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.print-design-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.print-dashboard-card {
  cursor: pointer;
}

.print-dashboard-panel {
  min-height: calc(100vh - 180px);
  align-content: start;
}

.identity-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 236px;
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tone-ice {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(235, 243, 255, 0.88));
}

:root[data-theme="dark"] .tone-ice,
:root[data-theme="dark"] .tone-sky,
:root[data-theme="dark"] .tone-blush {
  background:
    radial-gradient(circle at 10% 0, rgba(125, 180, 255, 0.12), transparent 34%),
    rgba(17, 24, 39, 0.8);
}

.tone-sky {
  background: linear-gradient(135deg, rgba(240, 247, 255, 0.92), rgba(220, 236, 255, 0.86));
}

.tone-blush {
  background: linear-gradient(135deg, rgba(255, 248, 250, 0.92), rgba(246, 235, 244, 0.88));
}

.card-top,
.card-meta,
.contact-row,
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-top span,
.card-meta span {
  font-size: 0.84rem;
  font-weight: 600;
}

.card-top button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-muted);
}

.card-body h4 {
  font-size: 1.6rem;
}

.card-body p {
  margin: 8px 0 0;
  font-size: 0.98rem;
}

.card-meta strong {
  font-size: 0.92rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(106, 111, 123, 0.09);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.is-live {
  background: rgba(0, 87, 184, 0.1);
  color: var(--primary);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.74);
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.small-action:disabled {
  cursor: not-allowed;
  color: var(--text-soft);
  opacity: 0.72;
}

.is-empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.34);
  border: 1px dashed rgba(109, 118, 138, 0.34);
  box-shadow: none;
}

:root[data-theme="dark"] .is-empty {
  background: rgba(15, 23, 42, 0.44);
  border-color: rgba(148, 163, 184, 0.28);
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.is-empty h4 {
  margin: 0;
  font-size: 1.3rem;
}

.is-empty p {
  max-width: 220px;
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.panel {
  padding: 26px;
}

.activity-list,
.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.activity-item,
.contact-row {
  padding: 18px 0;
}

.activity-item + .activity-item,
.contact-row + .contact-row {
  border-top: 1px solid var(--outline-soft);
}

.activity-item {
  align-items: start;
}

.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  flex: 0 0 auto;
}

.activity-item strong {
  display: block;
  font-size: 1rem;
}

.activity-item p {
  margin: 8px 0 0;
  line-height: 1.72;
}

.activity-item time,
.contact-row span {
  color: var(--text-soft);
  font-size: 0.84rem;
  white-space: nowrap;
}

.contact-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-hero {
  align-items: center;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 22px;
}

.account-identity h2 {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.account-identity p {
  margin: 0;
  color: var(--text-muted);
}

.account-avatar {
  width: 86px;
  height: 86px;
  font-size: 1.5rem;
}

.avatar-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.inline-status {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.account-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

#accountView > .dashboard-grid .account-form {
  display: none;
}

.account-summary-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.account-summary-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--outline-soft);
}

.account-summary-row:first-child {
  border-top: 0;
}

.account-summary-row span {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.account-summary-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-form label {
  display: grid;
  gap: 8px;
}

.account-form label span {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.account-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--outline);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
}

:root[data-theme="dark"] .account-form input,
:root[data-theme="dark"] .domain-form input,
:root[data-theme="dark"] .domain-form select,
:root[data-theme="dark"] .domain-actions select {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
}

.account-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-weight: 700;
}

.account-checkbox input {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--primary);
}

.form-note {
  margin: 18px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
}

.account-actions.compact-actions {
  align-items: flex-end;
  margin-top: 18px;
  padding: 0;
}

.compact-actions .form-note {
  margin: 0;
}

.account-actions + .account-actions {
  border-top: 1px solid var(--outline-soft);
}

.account-actions strong {
  display: block;
  margin-bottom: 8px;
}

.account-actions p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.danger-soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: rgba(186, 26, 26, 0.08);
  color: #ba1a1a;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(10px);
}

.modal-panel {
  width: min(100%, 560px);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 34px 90px -42px rgba(15, 23, 42, 0.5);
}

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

.modal-head h3 {
  margin: 0;
  font-size: 1.42rem;
  letter-spacing: -0.04em;
}

.modal-head p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.icon-close-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(106, 111, 123, 0.09);
  color: var(--text-muted);
  font-size: 1.28rem;
  line-height: 1;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.modal-actions .form-note {
  flex: 1;
  margin: 0;
}

:root[data-theme="dark"] .modal-panel {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(17, 24, 39, 0.96);
}

:root[data-theme="dark"] .icon-close-button {
  background: rgba(148, 163, 184, 0.14);
}

.domain-form,
.domain-list,
.domain-help,
.dns-records {
  display: grid;
  gap: 14px;
}

.domain-form {
  margin-top: 22px;
}

.domain-form label,
.domain-actions label {
  display: grid;
  gap: 8px;
}

.domain-form label span,
.domain-actions label span {
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.domain-form input,
.domain-form select,
.domain-actions select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--outline);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  outline: none;
}

:root[data-theme="dark"] .domain-help code,
:root[data-theme="dark"] .dns-records code {
  background: rgba(2, 6, 23, 0.36);
}

.domain-help {
  margin-top: 22px;
}

.domain-help code,
.dns-records code {
  display: block;
  overflow-wrap: anywhere;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.055);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
}

.domain-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.domain-card-main,
.domain-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.domain-card h4 {
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
  font-size: 1.42rem;
  letter-spacing: -0.04em;
}

.domain-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.dns-records {
  padding: 16px;
  border: 1px solid rgba(109, 118, 138, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

:root[data-theme="dark"] .dns-records {
  background: rgba(15, 23, 42, 0.48);
  border-color: rgba(148, 163, 184, 0.18);
}

.domain-actions {
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
}

.danger-inline {
  color: #ba1a1a;
}

.danger-text {
  color: #ba1a1a !important;
}

/* Custom domain task wizard */
.domain-wizard-page {
  --wizard-accent: #5b5bd6;
  --wizard-accent-soft: rgba(91, 91, 214, 0.1);
  --wizard-success: #16815d;
  --wizard-danger: #c33d3d;
}

.wizard-hero {
  overflow: hidden;
  position: relative;
}

.wizard-hero::after {
  position: absolute;
  right: -55px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 68%);
  content: "";
  pointer-events: none;
}

.eyebrow,
.wizard-kicker,
.task-overline {
  color: var(--wizard-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.wizard-launch {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1.28fr);
  gap: 34px 54px;
  margin-top: 26px;
  padding: 34px;
}

.wizard-launch-copy h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  letter-spacing: -0.045em;
}

.wizard-launch-copy p,
.cloudflare-connection p,
.record-details p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.domain-wizard-form {
  display: grid;
  gap: 17px;
}

.wizard-field {
  display: grid;
  gap: 8px;
}

.wizard-field label,
.platform-domain-form label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 750;
}

.wizard-field small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.hostname-input-wrap,
.platform-input-wrap {
  display: flex;
  align-items: center;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hostname-input-wrap:focus-within,
.platform-input-wrap:focus-within {
  border-color: var(--wizard-accent);
  box-shadow: 0 0 0 4px var(--wizard-accent-soft);
}

.hostname-input-wrap > span,
.platform-input-wrap > span {
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.hostname-input-wrap input,
.platform-input-wrap input,
.domain-wizard-form select,
.platform-domain-form select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--outline);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  outline: none;
}

.hostname-input-wrap input,
.platform-input-wrap input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.platform-input-wrap > span {
  padding: 0 16px 0 0;
}

.wizard-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding-inline: 20px;
}

.wizard-form-status {
  min-height: 1.35em;
  margin: -5px 2px 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.cloudflare-connection {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 17px 19px;
  border: 1px solid rgba(22, 129, 93, 0.2);
  border-radius: 18px;
  background: rgba(22, 129, 93, 0.06);
}

.cloudflare-connection.needs-action {
  border-color: rgba(219, 134, 24, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.cloudflare-connection.attention-pulse {
  animation: domain-attention 800ms ease;
}

@keyframes domain-attention {
  45% { transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12); }
}

.connection-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  color: #a55d05;
  font-weight: 900;
}

.connection-icon.is-connected {
  background: rgba(22, 129, 93, 0.14);
  color: var(--wizard-success);
}

.cloudflare-connection strong {
  display: block;
  margin-bottom: 2px;
}

.cloudflare-connection p {
  font-size: 0.84rem;
}

.quiet-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wizard-accent);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.platform-domain-option {
  grid-column: 1 / -1;
  padding-top: 2px;
  color: var(--text-muted);
}

.platform-domain-option summary {
  width: fit-content;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.platform-domain-form {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 15px;
}

.platform-domain-form > label {
  grid-column: 1 / -1;
}

.domain-tasks-section {
  margin-top: 34px;
}

.domain-task-list {
  margin-top: 20px;
  gap: 18px;
}

.domain-task-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 150px;
  padding: 28px;
  border: 1px dashed var(--outline);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: left;
}

.domain-task-empty > span {
  font-size: 2.2rem;
  color: var(--wizard-accent);
}

.domain-task-empty h4,
.domain-task-empty p {
  margin: 0;
}

.domain-task-empty p {
  margin-top: 5px;
}

.domain-task-card {
  display: grid;
  gap: 22px;
  padding: 27px;
  border: 1px solid rgba(109, 118, 138, 0.16);
  border-left: 4px solid var(--wizard-accent);
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  box-shadow: var(--shadow-card);
}

.domain-task-card.is-complete { border-left-color: var(--wizard-success); }
.domain-task-card.has-error { border-left-color: var(--wizard-danger); }

.task-card-header,
.task-domain-identity,
.task-primary-actions,
.record-details-head {
  display: flex;
  align-items: center;
}

.task-card-header {
  justify-content: space-between;
  gap: 20px;
}

.task-domain-identity {
  gap: 14px;
  min-width: 0;
}

.task-status-icon {
  display: grid;
  flex: 0 0 auto;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 15px;
  background: var(--wizard-accent-soft);
  color: var(--wizard-accent);
  font-weight: 900;
}

.is-complete .task-status-icon {
  background: rgba(22, 129, 93, 0.12);
  color: var(--wizard-success);
}

.has-error .task-status-icon {
  background: rgba(195, 61, 61, 0.1);
  color: var(--wizard-danger);
}

.task-card-header h4 {
  margin: 4px 0;
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.task-card-header p,
.task-timeline p,
.task-error-panel p,
.task-feedback {
  margin: 0;
  color: var(--text-muted);
}

.task-state-label {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--wizard-accent-soft);
  color: var(--wizard-accent);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.has-error .task-state-label {
  background: rgba(195, 61, 61, 0.09);
  color: var(--wizard-danger);
}

.task-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 3px 0 0;
  padding: 0;
  list-style: none;
}

.task-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding-right: 12px;
  color: var(--text-muted);
}

.task-timeline li::before {
  position: absolute;
  top: 12px;
  right: 0;
  left: 13px;
  height: 2px;
  background: var(--outline);
  content: "";
}

.task-timeline li:last-child::before { display: none; }

.timeline-marker {
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 2px solid var(--outline);
  border-radius: 50%;
  background: var(--surface-panel);
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
}

.task-timeline li.is-done::before { background: rgba(22, 129, 93, 0.45); }
.task-timeline li.is-done .timeline-marker { border-color: var(--wizard-success); background: var(--wizard-success); }
.task-timeline li.is-done strong { color: var(--text); }

.task-timeline li.is-current .timeline-marker {
  border-color: var(--wizard-accent);
  box-shadow: 0 0 0 5px var(--wizard-accent-soft);
}

.task-timeline li.is-current strong { color: var(--wizard-accent); }
.task-timeline li.is-error .timeline-marker { border-color: var(--wizard-danger); background: var(--wizard-danger); }
.task-timeline li.is-error strong { color: var(--wizard-danger); }

.task-timeline strong {
  display: block;
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 3px 5px 4px 0;
  background: var(--surface-panel);
  font-size: 0.84rem;
}

.task-timeline p {
  margin-top: 5px;
  font-size: 0.74rem;
  line-height: 1.45;
}

.compact-timeline { grid-template-columns: repeat(2, minmax(0, 260px)); }

.task-error-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(195, 61, 61, 0.22);
  border-radius: 18px;
  background: rgba(195, 61, 61, 0.055);
}

.error-panel-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: var(--wizard-danger);
  color: white;
  font-weight: 900;
}

.task-error-panel span {
  color: var(--wizard-danger);
  font-size: 0.74rem;
  font-weight: 800;
}

.task-error-panel h5 {
  margin: 3px 0 5px;
  font-size: 1rem;
}

.task-error-panel .quiet-link { margin-top: 11px; color: var(--wizard-danger); }

.task-primary-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.compact-button {
  width: auto;
  min-height: 40px;
  padding: 9px 15px;
}

.task-feedback {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(22, 129, 93, 0.08);
  color: var(--wizard-success);
  font-size: 0.82rem;
}

.task-feedback.is-error {
  background: rgba(195, 61, 61, 0.07);
  color: var(--wizard-danger);
}

.record-details {
  padding: 18px;
  border: 1px solid var(--outline);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.025);
}

.record-details[hidden] { display: none; }

.dns-record-row {
  display: grid;
  grid-template-columns: 70px minmax(150px, 1fr) auto minmax(150px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--outline);
}

.record-type {
  color: var(--wizard-accent);
  font-size: 0.76rem;
  font-weight: 900;
}

.dns-record-row small {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
}

.dns-record-row code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.copy-button {
  padding: 7px 9px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--surface-panel);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.task-settings {
  border-top: 1px solid var(--outline);
  padding-top: 14px;
  color: var(--text-muted);
}

.task-settings summary {
  width: fit-content;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.task-settings-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.task-settings-grid label {
  display: grid;
  gap: 6px;
}

.task-settings-grid label span { font-size: 0.76rem; font-weight: 700; }

.task-settings-grid select {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  background: var(--surface-panel);
  color: var(--text);
}

:root[data-theme="dark"] .hostname-input-wrap,
:root[data-theme="dark"] .platform-input-wrap,
:root[data-theme="dark"] .domain-wizard-form select,
:root[data-theme="dark"] .platform-domain-form select {
  background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 900px) {
  .wizard-launch { grid-template-columns: 1fr; gap: 26px; }
  .task-timeline { grid-template-columns: 1fr; gap: 0; }
  .task-timeline li { min-height: 68px; padding: 0 0 13px; }
  .task-timeline li::before { top: 13px; right: auto; bottom: -1px; left: 12px; width: 2px; height: auto; }
  .task-timeline li:last-child { min-height: auto; }
  .compact-timeline { grid-template-columns: 1fr; }
  .dns-record-row { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .dns-record-row > div:nth-of-type(2) { grid-column: 2; }
  .task-settings-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .wizard-launch, .domain-task-card { padding: 21px; }
  .task-card-header { align-items: flex-start; }
  .task-status-icon { width: 38px; height: 38px; border-radius: 12px; }
  .cloudflare-connection { grid-template-columns: auto minmax(0, 1fr); }
  .cloudflare-connection > :last-child { grid-column: 2; justify-self: start; }
  .platform-domain-form, .task-settings-grid { grid-template-columns: 1fr; }
  .dns-record-row { grid-template-columns: 1fr auto; }
  .dns-record-row .record-type { grid-column: 1 / -1; }
  .dns-record-row > div { grid-column: 1; }
}

.mobile-dashboard-nav {
  display: none;
}

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

  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--outline-soft);
  }

  .content-shell {
    grid-column: 1;
  }

  .card-grid,
  .print-design-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .dashboard-shell {
    display: block;
    min-height: 100dvh;
  }

  .content-shell,
  .sidebar {
    padding: 14px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: block;
    width: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(16, 24, 40, 0.06);
    background: rgba(248, 250, 253, 0.86);
    backdrop-filter: blur(22px);
  }

  .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .theme-toggle {
    flex: 0 0 auto;
    width: auto;
    min-width: 46px;
    padding: 0 10px;
  }

  .theme-toggle strong {
    display: none;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 1rem;
  }

  .plan-card {
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
    border-radius: 18px;
    box-shadow: 0 14px 34px -28px rgba(15, 23, 42, 0.25);
  }

  .plan-card strong {
    overflow: hidden;
    margin-top: 0;
    font-size: 0.96rem;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .plan-card p {
    overflow: hidden;
    margin-top: 4px;
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .sidebar-nav,
  .sidebar-foot {
    display: none;
  }

  .content-shell {
    grid-column: auto;
    padding: 14px 12px 28px;
  }

  .dashboard-main,
  .dashboard-view {
    gap: 16px;
  }

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

  .hero-panel {
    gap: 18px;
  }

  .hero-copy h2 {
    margin-top: 0;
    font-size: clamp(1.8rem, 10vw, 2.35rem);
    line-height: 1.05;
  }

  .hero-copy p {
    margin-top: 12px;
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-panel.is-stats-dashboard .hero-metrics article,
  .hero-metrics article {
    min-height: 86px;
    padding: 14px 10px;
    border-radius: 18px;
  }

  .hero-metrics strong {
    font-size: 1.55rem;
  }

  .hero-metrics span {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .card-grid,
  .print-design-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .section-head h3 {
    margin-top: 0;
    font-size: 1.34rem;
  }

  .section-head p {
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .section-head a {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
  }

  .identity-card {
    min-height: 204px;
    padding: 20px;
    border-radius: 24px;
  }

  .card-body h4 {
    font-size: 1.35rem;
  }

  .card-body p {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .card-top,
  .card-meta {
    gap: 10px;
  }

  .card-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .small-action {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .activity-item,
  .contact-row,
  .account-actions,
  .account-identity {
    align-items: start;
    flex-direction: column;
  }

  .activity-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 12px;
  }

  .activity-item time {
    grid-column: 2;
  }

  .contact-row {
    gap: 10px;
  }

  .account-identity {
    gap: 14px;
  }

  .account-avatar {
    width: 72px;
    height: 72px;
    font-size: 1.2rem;
  }

  .account-identity h2 {
    margin: 0 0 6px;
    font-size: 1.8rem;
  }

  .avatar-upload-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .account-form {
    gap: 12px;
  }

  .account-summary-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }

  .account-actions.compact-actions,
  .account-actions {
    align-items: stretch;
    gap: 12px;
  }

  .danger-soft-button {
    min-height: 44px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal-panel {
    width: 100%;
    max-height: 88dvh;
    padding: 20px;
    border-radius: 24px;
  }

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

  .modal-actions .ghost-button,
  .modal-actions .primary-button {
    width: 100%;
  }

  .print-dashboard-panel {
    min-height: auto;
  }

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

  .domain-card {
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
  }

  .domain-card-main,
  .domain-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .domain-card h4 {
    font-size: 1.22rem;
  }

  .mobile-dashboard-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.91);
    box-shadow: 0 22px 70px -38px rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(22px);
  }

  .mobile-dashboard-nav button {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: var(--text-muted);
    font-size: clamp(0.62rem, 2.8vw, 0.72rem);
    font-weight: 900;
    line-height: 1;
  }

  .mobile-dashboard-nav .icon-svg {
    width: 19px;
    height: 19px;
  }

  .mobile-dashboard-nav button.is-active {
    background: rgba(0, 87, 184, 0.1);
    color: var(--primary);
  }
}

:root[data-theme="dark"] .sidebar {
  border-color: rgba(148, 163, 184, 0.12);
}

@media (max-width: 767px) {
  :root[data-theme="dark"] .sidebar,
  :root[data-theme="dark"] .mobile-dashboard-nav {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.16);
  }
}

:root[data-theme="dark"] .nav-item.is-active,
:root[data-theme="dark"] .mobile-dashboard-nav button.is-active,
:root[data-theme="dark"] .status-pill.is-live {
  background: rgba(125, 180, 255, 0.14);
  color: var(--primary);
}

:root[data-theme="dark"] .status-pill {
  background: rgba(148, 163, 184, 0.13);
  color: var(--text-muted);
}

:root[data-theme="dark"] .domain-help code,
:root[data-theme="dark"] .dns-records code {
  background: rgba(2, 6, 23, 0.36);
}

/* Final dark theme clamp: black, gray, and white only. */
:root[data-theme="dark"] {
  --surface: #000000;
  --surface-strong: #101010;
  --surface-soft: #181818;
  --surface-panel: #111111;
  --text: #f5f5f5;
  --text-muted: #b8b8b8;
  --text-soft: #858585;
  --primary: #f5f5f5;
  --primary-deep: #d8d8d8;
  --outline: #2f2f2f;
  --outline-soft: #222222;
  --shadow-panel: none;
  --shadow-card: none;
}

:root[data-theme="dark"] body {
  background: #000000;
}

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .plan-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .hero-panel,
:root[data-theme="dark"] .identity-card,
:root[data-theme="dark"] .domain-card,
:root[data-theme="dark"] .modal-panel,
:root[data-theme="dark"] .mobile-dashboard-nav,
:root[data-theme="dark"] .profile-menu {
  border-color: #2a2a2a;
  background: #101010;
  box-shadow: none;
}

:root[data-theme="dark"] .sidebar {
  background: #050505;
}

@media (max-width: 767px) {
  :root[data-theme="dark"] .sidebar,
  :root[data-theme="dark"] .mobile-dashboard-nav {
    border-color: #2a2a2a;
    background: #050505;
  }
}

:root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .ghost-button,
:root[data-theme="dark"] .small-action,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .profile-chip,
:root[data-theme="dark"] .hero-metrics article,
:root[data-theme="dark"] .card-top button,
:root[data-theme="dark"] .empty-mark,
:root[data-theme="dark"] .icon-close-button,
:root[data-theme="dark"] .domain-help code,
:root[data-theme="dark"] .dns-records code {
  border-color: #333333;
  background: #1a1a1a;
  color: #f5f5f5;
  box-shadow: none;
}

:root[data-theme="dark"] .nav-item:hover,
:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .profile-menu a:hover,
:root[data-theme="dark"] .profile-menu button:hover,
:root[data-theme="dark"] .mobile-dashboard-nav button:hover {
  background: #1f1f1f;
  color: #ffffff;
}

:root[data-theme="dark"] .nav-item.is-active,
:root[data-theme="dark"] .mobile-dashboard-nav button.is-active,
:root[data-theme="dark"] .status-pill.is-live {
  background: #2a2a2a;
  color: #ffffff;
}

:root[data-theme="dark"] .primary-button {
  background: #f5f5f5;
  color: #050505;
  box-shadow: none;
}

:root[data-theme="dark"] .primary-button:hover {
  background: #ffffff;
}

:root[data-theme="dark"] .tone-ice,
:root[data-theme="dark"] .tone-sky,
:root[data-theme="dark"] .tone-blush,
:root[data-theme="dark"] .is-empty,
:root[data-theme="dark"] .dns-records {
  border-color: #2a2a2a;
  background: #111111;
}

:root[data-theme="dark"] .status-pill {
  background: #242424;
  color: #b8b8b8;
}

:root[data-theme="dark"] .account-form input,
:root[data-theme="dark"] .domain-form input,
:root[data-theme="dark"] .domain-form select,
:root[data-theme="dark"] .domain-actions select {
  border-color: #333333;
  background: #080808;
  color: #f5f5f5;
}

:root[data-theme="dark"] .avatar.soft,
:root[data-theme="dark"] .avatar {
  background: #2a2a2a;
  color: #ffffff;
}

:root[data-theme="dark"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.74);
}

:root[data-theme="dark"] .danger-soft-button {
  background: #1a1a1a;
  color: #f5f5f5;
}
