/* DNZ Software panel. Same tokens as the corporate site (sites/corporate/assets/site.css). */
:root {
  --bg: #F4F4F3;
  --card: #FFFFFF;
  --ink: #1C1917;
  --text: #44403C;
  --muted: #78716C;
  --line: #E7E5E4;
  --accent: #CC4709;  /* header orange, used for every accent */
  --accent-ink: #CC4709;
  --header: #CC4709;
  --ok: #15803D;
  --ok-bg: #F0FDF4;
  --warn: #9A3412;
  --warn-bg: #FFF7ED;
  --err: #B91C1C;
  --radius: 20px;
  --gutter: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --card: #1C1917;
    --ink: #FAFAF9;
    --text: #D6D3D1;
    --muted: #A8A29E;
    --line: #2E2A27;
    --accent-ink: #FFA066;
    --ok: #4ADE80;
    --ok-bg: #12261A;
    --warn: #FDBA74;
    --warn-bg: #2A1A0E;
    --err: #F87171;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
h1 { margin: 0 0 8px; color: var(--ink); font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; letter-spacing: -0.01em; }
h2 { margin: 0 0 14px; color: var(--ink); font-size: 19px; letter-spacing: -0.005em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.block { display: block; }
.lead { margin: 0 0 28px; font-size: 18px; color: var(--muted); }

/* Header */
header { background: var(--header); color: #FFFFFF; }
header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; } /* same as the sites */
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.mark { width: 34px; height: 34px; }
.mark g { stroke: #FFFFFF; }
.mark circle { fill: var(--header); }
.wordmark { display: inline-flex; align-items: baseline; font-size: 23px; letter-spacing: 0.12em; line-height: 1; }
.wordmark b { font-weight: 700; color: #FFFFFF; }
.wordmark span { font-weight: 400; color: rgba(255, 255, 255, .86); }
header nav { flex: 1; overflow-x: auto; }
header nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; justify-content: center; }
header nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; white-space: nowrap;
  border-radius: 999px; color: #FFFFFF; text-decoration: none; font-size: 15px;
}
header nav a:hover, header nav a[aria-current="page"] { background: rgba(255, 255, 255, .16); }
header :focus-visible { outline-color: #FFFFFF; }
.account-btn {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: #FFFFFF; color: #1C1917; font: inherit; font-size: 15px; font-weight: 700;
}
.account-btn:hover { background: #1C1917; color: #FFFFFF; }
.logout { margin: 0; flex: none; }

/* Main and footer */
.app-main { flex: 1; padding-top: 40px; padding-bottom: 56px; }
footer { padding: 24px 0 32px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Cards and layout */
.card { background: var(--card); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card > p:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid .card { margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.stat .num { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--ink); }
a.stat:hover { outline: 1px solid var(--line); }
@media (max-width: 760px) { .grid, .grid.three { grid-template-columns: minmax(0, 1fr); } }


/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #FFFFFF; }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err); }
.btn.block { width: 100%; }
.btn.disabled { opacity: .45; cursor: default; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.form.narrow { max-width: 440px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 14px; font-weight: 700; color: var(--ink); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .filters input, .filters select {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
.field input:focus, .field select:focus, .filters input:focus, .filters select:focus { outline: none; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field small { font-size: 13px; color: var(--muted); }
.field small.err { color: var(--err); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 16px; }
.filters input { flex: 1 1 260px; width: auto; }
.filters select { flex: 0 1 180px; width: auto; }

/* Notices and pills */
.notice { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; font-size: 15px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--bg); color: var(--muted); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.role-admin { color: var(--accent-ink); }
.pill.role-reseller { color: var(--ink); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14px; font-weight: 700; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td a { color: var(--ink); font-weight: 700; text-decoration: none; }
td a:hover { color: var(--accent-ink); }
.empty { margin: 0; padding: 28px; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crumb { margin: 0 0 10px; }
.crumb a { text-decoration: none; }


/* Auth pages */
body.auth header .wrap { justify-content: center; }
.auth-main { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: clamp(32px, 7vw, 72px) var(--gutter); }
.auth-card { width: 100%; max-width: 440px; margin: 0; }
.auth-card .sub { margin: 0 0 22px; color: var(--muted); }
.auth-card .alt { margin: 20px 0 0; text-align: center; font-size: 15px; }
body.auth footer .wrap { justify-content: center; }

@media (max-width: 640px) {
  header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; gap: 8px; }
  header nav { order: 3; flex-basis: 100%; }
  header nav ul { justify-content: flex-start; }
  .logout { margin-left: auto; }
}

/* Price editor */
.card-head.pad { padding: 22px 24px 0; margin: 0; }
table.prices td { vertical-align: middle; }
table.prices input {
  width: 100%; max-width: 220px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; text-align: right;
}
table.prices input:focus { outline: none; border-color: var(--ink); }
table.prices input[aria-invalid="true"] { border-color: var(--err); }
table.prices small.err { display: block; color: var(--err); font-size: 13px; margin-top: 4px; }

/* Checkout */
.choice { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.choice a {
  flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.choice a strong { color: var(--ink); }
.choice a[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
table.summary { width: 100%; max-width: 520px; border-collapse: collapse; margin: 6px 0 14px; }
table.summary th, table.summary td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
table.summary th { text-align: left; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }
table.summary td { text-align: right; color: var(--ink); }
table.summary tr.total th, table.summary tr.total td { font-weight: 700; color: var(--ink); font-size: 17px; border-bottom: 0; }
.soon-title { margin: 22px 0 6px; font-size: 17px; color: var(--ink); }
table.prices td.reseller input { background: var(--card); border-style: dashed; }
table.prices input { max-width: 150px; }

/* Reseller application */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 16px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea[aria-invalid="true"] { border-color: var(--err); }
.check.terms { align-items: flex-start; margin: 8px 0 4px; line-height: 1.45; }
.check.terms input { margin-top: 2px; flex: none; }
small.err.block { display: block; color: var(--err); font-size: 13px; }
.choice.compact a { flex: 0 1 auto; flex-direction: row; gap: 8px; padding: 10px 16px; }
dl.details { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; color: var(--ink); word-break: break-word; }

/* Discount codes */
.coupon { margin: 6px 0 4px; max-width: 420px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; text-transform: uppercase; }
.coupon-row input[aria-invalid="true"] { border-color: var(--err); }
.ok-text { color: var(--ok); font-size: 13px; }
fieldset.products { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
fieldset.products legend { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
fieldset.products legend em { font-weight: 400; font-style: normal; color: var(--muted); }
details.limits { margin: 0 0 10px; font-size: 15px; }
details.limits summary { cursor: pointer; color: var(--accent-ink); }
.warn-link { color: var(--warn); font-weight: 400; }

/* Licenses */
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: #FEF2F2; color: #B91C1C; }
.license-key { margin: 4px 0 16px; }
.license-key code, h1 code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .04em; color: var(--ink); user-select: all; }
dl.facts { display: grid; gap: 8px; margin: 0 0 16px; }
dl.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
dl.facts dt { color: var(--muted); font-size: 14px; }
dl.facts dd { margin: 0; }
fieldset.plans { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
fieldset.plans legend { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.check.plan { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.check.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* NotaSehpam song text (admin, read-only) */
pre.song { white-space: pre-wrap; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55; margin: 0; overflow-x: auto; }
