/* Audvoyz — shared styles for the public site, client accounts and /owner. */
:root {
  --bg: #0b0b0d;
  --surface: #151518;
  --surface-2: #1d1d21;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f5f2;
  --muted: #a3a19b;
  --faint: #6f6d68;
  --gold: #e2b04a;
  --gold-2: #b98a33;
  --gold-ink: #17130a;
  --good: #5cc28a;
  --warn: #e9a23b;
  --bad: #ef6b5b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Outfit", var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font);
  overflow-x: hidden;
}
img, video, audio { max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.gold { color: var(--gold); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
@media (max-width: 719px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) {
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hidden { display: none !important; }

/* --- Buttons & forms --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--text); font: 700 15px/1.2 var(--font); cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { text-decoration: none; border-color: var(--gold-2); }
.btn.primary { background: linear-gradient(180deg, #ecbd5a, var(--gold-2)); color: var(--gold-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(239, 107, 91, .5); color: #ffb3a8; background: transparent; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
label .muted { font-weight: 500; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=url],
select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: #0f0f12; color: var(--text); font: 16px/1.4 var(--font);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-2); outline-offset: 1px; border-color: transparent; }
input[type=file] { width: 100%; color: var(--muted); font-size: 14px; }
input[type=file]::file-selector-button {
  margin-right: 12px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer;
}
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.field + .field { margin-top: 14px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* --- Cards, badges, tables --- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.tight { padding: 14px 16px; }
.card h3 { margin-bottom: .35em; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  letter-spacing: .02em; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap;
}
.badge.good { color: var(--good); border-color: rgba(92, 194, 138, .4); }
.badge.warn { color: var(--warn); border-color: rgba(233, 162, 59, .45); }
.badge.bad { color: var(--bad); border-color: rgba(239, 107, 91, .45); }
.badge.gold { color: var(--gold); border-color: rgba(226, 176, 74, .45); }
.flash { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(226, 176, 74, .1);
  border: 1px solid rgba(226, 176, 74, .35); }
.error { color: #ffb3a8; overflow-wrap: anywhere; }
.flash, .muted, .faint { overflow-wrap: anywhere; }
.list { display: grid; gap: 10px; }
.list-item { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); }
a.list-item:hover { text-decoration: none; border-color: var(--gold-2); }
.list-item .meta { min-width: 0; }
.list-item .meta strong { display: block; overflow-wrap: anywhere; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
audio { width: 100%; height: 44px; }
.player { display: grid; gap: 6px; }
.player .row { justify-content: space-between; }
.kpi { font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bars .stackbar { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px; overflow: hidden; }
.bars .seg-first { background: var(--gold); }
.bars .seg-redo { background: rgba(226, 176, 74, .35); }
.bars .lbl { font-size: 10px; color: var(--faint); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: clip; }
@media (max-width: 400px) { .bars { gap: 3px; } .bars .lbl { font-size: 8px; } }
.grid > *, .split > * { min-width: 0; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--gold); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* --- Public site --- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 13, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 1.25rem var(--display); }
.brand:hover { text-decoration: none; }
.brand img { height: 22px; width: auto; display: block; }
.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a.link { color: var(--muted); font-weight: 700; font-size: 15px; padding: 8px 10px; }
.site-nav a.link:hover { color: var(--text); text-decoration: none; }
@media (max-width: 719px) { .site-nav a.link { display: none; } }
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 520px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(226, 176, 74, .16), transparent 70%); }
.hero .wrap { position: relative; }
.headline-2 { display: block; text-wrap: balance; }
.hero p.lead { font-size: 1.18rem; color: #d6d3cc; max-width: 640px; }
.hero .row { margin-top: 26px; }
.trust { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; font-weight: 600; }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: rgba(226, 176, 74, .14); color: var(--gold); margin-bottom: 12px; }
.plan { display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.popular { border-color: rgba(226, 176, 74, .55); box-shadow: 0 0 0 1px rgba(226, 176, 74, .25), var(--shadow); }
.plan .price { font: 700 2.4rem var(--display); }
.plan .price small { font: 600 1rem var(--font); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan li::before { content: "✓"; color: var(--gold); font-weight: 800; margin-right: 8px; }
.plan .btn { margin-top: auto; }
.ribbon { position: absolute; top: -12px; right: 16px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.site-footer { padding: 32px 0 48px; color: var(--faint); font-size: 14px; border-top: 1px solid var(--line); }
.site-footer .row { justify-content: space-between; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 18px; background: #0f0f12; }
.dropzone.drag { border-color: var(--gold); }
/* Friendlier file picker (the native input stays for accessibility, visually hidden) */
.filepick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filepick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.filepick .pick-name { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.filepick input[type=file]:focus-visible + .btn { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.preview-img { max-height: 220px; border-radius: var(--radius-sm); margin-top: 10px; display: block; }
.total { font: 700 1.4rem var(--display); }

/* --- Owner dashboard --- */
.owner-top { position: sticky; top: 0; z-index: 30; background: rgba(11, 11, 13, .92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); }
.owner-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 10px; }
.owner-nav { display: none; flex-direction: column; gap: 2px; padding: 8px 16px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.owner-nav.open { display: flex; }
.owner-nav a, .owner-nav button { color: var(--text); font-weight: 700; padding: 11px 12px; border-radius: 10px; text-align: left;
  background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.owner-nav a.active { background: var(--surface-2); color: var(--gold); }
.owner-nav a:hover { text-decoration: none; background: var(--surface); }
.menu-btn { min-height: 40px; padding: 6px 14px; }
@media (min-width: 900px) {
  .menu-btn { display: none; }
  .owner-nav { display: flex; flex-direction: row; flex-wrap: wrap; position: static; padding: 0 16px; max-width: 1120px;
    margin: 0 auto; border-bottom: 0; background: none; }
  .owner-nav a, .owner-nav button { padding: 10px 12px; font-size: 14px; }
  .owner-nav form { margin-left: auto; }
}
.owner-main { padding: 22px 0 64px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 0; }
.crumb { display: inline-block; margin-bottom: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
.facts-form .grid { gap: 14px; }
.take { display: grid; gap: 10px; }
.take.done { border-color: rgba(92, 194, 138, .4); }
.rec-btn.recording { background: var(--bad); color: #fff; border-color: transparent; }
.rec-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; }
.voice-option { display: flex; flex-direction: column; gap: 10px; }
.voice-option .btn { margin-top: auto; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--surface-2); border-top-color: var(--gold);
  animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; font-size: 14px; }
.reel { max-height: 520px; border-radius: var(--radius-sm); background: #000; display: block; margin: 0 auto; }
.split { display: grid; gap: 16px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

/* --- Legal pages --- */
.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li + li { margin-top: 6px; }
.legal p, .legal li { color: #d6d3cc; }

/* Work queue */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kpi.bad-text { color: var(--bad); }
.ticket { align-items: flex-start; }
.ticket .meta { display: grid; gap: 2px; flex: 1; }
.ticket-msg { font-size: 14px; overflow-wrap: anywhere; }
.ticket-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; min-width: 140px; }
.ticket-actions select { width: 100%; }
.bill-panel { border-color: rgba(239, 107, 91, .45); }
.bill-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bill-choices form { display: grid; }
.bill-choices .btn { display: block; width: 100%; white-space: normal; text-align: left; padding: 12px 16px; height: auto;
  line-height: 1.35; border-radius: var(--radius-sm); }
.bill-choices .btn small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: inherit; opacity: .78; }
@media (max-width: 560px) {
  .ticket { flex-direction: column; }
  .ticket-actions { width: 100%; flex-direction: row; }
  .ticket-actions > * { flex: 1; }
}
.bill-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.bill-line form { margin: 0; }
.queue-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) {
  .queue-kpis { gap: 8px; }
  .queue-kpis .card { padding: 10px 12px; }
  .queue-kpis .kpi-label { font-size: 12px; }
  .queue-kpis .kpi { font-size: 1.4rem; }
}
