/* Novaram DNS admin - Novaram portal palette (brand blue rgb(0,161,228); dark navy chrome as in the billing/migrate portals) */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/roboto-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/roboto-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/roboto-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/roboto-latin-ext-400.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/roboto-latin-ext-500.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/roboto-latin-ext-700.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy: #0a0f19; --navy-2: #151d2e; --navy-3: #1d2840;
  --brand: #0a86c8; --brand-2: #0a73b5; --brand-3: #3cb4ec; --brand-ink: #ffffff;
  --red: #c93434;
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f7fafd; --fg: #1b2230; --muted: #5d6779; --line: #e1e5ec;
  --ok: #1b8a4c; --ok-bg: #e5f6ec; --bad: #c93434; --bad-bg: #fdeaea; --warn: #9a6200; --warn-bg: #fdf3e1;
  --pending: #0a86c8; --pending-bg: #e6f4fc; --info-bg: #e6f4fc;
  --focus: 0 0 0 3px rgba(10, 134, 200, .3);
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 30, 54, .06), 0 6px 20px -10px rgba(16, 30, 54, .18);
}
:root { color-scheme: light; }
/* Theme: users choose auto (follow the OS), light or dark under Profile -> <html data-theme="..."> */
:root[data-theme="dark"] {
  --bg: #0c0f14; --surface: #151a22; --surface-2: #1a2029; --fg: #e6e9ef; --muted: #8a94a7; --line: #252c37;
  --brand: #3cb4ec; --brand-2: #0a8fd0; --brand-ink: #06121c;
  --ok: #35c97a; --ok-bg: #12301c; --bad: #ff5d5d; --bad-bg: #361616; --warn: #f5b041; --warn-bg: #352a12;
  --pending: #3cb4ec; --pending-bg: #132739; --info-bg: #132739; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f14; --surface: #151a22; --surface-2: #1a2029; --fg: #e6e9ef; --muted: #8a94a7; --line: #252c37;
    --brand: #3cb4ec; --brand-2: #0a8fd0; --brand-ink: #06121c;
    --ok: #35c97a; --ok-bg: #12301c; --bad: #ff5d5d; --bad-bg: #361616; --warn: #f5b041; --warn-bg: #352a12;
    --pending: #3cb4ec; --pending-bg: #132739; --info-bg: #132739; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 15px/1.5 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
h1 { font-size: 1.6rem; font-weight: 500; margin: .2rem 0 1.1rem; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; font-weight: 500; margin: 0 0 .9rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { display: block; height: 26px; width: auto; }
.brand-name { font-size: 1.3rem; font-weight: 500; letter-spacing: .01em; }
.brand-product { font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--brand-3); padding-left: .15rem; }
.mainnav { display: flex; gap: .2rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav a { color: rgba(255, 255, 255, .78); padding: .45rem .8rem; border-radius: 6px; white-space: nowrap; font-weight: 500; }
.mainnav a:hover { color: #fff; background: var(--navy-2); text-decoration: none; }
.mainnav a.active { color: #fff; background: var(--navy-3); box-shadow: inset 0 -2px 0 var(--brand-3); }

/* ---------- user menu / avatar ---------- */
.usermenu { position: relative; flex-shrink: 0; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: .55rem; cursor: pointer; padding: .3rem .5rem .3rem .3rem; border-radius: 999px; color: #fff; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--navy-2); }
.usermenu .chev { width: 12px; height: 12px; opacity: .7; }
.usermenu-name { font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; font-size: .85rem; letter-spacing: .03em; color: #fff;
          background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); flex-shrink: 0; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.05rem; box-shadow: none; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: .5rem; }
.usermenu-head { display: flex; gap: .8rem; align-items: center; padding: .6rem .6rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.usermenu-head div { display: flex; flex-direction: column; min-width: 0; }
.usermenu-head .muted { overflow: hidden; text-overflow: ellipsis; }
.role-badge { align-self: flex-start; margin-top: .3rem; font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: var(--pending-bg); padding: .05rem .45rem; border-radius: 4px; }
.usermenu-panel a, .usermenu-panel .menu-item { display: block; width: 100%; text-align: left; padding: .55rem .6rem; border-radius: 6px; color: var(--fg); background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu-panel a:hover, .usermenu-panel .menu-item:hover { background: var(--surface-2); text-decoration: none; }
.usermenu-panel form { margin: 0; }

/* ---------- layout ---------- */
main.content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.6rem 16px 3rem; }
.foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.2rem 16px; display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 1.2rem 0; box-shadow: var(--shadow); }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.bar { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.bar h1 { margin-bottom: .4rem; }
.bar > div { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ---------- guest (login) pages ---------- */
body.guest { background: radial-gradient(1200px 600px at 100% -10%, rgba(0, 161, 228, .14), transparent 60%), radial-gradient(900px 500px at 10% -20%, rgba(10, 111, 209, .12), transparent 60%), #090c12 fixed; }
main.guest-main { flex: 1; width: 100%; max-width: 440px; margin: 0 auto; padding: 8vh 16px 2rem; }
.guest-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: #fff; margin-bottom: 1.8rem; }
.guest-brand:hover { text-decoration: none; }
.guest-brand img { height: 44px; width: auto; }
.guest-brand .brand-name { font-size: 2rem; }
.guest-brand .brand-product { font-size: .85rem; }
body.guest .card { margin-top: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); border: 0; padding: 1.8rem; }
body.guest .card h1 { font-size: 1.4rem; }
body.guest .foot { color: rgba(255, 255, 255, .55); }
body.guest .flash { box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

/* ---------- forms ---------- */
label { display: block; margin: 0 0 .9rem; font-weight: 500; font-size: .92rem; }
input, select { display: block; width: 100%; margin-top: .3rem; padding: .55rem .7rem; font: inherit; font-weight: 400; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover { border-color: #c9ced7; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
button, .button { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; font: inherit; font-weight: 500; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
button:hover, .button:hover { background: var(--surface-2); border-color: #c9ced7; text-decoration: none; }
.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
body.guest .primary, .narrow form > .primary { width: 100%; justify-content: center; padding: .7rem 1rem; }
.danger { color: var(--bad); }
button.danger { border-color: var(--bad); }
button.danger:hover { background: var(--bad); color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 400; }
button.link:hover { text-decoration: underline; background: none; }
button.link.danger { color: var(--bad); }
form.inline { display: inline; }
.row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin-bottom: 1rem; }
.row label { margin: 0; flex: 1 1 240px; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 1rem; }
.filters input, .filters select { width: auto; flex: 1 1 220px; margin: 0; }
.record-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; }
.record-form label { margin: 0; flex: 0 1 auto; }
.record-form label.grow { flex: 1 1 300px; }
.record-form [hidden] { display: none; }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
@media (max-width: 760px) { table.list { display: block; overflow-x: auto; } }
table.list th, table.list td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list th { font-size: .74rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
table.list tbody tr:hover td { background: var(--surface-2); }
table.list td a { font-weight: 500; }
tr.editing td { background: var(--pending-bg) !important; }
tr.bad td { color: var(--bad); }
.actions { white-space: nowrap; text-align: right; }
.actions > * { margin-left: .8rem; }
.mono, code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, "Roboto Mono", monospace; font-size: .88em; }
code { background: var(--surface-2); padding: .05rem .3rem; border-radius: 4px; }
.wrap { word-break: break-all; }
.nowrap { white-space: nowrap; }
pre { white-space: pre-wrap; margin: .6rem 0 0; }

/* ---------- tags / flashes ---------- */
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 500; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ok { color: var(--ok); background: var(--ok-bg); }
.tag.bad { color: var(--bad); background: var(--bad-bg); }
.tag.pending { color: var(--pending); background: var(--pending-bg); }
.tag.off { color: var(--muted); background: var(--surface-2); }
.flash { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1.1rem; border-left: 4px solid currentColor; background: var(--surface); }
.flash.ok { color: var(--ok); background: var(--ok-bg); }
.flash.error { color: var(--bad); background: var(--bad-bg); }
.flash.info { color: var(--brand); background: var(--info-bg); }
.flash.warn { color: var(--warn); background: var(--warn-bg); }
.secret { font-size: 1.25rem; letter-spacing: .08em; background: var(--surface-2); border: 1px dashed var(--line); padding: .7rem; border-radius: 8px; text-align: center; }
.pager { display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; align-items: center; margin: 1.2rem 0; }
.pager-links { display: flex; gap: .4rem; align-items: center; }
.pager-links a, .per-page a { padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pager-links span { padding: 0 .4rem; }
.per-page { display: flex; gap: .3rem; align-items: center; color: var(--muted); font-size: .9rem; }
.per-page a { padding: .25rem .55rem; font-size: .85rem; }
.per-page a.current { background: var(--brand); border-color: var(--brand); color: #fff; }
.bulkbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding: .7rem .9rem; margin-bottom: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 68px; z-index: 5; }
.bulkbar button:disabled { opacity: .45; cursor: not-allowed; }
th.check, td.check { width: 2.2rem; padding-right: 0; }
td.check input, th.check input { width: 1.05rem; height: 1.05rem; margin: .15rem 0 0; accent-color: var(--brand); }
tr.selected td { background: var(--pending-bg) !important; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: .4rem; }
details.help { margin-top: 1rem; color: var(--muted); }
details.help summary { cursor: pointer; color: var(--brand); }

/* ---------- templates / delegation check ---------- */
.section-title { margin-top: 1.6rem; display: flex; align-items: center; gap: .5rem; }
.section-title.add::before, .section-title.remove::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.section-title.add::before { background: var(--ok); }
.section-title.remove::before { background: var(--bad); }
tr.row-add td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
tr.row-remove td { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(197, 22, 22, .45); }
tr.row-remove td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.notes ul, details.help ul { margin: .2rem 0 0; padding-left: 1.2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: .6rem 0 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); color: var(--fg); }
.stat:hover { text-decoration: none; border-color: var(--brand); }
.stat.active { border-color: var(--brand); box-shadow: var(--focus); }
.stat b { display: block; font-size: 1.6rem; font-weight: 500; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.bad b { color: var(--bad); } .stat.warn b { color: var(--warn); } .stat.ok b { color: var(--ok); }
.tag.warn { color: var(--warn); background: var(--warn-bg); }

/* ---------- DNSSEC ---------- */
label.checkline { display: flex; gap: .5rem; align-items: center; font-weight: 400; flex: 1 1 320px; }
label.checkline input { width: auto; margin: 0; accent-color: var(--brand); }
#dnssec h2 { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- version history ---------- */
.row.spaced { margin-top: 1.2rem; }
.version-meta { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.version-meta > div { display: flex; flex-direction: column; }
.version-meta .grow { flex: 1 1 280px; }
table.history { box-shadow: none; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding: .6rem 16px; gap: .6rem 1rem; }
  .mainnav { order: 3; flex-basis: 100%; }
  .usermenu { margin-left: auto; }
  .usermenu-name, .usermenu .chev { display: none; }
  .usermenu-panel { width: min(280px, calc(100vw - 32px)); }
  h1 { font-size: 1.35rem; }
}

/* appearance chooser (profile) */
.theme-choice { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.theme-choice label { display: flex; align-items: center; gap: .4rem; font-weight: 400; margin: 0; cursor: pointer; }
.theme-choice input { width: auto; margin: 0; }
