/* ---------- Public top bar (login / signup / pricing) ---------- */
.pub-nav {
  position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.pub-brand { font-weight: 800; font-size: 18px; color: #111827; text-decoration: none; }
.pub-brand span { color: #5b8cff; }
.pub-links { display: flex; align-items: center; gap: 6px; }
.pub-links a {
  padding: 8px 12px; border-radius: 10px; color: #374151; text-decoration: none;
  font-weight: 600; font-size: 14px;
}
.pub-links a:hover { background: rgba(0, 0, 0, 0.05); }
.pub-links a[aria-current="page"] { color: #4f7cff; }
.pub-links a.pub-cta { background: linear-gradient(135deg, #5b8cff, #4a72e8); color: #fff; }
.pub-links a.pub-cta:hover { filter: brightness(1.05); }

.theme-toggle {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e5e7eb; background: #fff; color: #374151; border-radius: 10px;
  cursor: pointer; padding: 0; margin-left: 4px;
}
.theme-toggle:hover { background: #f3f4f6; }
.theme-toggle svg { width: 18px; height: 18px; display: block; }

@media (max-width: 520px) {
  .pub-nav { padding: 0 12px; }
  .pub-links a { padding: 8px; font-size: 13px; }
  .pub-brand { font-size: 16px; }
}

/* ---------- Pricing page ---------- */
body.pricing-page { padding-top: 60px; min-height: 100vh; }
.pricing-wrap { max-width: 860px; margin: 0 auto; padding: 48px 20px 64px; text-align: center; }
.pricing-wrap h1 { margin: 0 0 8px; font-size: 34px; }
.pricing-wrap .lead { color: #6b7280; margin: 0 0 32px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; text-align: left; }
.plan { padding: 26px; border-radius: 16px; border: 1px solid #e5e7eb; background: #fff; }
.plan h2 { margin: 0 0 4px; font-size: 18px; }
.plan .price { font-size: 36px; font-weight: 800; margin: 8px 0 2px; }
.plan .per { color: #6b7280; font-size: 13px; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; font-size: 14px; }
.plan li::before { content: "✓"; color: #16a34a; font-weight: 700; margin-right: 8px; }
.plan .plan-btn {
  display: block; text-align: center; padding: 11px 14px; border-radius: 12px; font-weight: 700;
  text-decoration: none; background: linear-gradient(135deg, #5b8cff, #4a72e8); color: #fff;
}
.plan .plan-btn.disabled { background: #e5e7eb; color: #6b7280; pointer-events: none; }
.plan.featured { border-color: #5b8cff; box-shadow: 0 8px 30px rgba(91, 140, 255, 0.18); }

/* ---------- Dark mode ---------- */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body {
  background-color: #0b1020; color: #e5e7eb;
}
html[data-theme="dark"] body.auth-body {
  background-image:
    radial-gradient(circle at 8% 12%, rgba(88, 120, 255, 0.18), transparent 42%),
    radial-gradient(circle at 92% 92%, rgba(88, 120, 255, 0.14), transparent 42%);
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] label,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .stat b { color: #f3f4f6; }
html[data-theme="dark"] .muted,
html[data-theme="dark"] .hint,
html[data-theme="dark"] small,
html[data-theme="dark"] .stat span,
html[data-theme="dark"] .nav-user,
html[data-theme="dark"] .pricing-wrap .lead,
html[data-theme="dark"] .plan .per { color: #9ca3af; }

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .plan,
html[data-theme="dark"] dialog {
  background: #121a2e; border-color: #243049; color: #e5e7eb;
}
html[data-theme="dark"] dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
html[data-theme="dark"] .nav,
html[data-theme="dark"] .nav-inner { background: #0f1730; border-color: #243049; }

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #1a2340; border-color: #2b3858; color: #e5e7eb;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #6b7280; }

html[data-theme="dark"] button:not(.primary):not(.danger):not(.ok):not(.icon-act):not(.mini-btn):not(.switch),
html[data-theme="dark"] .btn:not(.primary) {
  background: #1a2340; border-color: #2b3858; color: #e5e7eb;
}
html[data-theme="dark"] button:not(.primary):not(.danger):not(.ok):not(.icon-act):not(.mini-btn):not(.switch):hover,
html[data-theme="dark"] .btn:not(.primary):hover { background: #222d52; }

html[data-theme="dark"] table th { color: #d1d5db; border-color: #243049; }
html[data-theme="dark"] table td { border-color: #1c2540; }
html[data-theme="dark"] table tbody tr:hover { background: #151e36; }

/* Links table */
html[data-theme="dark"] .links-card .links-table th { color: #d1d5db; border-bottom-color: #243049; }
html[data-theme="dark"] .links-card .links-table td { border-bottom-color: #1c2540; }
html[data-theme="dark"] .links-card .links-table tbody tr:hover { background: #151e36; }
html[data-theme="dark"] .links-card .count-pill { background: #1a2340; border-color: #2b3858; color: #d1d5db; }
html[data-theme="dark"] .links-card .icon-btn { background: #1a2340; border-color: #2b3858; color: #d1d5db; }
html[data-theme="dark"] .links-card .icon-btn:hover { background: #222d52; }
html[data-theme="dark"] .links-card .avatar,
html[data-theme="dark"] .links-card .linkicon { background: #1f2a4a; color: #d1d5db; }
html[data-theme="dark"] .links-card .short-text { color: #2dd4bf; }
html[data-theme="dark"] .links-card .orig .t,
html[data-theme="dark"] .links-card .when small,
html[data-theme="dark"] .links-card .until { color: #9ca3af; }
html[data-theme="dark"] .links-card .orig .u { color: #d1d5db; }
html[data-theme="dark"] .links-card .mini-btn,
html[data-theme="dark"] .links-card .icon-act { color: #9ca3af; }
html[data-theme="dark"] .links-card .mini-btn:hover,
html[data-theme="dark"] .links-card .icon-act:hover { background: #222d52; color: #f3f4f6; }
html[data-theme="dark"] .links-card .icon-act.danger:hover { background: #3b1620; color: #f87171; }
html[data-theme="dark"] .links-card .b-ok { background: #0f3a24; color: #4ade80; }
html[data-theme="dark"] .links-card .b-off { background: #1f2a4a; color: #cbd5e1; }
html[data-theme="dark"] .links-card .b-exp { background: #431a1a; color: #fca5a5; }
html[data-theme="dark"] .links-card .perpage { color: #9ca3af; }
html[data-theme="dark"] .links-card .perpage select { background: #1a2340; border-color: #2b3858; color: #e5e7eb; }

/* Stats */
html[data-theme="dark"] .stat { box-shadow: none; }

/* Public bar + toggle + pricing */
html[data-theme="dark"] .pub-nav { background: rgba(11, 16, 32, 0.78); border-bottom-color: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .pub-brand { color: #f3f4f6; }
html[data-theme="dark"] .pub-links a { color: #d1d5db; }
html[data-theme="dark"] .pub-links a:hover { background: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .pub-links a[aria-current="page"] { color: #8fb0ff; }
html[data-theme="dark"] .pub-links a.pub-cta { color: #fff; }
html[data-theme="dark"] .theme-toggle { background: #1a2340; border-color: #2b3858; color: #e5e7eb; }
html[data-theme="dark"] .theme-toggle:hover { background: #222d52; }
html[data-theme="dark"] .plan.featured { box-shadow: 0 8px 30px rgba(91, 140, 255, 0.12); }
html[data-theme="dark"] .plan .plan-btn.disabled { background: #1f2a4a; color: #94a3b8; }

/* ---------- Domain dropdowns (create form + edit dialog) ---------- */
.grid select, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid #dfe3ea; border-radius: 12px;
  background: #f1f2f6; color: inherit; font: inherit;
}