:root {
  --paper: #FAF8F4; --surface: #FFFFFF; --ink: #2E2A26; --muted: #7A6F63;
  --brown: #412D1E; --gold: #99762A; --line: #E7E0D6;
  --ok: #4A6741; --warn: #A66321; --err: #8C2F2F;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.55 'Segoe UI', system-ui, -apple-system, sans-serif;
}
code, .mono { font-family: Consolas, 'SF Mono', monospace; }

/* bara de sus */
.topbar {
  background: var(--brown); color: #fff;
  display: flex; align-items: center; gap: 2rem; padding: 0 1.25rem; min-height: 56px;
}
.topbar .brand img { display: block; }
.topbar nav { display: flex; gap: 1.25rem; flex: 1; }
.topbar nav a {
  color: #fff; text-decoration: none; padding: 1rem 0.15rem; font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
.topbar nav a.activ, .topbar nav a:hover { border-bottom-color: var(--gold); }
.topbar .cont { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.btn-text { background: none; border: none; color: var(--gold); cursor: pointer; font: inherit; padding: 0; }
.btn-text:hover { text-decoration: underline; }

/* continut */
.continut { max-width: 1100px; margin: 2rem auto; padding: 0 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.5rem; margin-bottom: 1.5rem;
}
h1 { font-size: 1.4rem; font-weight: 600; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.75rem; }
a { color: var(--gold); }

/* flash */
.flash { max-width: 1100px; margin: 1rem auto -1rem; padding: 0.7rem 1rem; border-radius: 6px; border: 1px solid; }
.flash-ok { background: #eef3ec; border-color: var(--ok); color: var(--ok); }
.flash-err { background: #f7ecec; border-color: var(--err); color: var(--err); }

/* formulare */
label, th {
  text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); font-weight: 600;
}
label { display: block; margin: 0 0 0.3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; height: 40px; padding: 0 0.7rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
}
textarea { height: auto; min-height: 90px; padding: 0.6rem 0.7rem; }
input:focus, select:focus, textarea:focus, button:focus, a:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.camp { margin-bottom: 1.1rem; }
.camp .eroare { color: var(--err); font-size: 0.85rem; margin-top: 0.25rem; text-transform: none; letter-spacing: 0; }
.rand { display: flex; gap: 1rem; flex-wrap: wrap; }
.rand > .camp { flex: 1; min-width: 200px; }

/* butoane */
.btn {
  display: inline-block; padding: 0.55rem 1.2rem; font: inherit; cursor: pointer;
  border-radius: 4px; text-decoration: none;
  background: transparent; color: var(--gold); border: 1px solid var(--gold);
}
.btn:hover { background: rgba(153, 118, 42, 0.08); }
.btn-primar { background: var(--brown); color: #fff; border-color: var(--brown); }
.btn-primar:hover { background: #55402f; }
.btn-pericol { color: var(--err); border-color: var(--err); }

/* tabele */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); }
tbody tr { border-left: 3px solid transparent; }
tbody tr:hover { border-left-color: var(--gold); background: #fdfbf7; }
td.mono { font-family: Consolas, 'SF Mono', monospace; }

/* pastile de status */
.pastila {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 3px; font-size: 0.8rem;
  border: 1px solid var(--line); color: var(--muted);
}
.pastila-publicata { background: var(--ok); border-color: var(--ok); color: #fff; }
.pastila-corectata { background: transparent; border-color: var(--warn); color: var(--warn); }

/* antet pagina cu actiuni */
.antet { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.antet h1 { margin: 0; }

/* banda de certificat (folosita din Plan 2b, definita aici) */
.certificat {
  background: var(--brown); color: #fff; border-radius: 6px; padding: 1.1rem 1.4rem; margin-bottom: 1.5rem;
}
.certificat .cod { font-family: Consolas, monospace; font-size: 1.9rem; letter-spacing: 0.15em; }
.certificat .meta { color: #d9cfc2; font-size: 0.85rem; }
.certificat .hash {
  font-family: Consolas, monospace; font-size: 12px; color: var(--gold);
  opacity: 0.85; overflow-x: auto; white-space: nowrap; margin-top: 0.5rem;
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; padding: 0.5rem 1rem; gap: 0.5rem 1.25rem; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; }
  .continut { margin-top: 1.25rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .topbar nav a { transition: background 120ms ease, border-color 120ms ease; }
}

/* editor etichete */
.editor-coloane { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.editor-stare { position: sticky; top: 1.5rem; }
.editor-preview { margin-top: 1rem; }
.preview-cadru { width: 100%; overflow: hidden; }
.preview-cadru iframe { width: 360px; height: 600px; border: 1px solid var(--line); background: #fbf9f6; transform-origin: top left; display: block; }
.depaseste { color: #a12b2b; font-weight: 600; }
.ajutor { color: var(--muted); font-size: .88rem; }
.lista-ingrediente { list-style: none; padding: 0; margin: 0; max-height: 340px; overflow-y: auto; }
.lista-ingrediente li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.probleme { margin: .5rem 0; padding-left: 1.1rem; font-size: .88rem; color: var(--warn); }
.probleme li { margin-bottom: .3rem; }
.bifa { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 400; color: var(--ink);
  display: flex; gap: .5rem; align-items: center; margin: 0 0 .35rem; }
.bifa input { width: auto; height: auto; margin: 0; flex: none; }
.galerie-optiune img { width: 64px; height: auto; border: 1px solid var(--line); flex: none; }
.limba { border: 1px solid var(--line); border-radius: 4px; padding: .6rem 1rem; margin-bottom: .75rem; }
.limba-antet { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.limba-antet .bifa { margin: 0; font-weight: 600; }
.limba-campuri { margin-top: .75rem; }
html.js .limba:not(.activa) .limba-campuri { display: none; }
.doua-coloane { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
#nutritie > .camp { min-width: 140px; }
.nutritie-altele { margin-top: .5rem; }
.nutritie-altele summary { cursor: pointer; color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.stare-lista:empty { display: none; }
.stare-gata { color: var(--ok); }
[hidden] { display: none !important; }
@media (max-width: 720px) { .doua-coloane { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .editor-coloane { grid-template-columns: 1fr; } .editor-stare { position: static; } }

.snippet { background: var(--code-bg, #F1E9E4); border: 1px solid var(--line); border-radius: 4px;
  padding: 1rem; font-family: Consolas, monospace; font-size: .9rem; white-space: pre-wrap; overflow-x: auto; }
