* {
  box-sizing: border-box;
}

:root {
  --blue: #2f6fec;
  --blue-strong: #1f5ed7;
  --blue-soft: #eaf1ff;
  --bg: #f2f3f5;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #dfe4ea;
  --line-strong: #c8d0da;
  --green: #22a35a;
  --orange: #f59e0b;
  --red: #d92d20;
  --shadow: 0 14px 34px rgba(17, 24, 39, .08);
  --shadow-soft: 0 6px 18px rgba(17, 24, 39, .06);
  --radius: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .9) 0, rgba(242, 243, 245, .95) 180px),
    var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 7px 18px rgba(47, 111, 236, .22);
}

button:hover {
  background: var(--blue-strong);
}

button:disabled {
  opacity: .58;
  cursor: wait;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 111, 236, .65);
  box-shadow: 0 0 0 4px rgba(47, 111, 236, .12);
}

select {
  appearance: auto;
}

.appbar,
.login-topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(180deg, #3b82f6 0%, #2f6fec 100%);
  box-shadow: 0 5px 18px rgba(47, 111, 236, .32);
}

.app-title,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 900;
}

.home-link {
  color: #fff;
  text-decoration: none;
}

.home-link:hover {
  opacity: .96;
}

.appbar .app-title {
  margin-right: auto;
}

.brand-mark,
.login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: #fff;
  font-weight: 950;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .72);
  background: linear-gradient(145deg, #f8fbff 0%, #dbeafe 100%);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .5), 0 10px 22px rgba(15, 23, 42, .18);
  overflow: hidden;
}

.logo-shield {
  position: absolute;
  inset: 9px 10px 8px;
  border-radius: 8px 8px 11px 11px;
  background: linear-gradient(180deg, #2f6fec 0%, #1f5ed7 100%);
  clip-path: polygon(50% 0, 100% 17%, 91% 78%, 50% 100%, 9% 78%, 0 17%);
}

.logo-orbit {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid #22c55e;
  border-right-color: transparent;
  border-radius: 999px;
  transform: rotate(-30deg);
}

.logo-orbit::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 2px;
  width: 0;
  height: 0;
  border-left: 6px solid #22c55e;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(34deg);
}

.logo-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2);
}

.dot-a {
  left: 16px;
  top: 17px;
}

.dot-b {
  right: 15px;
  top: 17px;
}

.dot-c {
  left: 19px;
  bottom: 14px;
}

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

.menu-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin-right: 12px;
  border: 2px solid rgba(255, 255, 255, .46);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  box-shadow: none;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.menu-button:hover {
  background: rgba(255, 255, 255, .25);
}

.nav-pill,
.logout-btn,
.nav-sync {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.nav-sync {
  border: 1px solid rgba(255, 255, 255, .36);
  box-shadow: none;
}

.nav-pill.active {
  background: rgba(255, 255, 255, .24);
}

.logout-btn,
.nav-sync {
  border: 0;
  box-shadow: none;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, .26);
}

.page {
  width: min(1680px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 18px 0 24px;
}

.filter-panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.side-drawer {
  position: fixed;
  left: 0;
  top: 58px;
  bottom: 0;
  z-index: 100;
  width: 320px;
  padding: 28px 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 16px 0 40px rgba(15, 23, 42, .18);
  transform: translateX(-105%);
  transition: transform .2s ease;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-mask {
  position: fixed;
  inset: 58px 0 0;
  z-index: 90;
  background: rgba(17, 24, 39, .32);
  backdrop-filter: blur(1px);
}

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

.drawer-head strong {
  color: #111827;
  font-size: 21px;
  font-weight: 950;
}

.drawer-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  color: #475467;
  background: #eef2f7;
  box-shadow: none;
}

.drawer-close:hover {
  color: #fff;
  background: #64748b;
}

.side-drawer p {
  margin: 12px 0 28px;
  color: #667085;
  font-size: 14px;
  font-weight: 780;
}

.drawer-link {
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  border-radius: 10px;
  color: #111827;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
}

.drawer-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-size: 24px;
}

.drawer-link:hover,
.drawer-link.active {
  background: #e5e7eb;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, .7fr) minmax(160px, .9fr) minmax(160px, .9fr) minmax(140px, .75fr) minmax(170px, .85fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 14px;
  overflow: visible;
  position: relative;
  z-index: 8;
}

.ssl-filter-panel {
  grid-template-columns: minmax(170px, 1.1fr) minmax(140px, .8fr) minmax(110px, .7fr) minmax(150px, .9fr) minmax(150px, .9fr) minmax(120px, .75fr) minmax(110px, .7fr) auto;
}

.field {
  display: block;
}

.with-icon {
  position: relative;
}

.with-icon span {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #8a94a6;
  font-size: 22px;
  line-height: 1;
}

.with-icon input,
.with-icon select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding-left: 44px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.with-icon select {
  appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

.combo-field {
  position: relative;
  z-index: 10;
}

.combo-field:focus-within {
  z-index: 30;
}

.combo-input {
  padding-right: 38px;
}

.combo-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 999px;
  color: #667085;
  background: #eef2f7;
  box-shadow: none;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
}

.combo-clear:hover {
  color: #fff;
  background: #64748b;
}

.combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .18);
  padding: 6px;
  z-index: 60;
}

.combo-option {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  border-radius: 10px;
  padding: 0 12px;
  color: #1f2937;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 14px;
  font-weight: 850;
}

.combo-option:hover {
  color: #1d4ed8;
  background: #eef5ff;
}

.combo-option.selected {
  color: #fff;
  background: var(--blue);
}

.combo-option.combo-all {
  color: #667085;
}

.combo-option.combo-all.selected {
  color: #fff;
}

.combo-empty {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.plain-btn {
  border: 1px solid var(--line-strong);
  color: #344054;
  background: #fff;
  box-shadow: none;
}

.plain-btn:hover {
  color: #111827;
  background: #eef2f7;
}

.export-btn {
  margin-left: auto;
  border: 1px solid rgba(34, 163, 90, .4);
  color: #15803d;
  background: #fff;
  box-shadow: none;
}

.export-btn:hover {
  color: #fff;
  background: var(--green);
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.status-line .error {
  color: var(--red);
}

.sync-detail {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 10px;
}

.sync-detail div {
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow-soft);
}

.sync-detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.sync-detail strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: 20px;
  line-height: 1.1;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
}

table {
  width: 100%;
  min-width: 1360px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

th,
td {
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  position: static;
  height: 52px;
  color: #fff;
  background: #1f5a83;
  font-weight: 950;
  font-size: 17px;
}

th:nth-child(1), td:nth-child(1) { width: 16%; }
th:nth-child(2), td:nth-child(2) { width: 13%; }
th:nth-child(3), td:nth-child(3) { width: 13%; }
th:nth-child(4), td:nth-child(4) { width: 18%; }
th:nth-child(5), td:nth-child(5) { width: 17%; }
th:nth-child(6), td:nth-child(6) { width: 9%; }
th:nth-child(7), td:nth-child(7) { width: 14%; }

td {
  color: #5f6775;
}

tbody tr:hover {
  background: #f8fbff;
}

td input,
td select,
td textarea {
  min-height: 34px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
  resize: vertical;
}

td input:focus,
td select:focus,
td textarea:focus {
  border-color: rgba(47, 111, 236, .45);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 236, .1);
}

.domain-cell {
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.platform-select {
  width: 100%;
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.cf-input {
  min-width: 0;
  color: #b45309;
  background: #fff7ed;
}

.registrar-account-input {
  color: #475467;
  background: #f8fafc;
}

.dns-servers-input {
  min-height: 46px;
  line-height: 1.35;
  white-space: pre-line;
}

.op-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.text-btn,
.danger-text {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.text-btn {
  color: var(--orange);
}

.danger-text {
  color: var(--red);
}

.text-btn:hover,
.danger-text:hover {
  background: transparent;
  text-decoration: underline;
}

.empty-row {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

.pagination-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-size select {
  width: 78px;
  min-height: 34px;
  border-radius: 9px;
}

.pagination-bar button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.admin-page {
  padding-top: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 16px;
  align-items: start;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.admin-field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.admin-field.full {
  grid-column: 1 / -1;
}

.admin-field-title {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.admin-field-title input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.admin-field textarea {
  min-height: 160px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-actions,
.admin-search {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-search {
  margin-bottom: 12px;
}

.admin-search input {
  flex: 1;
}

.admin-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-status.error {
  color: var(--red);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  min-width: 760px;
}

.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 30%; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 28%; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 17%; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 15%; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 10%; }

.save-admin-row {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.pagination-bar.compact {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.creation-cell,
.expiry-cell,
.cf-cell,
.registrar-account-cell,
.platform-cell,
.dns-servers-cell {
  color: #273142;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.cf-cell,
.registrar-account-cell {
  color: #b45309;
}

.dns-servers-cell {
  white-space: pre-line;
  line-height: 1.45;
}

.dns-page {
  width: min(1760px, calc(100vw - 40px));
}

.dns-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 14px;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.dns-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 950;
}

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

.dns-sync-btn {
  min-height: 40px;
  border: 1px solid rgba(47, 111, 236, .28);
  color: #1d4ed8;
  background: #eff6ff;
  box-shadow: none;
}

.dns-sync-btn:hover {
  color: #fff;
  background: var(--blue);
}

.dns-sync-btn:disabled {
  color: #475467;
  background: #eef2f7;
}

.dns-health {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  padding: 0 14px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.dns-health.error {
  border-color: #fecaca;
  color: var(--red);
  background: #fff1f2;
}

.dns-filter-panel {
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, .9fr) minmax(140px, .65fr) minmax(150px, .7fr) auto;
}

.dns-summary {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.dns-table-panel .table-wrap {
  overflow-x: hidden;
}

.dns-table {
  min-width: 0;
  table-layout: fixed;
}

.dns-table th,
.dns-table td {
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}

.dns-table th {
  font-size: 15px;
}

.dns-table th:nth-child(1), .dns-table td:nth-child(1) { width: 12%; }
.dns-table th:nth-child(2), .dns-table td:nth-child(2) { width: 6%; }
.dns-table th:nth-child(3), .dns-table td:nth-child(3) { width: 19%; }
.dns-table th:nth-child(4), .dns-table td:nth-child(4) { width: 25%; }
.dns-table th:nth-child(5), .dns-table td:nth-child(5) { width: 8%; }
.dns-table th:nth-child(6), .dns-table td:nth-child(6) { width: 5%; }
.dns-table th:nth-child(7), .dns-table td:nth-child(7) { width: 17%; }
.dns-table th:nth-child(8), .dns-table td:nth-child(8) { width: 8%; }

.dns-zone-cell,
.dns-name-cell,
.dns-content-cell,
.dns-account-cell,
.dns-modified-cell {
  color: #273142;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dns-name-cell {
  color: #111827;
}

.dns-content-cell {
  color: #b45309;
}

.dns-type-badge,
.proxied {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 950;
}

.dns-type-badge {
  color: #1d4ed8;
  background: #eaf1ff;
}

.proxied.on {
  color: #b45309;
  background: #fff7ed;
}

.proxied.off {
  color: #475467;
  background: #f1f5f9;
}

@media (max-width: 1180px) {
  .dns-table {
    border-collapse: separate;
    border-spacing: 0 10px;
    background: transparent;
  }

  .dns-table thead {
    display: none;
  }

  .dns-table,
  .dns-table tbody,
  .dns-table tr {
    display: block;
    width: 100%;
  }

  .dns-table tr {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 88px minmax(220px, 1.2fr);
    grid-template-areas:
      "zone type content"
      "name proxied content"
      "account ttl modified";
    gap: 10px 16px;
    align-items: start;
    margin-bottom: 10px;
    border: 1px solid rgba(214, 221, 230, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .9);
    padding: 14px 16px;
  }

  .dns-table td {
    display: block;
    min-height: 0;
    width: auto !important;
    border-bottom: 0;
    padding: 0;
  }

  .dns-table td::before {
    display: block;
    margin-bottom: 4px;
    color: #98a2b3;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
  }

  .dns-zone-cell { grid-area: zone; }
  .dns-type-cell { grid-area: type; }
  .dns-name-cell { grid-area: name; }
  .dns-content-cell { grid-area: content; }
  .dns-proxied-cell { grid-area: proxied; }
  .dns-ttl-cell { grid-area: ttl; }
  .dns-account-cell { grid-area: account; }
  .dns-modified-cell { grid-area: modified; }

  .dns-zone-cell::before { content: "zone"; }
  .dns-type-cell::before { content: "type"; }
  .dns-name-cell::before { content: "name"; }
  .dns-content-cell::before { content: "content"; }
  .dns-proxied-cell::before { content: "proxied"; }
  .dns-ttl-cell::before { content: "ttl"; }
  .dns-account-cell::before { content: "cloudflare_account"; }
  .dns-modified-cell::before { content: "modified_on"; }
}

@media (max-width: 720px) {
  .dns-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .dns-hero-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .dns-table tr {
    grid-template-columns: 1fr;
    grid-template-areas:
      "zone"
      "type"
      "name"
      "content"
      "proxied"
      "ttl"
      "account"
      "modified";
  }
}

.ssl-page {
  width: min(1720px, calc(100vw - 44px));
}

.ssl-page .dns-hero {
  min-height: 150px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 4%, rgba(47, 111, 236, .16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(248, 250, 252, .72));
  padding: 28px 30px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .09);
}

.ssl-page .dns-hero h1 {
  font-size: 42px;
  letter-spacing: 0;
}

.ssl-page .dns-health {
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(18px);
}

.ssl-page .filter-panel,
.ssl-page .sync-detail div,
.ssl-page .table-panel {
  border-color: rgba(206, 214, 224, .76);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
}

.ssl-page .filter-panel {
  border-radius: 24px;
}

.ssl-page .with-icon input,
.ssl-page .with-icon select {
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
}

.ssl-table-panel {
  border-radius: 28px;
  background: transparent;
}

.ssl-table-panel .table-wrap {
  overflow: visible;
}

.ssl-table {
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: transparent;
  table-layout: auto;
}

.ssl-table thead {
  display: none;
}

.ssl-table,
.ssl-table tbody,
.ssl-table tr {
  display: block;
  width: 100%;
}

.ssl-table tr {
  display: grid;
  grid-template-columns: minmax(200px, .95fr) 112px 120px 84px minmax(220px, 1fr) minmax(220px, 1fr);
  grid-template-areas:
    "domain status valid days issuer issuer"
    "domain platform cf cf registrar checked";
  gap: 10px 18px;
  align-items: center;
  margin-bottom: 10px;
  border: 1px solid rgba(214, 221, 230, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
  padding: 16px 18px;
}

.ssl-table tr:hover {
  background: rgba(255, 255, 255, .96);
}

.ssl-table td {
  display: block;
  min-height: 0;
  width: auto !important;
  border-bottom: 0;
  padding: 0;
  color: #475467;
  font-size: 14px;
}

.ssl-domain-cell { grid-area: domain; }
.ssl-status-cell { grid-area: status; }
.ssl-valid-to-cell { grid-area: valid; }
.ssl-days-left-cell { grid-area: days; }
.ssl-issuer-cell { grid-area: issuer; }
.ssl-cf-cell { grid-area: cf; }
.ssl-registrar-cell { grid-area: registrar; }
.ssl-platform-cell { grid-area: platform; }
.ssl-checked-cell { grid-area: checked; }

.ssl-table td::before {
  display: block;
  margin-bottom: 4px;
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  text-transform: uppercase;
}

.ssl-domain-cell::before { content: "domain"; }
.ssl-status-cell::before { content: "status"; }
.ssl-valid-to-cell::before { content: "valid_to"; }
.ssl-days-left-cell::before { content: "days_left"; }
.ssl-issuer-cell::before { content: "issuer / error"; }
.ssl-cf-cell::before { content: "cloudflare_account"; }
.ssl-registrar-cell::before { content: "registor_account"; }
.ssl-platform-cell::before { content: "platform"; }
.ssl-checked-cell::before { content: "checked_at"; }

.ssl-cf-cell,
.ssl-registrar-cell {
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.ssl-status {
  display: inline-flex;
  min-width: 72px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 950;
}

.ssl-status.ok {
  color: #047857;
  background: #d1fae5;
}

.ssl-status.warning {
  color: #b45309;
  background: #fef3c7;
}

.ssl-status.expired,
.ssl-status.error {
  color: #b91c1c;
  background: #fee2e2;
}

.ssl-status.no_https {
  color: #9a3412;
  background: #ffedd5;
}

.ssl-status.dns_missing {
  color: #475467;
  background: #f1f5f9;
}

.ssl-status.missing {
  color: #475467;
  background: #eef2f7;
}

.ssl-domain-cell,
.ssl-issuer-cell,
.ssl-cf-cell,
.ssl-registrar-cell {
  overflow-wrap: anywhere;
}

.ssl-domain-cell {
  color: #111827;
  font-weight: 900;
}

.ssl-domain-cell strong,
.ssl-issuer-cell strong {
  display: block;
  color: #111827;
  font-size: 16px;
  font-weight: 920;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ssl-domain-cell span,
.ssl-issuer-cell span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ssl-issuer-cell {
  white-space: normal;
}

.platform-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 14px;
  color: var(--blue-strong);
  background: var(--blue-soft);
  font-weight: 900;
}

@media (max-width: 1180px) {
  .ssl-table tr {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "domain domain"
      "status valid"
      "days platform"
      "issuer issuer"
      "cf registrar"
      "checked checked";
  }
}

@media (max-width: 720px) {
  .ssl-page {
    width: min(100% - 24px, 680px);
  }

  .ssl-page .dns-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .ssl-page .dns-hero h1 {
    font-size: 32px;
  }

  .ssl-table tr {
    grid-template-columns: 1fr;
    grid-template-areas:
      "domain"
      "status"
      "valid"
      "days"
      "issuer"
      "cf"
      "registrar"
      "platform"
      "checked";
  }
}

.admin-board {
  width: min(1380px, calc(100vw - 64px));
  padding-top: 40px;
  padding-bottom: 56px;
}

.admin-board h1 {
  margin: 0 0 28px;
  color: #1f2937;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 950;
}

.source-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}

.source-strip div {
  min-height: 76px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  background: rgba(255, 255, 255, .86);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}

.source-strip strong {
  display: block;
  margin-bottom: 7px;
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.source-strip span {
  color: #667085;
  font-size: 13px;
  font-weight: 780;
}

.admin-section {
  margin-bottom: 42px;
}

.section-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 950;
}

.section-head button {
  min-height: 40px;
  border-radius: 8px;
}

.inline-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  padding: 22px;
  box-shadow: var(--shadow);
}

.inline-editor.hidden {
  display: none;
}

.inline-editor label {
  display: grid;
  gap: 8px;
  color: #475467;
  font-size: 14px;
  font-weight: 900;
}

.inline-editor .wide {
  grid-column: 1 / -1;
}

.inline-editor textarea {
  min-height: 120px;
  padding: 12px 14px;
  line-height: 1.45;
  resize: vertical;
}

.inline-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.inline-actions.wide {
  align-items: center;
}

.admin-status-line {
  display: grid;
  grid-template-columns: minmax(300px, 520px) 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-search.compact-search {
  margin: 0;
}

.admin-search.compact-search input {
  min-height: 42px;
}

.group-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.filter-chip {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  color: #475467;
  background: #fff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.manage-table {
  min-width: 0;
  table-layout: auto;
  border-collapse: collapse;
  border-radius: 0;
  background: transparent;
}

.manage-table th,
.manage-table td {
  height: 56px;
  min-height: 0;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px;
  background: transparent;
  color: #273142;
  font-size: 14px;
  vertical-align: middle;
}

.manage-table th {
  height: 46px;
  color: #667085;
  background: rgba(255, 255, 255, .72);
  font-size: 14px;
  font-weight: 950;
}

.manage-table tbody tr:hover {
  background: rgba(255, 255, 255, .72);
}

.manage-table th:nth-child(n),
.manage-table td:nth-child(n) {
  width: auto;
}

.group-name-cell,
.platform-name-cell {
  color: #1f2937;
  font-weight: 950;
}

.group-count-cell,
.platform-count-cell {
  font-weight: 850;
}

.domain-manage-table {
  border-top: 1px solid #e5e7eb;
}

.domain-manage-table th:nth-child(1),
.domain-manage-table td:nth-child(1) {
  width: 28%;
}

.domain-manage-table th:nth-child(2),
.domain-manage-table td:nth-child(2) {
  width: 25%;
}

.domain-manage-table th:nth-child(3),
.domain-manage-table td:nth-child(3) {
  width: 25%;
}

.domain-manage-table th:nth-child(4),
.domain-manage-table td:nth-child(4) {
  width: 14%;
}

.domain-manage-table th:nth-child(5),
.domain-manage-table td:nth-child(5) {
  width: 8%;
}

.domain-manage-table input,
.domain-manage-table select {
  min-height: 38px;
  border-color: var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 760;
}

.cf-readonly {
  color: #667085;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.login-body {
  background:
    radial-gradient(circle at 50% 0, rgba(47, 111, 236, .18), transparent 34%),
    #f3f4f6;
}

.login-main {
  min-height: calc(100vh - 58px);
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.login-card {
  width: min(420px, 100%);
  padding: 38px 40px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.login-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef5ff, #fff);
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 24px;
}

.login-card p {
  margin: 8px 0 24px;
  text-align: center;
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #5d6675;
  font-size: 14px;
  font-weight: 750;
}

.login-card input {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.login-card button {
  width: 100%;
  margin-top: 4px;
}

#loginMsg {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--red);
}

@media (max-width: 1200px) {
  .page {
    width: min(100% - 28px, 900px);
  }

  .filter-panel,
  .sync-detail {
    grid-template-columns: 1fr;
  }

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

}

@media (max-width: 720px) {
  .appbar,
  .login-topbar {
    padding: 0 14px;
  }

  .app-title,
  .brand {
    font-size: 18px;
  }

  .nav-pill {
    display: none;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions button {
    flex: 1;
    padding: 0 10px;
  }
}
