/* app.css — WebID Social. Telefonul întâi (375 px), apoi lărgit de la 720 px. Culorile casei (fundalul cald, verdele WebID). */
:root {
  --bg: #F7F5F0; --card: #fff; --ink: #2b2622; --muted: #6f675f; --line: #E4E1D8;
  --brand: #0F6E56; --brand-ink: #fff; --brand-soft: #E3F1EC;
  --warn: #8a5a00; --warn-bg: #FFF4DB; --err: #a3271f; --err-bg: #FDECEA; --ok: #0F6E56; --ok-bg: #E3F1EC;
  --r: 12px; --gap: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.4rem; line-height: 1.25; margin: 4px 0 8px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 112px; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.right { text-align: right; display: block; }
.lead { color: var(--muted); margin: 0 0 var(--gap); }

/* capul + filele */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 700; flex: none; }
.top-r { display: flex; gap: 12px; flex: none; }
.top-r a { text-decoration: none; }
.tabs { display: flex; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.tabs a { flex: 1; text-align: center; padding: 12px 4px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }

/* blocuri */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 var(--gap); }
.card.narrow { max-width: 440px; margin: 40px auto; }
fieldset.card { min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 8px; float: left; width: 100%; }
legend + * { clear: both; }
.stack > * + * { margin-top: 0; }
.note { display: block; border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: var(--brand-soft); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.err { background: var(--err-bg); color: var(--err); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.flash { border-radius: 8px; padding: 10px 12px; margin: 0 0 var(--gap); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--err-bg); color: var(--err); }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--muted); white-space: nowrap; }
.pill.warn, .pill.s-error { background: var(--err-bg); color: var(--err); }
.pill.s-published { background: var(--ok-bg); color: var(--ok); }
.pill.s-publishing, .pill.s-processing { background: var(--warn-bg); color: var(--warn); }

/* butoane: ținte de cel puțin 44 px */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--brand);
       background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0 8px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.sticky-act { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(247,245,240,.96); border-top: 1px solid var(--line); z-index: 6; }
.sticky-act .btn { max-width: 688px; margin: 0 auto; display: flex; }

/* câmpuri */
.fld { display: block; margin: 0 0 14px; border: 0; padding: 0; }
.fld > span, .fld > legend { display: block; font-weight: 600; margin-bottom: 6px; }
.fld > small { display: block; margin-top: 4px; }
input[type=url], input[type=text], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 44px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.check, .switch { display: flex; align-items: center; gap: 10px; min-height: 44px; flex-wrap: wrap; }
.check input, .switch input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; margin: 0; }
.check.off { color: var(--muted); }
.check .off-note { flex-basis: 100%; margin: -10px 0 0 32px; }
.sub { margin: 8px 0 0 12px; padding-left: 12px; border-left: 3px solid var(--line); }
.sub small { display: block; margin: -8px 0 6px 32px; }
.consent { color: var(--muted); margin: 8px 0 0; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 48px; cursor: pointer; }
.chip input { width: 20px; height: 20px; accent-color: var(--brand); margin: 0; }
.chip small { flex-basis: 100%; color: var(--muted); font-size: .75rem; line-height: 1.2; }
.chip.off { opacity: .6; cursor: default; }
.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.preview { margin: 0 0 14px; }
.preview video { display: block; width: 100%; max-height: 60vh; background: #000; border-radius: 10px; margin-top: 4px; }
.acct { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.acct img { border-radius: 50%; background: var(--line); }

/* rețelele */
.nets, .queue, .list { list-style: none; margin: 0; padding: 0; }
.net, .qi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0 0 10px; }
.net.is-on { border-color: var(--brand); }
.net.st-warn, .net.st-reconnect { border-color: #e2b04a; }
.net-head { display: flex; gap: 12px; align-items: flex-start; }
.net-txt { display: flex; flex-direction: column; min-width: 0; }
.net-txt .muted { overflow-wrap: anywhere; }
.net-act { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.net-act form { margin: 0; }
.net-ico { width: 28px; height: 28px; border-radius: 8px; flex: none; display: inline-block; background: var(--line); }
.ni-tiktok { background: #111; } .ni-instagram { background: linear-gradient(45deg,#f09433,#dc2743,#bc1888); }
.ni-facebook { background: #1877F2; } .ni-youtube { background: #FF0000; } .ni-linkedin { background: #0A66C2; } .ni-gbp { background: #4285F4; }
.row-link { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0 0 8px; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; }
.qi-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qi-head time { margin-left: auto; }
.qi-text { margin: 8px 0; overflow-wrap: anywhere; }
.qi-act { display: flex; gap: 8px; flex-wrap: wrap; }

@media (min-width: 720px) {
  .wrap { padding-top: 24px; }
  .chips { grid-template-columns: repeat(3, 1fr); }
  .net { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .net .note { flex-basis: 100%; }
  .net { flex-wrap: wrap; }
  .net-act { margin-top: 0; }
}

/* fișierul din telefon */
.lbl { display: block; font-weight: 600; margin-bottom: 8px; }
.block { display: block; margin: 8px 0 12px; }
.pick { cursor: pointer; }
.url-box { margin-top: 10px; }
.url-box summary { cursor: pointer; color: var(--muted); min-height: 32px; display: flex; align-items: center; }
.url-box input { margin-top: 6px; }
.url-box small { display: block; margin-top: 4px; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.preview img { display: block; max-width: 100%; max-height: 60vh; border-radius: 10px; margin-top: 4px; }
