/* DNSZone panel theme.
 * Colours live in CSS variables so every page works in dark (default) and light.
 * The second half maps the hardcoded dark utility classes used across the older
 * views onto those variables; `html` is prefixed so these rules beat the
 * Tailwind CDN rules without !important. */

:root {
    --dz-bg: #0f1116;
    --dz-surface: #171a21;
    --dz-surface-2: #1d2129;
    --dz-sunken: #12151b;
    --dz-border: rgba(255, 255, 255, .07);
    --dz-border-strong: rgba(255, 255, 255, .12);
    --dz-overlay-1: rgba(255, 255, 255, .025);
    --dz-overlay-2: rgba(255, 255, 255, .05);
    --dz-overlay-3: rgba(255, 255, 255, .09);
    --dz-text: #e8eaef;
    --dz-text-2: #c5cad5;
    --dz-muted: #9098a9;
    --dz-muted-2: #6d7587;
    --dz-faint: #4d5465;
    --dz-accent: #3366ff;
    --dz-accent-text: #6f93ff;
    --dz-shadow: 0 14px 34px -18px rgba(0, 0, 0, .75);
    --dz-chart-grid: rgba(255, 255, 255, .05);
    --dz-chart-label: rgba(148, 163, 184, .45);
    color-scheme: dark;
}

html:not(.dark) {
    --dz-bg: #f3f4f6;
    --dz-surface: #ffffff;
    --dz-surface-2: #ffffff;
    --dz-sunken: #f8fafc;
    --dz-border: #e5e7eb;
    --dz-border-strong: #d1d5db;
    --dz-overlay-1: rgba(15, 23, 42, .025);
    --dz-overlay-2: rgba(15, 23, 42, .045);
    --dz-overlay-3: rgba(15, 23, 42, .08);
    --dz-text: #0f172a;
    --dz-text-2: #334155;
    --dz-muted: #475569;
    --dz-muted-2: #64748b;
    --dz-faint: #94a3b8;
    --dz-accent-text: #1f47f5;
    --dz-shadow: 0 12px 32px -16px rgba(15, 23, 42, .2);
    --dz-chart-grid: rgba(15, 23, 42, .06);
    --dz-chart-label: rgba(71, 85, 105, .7);
    color-scheme: light;
}

body { background-color: var(--dz-bg); color: var(--dz-text); }

/* ── Form controls ───────────────────────────────────────────────── */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not(.sr-only), select, textarea {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    border: 1px solid var(--dz-border-strong) !important;
    border-radius: .5rem !important;
    background-color: var(--dz-sunken) !important;
    padding: .5rem .75rem !important;
    font-size: .875rem !important;
    color: var(--dz-text) !important;
    width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--dz-faint) !important; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: right .65rem center !important;
    background-size: 1rem !important; padding-right: 2.25rem !important; cursor: pointer;
}
input:focus, select:focus, textarea:focus {
    outline: none !important; border-color: var(--dz-accent) !important;
    box-shadow: 0 0 0 3px rgba(51, 102, 255, .2) !important;
}
.dz-plain { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }

/* ── Building blocks for the new pages ───────────────────────────── */
.dz-card { background: var(--dz-surface); border: 1px solid var(--dz-border); border-radius: .75rem; box-shadow: var(--dz-shadow); }
.dz-muted { color: var(--dz-muted); }
.dz-nav-link { display: flex; align-items: center; gap: .75rem; border-radius: .5rem; padding: .55rem .65rem; color: var(--dz-text-2); transition: color .15s, background-color .15s; }
.dz-nav-link:hover { color: var(--dz-text); background: var(--dz-overlay-2); }
.dz-nav-link[aria-current=page] { color: var(--dz-accent-text); background: rgba(51, 102, 255, .1); }
.dz-nav-link.is-disabled { color: var(--dz-faint); cursor: default; }
.dz-nav-link.is-disabled:hover { background: transparent; color: var(--dz-faint); }
.dz-nav-heading { margin: 1.25rem .65rem .35rem; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dz-muted-2); }

.dz-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.dz-switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; width: 100% !important; }
.dz-switch input:disabled { cursor: not-allowed; }
.dz-switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--dz-overlay-3); box-shadow: inset 0 0 0 1px var(--dz-border); transition: background .2s; }
.dz-switch .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .3); transition: transform .2s; }
.dz-switch input:checked ~ .track { background: var(--dz-accent); box-shadow: none; }
.dz-switch input:checked ~ .knob { transform: translateX(20px); }
.dz-switch input:focus-visible ~ .track { outline: 2px solid var(--dz-accent-text); outline-offset: 2px; }
.dz-switch input:disabled ~ .track, .dz-switch input:disabled ~ .knob { opacity: .5; }

/* Older pages use small h1s; give every page title the same weight as the new pages. */
main h1.text-lg, main h1.text-xl { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -.02em; }
@media (min-width: 640px) { main h1.text-lg, main h1.text-xl { font-size: 2.25rem; line-height: 2.5rem; } }

/* ── Legacy class mapping: surfaces ─────────────────────────────── */
html .bg-\[\#111320\] { background-color: var(--dz-bg); }
html .bg-\[\#161827\], html .bg-slate-900 { background-color: var(--dz-surface); }
html .rounded-xl.bg-\[\#161827\], html .rounded-2xl.bg-\[\#161827\] { box-shadow: var(--dz-shadow); }
html .bg-\[\#0d0f1c\], html .bg-\[\#0f172a\], html .bg-\[\#0c0f1c\], html .bg-\[\#0a0c18\] { background-color: var(--dz-sunken); }
html .bg-\[\#0a0d20\], html .bg-\[\#0f0d08\] { background-color: var(--dz-surface); box-shadow: var(--dz-shadow); }
html .bg-\[\#1a1d2e\], html .bg-\[\#1e2235\], html .bg-slate-800 { background-color: var(--dz-surface-2); }
html .bg-\[\#0d0f1c\]\/95 { background-color: var(--dz-surface-2); }
html .bg-white\/\[0\.015\], html .bg-white\/\[0\.02\], html .bg-white\/\[0\.03\] { background-color: var(--dz-overlay-1); }
html .bg-white\/5 { background-color: var(--dz-overlay-2); }
html .bg-white\/10 { background-color: var(--dz-overlay-3); }
html .hover\:bg-white\/\[0\.02\]:hover, html .hover\:bg-white\/\[0\.03\]:hover { background-color: var(--dz-overlay-1); }
html .hover\:bg-white\/5:hover, html .hover\:bg-white\/\[0\.06\]:hover { background-color: var(--dz-overlay-2); }
html .hover\:bg-white\/10:hover, html .hover\:bg-slate-700:hover, html .hover\:bg-slate-800:hover { background-color: var(--dz-overlay-3); }

/* ── Legacy class mapping: borders ──────────────────────────────── */
html .border-white\/5, html .border-white\/\[0\.06\], html .border-white\/\[0\.04\] { border-color: var(--dz-border); }
html .border-white\/10, html .border-white\/20, html .border-slate-800, html .border-slate-700, html .border-slate-600\/50 { border-color: var(--dz-border-strong); }
html .divide-white\/5 > :not([hidden]) ~ :not([hidden]),
html .divide-white\/\[0\.03\] > :not([hidden]) ~ :not([hidden]),
html .divide-white\/\[0\.04\] > :not([hidden]) ~ :not([hidden]) { border-color: var(--dz-border); }
html .hover\:border-white\/10:hover, html .hover\:border-slate-500:hover { border-color: var(--dz-border-strong); }
html .ring-white\/5 { --tw-ring-color: var(--dz-border); }

/* ── Legacy class mapping: text ─────────────────────────────────── */
html .text-slate-100, html .text-slate-200, html .text-gray-200, html .text-\[\#EDEDEC\] { color: var(--dz-text); }
html .text-slate-300, html .text-gray-300 { color: var(--dz-text-2); }
html .text-slate-400, html .text-gray-400 { color: var(--dz-muted); }
html .text-slate-500 { color: var(--dz-muted-2); }
html .text-slate-600, html .text-slate-700, html .text-slate-800 { color: var(--dz-faint); }
html .hover\:text-slate-100:hover, html .hover\:text-slate-200:hover, html .hover\:text-slate-300:hover { color: var(--dz-text); }
html .hover\:text-slate-400:hover { color: var(--dz-muted); }
html .placeholder-slate-600::placeholder { color: var(--dz-faint); }

/* ── Light theme: deepen accent text so it stays readable on white ─ */
html:not(.dark) .text-emerald-300, html:not(.dark) .text-emerald-400 { color: #047857; }
html:not(.dark) .text-green-400 { color: #15803d; }
html:not(.dark) .text-red-300, html:not(.dark) .text-red-400 { color: #dc2626; }
html:not(.dark) .text-rose-300, html:not(.dark) .text-rose-400, html:not(.dark) .text-rose-500 { color: #e11d48; }
html:not(.dark) .text-amber-300, html:not(.dark) .text-amber-400 { color: #b45309; }
html:not(.dark) .text-amber-400\/70 { color: rgba(180, 83, 9, .85); }
html:not(.dark) .text-yellow-400 { color: #a16207; }
html:not(.dark) .text-orange-400 { color: #c2410c; }
html:not(.dark) .text-brand-300, html:not(.dark) .text-brand-400 { color: #1f47f5; }
html:not(.dark) .text-blue-300, html:not(.dark) .text-blue-400 { color: #1d4ed8; }
html:not(.dark) .text-sky-400 { color: #0369a1; }
html:not(.dark) .text-cyan-400 { color: #0e7490; }
html:not(.dark) .text-indigo-300, html:not(.dark) .text-indigo-400 { color: #4338ca; }
html:not(.dark) .text-violet-300, html:not(.dark) .text-violet-400, html:not(.dark) .text-purple-400 { color: #6d28d9; }
html:not(.dark) .text-violet-400\/70 { color: rgba(109, 40, 217, .85); }
html:not(.dark) .hover\:text-brand-300:hover, html:not(.dark) .hover\:text-brand-400:hover { color: #1834e1; }
