/* Shared space-gray design system. Loaded after all module styles. */
:root,
:root[data-theme] {
  color-scheme: dark;
  --bg: #0c0d0f;
  --panel: #15171a;
  --panel-2: #1d2024;
  --panel-3: #272b30;
  --text: #f0f1f3;
  --muted: #a0a5ae;
  --border: #30343b;
  --accent: #c2c8d1;
  --accent-2: #e1e5eb;
  --success: #80bba2;
  --warning: #c7ae80;
  --danger: #da9298;
  --shadow: 0 12px 32px #00000024;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* Tenant access and active-system controls */
.tenant-switcher select { min-width: 190px; font-weight: 700; }
.tenant-fields { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 13px; }
.tenant-fields legend { padding: 0 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.tenant-fields label { display: grid !important; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; min-width: 220px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel-2); cursor: pointer; }
.tenant-fields input { grid-row: 1/3; width: 18px !important; min-height: 18px !important; accent-color: var(--accent); }
.tenant-fields small { color: var(--muted); font-weight: 400; }
.user-tenants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.user-tenants em { padding: 4px 8px; border: 1px solid rgba(194,166,105,.35); border-radius: 999px; color: var(--gold); background: rgba(194,166,105,.08); font-size: 11px; font-style: normal; font-weight: 700; }
#user-edit-fields .tenant-fields { margin-top: 14px; }
@media (max-width: 1100px) { .tenant-switcher { width: min(54vw, 270px); } .tenant-switcher select { width: 100%; min-width: 0; } }
@media (max-width: 560px) { .tenant-switcher { width: min(48vw, 210px); } .tenant-switcher select { padding: 0 8px; font-size: 12px; } .tenant-fields label { min-width: 100%; } }
body,
.app-shell {
  background: var(--bg);
  color: var(--text);
}
body,
button,
input,
select,
textarea {
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}
.app-sidebar {
  background: linear-gradient(170deg, #1b1e22, #111315 65%);
  border-color: var(--border);
  padding: 24px 14px;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 4px 30px;
  gap: 12px;
  color: var(--text);
}
.sidebar-brand strong {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.sidebar-brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-top: 5px;
}
.brand-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border: 1px solid #494e56;
  border-radius: 50%;
  background: #101113;
  filter: grayscale(1);
}
.app-sidebar nav a {
  min-height: 46px;
  color: var(--muted);
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 12px;
}
.app-sidebar nav a:hover {
  background: #ffffff06;
  color: var(--text);
}
.app-sidebar nav a[aria-current="page"] {
  background: linear-gradient(130deg, #383d45, #24282e);
  border-color: #4b515c;
  color: #fff;
  box-shadow:
    inset 0 1px 0 #ffffff12,
    0 5px 12px #0002;
}
.app-sidebar nav a[aria-current="page"]:before {
  display: none;
}
.nav-icon {
  border: 0;
  color: inherit;
  background: none;
  font-size: 18px;
}
.sidebar-logout {
  color: var(--muted);
  border-color: var(--border);
  box-shadow: none;
  border-radius: 10px;
  background: transparent;
  margin-top: auto;
}
.app-topbar {
  background: #111315ed;
  backdrop-filter: blur(24px);
  border-color: var(--border);
  height: 76px;
}
.app-topbar > strong {
  font-size: 18px;
  font-weight: 600;
}
.app-tools #identity {
  font-size: 12px;
  color: var(--muted);
}
.status-chip {
  font-size: 11px;
  color: #b7c7bf;
  background: #1c2521;
  border-color: #35433c;
}
.app-content {
  padding: 32px !important;
}
.console-page,
.admin-root {
  gap: 24px;
}
.page-head,
.pd-heading,
.bd-head {
  margin-bottom: 24px;
}
.page-head h1,
.pd-heading h1,
.bd-root h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
}
.page-head p,
.pd-heading p,
.bd-head p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.eyebrow,
.bd-kicker {
  color: #b3bac5;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.console-card,
.console-panel,
.surface,
.metric,
.ad-card,
.ad-stats > div,
.bd-stats > div,
.bd-section,
.bd-preview > section,
.pd-metric,
.pd-list,
.user-form,
.user-list article,
.audit-list {
  background: linear-gradient(145deg, #1b1e22, #15171a);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 #ffffff04,
    var(--shadow);
}
.console-panel,
.ad-card,
.bd-section {
  padding: 24px;
}
.console-card strong,
.ad-stats strong,
.bd-stats strong,
.pd-metric strong {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.console-panel h2,
.bd-root h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
button,
.button,
.bd-root button,
.pd-refresh,
.app-tools button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #41464f;
  border-radius: 12px;
  background: linear-gradient(#2c3036, #23262b);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 #ffffff09,
    0 2px 4px #0002;
  transition:
    background 0.15s,
    transform 0.15s,
    border-color 0.15s;
}
.button.primary,
.bd-root .bd-primary,
.login-submit {
  background: linear-gradient(#e2e6eb, #b5bdc8) !important;
  border-color: #ccd2dc !important;
  color: #14171b !important;
  box-shadow:
    inset 0 1px 0 #fff8,
    0 5px 14px #0003 !important;
}
button:not(:disabled):hover,
.button:not(:disabled):hover,
.bd-root button:not(:disabled):hover {
  border-color: #828b99;
  filter: brightness(1.08);
  transform: none;
}
button:not(:disabled):active {
  transform: scale(0.98);
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: none;
}
.button.danger {
  color: var(--danger);
}
input:not([type="checkbox"]),
select,
textarea,
.control,
.settings-form input:not([type="checkbox"]),
.settings-form select,
.user-form input,
.user-form select,
.bd-root input:not([type="checkbox"]),
.bd-root select,
.pd-root input,
.pd-root select,
#ad-form input,
#ad-form select,
.inline-form input,
.auth-card input {
  background: #111316;
  color: var(--text);
  border: 1px solid #383e47;
  border-radius: 12px;
  min-height: 46px;
  font-size: 14px;
  padding: 11px 14px;
  max-width: 100%;
  box-shadow: inset 0 1px 3px #0002;
}
input::placeholder,
textarea::placeholder {
  color: #7f8793;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
.bd-root :focus-visible,
.pd-root :focus-visible {
  outline: 2px solid #b5c0d0;
  outline-offset: 3px;
}
input[type="checkbox"] {
  accent-color: #bcc6d4;
}
.bd-root {
  --pink: #bec7d4;
}
.pd-root {
  --pd-pink: #c5cdd8;
  --pd-panel: #15171a;
  --pd-input: #111316;
  --pd-border: #383e47;
  --pd-muted: #a0a5ae;
  --pd-amber: #c7ae80;
  --pd-green: #80bba2;
  --pd-blue: #9daec6;
  padding: 0;
}
.pd-heading h1:before {
  background: #bdc7d4;
}
.pd-heading h1 svg {
  color: #bdc7d4;
}
.pd-toolbar {
  gap: 12px;
}
.pd-tabs {
  background: #101215;
  border-radius: 13px;
  padding: 5px;
}
.pd-tabs button {
  border-radius: 9px;
  box-shadow: none;
}
.pd-tabs button[aria-selected="true"],
.bd-presets button[aria-pressed="true"] {
  background: linear-gradient(#343a43, #272c33);
  color: #edf0f5;
  border-color: #505967;
  box-shadow: inset 0 1px 0 #ffffff09;
}
.pd-tabs button[aria-selected="true"] .pd-count {
  background: #454e5b;
  color: #fff;
}
.pd-metric-icon {
  border-radius: 14px;
}
.pd-empty p {
  font-size: 17px;
}
.pd-pagination {
  font-size: 14px;
}
.pd-pagination button {
  padding: 10px;
}
.bd-message {
  background: #22262c;
}
.bd-message h3 span {
  color: #c1ccd9;
}
.bd-toggle input:checked {
  background: #7c899a;
}
.bd-footer {
  background: #191c20;
  border-radius: 16px;
  border-color: var(--border);
}
.bd-alert {
  border-left-color: #b1bdce;
}
.privacy-note {
  background: #20252b;
  color: #abb4c0;
}
.super-badge {
  color: #d3dbe5 !important;
  border-color: #535e6d;
  background: #2c3440;
}
.site-avatar {
  background: linear-gradient(#454d58, #282e36);
  color: #eef1f5;
}
.site-identity a {
  color: #d2dbe6;
  overflow-wrap: anywhere;
}
.domain-list > div {
  background: #171a1e;
}
.settings-divider {
  background: var(--border);
  height: 1px;
}
.auth-shell {
  background: radial-gradient(ellipse at 30% 30%, #292e36 0, transparent 55%), #0c0d0f;
  min-height: 100dvh;
}
.login-frame {
  border: 1px solid #373d46;
  background: #15171a;
  border-radius: 24px;
}
.login-visual {
  background: radial-gradient(ellipse at center, #272c33, #101214 75%);
  padding: 40px;
}
.login-visual:before {
  opacity: 0.15;
}
.login-orb {
  display: none;
}
.auth-card {
  background: #181b1f;
}
.auth-card label,
.auth-card > p {
  color: var(--muted);
}
.login-brandmark {
  width: 230px;
  height: 230px;
  top: 36%;
  border-radius: 50%;
  border: 1px solid #515862;
  background: #101113;
  box-shadow: 0 20px 55px #0005;
  overflow: hidden;
}
.login-brandmark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
}
.login-logo .brand-icon {
  width: 44px;
  height: 44px;
}
.login-visual h2 {
  font-size: 36px;
}
.login-foot span {
  background: var(--border);
}
.security-status {
  background: #1b2520;
  border-color: #3e5548;
}
.security-status > span {
  background: #9ebca8;
  color: #152019;
}
#ad-dialog {
  background: #1a1d22;
  border-color: #414853;
  border-radius: 20px;
}
@media (max-width: 900px) {
  .app-content {
    padding: 22px !important;
  }
  .app-tools {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
  }
  .app-topbar {
    gap: 10px;
  }
  .app-sidebar {
    height: 100dvh;
  }
  .login-brandmark {
    width: 120px;
    height: 120px;
    top: 30%;
  }
  .login-visual {
    min-height: 310px;
    padding: 24px;
  }
  .login-visual h2 {
    font-size: 27px;
  }
  .user-form {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .app-content {
    padding: 18px 14px !important;
  }
  .page-head h1,
  .pd-heading h1,
  .bd-root h1 {
    font-size: 27px;
  }
  .console-panel,
  .bd-section,
  .ad-card {
    padding: 18px;
  }
  .user-form {
    grid-template-columns: 1fr;
  }
  .app-topbar > strong {
    font-size: 15px;
  }
  .app-tools select {
    width: 64px;
    padding: 8px;
  }
  .site-row,
  .site-identity {
    flex-wrap: wrap;
  }
  .site-identity > div {
    min-width: 0;
  }
  .auth-card {
    padding: 30px 22px;
  }
  .pd-tabs button {
    padding: 10px 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
/* Warm metal accents against the shared graphite surfaces. */
.brand-icon,
.login-brandmark img {
  filter: saturate(0.45);
}
.eyebrow,
.bd-kicker {
  color: #c6b28d;
}
.sidebar-brand small {
  color: #bfae91;
}
.app-sidebar nav a[aria-current="page"] {
  border-color: #645c4e;
  background: linear-gradient(130deg, #35332f, #25282d);
}
.app-sidebar nav a[aria-current="page"] .nav-icon {
  color: #d7bf92;
}
.login-brandmark {
  border-color: #776a53;
}
.audit-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.audit-list strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.audit-pagination span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.domain-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.domain-section-heading h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.domain-section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.domain-section-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid #44484f;
  border-radius: 12px;
  color: #cab994;
  background: #23262a;
  font-size: 23px;
}
.domain-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  align-items: end;
  gap: 16px;
}
.domain-create-form label {
  display: grid;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #c8cdd5;
}
.domain-create-form input {
  width: 100%;
}
.domain-create-form button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.domain-feedback {
  grid-column: 1/-1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.domain-feedback:empty {
  display: none;
}
.domain-inventory {
  display: grid;
  gap: 0;
  margin-top: 8px;
}
.domain-sites-overview {
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
#site-stats .console-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
#site-stats .console-card {
  min-height: 126px;
  align-content: space-between;
  padding: 20px 22px;
}
#site-stats .console-card strong {
  font-size: 30px;
}
.domain-sites-overview .site-monitor-head {
  min-height: 44px;
}
.domain-sites-overview .site-monitor-head > span {
  font-size: 15px;
  font-weight: 600;
}
.domain-sites-overview .site-monitor-head .button {
  min-width: 152px;
}
.domain-sites-overview .site-monitor-card {
  grid-template-columns: 12px minmax(240px, 1fr) minmax(300px, 1fr);
  min-height: 126px;
  padding: 20px 22px;
}
.domain-sites-overview .site-monitor-meta {
  align-self: stretch;
  align-content: center;
  padding-left: 22px;
  border-left: 1px solid var(--border);
}
.domain-create {
  padding: 24px 26px;
}
.domain-create .domain-section-heading {
  margin-bottom: 20px;
}
.domain-create-form {
  grid-template-columns: minmax(210px, 0.9fr) minmax(300px, 1.2fr) 150px;
  gap: 14px;
}
.domain-create-form button {
  width: 150px;
}
#domain-pagination {
  margin-top: 16px;
}
.domain-inventory > .domain-section-heading {
  margin-bottom: 14px;
}
.domain-count {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border: 1px solid #42464d;
  border-radius: 7px;
  font-size: 11px;
  color: #c5cbd4;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.domain-section-caption {
  font-size: 11px;
  color: #929ba8;
}
.domain-cards {
  display: grid;
  gap: 12px;
}
.domain-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(125deg, #1c1f23, #15171a);
  box-shadow: inset 0 1px 0 #ffffff05;
}
.domain-monogram {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid #555149;
  border-radius: 14px;
  background: linear-gradient(145deg, #37352f, #262a30);
  font-size: 22px;
  font-weight: 600;
  color: #d3c4a7;
  margin-top: 2px;
}
.domain-details {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.domain-details h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.domain-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.domain-edit-button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #89929e;
  cursor: pointer;
  box-shadow: none;
}
.domain-edit-button:hover {
  border-color: #3b424b;
  background: #20242a;
  color: #dfc995;
}
.domain-host {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: #a4adba;
  font-size: 13px;
  overflow-wrap: anywhere;
  line-height: 1.5;
  text-decoration: none;
}
.domain-host:hover {
  color: #dfc995;
}
.domain-host span {
  font-size: 10px;
  opacity: 0.75;
}
.domain-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 2px;
}
.domain-record-label {
  font-size: 11px;
  color: #a6b2ac;
}
.domain-record-label:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: #96aa9f;
}
.domain-remove {
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  min-height: 38px;
  padding: 8px 15px;
  color: #afb6c1;
}
.domain-remove:hover {
  color: var(--danger);
  border-color: var(--danger) !important;
}
.domain-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #2b3037;
  border-radius: 13px;
  background: #14171b;
  color: #929ca9;
}
.domain-info > span {
  color: #c4b393;
  font-size: 17px;
  line-height: 1.5;
}
.domain-info p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}
.domain-empty {
  padding: 36px 24px;
  margin: 0;
  border: 1px dashed #3a4049;
  border-radius: 17px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.domain-empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}
.domain-empty p {
  margin: 9px 0 0;
  font-size: 13px;
}
.domain-nameservers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 230px));
  gap: 7px;
  margin-top: 5px;
}
.domain-nameservers > span {
  grid-column: 1/-1;
  color: #7f8996;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.domain-ns-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #343b44;
  border-radius: 9px;
  background: #111418;
  color: #d8dde4;
  cursor: pointer;
}
.domain-ns-copy:hover {
  border-color: #71674e;
}
.domain-ns-copy code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dfc995;
  font-size: 11px;
}
.domain-ns-copy span {
  flex-shrink: 0;
  color: #929ca9;
  font-size: 9px;
  text-transform: uppercase;
}
.domain-ns-copy:focus-visible {
  outline: 2px solid #c9b47f;
  outline-offset: 2px;
}
.domain-card.is-disabled {
  opacity: 0.68;
  background: #141619;
}
.domain-state-button {
  min-width: 94px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}
.domain-state-button.danger {
  color: #e6a19d;
}
.domain-actions > .badge {
  white-space: nowrap;
}
.domain-ns-missing {
  margin-top: 5px;
  padding: 9px 11px;
  border: 1px solid #604b35;
  border-radius: 9px;
  background: #211b16;
  color: #d7ae78;
  font-size: 11px;
}
.domain-ns-verification {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
  min-height: 32px;
}
.domain-ns-verification small {
  color: #7f8996;
  font-size: 10px;
}
.domain-ns-verification .button {
  min-height: 30px;
  margin-left: auto;
  padding: 5px 10px;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}
.domain-card-feedback {
  margin: 2px 0 0;
  padding: 9px 11px;
  border: 1px solid #604b35;
  border-radius: 9px;
  background: #211b16;
  color: #d7ae78;
  font-size: 11px;
  line-height: 1.45;
}
.domain-card-feedback:empty {
  display: none;
}
.badge.danger {
  border-color: #714541;
  background: #2a1918;
  color: #e6a19d;
}
@media (min-width: 761px) and (max-width: 1050px) {
  .domain-sites-overview .site-monitor-card {
    grid-template-columns: 12px minmax(0, 1fr);
  }
  .domain-sites-overview .site-monitor-meta {
    grid-column: 2;
    justify-items: start;
    padding: 14px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
  .domain-create-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }
  .domain-create-form button {
    width: 100%;
    grid-column: 1/-1;
  }
  .domain-card {
    grid-template-columns: 48px minmax(0, 1fr) minmax(118px, 0.24fr);
    gap: 16px;
    padding: 20px;
  }
  .domain-details {
    gap: 8px;
  }
  .domain-nameservers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
  .domain-ns-copy {
    width: 100%;
  }
  .domain-ns-verification {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }
  .domain-ns-verification .button {
    margin-left: 0;
  }
  .domain-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 9px;
    padding: 0 0 0 16px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }
  .domain-actions > .badge {
    align-self: flex-start;
  }
  .domain-actions .button {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 760px) {
  #site-stats .console-grid {
    grid-template-columns: 1fr;
  }
  #site-stats .console-card {
    min-height: 104px;
  }
  .domain-sites-overview .site-monitor-card {
    min-height: auto;
  }
  .domain-sites-overview .site-monitor-meta {
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
  .domain-create {
    padding: 20px;
  }
  .domain-create-form {
    grid-template-columns: 1fr;
  }
  .domain-create-form button {
    width: 100%;
  }
  .domain-section-caption {
    display: none;
  }
  .domain-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
  }
  .domain-monogram {
    width: 42px;
    height: 42px;
  }
  .domain-actions {
    grid-column: 1/-1;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    gap: 12px;
  }
  .domain-nameservers {
    grid-template-columns: 1fr;
  }
  .domain-ns-verification {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .domain-ns-verification .button {
    margin-left: 0;
  }
  .domain-info {
    padding: 14px;
  }
  .domain-section-heading {
    align-items: flex-start;
  }
}

/* Phone navigation: three primary destinations plus a complete bottom sheet. */
.mobile-bottom-nav,
.mobile-more-sheet,
.mobile-more-backdrop {
  display: none;
}

@media (max-width: 600px) {
  .app-content {
    padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  }

  .menu-toggle {
    display: none !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1200;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 66px;
    padding: 6px;
    border: 1px solid #343a43;
    border-radius: 18px;
    background: rgba(24, 27, 31, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: flex;
    min-width: 0;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 3px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #9299a4;
    text-decoration: none;
  }

  .mobile-bottom-nav span {
    font-size: 20px;
    line-height: 1;
  }

  .mobile-bottom-nav small {
    overflow: hidden;
    width: 100%;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav :is(a, button)[aria-current="page"] {
    background: #302d27;
    color: #e0c38d;
  }

  .mobile-more-backdrop {
    position: fixed;
    z-index: 1290;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.68);
  }

  .mobile-more-sheet {
    position: fixed;
    z-index: 1300;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    max-height: min(82dvh, 720px);
    overflow: auto;
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
    border: 1px solid #343a43;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: #171a1e;
    box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(105%);
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .mobile-more-sheet.is-open {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-more-sheet > header {
    position: sticky;
    z-index: 1;
    top: -20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -20px -18px 14px;
    padding: 20px 18px 14px;
    border-bottom: 1px solid #30353d;
    background: #171a1e;
  }

  .mobile-more-sheet header small,
  .mobile-more-group > strong {
    color: #bda477;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .mobile-more-sheet h2 {
    margin: 4px 0 0;
    font-size: 23px;
  }

  .mobile-more-sheet header button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #343a43;
    border-radius: 14px;
    background: #20242a;
    color: #e8ebef;
    font-size: 27px;
  }

  .mobile-more-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
  }

  .mobile-more-group > strong {
    grid-column: 1 / -1;
    padding: 0 4px 3px;
  }

  .mobile-more-group a,
  .mobile-sheet-logout {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #30353d;
    border-radius: 13px;
    background: #1d2126;
    color: #d7dbe1;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
  }

  .mobile-more-group a span,
  .mobile-sheet-logout span {
    flex: 0 0 24px;
    color: #bda477;
    font-size: 17px;
    text-align: center;
  }

  .mobile-more-group a[aria-current="page"] {
    border-color: #6a5d45;
    background: #302d27;
    color: #f1dfbc;
  }

  .mobile-sheet-logout {
    width: 100%;
    margin-top: 20px;
    color: #e8a3a3;
  }

  .mobile-more-open {
    overflow: hidden;
  }
}
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  width: 100%;
  height: 100dvh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0009;
  backdrop-filter: blur(3px);
  box-shadow: none;
}
.menu-backdrop:not(:disabled):hover {
  transform: none;
  filter: none;
}
.mobile-nav-open {
  overflow: hidden;
}
.app-sidebar {
  overscroll-behavior: contain;
}
.app-content,
.console-panel,
.user-list article > div {
  min-width: 0;
}
.user-list article span {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .app-sidebar {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    width: min(280px, calc(100vw - 56px));
  }
  .app-topbar {
    padding-top: env(safe-area-inset-top);
    min-height: 76px;
    height: auto;
  }
  .app-content {
    padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
  }
  .app-content input:not([type="checkbox"]),
  .app-content select,
  .app-content textarea,
  .auth-card input {
    font-size: 16px !important;
  }
  .button,
  .bd-root button,
  .pd-tabs button,
  .domain-remove {
    min-height: 44px;
  }
  .audit-pagination {
    flex-wrap: wrap;
  }
  #ad-dialog {
    max-height: calc(100dvh - 32px);
    overscroll-behavior: contain;
  }
  .console-page,
  .admin-root {
    gap: 20px;
  }
  .user-form p:empty,
  #user-action-status:empty {
    display: none;
  }
}
.user-list article .user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.users-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.super-admin-card {
  border-color: rgba(107, 196, 151, .34) !important;
}
#user-edit-fields {
  display: grid;
  gap: 14px;
}
#user-edit-fields[hidden] {
  display: none;
}
.user-action-dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}
.user-action-dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(4px);
}
.user-action-dialog h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.user-action-dialog p {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.user-action-dialog label {
  display: grid;
  gap: 10px;
}
.user-action-dialog input {
  width: 100%;
  font-size: 16px;
}
.user-action-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
#user-dialog-error {
  color: var(--danger);
}
@media (max-width: 600px) {
  .users-search {
    grid-template-columns: 1fr 1fr;
  }
  .users-search input {
    grid-column: 1 / -1;
  }
  .user-list article .user-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .user-actions button {
    flex: 1;
  }
  .user-action-dialog footer {
    flex-wrap: wrap;
  }
}
.user-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pd-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}
.pd-date-range label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  min-width: 0;
}
.pd-date-range p {
  grid-column: 1/-1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.pd-date-range input {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 650px) {
  .user-form,
  .pd-date-range {
    grid-template-columns: 1fr;
  }
}
/* Compact payments workspace */
.pd-root .pd-heading h1:before {
  display: none;
}
.pd-root .pd-heading {
  margin-bottom: 22px;
}
.pd-root .pd-heading p {
  margin-bottom: 6px;
}
.pd-root .pd-demo {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}
.pd-root .pd-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 200px auto auto;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}
.pd-root .pd-search,
.pd-root .pd-select {
  min-width: 0;
}
.pd-root input,
.pd-root select,
.pd-root .pd-refresh {
  height: 46px;
  border-radius: 11px;
  font-size: 13px;
  padding: 0 14px;
}
.pd-root .pd-refresh {
  gap: 9px;
  white-space: nowrap;
}
.pd-root .pd-refresh svg {
  width: 18px;
  height: 18px;
}
.pd-root .pd-filter-toggle[aria-expanded="true"] {
  border-color: #a29479;
  background: #33312c;
}
.pd-root [hidden] {
  display: none !important;
}
.pd-root .pd-date-range {
  margin-bottom: 14px;
  padding: 18px;
  background: #17191c;
}
.pd-filter-heading {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pd-filter-heading strong {
  font-size: 13px;
  font-weight: 600;
}
.pd-filter-heading button {
  background: transparent;
  box-shadow: none;
  padding: 6px 12px;
}
.pd-active-range {
  margin: 0 0 18px;
  color: #d2c2a5;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.pd-root input[aria-invalid="true"] {
  border-color: var(--danger);
}
.pd-root .pd-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.pd-root .pd-metric {
  min-height: 100px;
  padding: 18px;
  gap: 12px;
  border-radius: 15px;
}
.pd-root .pd-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.pd-root .pd-metric-icon svg {
  width: 21px;
  height: 21px;
}
.pd-root .pd-metric h2 {
  font-size: 12px;
}
.pd-root .pd-metric strong {
  font-size: 27px;
}
.pd-root .pd-list {
  min-height: 380px;
  padding: 0;
  border-radius: 18px;
  overflow: hidden;
}
.pd-root .pd-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #17191d;
}
.pd-root .pd-tabs button {
  width: 100%;
  justify-content: center;
  gap: 9px;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}
.pd-root .pd-demo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pd-root .pd-demo:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d949e;
}
.pd-root .pd-demo.is-connected:before {
  background: var(--pd-green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pd-green) 12%, transparent);
}
.pd-root .pd-demo.is-unavailable {
  color: #d89a92;
}
.pd-root .pd-demo.is-unavailable:before {
  background: #d16f68;
}
.pd-root .pd-tabs svg {
  width: 18px;
  height: 18px;
}
.pd-root .pd-count {
  font-size: 11px;
  min-width: 22px;
  line-height: 20px;
}
.pd-root .pd-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 32px 18px;
}
.pd-empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #3b4048;
  border-radius: 18px;
  background: linear-gradient(145deg, #2b3037, #1a1d22);
  color: #b9c1cc;
  margin-bottom: 6px;
}
.pd-empty strong {
  font-size: 15px;
  font-weight: 500;
}
.pd-root .pd-empty p {
  font-size: 13px;
  margin: 0;
  max-width: 320px;
}
.pd-root .pd-pagination {
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--muted);
}
.pd-root .pd-pagination button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 7px;
  border-radius: 9px;
}
@media (max-width: 1100px) {
  .pd-root .pd-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pd-root .pd-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .pd-root .pd-search {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .pd-root .pd-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .pd-root .pd-select {
    grid-column: 1/-1;
  }
  .pd-root .pd-metrics {
    gap: 8px;
  }
  .pd-root .pd-metric {
    padding: 13px 10px;
    gap: 9px;
    min-height: 88px;
  }
  .pd-root .pd-metric-icon {
    width: 30px;
    height: 34px;
    border-radius: 9px;
  }
  .pd-root .pd-metric-icon svg {
    width: 18px;
    height: 18px;
  }
  .pd-root .pd-metric h2 {
    font-size: 11px;
  }
  .pd-root .pd-metric strong {
    font-size: 24px;
  }
  .pd-root .pd-date-range {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }
  .pd-root .pd-tabs {
    gap: 4px;
    padding: 10px;
  }
  .pd-root .pd-tabs button {
    flex: 1;
    padding: 7px 5px;
    gap: 5px;
    flex-wrap: nowrap;
    font-size: 12px;
  }
  .pd-root .pd-tabs button > span:first-of-type {
    width: auto;
  }
  .pd-root .pd-tabs svg {
    display: none;
  }
  .pd-root .pd-pagination {
    justify-content: center;
  }
  .pd-root .pd-heading h1 {
    font-size: 26px;
  }
}
/* Payment export action and accessible format dialog */
.pd-root .pd-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
#pd-export {
  white-space: nowrap;
}
#pd-export-dialog {
  max-width: calc(100vw - 32px);
}
#pd-export-dialog select {
  width: 100%;
  margin-top: 8px;
}
#pd-export-summary {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
#pd-export-error {
  color: var(--danger);
}
#pd-export-error:empty {
  display: none;
}
@media (max-width: 600px) {
  .pd-root .pd-heading {
    flex-wrap: wrap;
  }
  #pd-export {
    width: 100%;
  }
}
/* Telegram connection settings */
.tg-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}
.tg-fields label {
  min-width: 0;
}
.tg-fields input,
.tg-fields textarea {
  width: 100%;
  min-width: 0;
}
.tg-fields small {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  font-weight: 400;
}
.tg-wide {
  grid-column: 1/-1;
}
.tg-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.tg-events {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 20px;
  font-size: 13px;
}
.tg-events summary {
  cursor: pointer;
  color: var(--muted);
  padding: 8px 0;
}
.tg-events ul {
  list-style: none;
  padding: 0;
}
.tg-events li {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.tg-events time {
  font-size: 11px;
  color: var(--muted);
}
.tg-connection .bd-pill {
  white-space: nowrap;
}
@media (max-width: 650px) {
  .tg-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .tg-actions button {
    flex: 1 1 100%;
  }
  .tg-events li {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
.tg-info {
  padding: 16px 20px;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: 12px;
  background: var(--panel);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.tg-connection .bd-pill {
  display: inline-block !important;
  letter-spacing: 0;
  color: var(--muted);
  border-color: var(--border);
  background: var(--panel-2);
}
.ad-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ad-actions button {
  flex: 1;
}
#ad-delete-error {
  color: var(--danger);
}
#ad-delete-error:empty {
  display: none;
}
#ad-pagination {
  padding: 16px 0;
}
#ad-pagination span {
  font-size: 13px;
}
@media (max-width: 480px) {
  #ad-pagination {
    gap: 8px;
  }
  #ad-pagination span {
    order: -1;
    width: 100%;
    text-align: center;
  }
  #ad-pagination button {
    flex: 1;
  }
}
.settings-telegram {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  min-width: 0;
}
.settings-telegram > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px;
  cursor: pointer;
  list-style: none;
}
.settings-telegram > summary::-webkit-details-marker {
  display: none;
}
.pd-records {
  display: grid;
  gap: 10px;
  padding: 16px;
}
.pd-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #171a1e;
}
.pd-record > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.pd-record span {
  color: var(--muted);
  font-size: 12px;
}
.tg-bind-code {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #111418;
}
.tg-bind-code code {
  flex: 1;
  color: #a7e8c5;
  font-size: 15px;
}
.password-accordion {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.password-accordion > summary {
  cursor: pointer;
  font-weight: 600;
}
.password-accordion fieldset {
  margin-top: 14px;
}
@media (max-width: 700px) {
  .pd-record {
    grid-template-columns: 1fr;
  }
  .tg-bind-code {
    align-items: stretch;
    flex-direction: column;
  }
}
.settings-telegram summary strong {
  font-size: 16px;
}
.settings-telegram summary small {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}
.settings-telegram-content {
  padding: 0 22px 22px;
  min-width: 0;
}
.settings-telegram .bd-head h1 {
  font-size: 23px;
}
.settings-telegram .bd-editor {
  grid-template-columns: minmax(0, 1fr);
}
.settings-telegram .bd-preview {
  position: static;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 650px) {
  .settings-telegram > summary {
    padding: 16px;
  }
  .settings-telegram-content {
    padding: 0 12px 16px;
  }
  .settings-telegram .bd-preview {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Dense operational data, with breathing room and clear hierarchy */
.pd-root .pd-records {
  width: 100%;
  max-width: none;
  align-self: stretch;
  justify-self: stretch;
  gap: 12px;
  padding: 18px;
}
.pd-root .pd-record {
  grid-template-columns: minmax(240px, 1.35fr) minmax(170px, 0.7fr) auto;
  gap: 18px 24px;
  padding: 20px;
  border-color: #313741;
  background: linear-gradient(145deg, #1a1e23, #15181c);
  box-shadow: 0 12px 28px #0002;
}
.pd-record-main {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 13px !important;
}
.pd-method-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #454d58;
  border-radius: 13px;
  background: #242a31;
  color: #d7c39c;
}
.pd-method-icon svg {
  width: 21px;
  height: 21px;
}
.pd-record-main strong {
  font-size: 15px;
}
.pd-record-amount {
  text-align: right;
}
.pd-record-amount strong {
  font-size: 17px;
  color: #f4f5f7;
}
.pd-record-state {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center;
}
.pd-duplicate {
  font-size: 10px !important;
  color: #d7c39c !important;
}
.pd-record-details {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 2px 0 0;
  overflow: hidden;
  border: 1px solid #2e343c;
  border-radius: 11px;
  background: #2e343c;
}
.pd-record-details div {
  min-width: 0;
  padding: 10px 12px;
  background: #121519;
}
.pd-record-details dt {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7f8996;
}
.pd-record-details dd {
  margin: 5px 0 0;
  font-size: 12px;
  color: #cfd4da;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-root .pd-date-range {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}
.pd-root .pd-date-range .pd-filter-heading,
.pd-root .pd-date-range > p {
  grid-column: 1/-1;
}
.ad-root {
  display: grid;
  gap: 22px;
}
.ad-root .page-head {
  margin-bottom: 0;
}
.ad-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  padding: 8px !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  background: #111419 !important;
}
.ad-tabs button {
  min-height: 48px;
  border-radius: 11px !important;
}
.ad-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #353c45, #252a31);
  box-shadow:
    inset 0 0 0 1px #596473,
    0 8px 20px #0003;
}
.ad-root > .pd-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 12px;
}
.ad-root > .pd-toolbar input,
.ad-root > .pd-toolbar select {
  width: 100%;
  height: 48px;
}
.ad-stats {
  margin: 0 !important;
}
.ad-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 170px;
}
.ad-card {
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid #323943 !important;
  border-radius: 17px !important;
  background: linear-gradient(145deg, #1a1e23, #14171b) !important;
  box-shadow: 0 12px 28px #0002;
}
.ad-card header {
  padding-bottom: 14px;
  border-bottom: 1px solid #2b3139;
}
.ad-card dl {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}
.ad-card dl div {
  padding: 11px 12px;
  border-radius: 10px;
  background: #111418;
}
.ad-card dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.ad-card dd {
  margin-top: 5px !important;
}
.ad-actions {
  padding-top: 4px;
}
.site-monitor {
  display: grid;
  gap: 12px;
}
.site-monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-monitor-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
}
.site-monitor-card.inactive {
  border-color: #72413f;
  background: linear-gradient(135deg, #21191a, #17191c);
}
.site-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #58bd8b;
  box-shadow: 0 0 0 5px #58bd8b18;
}
.site-monitor-card.inactive .site-status-dot {
  background: #e06d68;
  box-shadow: 0 0 0 5px #e06d6818;
}
.site-monitor-card > div:nth-child(2) {
  display: grid;
  gap: 5px;
}
.site-monitor-card a {
  color: #d7c39c;
}
.site-monitor-card small {
  color: var(--muted);
}
.site-monitor-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}
@media (max-width: 900px) {
  .pd-root .pd-date-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pd-record-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ad-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .pd-root .pd-date-range {
    grid-template-columns: 1fr;
  }
  .pd-root .pd-record {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pd-record-amount {
    text-align: left;
  }
  .pd-record-state {
    align-items: flex-start !important;
  }
  .pd-record-details {
    grid-template-columns: 1fr;
  }
  .ad-root > .pd-toolbar {
    grid-template-columns: 1fr;
  }
  .site-monitor-card {
    grid-template-columns: 12px minmax(0, 1fr);
  }
  .site-monitor-meta {
    grid-column: 2;
    justify-items: start;
  }
  .site-monitor-head {
    align-items: flex-start;
    gap: 12px;
  }
}

/* Payment accounts and copy-first grouped payment records */
.ad-root #ad-export {
  display: none !important;
}
.ad-root > .pd-toolbar {
  grid-template-columns: minmax(0, 680px);
}
#wallet-dialog,
#ad-dialog {
  width: min(620px, calc(100vw - 32px));
}
#wallet-form,
#ad-form {
  display: flex !important;
  flex-direction: column;
  gap: 17px;
}
#wallet-form > label,
#ad-form > label {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 8px;
  width: 100%;
}
#wallet-form input,
#wallet-form select,
#ad-form input,
#ad-form select {
  width: 100%;
  min-width: 0;
}
.amount-range-fields,
#ad-form > .pd-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
}
.amount-range-fields label,
#ad-form > .pd-date-range label {
  display: grid;
  gap: 8px;
}
.ad-card .ad-caption {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid #4a4437;
  border-radius: 999px;
  background: #211f1a;
  color: #d8c49b;
  font-size: 11px;
}
.ad-card .ad-code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pd-copyable {
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}
.pd-copyable:hover,
.pd-copyable:focus-visible {
  border-color: #69614f;
  transform: translateY(-1px);
  background: linear-gradient(145deg, #20252b, #181b20);
  outline: none;
}
.pd-copy-hint {
  font-size: 9px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8f98a4 !important;
}
.pd-address {
  grid-column: span 1;
}
.pd-address dd {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: #f0dfbb !important;
  user-select: text;
}
.pd-payment-group {
  width: 100%;
  overflow: hidden;
  border: 1px solid #343b45;
  border-radius: 14px;
  background: #13161a;
}
.pd-payment-group > summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(145deg, #20252b, #181b20);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.pd-payment-group > summary:hover {
  background: linear-gradient(145deg, #252b32, #1b1f24);
}
.pd-payment-group > summary::-webkit-details-marker {
  display: none;
}
.pd-group-menu-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #46505c;
  border-radius: 12px;
  color: #d8c49b;
  background: #171b20;
}
.pd-group-menu-icon svg {
  width: 21px;
  height: 21px;
}
.pd-group-menu-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.pd-group-menu-copy strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.pd-group-menu-copy small {
  color: #d9c69d;
}
.pd-group-count {
  display: grid;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  place-items: center;
  border-radius: 999px;
  background: #303741;
  color: #eef1f5;
  font-size: 12px;
  font-weight: 700;
}
.pd-group-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.pd-group-action svg {
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}
.pd-payment-group[open] .pd-group-action svg {
  transform: rotate(90deg);
}
.pd-payment-group[open] > summary {
  border-bottom: 1px solid #343b45;
}
.pd-group-items {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #0e1114;
}
.pd-group-items .pd-record {
  margin: 0;
  box-shadow: none;
}
.pd-group-item {
  display: grid;
  gap: 7px;
}
.pd-group-item > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  color: #9da6b2;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.pd-group-item > header strong {
  color: #d9c69d;
  text-transform: uppercase;
}
.pd-group-item .pd-record:before {
  display: none;
}
.pd-group-items .pd-record:before {
  content: "Tekil istek";
  grid-column: 1/-1;
  color: #7f8996;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 650px) {
  .amount-range-fields,
  #ad-form > .pd-date-range {
    grid-template-columns: 1fr;
  }
  .pd-payment-group > summary {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 13px;
  }
  .pd-group-menu-icon {
    width: 40px;
    height: 40px;
  }
  .pd-group-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .pd-group-action {
    grid-column: 3;
  }
  .pd-group-count {
    display: none;
  }
}
.pd-record-meta {
  display: flex !important;
  align-items: center;
  gap: 5px;
}
.pd-type-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pd-type-badge.bank {
  color: #acd0ff;
  background: #1c3652;
}
.pd-type-badge.crypto {
  color: #d9c2ff;
  background: #352752;
}
.pd-rejection {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e6a19d !important;
  font-size: 10px !important;
}
.pd-record-state {
  gap: 5px !important;
}
.pd-record-details {
  grid-template-columns: 130px minmax(140px, 0.5fr) minmax(280px, 1.5fr) auto;
}
.pd-record-details .pd-address {
  grid-column: auto;
}
.pd-record-details .pd-rejection-detail {
  grid-column: 1/-1;
  padding: 11px 12px !important;
  border-top: 1px solid #39312d;
  background: #1c1716 !important;
  text-align: left;
}
.pd-record-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 2px;
  padding: 14px 16px;
  border: 1px solid #303841;
  border-radius: 12px;
  background: #12161a;
}
.pd-record-actions > span {
  display: grid;
  gap: 3px;
}
.pd-record-actions > span strong { color: #e7e9ec; font-size: 12px; }
.pd-record-actions > span small { color: #89939f; font-size: 10px; }
.pd-record-actions > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.pd-record-actions .pd-decision {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.pd-record-actions .pd-decision svg { width: 16px; height: 16px; }
.pd-record-actions .pd-approve { color: #8fd8b8; border-color: #34785b; background: rgba(26, 104, 72, .22); }
.pd-record-actions .pd-reject { color: #efa1a1; border-color: #814343; background: rgba(116, 38, 38, .22); }
.pd-record-actions .pd-decision:disabled { opacity: .55; cursor: wait; }
.pd-decision-dialog #pd-decision-copy { line-height: 1.65; }
.pd-decision-dialog #pd-decision-error:not(:empty) { color: #efa1a1; }
.pd-decision-dialog #pd-decision-confirm.is-approve { color: #e8fff5; border-color: #34785b; background: #216044; }
.pd-decision-dialog #pd-decision-confirm.is-reject { color: #fff0f0; border-color: #814343; background: #6b3030; }
@media (max-width: 620px) {
  .pd-record-actions { grid-area: actions; display: grid; grid-template-columns: 1fr; padding: 12px; }
  .pd-record-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .pd-record-actions .pd-decision { min-width: 0; width: 100%; }
}
.pd-rejection-detail dt {
  color: #a98b83 !important;
}
.pd-rejection-detail dd {
  margin-top: 6px !important;
  color: #e7aaa3 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .pd-record-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pd-record-details .pd-address {
    grid-column: 1/-1;
  }
}

/* Full-width account search and a stacked, mobile-safe wallet editor */
.ad-root > .pd-toolbar {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}
.ad-root > .pd-toolbar #ad-search {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}
dialog#wallet-dialog {
  width: min(620px, calc(100vw - 32px)) !important;
  max-width: 620px !important;
  max-height: calc(100dvh - 32px) !important;
  padding: 0 !important;
  overflow: auto !important;
  color: var(--text) !important;
  background: #171a1e !important;
  border: 1px solid #3a414b !important;
  border-radius: 20px !important;
  box-shadow: 0 28px 80px #000a !important;
}
dialog#wallet-dialog::backdrop {
  background: #050607c7;
  backdrop-filter: blur(6px);
}
dialog#wallet-dialog form#wallet-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 18px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}
dialog#wallet-dialog form#wallet-form > .ad-dialog-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 0 2px !important;
  padding: 0 0 17px !important;
  border-bottom: 1px solid var(--border) !important;
}
dialog#wallet-dialog form#wallet-form > .ad-dialog-header h2 {
  margin: 0 !important;
  font-size: 21px !important;
  letter-spacing: -0.02em !important;
}
dialog#wallet-dialog form#wallet-form > label {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: #c7cdd5 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}
dialog#wallet-dialog form#wallet-form > label > input,
dialog#wallet-dialog form#wallet-form > label > select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  font-size: 14px !important;
}
dialog#wallet-dialog #wallet-error {
  min-height: 0 !important;
  margin: 0 !important;
  color: var(--danger) !important;
  font-size: 12px !important;
}
dialog#wallet-dialog #wallet-error:empty {
  display: none !important;
}
dialog#wallet-dialog form#wallet-form > footer {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 18px 0 0 !important;
  border-top: 1px solid var(--border) !important;
}
dialog#wallet-dialog form#wallet-form > footer button {
  min-width: 112px !important;
}
@media (max-width: 520px) {
  dialog#wallet-dialog {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }
  dialog#wallet-dialog form#wallet-form {
    padding: 18px !important;
    gap: 15px !important;
  }
  dialog#wallet-dialog form#wallet-form > footer {
    flex-direction: column-reverse !important;
  }
  dialog#wallet-dialog form#wallet-form > footer button {
    width: 100% !important;
  }
}
.pd-copyable.is-copied {
  border-color: #638b72 !important;
  background: linear-gradient(145deg, #1d2a23, #171d1a) !important;
  box-shadow:
    0 0 0 1px #638b7240,
    0 12px 28px #0002 !important;
}
.pd-copyable.is-copied .pd-copy-hint {
  display: inline-flex !important;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #638b72;
  border-radius: 999px;
  color: #a9d5b8 !important;
  background: #203128;
  font-weight: 700;
}

/* Analytics command center */
.analytics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -6px 0 22px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #15181c;
}
.analytics-toolbar p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.analytics-toolbar p strong {
  color: #d9dde2;
}
.analytics-toolbar p small {
  padding-left: 8px;
  border-left: 1px solid var(--border);
}
.analytics-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #70b890;
  box-shadow: 0 0 0 5px #70b89018;
  animation: analytics-pulse 2s infinite;
}
@keyframes analytics-pulse {
  50% {
    box-shadow: 0 0 0 9px #70b89000;
  }
}
.analytics-metrics .console-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.analytics-metrics .console-card {
  min-height: 112px;
  padding: 18px;
}
.analytics-metrics .console-card strong {
  font-size: 27px;
}
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.analytics-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid #30363e;
  border-radius: 18px;
  background: linear-gradient(145deg, #1a1e23, #13161a);
  box-shadow: 0 14px 35px #0002;
}
.analytics-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.analytics-panel h2 {
  margin: 5px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.analytics-panel > header > span {
  color: var(--muted);
  font-size: 11px;
}
.panel-kicker {
  color: #bca777;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.analytics-trend,
.analytics-map-panel {
  grid-column: span 1;
}
.analytics-live {
  order: -1;
}
.analytics-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.analytics-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.analytics-legend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.analytics-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.analytics-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.analytics-legend .users {
  background: #d6bd86;
}
.analytics-legend .sessions {
  background: #7d8ba0;
}
.analytics-chart {
  position: relative;
  min-height: 245px;
}
.analytics-chart svg {
  display: block;
  width: 100%;
  height: 215px;
  overflow: visible;
  border-bottom: 1px solid #30363e;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 52px, #2b3037 53px);
}
.analytics-area {
  fill: url(#analytics-fill);
}
.analytics-line {
  fill: none;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.analytics-line.users {
  stroke: #d6bd86;
}
.analytics-line.sessions {
  stroke: #7d8ba0;
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
}
.live-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid #3b654f;
  border-radius: 999px;
  color: #9ad0ae !important;
  background: #17261e;
}
.live-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #70c293;
}
.analytics-live-content {
  min-height: 245px;
}
.live-number {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.live-number strong {
  font-size: 48px;
  line-height: 1;
  color: #f1e6ce;
}
.live-number span {
  font-size: 12px;
  color: var(--muted);
}
.live-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}
.live-stats span {
  padding: 12px;
  border-radius: 10px;
  background: #111418;
  color: var(--muted);
  font-size: 11px;
}
.live-stats strong {
  display: block;
  margin-bottom: 4px;
  color: #e8ebef;
  font-size: 17px;
}
.live-events {
  display: grid;
  gap: 7px;
}
.live-events > small {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.live-events > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}
.live-events > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #b9c0ca;
}
.live-events p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
}
.analytics-live-content time {
  display: block;
  margin-top: 13px;
  color: #707985;
  font-size: 9px;
  text-align: right;
}
.analytics-bars {
  display: grid;
  gap: 14px;
}
.analytics-bar > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 7px;
  font-size: 11px;
}
.analytics-bar > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c2c8d0;
}
.analytics-bar > div strong {
  color: #e6e8eb;
}
.analytics-bar > i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #292e35;
}
.analytics-bar > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #807156, #d6bd86);
}
.analytics-devices {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  min-height: 220px;
}
.device-donut {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 22px;
}
.device-donut:before {
  content: "";
  grid-area: 1/1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #171a1e;
}
.device-donut span {
  grid-area: 1/1;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.device-donut strong {
  display: block;
  color: #eceff2;
  font-size: 22px;
}
.device-list {
  display: grid;
  gap: 13px;
}
.device-list > div {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}
.device-list i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.device-list span {
  color: #bec5cd;
}
.analytics-pages {
  display: grid;
}
.analytics-page-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #292e35;
  font-size: 11px;
}
.analytics-page-row:last-child {
  border-bottom: 0;
}
.page-rank {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #242a31;
  color: #aeb7c2;
}
.analytics-page-row > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #c9ced5;
}
.analytics-pages strong {
  text-align: right;
}
.analytics-pages small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
}
.analytics-cities {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, 0.7fr);
  gap: 22px;
  align-items: center;
  min-height: 245px;
}
.analytics-page-body {
  min-height: 205px;
}
.analytics-bars .analytics-page-body {
  display: grid;
  align-content: start;
  gap: 14px;
}
.analytics-city-page {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, 0.7fr);
  gap: 22px;
  align-items: center;
}
.analytics-cities:has(> .analytics-pagination) {
  display: block;
}
.analytics-pagination {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #292e35;
}
.analytics-pagination button {
  width: 34px;
  min-height: 30px;
  padding: 0;
}
.analytics-pagination span {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .analytics-city-page {
    grid-template-columns: 1fr;
  }
}
.turkey-map {
  position: relative;
  min-height: 210px;
}
.turkey-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 18px #0005);
}
.turkey-map path {
  fill: #262c33;
  stroke: #59616a;
  stroke-width: 0.5;
}
.turkey-map button {
  position: absolute;
  z-index: 1;
  padding: 0;
  min-height: 0;
  border: 2px solid #f1dab0;
  border-radius: 50%;
  background: #b4965a;
  box-shadow:
    0 0 0 5px #c9aa6630,
    0 0 22px #d0b16b80;
  transform: translate(-50%, -50%);
  cursor: help;
}
.city-list {
  display: grid;
  gap: 5px;
}
.city-list > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #292e35;
  font-size: 10px;
}
.city-list span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #bbc2cb;
}
.city-list b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #292f36;
  color: #d6bd86;
  font-size: 9px;
}
.analytics-city-tabs {
  display: grid;
  grid-template-columns: repeat(2,auto);
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-2);
}
.analytics-city-tabs button {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.analytics-city-tabs button[aria-selected="true"] {
  background: #30363e;
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.analytics-city-page.is-world {
  grid-template-columns: minmax(150px,.62fr) minmax(0,1.38fr);
}
.world-city-summary {
  display: grid;
  align-content: center;
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: radial-gradient(circle at 70% 25%,rgba(214,189,134,.16),transparent 38%),var(--panel-2);
}
.world-city-summary::before {
  content: "◎";
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 34px;
}
.world-city-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.world-city-summary strong {
  margin-top: 5px;
  font-size: 16px;
}
.city-list > div > span > span {
  display: grid;
  gap: 2px;
}
.city-list small {
  color: var(--muted);
  font-size: 8px;
}
@media (max-width: 1200px) {
  .analytics-metrics .console-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .analytics-trend,
  .analytics-map-panel {
    grid-column: auto;
  }
}
@media (max-width: 700px) {
  .analytics-map-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }
  .analytics-city-tabs {
    width: 100%;
    grid-template-columns: repeat(2,1fr);
  }
  .analytics-city-page.is-world {
    grid-template-columns: 1fr;
  }
  .world-city-summary {
    min-height: 112px;
  }
  .world-city-summary::before {
    margin-bottom: 10px;
  }
  .analytics-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .analytics-toolbar button {
    width: 100%;
  }
  .analytics-toolbar p {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .analytics-toolbar p small {
    width: 100%;
    padding: 0;
    border: 0;
  }
  .analytics-metrics .console-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-metrics .console-card {
    min-height: 96px;
    padding: 14px;
  }
  .analytics-metrics .console-card strong {
    font-size: 22px;
  }
  .analytics-panel {
    padding: 17px;
  }
  .analytics-panel > header {
    margin-bottom: 16px;
  }
  .analytics-cities,
  .analytics-devices {
    grid-template-columns: 1fr;
  }
  .turkey-map {
    min-height: 180px;
  }
  .city-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .device-donut {
    width: 145px;
    justify-self: center;
  }
  .analytics-chart {
    min-height: 210px;
  }
  .analytics-chart svg {
    height: 180px;
  }
  .live-number strong {
    font-size: 40px;
  }
}

/* Mobile payment cards: prioritize scanability over desktop table density */
@media (max-width: 650px) {
  .pd-root .pd-list {
    border-radius: 15px;
  }
  .pd-root .pd-records {
    gap: 10px;
    padding: 10px;
  }
  .pd-root .pd-record {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main main" "amount state" "details details" "actions actions";
    gap: 13px 10px;
    padding: 15px;
    border-radius: 14px;
    box-shadow: 0 8px 20px #0003;
  }
  .pd-record-main {
    grid-area: main;
    align-items: flex-start !important;
    gap: 11px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid #30363e;
  }
  .pd-record-main > div {
    min-width: 0;
  }
  .pd-record-main strong {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .pd-method-icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .pd-method-icon svg {
    width: 18px;
    height: 18px;
  }
  .pd-record-meta {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px !important;
    margin-top: 5px;
    line-height: 1.45;
  }
  .pd-record-meta .pd-type-badge {
    flex: 0 0 auto;
  }
  .pd-record-amount {
    grid-area: amount;
    text-align: left;
    align-self: center;
  }
  .pd-record-amount strong {
    font-size: 18px;
    line-height: 1.2;
  }
  .pd-record-amount span {
    margin-top: 4px;
    font-size: 10px;
  }
  .pd-record-state {
    grid-area: state;
    align-items: flex-end !important;
    justify-content: center;
    align-self: center;
    text-align: right;
  }
  .pd-record-state .badge {
    white-space: nowrap;
  }
  .pd-copy-hint {
    max-width: 90px;
    line-height: 1.3;
    text-align: right;
  }
  .pd-record-details {
    grid-area: details;
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 1px;
    margin: 0;
    border-radius: 10px;
  }
  .pd-record-details > div,
  .pd-record-details .pd-address {
    display: grid;
    grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    grid-column: auto;
    padding: 10px 11px !important;
  }
  .pd-record-details dt {
    padding-top: 1px;
    font-size: 9px;
  }
  .pd-record-details dd {
    margin: 0;
    font-size: 11px;
    text-align: right;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .pd-record-details .pd-address dd {
    word-break: break-all;
  }
  .pd-record-details .pd-rejection-detail {
    grid-template-columns: 1fr;
    gap: 4px;
    border-top: 1px solid #39312d;
    text-align: left;
  }
  .pd-record-details .pd-rejection-detail dd {
    text-align: left;
  }
  .pd-payment-group {
    border-radius: 14px;
  }
  .pd-payment-group > summary {
    gap: 9px;
    padding: 14px;
  }
  .pd-payment-group > summary strong {
    font-size: 14px;
  }
  .pd-payment-group > summary small {
    font-size: 11px;
    line-height: 1.45;
  }
  .pd-group-items {
    gap: 9px;
    padding: 8px;
  }
  .pd-group-items .pd-record:before {
    margin-bottom: -4px;
  }
}
@media (max-width: 390px) {
  .pd-root .pd-record {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "amount" "state" "details";
  }
  .pd-record-state {
    align-items: flex-start !important;
    text-align: left;
  }
  .pd-copy-hint {
    max-width: none;
    text-align: left;
  }
}
.bd-preview-single {
  position: static !important;
  display: block !important;
  max-width: 620px;
  margin: 0 auto 18px;
}
.bd-preview-buttons .bd-approve:disabled {
  opacity: 1;
  color: #b9ebca;
  border-color: #397453;
  background: #173525;
}
.bd-preview-buttons .bd-reject:disabled {
  opacity: 1;
  color: #ffc1bd;
  border-color: #81413d;
  background: #3a1d1c;
}
.settings-subnav {
  display: grid;
  gap: 3px;
  margin: -2px 0 8px 28px;
  padding-left: 14px;
  border-left: 1px solid #303741;
}
.settings-subnav a {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  color: #89929e !important;
  font-size: 12px !important;
}
.settings-subnav a:before {
  display: none !important;
}
.settings-subnav a[aria-current="page"] {
  color: #e7dbbf !important;
  background: #29271f !important;
  box-shadow: none !important;
}
.settings-form .support-enabled {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
}
.support-enabled span {
  display: grid;
  gap: 5px;
}
.support-enabled small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}
.support-enabled input {
  width: 44px;
  height: 24px;
  accent-color: var(--success);
}
.sidebar-bottom {
  display: grid;
  gap: 6px;
  margin-top: auto;
}
.sidebar-contact {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  color: #9da8ba;
  font-weight: 650;
}
.sidebar-contact:hover {
  color: var(--text);
  background: var(--panel-2);
}
.sidebar-contact[aria-current="page"] {
  color: var(--text);
  border: 1px solid #615a4d;
  background: #2a2926;
}
.sidebar-logout {
  margin-top: 0;
}
@media (max-width: 900px) {
  .settings-subnav {
    margin-left: 32px;
  }
}
.bd-row > span {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.bd-row > span small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.bd-row > select {
  flex: 0 0 min(310px, 42%);
}
.bd-footer {
  margin-top: 24px;
}
.settings-telegram-content > .bd-root {
  padding-top: 10px;
}
.session-expired-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #3d444e;
  border-radius: 22px;
  color: var(--text);
  background: #171a1e;
  box-shadow: 0 30px 90px #000b;
}
.session-expired-dialog::backdrop {
  background: #050607d9;
  backdrop-filter: blur(8px);
}
.session-expired-dialog > div {
  display: grid;
  justify-items: center;
  padding: 30px;
  text-align: center;
}
.session-expired-dialog > div > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border: 1px solid #5d5544;
  border-radius: 17px;
  background: #29251d;
  color: #dcc28a;
  font-size: 24px;
}
.session-expired-dialog h2 {
  margin: 0;
  font-size: 22px;
}
.session-expired-dialog p {
  margin: 12px 0 22px;
  color: var(--muted);
  line-height: 1.65;
}
.session-expired-dialog button {
  width: 100%;
}
.pd-root .pd-toolbar {
  grid-template-columns: minmax(180px, 1fr) 200px auto auto auto;
}
@media (max-width: 1100px) {
  .pd-root .pd-toolbar {
    grid-template-columns: minmax(150px, 1fr) repeat(3, auto);
  }
  .pd-root .pd-search {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .bd-row > select {
    width: 100%;
    flex-basis: auto;
  }
  .pd-root .pd-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pd-root .pd-toolbar .pd-search,
  .pd-root .pd-toolbar .pd-select {
    grid-column: 1/-1;
  }
  .pd-root .pd-toolbar .pd-refresh {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    gap: 5px;
    font-size: 11px;
  }
  .pd-root .pd-toolbar .pd-refresh svg {
    display: none;
  }
  #pd-export {
    width: 100%;
  }
}

/* Telegram message composer and interactive payment metrics */
.bd-permission .bd-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 330px);
  align-items: center;
  gap: 24px;
}
.bd-permission .bd-row > label,
.bd-permission select {
  width: 100%;
}
.bd-message-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.85fr) minmax(330px, 1.15fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}
.bd-fields header {
  margin-bottom: 15px;
}
.bd-fields header small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.bd-field-row {
  display: grid;
  grid-template-columns: 20px minmax(100px, 1fr) 86px 68px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #2c3138;
}
.bd-field-row:first-child {
  border-top: 0;
}
.bd-field-grip {
  color: #646d78;
}
.bd-field-name {
  font-size: 13px;
  font-weight: 600;
}
.bd-field-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 86px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.bd-field-toggle input {
  flex: 0 0 auto;
  margin: 0;
  accent-color: #bda975;
}
.bd-field-order {
  display: flex;
  gap: 4px;
}
.bd-field-order button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 1px solid #3b424c;
  border-radius: 8px;
  color: #cbd1d9;
  background: #22262c;
}
.bd-field-order button:disabled {
  opacity: 0.3;
}
.bd-message-layout .bd-preview-single {
  width: 100%;
  max-width: none;
  margin: 0;
}
.pd-metric {
  appearance: none;
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s,
    background 0.2s;
}
.pd-metric:hover {
  transform: translateY(-2px);
  border-color: #59626e;
  background: linear-gradient(145deg, #20242a, #181b1f);
}
.pd-metric:focus-visible {
  outline: 2px solid #c9b47f;
  outline-offset: 3px;
}
.pd-metric-title {
  display: block;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}
.pd-metric strong {
  display: block;
}
@media (max-width: 800px) {
  .bd-message-layout {
    grid-template-columns: 1fr;
  }
  .bd-permission .bd-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
@media (max-width: 480px) {
  .bd-field-row {
    grid-template-columns: 18px minmax(80px, 1fr) auto;
  }
  .bd-field-toggle {
    grid-column: 2;
    width: auto;
  }
  .bd-field-order {
    grid-column: 3;
    grid-row: 1/3;
  }
  .bd-field-toggle span {
    font-size: 10px;
  }
}
.analytics-pages .analytics-empty {
  display: grid !important;
  min-height: 170px;
  place-items: center;
  grid-template-columns: 1fr !important;
  padding: 24px !important;
  border: 0 !important;
  text-align: center;
  color: var(--muted);
}
.bd-title-field {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #2c3138;
  color: var(--muted);
  font-size: 11px;
}
.bd-title-field input {
  width: 100%;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
#tg-operator-permission {
  grid-column: 1/-1;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #30363e;
}
#tg-operator-permission[hidden] {
  display: none;
}
.bd-permission .tg-operator-picker > strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
.bd-message-layout .bd-fields {
  display: block;
}
.bd-message-layout .bd-fields > header,
.bd-message-layout .bd-title-field {
  width: 100%;
}
.bd-message-layout #bdFieldEditor {
  width: 100%;
}
.settings-telegram .tg-connection {
  padding: 19px 20px;
}
.settings-telegram .tg-connection > .bd-row {
  margin-bottom: 8px;
}
.settings-telegram .tg-connection > .bd-note {
  margin: 6px 0;
  font-size: 12px;
}
.settings-telegram .tg-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 15px 0;
}
.settings-telegram .tg-fields .bd-field {
  margin-bottom: 0;
}
.settings-telegram .tg-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}
.settings-telegram .tg-actions button {
  width: 100%;
  min-width: 0;
  padding-inline: 9px;
  font-size: 12px;
}
.settings-telegram .tg-connection > .bd-check {
  margin-top: 12px;
}
.settings-telegram .tg-events {
  margin-top: 12px;
}
@media (max-width: 600px) {
  .settings-telegram .tg-fields,
  .settings-telegram .tg-actions {
    grid-template-columns: 1fr;
  }
  .settings-telegram .tg-connection {
    padding: 16px;
  }
}
.ad-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.tg-operator-picker > span {
  font-weight: 600;
}
.tg-operator-picker > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}
.tg-operator-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.tg-operator-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #343b44;
  border-radius: 11px;
  background: #121519;
}
.tg-operator-list label > span {
  display: grid;
  gap: 2px;
}
.tg-operator-list small {
  color: var(--muted);
  font-size: 10px;
}
.tg-operator-empty {
  margin-top: 9px;
  padding: 12px;
  border: 1px dashed #3b424b;
  border-radius: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.tg-operator-picker details {
  margin-top: 10px;
}
.tg-operator-picker details summary {
  cursor: pointer;
  color: #c7ccd3;
  font-size: 12px;
}
.tg-operator-picker textarea {
  width: 100%;
  margin-top: 9px;
}
.session-expired-dialog [role="alert"],
#login-error {
  text-align: center;
}
@media (max-width: 600px) {
  .tg-operator-list {
    grid-template-columns: 1fr;
  }
  .ad-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.analytics-devices > .analytics-empty {
  grid-column: 1/-1;
  width: 100%;
  min-height: 220px;
  place-self: center;
  text-align: center;
}
:is(#analytics-chart, #analytics-sources, #analytics-cities, #analytics-devices, #analytics-pages):has(> .analytics-empty) {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 245px;
}
:is(#analytics-chart, #analytics-sources, #analytics-cities, #analytics-devices, #analytics-pages) > .analytics-empty {
  display: grid !important;
  width: 100%;
  min-height: 245px;
  margin: 0;
  padding: 24px !important;
  place-items: center;
  place-self: center;
  grid-column: 1 / -1;
  border: 0 !important;
  text-align: center;
}
.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, #1a1e23, #13161a);
}
.contact-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid #42556a;
  border-radius: 15px;
  color: #9fc6e9;
  background: #172432;
  font-size: 22px;
}
.contact-card h2 {
  margin: 5px 0 6px;
  font-size: 18px;
}
.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.contact-action {
  text-decoration: none;
  white-space: nowrap;
}
@media (max-width: 650px) {
  .contact-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }
  .contact-action {
    grid-column: 1 / -1;
    width: 100%;
  }
}
@media (max-width: 650px) {
  .pd-root .pd-record {
    position: relative;
  }
  .pd-record-main {
    padding-right: 82px;
  }
  .pd-record-state {
    display: contents !important;
  }
  .pd-record-state .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pd-copy-hint {
    display: inline-flex !important;
    grid-area: state;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: center;
    width: 118px;
    min-height: 27px;
    margin-right: 8px;
    box-sizing: border-box;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1 !important;
    letter-spacing: 0.035em;
    text-align: center !important;
  }
  .pd-copyable.is-copied .pd-copy-hint {
    width: 118px;
  }
}
@media (max-width: 390px) {
  .pd-root .pd-record {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main main" "amount state" "details details";
  }
  .pd-record-state {
    min-width: 0;
  }
  .pd-copy-hint {
    width: 112px !important;
    margin-right: 5px;
  }
  .pd-copyable.is-copied .pd-copy-hint {
    width: 112px !important;
  }
}
@media (max-width: 900px) {
  .user-list article {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
  }
  .user-list article .user-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .user-list article .user-actions button {
    width: 100%;
    min-width: 0;
    padding: 9px 8px;
    font-size: 12px;
  }
  .user-list article > .protected-account {
    justify-self: start;
  }
}
@media (max-width: 520px) {
  .user-list article .user-actions {
    grid-template-columns: 1fr;
  }
  .user-list article .user-actions button {
    min-height: 40px;
  }
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.bd-permission .bd-row {
  margin-bottom: 0;
}
.bd-permission .bd-row > label {
  display: block;
}
.bd-permission .bd-row > label select {
  display: block;
}

/* User management workspace */
.admin-root {
  max-width: 1180px;
  margin-inline: auto;
}
.user-create-card,
.users-directory {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,.035), var(--shadow);
}
.user-create-card {
  padding: 20px;
}
.user-create-card > header,
.users-directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.user-create-card > header {
  margin-bottom: 18px;
}
.user-create-card h2,
.users-directory h2 {
  margin: 0;
  font-size: 17px;
}
.user-create-card header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.user-create-card header > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--accent);
  font-size: 22px;
}
.user-create-card .user-form {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.user-create-card .user-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}
.user-create-card .user-form input,
.user-create-card .user-form select,
.user-create-card .user-form button {
  min-height: 46px;
}
.user-create-card .user-form button {
  align-self: end;
}
.users-directory {
  padding: 20px;
}
.users-directory-head {
  margin-bottom: 16px;
}
.users-directory-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.users-directory-head > div > span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}
.users-directory .users-search {
  width: min(500px, 100%);
  grid-template-columns: minmax(220px,1fr) auto auto;
}
.users-directory .users-search input,
.users-directory .users-search button {
  min-height: 42px;
}
.users-directory .user-list {
  gap: 10px;
}
.users-directory .user-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-2);
  box-shadow: none;
}
.user-card-main {
  display: flex !important;
  align-items: center;
  gap: 13px !important;
  min-width: 0;
}
.user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(145deg,rgba(214,189,134,.15),rgba(255,255,255,.025));
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.user-card-copy {
  display: grid !important;
  grid-template-columns: auto auto;
  gap: 4px 10px !important;
  min-width: 0;
}
.user-card-title {
  display: flex !important;
  grid-column: 1/-1;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px !important;
}
.user-card-title strong {
  margin-right: 2px;
  font-size: 15px;
}
.user-role,
.user-state {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.user-role {
  background: rgba(214,189,134,.12);
  color: var(--accent);
}
.user-state.is-active {
  background: rgba(78,188,137,.12);
  color: #79cda7;
}
.user-state.is-disabled {
  background: rgba(232,115,124,.1);
  color: #ef969d;
}
.user-email,
.user-username {
  min-width: 0;
  overflow: hidden;
  color: var(--muted) !important;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-username::before {
  content: "•";
  margin-right: 8px;
  color: #59606a;
}
.users-directory .user-actions {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(112px,1fr)) !important;
  width: 254px !important;
  gap: 7px !important;
}
.users-directory .user-actions button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}
.users-directory .protected-account {
  padding: 7px 10px;
  border: 1px solid rgba(107,196,151,.22);
  border-radius: 999px;
  background: rgba(107,196,151,.07);
  color: #84bfa3;
  font-size: 11px;
  white-space: nowrap;
}
.users-pagination {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.audit-timezone {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 820px) {
  .user-create-card .user-form {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .users-directory-head {
    align-items: stretch;
    flex-direction: column;
  }
  .users-directory .users-search {
    width: 100%;
  }
  .users-directory .user-card {
    grid-template-columns: 1fr;
  }
  .users-directory .user-actions {
    width: 100% !important;
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  }
  .users-directory .protected-account {
    justify-self: start !important;
  }
}
@media (max-width: 560px) {
  .user-create-card,
  .users-directory {
    padding: 14px;
    border-radius: 18px;
  }
  .user-create-card .user-form,
  .users-directory .users-search,
  .users-directory .user-actions {
    grid-template-columns: 1fr !important;
  }
  .users-directory .users-search input {
    grid-column: auto;
  }
  .users-directory .user-card {
    min-height: 0;
    padding: 13px;
  }
  .user-card-copy {
    grid-template-columns: 1fr;
  }
  .user-card-title,
  .user-email,
  .user-username {
    grid-column: 1;
  }
  .user-username::before {
    display: none;
  }
  .users-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .users-pagination span {
    grid-column: 1/-1;
    grid-row: 1;
    text-align: center;
  }
}

/* Compact mobile editors and protected user cards */
#ad-form {
  gap: 13px !important;
}
#ad-form > label {
  margin: 0 !important;
}
#ad-form > .pd-date-range {
  padding: 12px;
  gap: 10px;
}
#ad-form > p {
  margin: 1px 0;
  line-height: 1.45;
}
#ad-form footer {
  margin-top: 5px;
}
@media (max-width: 600px) {
  #ad-dialog {
    padding: 16px !important;
  }
  #ad-form {
    gap: 12px !important;
  }
  #ad-form > .pd-date-range {
    padding: 11px;
  }
  .user-list article:has(> .protected-account) {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
  }
  .user-list article:has(> .protected-account) > .protected-account {
    justify-self: end;
    white-space: nowrap;
  }
}
@media (max-width: 380px) {
  .user-list article:has(> .protected-account) {
    grid-template-columns: 1fr;
  }
  .user-list article:has(> .protected-account) > .protected-account {
    justify-self: start;
  }
}
.ad-root > .pd-toolbar {
  margin-bottom: 0 !important;
}

/* Domain management: compact, overflow-safe mobile layout */
@media (max-width: 760px) {
  .domain-sites-overview {
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
  #site-stats .console-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  #site-stats .console-card {
    min-width: 0;
    min-height: 92px;
    padding: 12px 10px;
    gap: 4px;
    border-radius: 13px;
  }
  #site-stats .console-card span,
  #site-stats .console-card small {
    font-size: 10px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  #site-stats .console-card strong {
    font-size: 23px;
  }
  .domain-sites-overview .site-monitor-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .domain-sites-overview .site-monitor-head > span {
    min-width: 0;
    font-size: 14px;
  }
  .domain-sites-overview .site-monitor-head .button {
    display: inline-flex !important;
    visibility: visible !important;
    width: auto !important;
    min-width: 0;
    min-height: 38px;
    padding: 8px 11px;
    white-space: nowrap;
    font-size: 11px;
  }
  .domain-sites-overview .site-monitor-card {
    width: 100%;
    min-width: 0;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 10px;
    padding: 15px;
    border-radius: 14px;
    overflow: hidden;
  }
  .domain-sites-overview .site-monitor-card > div:nth-child(2),
  .domain-sites-overview .site-monitor-meta {
    min-width: 0;
  }
  .domain-sites-overview .site-monitor-card a,
  .domain-sites-overview .site-monitor-card small {
    overflow-wrap: anywhere;
  }
  .domain-sites-overview .site-monitor-meta {
    grid-column: 2;
    width: 100%;
    justify-items: start;
    gap: 5px;
    padding-top: 11px;
  }
  .domain-create {
    padding: 16px;
    border-radius: 15px;
  }
  .domain-create .domain-section-heading {
    margin-bottom: 15px;
  }
  .domain-create-form {
    gap: 12px;
  }
  .domain-card {
    width: 100%;
    min-width: 0;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 15px;
    overflow: hidden;
  }
  .domain-monogram {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 18px;
  }
  .domain-details,
  .domain-title-row,
  .domain-nameservers,
  .domain-ns-copy {
    min-width: 0;
    max-width: 100%;
  }
  .domain-ns-copy code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .domain-ns-verification {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
  }
  .domain-ns-verification small {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .domain-ns-verification .button {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    min-height: 34px;
    padding: 6px 9px;
  }
  .domain-actions {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    padding-top: 12px;
  }
  .domain-actions > .badge {
    grid-column: 1/-1;
    justify-self: start;
  }
  .domain-actions button {
    width: 100%;
    min-width: 0;
    min-height: 39px;
    padding: 8px 9px;
    font-size: 11px;
  }
  .domain-actions button:only-of-type {
    grid-column: 1/-1;
  }
  #domain-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 7px;
  }
  #domain-pagination button {
    min-width: 0;
    padding: 8px;
    font-size: 11px;
  }
  #domain-pagination span {
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
  }
}
