[hidden] { display: none !important; }
:root {
  --bg: #f2f4f5;
  --card: #ffffff;
  --text: #002f34;
  --muted: #5b7275;
  --line: #d8dfe0;
  --accent: #002f34;
  --accent-text: #ffffff;
  --ok: #1b7f4b;
  --bad: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1718;
    --card: #182325;
    --text: #e6eeee;
    --muted: #93a7a9;
    --line: #2c3b3d;
    --accent: #23e5db;
    --accent-text: #002f34;
    --ok: #4cd38a;
    --bad: #ff7a6b;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
nav { display: flex; gap: 4px; }
nav button { border: 0; background: none; padding: 8px 10px; border-radius: 8px; color: var(--muted); }
nav button.active { background: var(--bg); color: var(--text); font-weight: 600; }
main { max-width: 680px; margin: 0 auto; padding: 16px; }
main.narrow { max-width: 380px; padding-top: 15vh; }
h1 { font-size: 24px; } h2 { font-size: 18px; margin: 0 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; position: relative; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 15px; }
input, textarea, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
label.check input { width: auto; margin: 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 14px; padding: 8px 12px; }
legend { font-weight: 600; font-size: 14px; }
fieldset label.check { margin-bottom: 4px; }
.row { display: flex; gap: 12px; } .row label { flex: 1; } .row label.small { flex: 0 0 110px; }
button, .button { display: inline-block; padding: 11px 18px; font: inherit; font-weight: 600; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; }
.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.mic { width: 100%; margin: -4px 0 14px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.mic .dot, .mic .bars { display: none; }
.mic.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.mic.on .dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
.mic.on .bars { display: flex; align-items: center; gap: 3px; height: 22px; }
.mic .bars i { display: block; width: 4px; height: 22px; border-radius: 2px; background: #fff; transform: scaleY(.2); transition: transform 80ms linear; }
.mic.on:not(.live).speaking .bars i { animation: talk .5s ease-in-out infinite alternate; }
.mic.on:not(.live).speaking .bars i:nth-child(2) { animation-delay: .1s; }
.mic.on:not(.live).speaking .bars i:nth-child(3) { animation-delay: .2s; }
.mic.on:not(.live).speaking .bars i:nth-child(4) { animation-delay: .3s; }
.mic.on:not(.live).speaking .bars i:nth-child(5) { animation-delay: .15s; }
.mic.hearing, .mic.speaking { box-shadow: 0 0 0 4px rgba(192, 57, 43, .25); }
@keyframes blink { 50% { opacity: .25; } }
@keyframes talk { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
button:disabled { opacity: .6; cursor: wait; }
form > .primary { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .primary { flex: 1; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: var(--bad); } .ok { color: var(--ok); font-weight: 600; }
pre { white-space: pre-wrap; font-size: 14px; background: var(--bg); padding: 10px; border-radius: 8px; }
code { word-break: break-all; }
.banner { background: #ffce32; color: #002f34; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.banner a { color: inherit; font-weight: 700; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 14px; }
.thumb { position: relative; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; line-height: 26px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.count { float: right; font-weight: 400; color: var(--muted); } .count.bad { color: var(--bad); }
.dropdown { position: absolute; left: 0; right: 0; z-index: 3; background: var(--card); border: 1px solid var(--line); border-radius: 8px; max-height: 260px; overflow: auto; font-weight: 400; }
.dropdown:empty { display: none; }
.dropdown div { padding: 10px 12px; cursor: pointer; } .dropdown div:hover { background: var(--bg); }
.dropdown small { color: var(--muted); }
.adcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: var(--bg); }
.adcard .main { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #000; }
.adcard .strip { display: flex; gap: 6px; padding: 6px; overflow-x: auto; }
.adcard .strip img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; cursor: pointer; }
.adcard .body { padding: 12px 14px; }
.adcard .t { font-size: 20px; font-weight: 500; margin: 0 0 6px; }
.adcard .p { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.adcard .meta { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.adcard .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.adcard .chips span { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 13px; }
.adcard .d { white-space: pre-wrap; font-size: 15px; }
.cost { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 15px; }
.cost div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.cost div span:last-child { font-weight: 600; text-align: right; }
.cost .note { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.ad { display: flex; gap: 12px; align-items: flex-start; }
.ad img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; }
.tag { display: inline-block; font-size: 13px; padding: 2px 8px; border-radius: 99px; background: var(--bg); margin: 4px 0; }

.field-title { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; margin-bottom: 12px; border: 2px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--text); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop svg { color: var(--accent); }
.drop-title { font-size: 16px; font-weight: 700; }
.drop-sub { font-size: 13px; font-weight: 400; color: var(--muted); }
.recognized { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 15px; }
.recognized ul { margin: 8px 0; padding-left: 20px; }
.recognized small { color: var(--muted); }
.revise { border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px 4px; margin-bottom: 16px; }
.revise .actions { margin-bottom: 10px; }
.revise .mic, .revise .primary { flex: 1; margin: 0; }
.publish { width: 100%; margin-top: 10px; }
#tab-ads h2 { margin-top: 8px; }
.ad .btns { display: flex; gap: 8px; margin-top: 8px; }
.ad .btns button { padding: 7px 12px; font-size: 14px; }
#preview > .actions button { flex: 1; }
.mic.busy { opacity: .8; cursor: progress; }
.mic.busy .dot { display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; background: none; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- navigare cu iconițe ---------- */
nav svg { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sticky-bar { position: sticky; bottom: 0; z-index: 1; margin: 0 -16px -16px; padding: 12px 16px 16px; background: var(--card); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.sticky-bar .actions { margin-bottom: 8px; }
.sticky-bar .publish { margin-top: 0; }
.sticky-bar > .primary { width: 100%; }
#preview .sticky-bar .actions button { flex: 1; }

/* ---------- statistici ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 24px; font-weight: 800; margin-top: 2px; line-height: 1.2; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.wide { grid-column: 1 / -1; }
.month { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.month .head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: 6px; }
.month .head span { font-size: 18px; }
.month .line { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; color: var(--muted); }
.month .line b { color: var(--text); font-weight: 600; }

/* ---------- telefon ---------- */
@media (max-width: 700px) {
  body { font-size: 16px; }
  header { padding: calc(8px + env(safe-area-inset-top)) 14px 8px; }
  header strong { font-size: 17px; }
  nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
  nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font-size: 11px; font-weight: 600; border-radius: 10px; }
  nav button.active { background: none; color: var(--accent); }
  nav svg { display: block; }
  main { padding: 10px 10px calc(84px + env(safe-area-inset-bottom)); }
  .card { padding: 14px; border-radius: 14px; margin-bottom: 12px; }
  .banner { font-size: 14px; padding: 10px 12px; margin-bottom: 10px; }
  input, textarea, select { font-size: 16px; padding: 12px; }
  button, .button { padding: 13px 16px; }
  .hint { font-size: 13px; }
  .drop { padding: 18px 12px; }
  .thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .sticky-bar { bottom: calc(62px + env(safe-area-inset-bottom)); margin: 0 -14px -14px; padding: 10px 14px 14px; border-radius: 0 0 14px 14px; box-shadow: 0 -6px 16px rgba(0, 0, 0, .06); }
  .adcard .t { font-size: 18px; }
  .adcard .p { font-size: 22px; }
  .row label.small { flex-basis: 96px; }
}
