/* Editorul avansat - acelasi sistem vizual ca pagina principala (ugc.css): tokeni, margini din umbre semi-transparente,
   miscare doar pe transform/opacity cu ease-out puternic. Bara de sus si bara laterala sunt mai dense (instrument de lucru). */
:root {
  --bg: #f7f7fa; --panel: #ffffff; --panel-2: #fbfbfd; --ink: #0b0d14; --ink-2: #363c4b; --muted: #6b7183; --faint: #9aa0b1;
  --line: rgba(15, 18, 34, .09); --line-2: rgba(15, 18, 34, .15); --soft: #f3f4f8; --soft-2: #eceef4;
  --accent: #5b5bf7; --accent-ink: #ffffff; --accent-soft: #f0f0ff; --accent-text: #4338ca; --ring: rgba(91, 91, 247, .18);
  --grad: linear-gradient(135deg, #5b5bf7 0%, #7c5cf7 55%, #a855f7 100%);
  --ok: #047857; --ok-soft: #ecfdf5; --ok-line: rgba(4, 120, 87, .2);
  --warn: #b45309; --warn-soft: #fffaeb; --warn-line: rgba(180, 83, 9, .22);
  --bad: #dc2626; --bad-soft: #fef2f2; --bad-line: rgba(220, 38, 38, .22);
  --radius: 14px; --edge: 0 0 0 1px var(--line);
  --shadow: var(--edge), 0 1px 2px rgba(15, 18, 34, .04), 0 6px 16px -6px rgba(15, 18, 34, .07);
  --shadow-lg: 0 0 0 1px rgba(15, 18, 34, .06), 0 24px 64px -12px rgba(15, 18, 34, .3);
  --chrome: #0e1018; --chrome-2: #1a1d29; --chrome-line: rgba(255, 255, 255, .09); --chrome-muted: #9aa0b4;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
::selection { background: rgba(91, 91, 247, .2); }
h1, h2, h3 { font-family: var(--font-display); }
h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.015em; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 14px; letter-spacing: -.005em; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 10px; }
a { color: var(--accent-text); text-underline-offset: 3px; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: 12.5px; }
code { font-family: var(--mono); background: var(--soft); box-shadow: var(--edge); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
table.tbl, .kv, .sim-bars, .tl-axis, .badge, .saved-ind { font-variant-numeric: tabular-nums; }

/* ---------- bara de sus (cromul aplicatiei, inchis la culoare) ---------- */
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; background: rgba(14, 16, 24, .96); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 0 var(--chrome-line); }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: #fff; text-decoration: none; padding: 6px 10px 6px 6px; margin-left: -6px; border-radius: 10px; flex-shrink: 0; transition: background-color 150ms ease; }
.brand-back { color: var(--chrome-muted); font-size: 15px; transition: transform 160ms var(--ease-out); }
.brand-logo { width: 28px; height: 28px; display: block; flex-shrink: 0; border-radius: 8px; box-shadow: 0 4px 12px -4px rgba(124, 92, 247, .8); }
.brand-word { font-family: var(--font-display); font-size: 15.5px; line-height: 1; letter-spacing: -.03em; display: inline-flex; align-items: baseline; gap: 4px; }
.brand-word-a { font-weight: 560; }
.brand-word b { font-weight: 800; letter-spacing: -.02em; background: linear-gradient(135deg, #9d9bff, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand .muted { color: var(--chrome-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; padding-left: 10px; margin-left: 2px; box-shadow: -1px 0 0 var(--chrome-line); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
#topbar-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
#topbar-center select { max-width: 420px; }
.topbar .btn.ghost { color: #e6e8f0; background: transparent; box-shadow: 0 0 0 1px var(--chrome-line); }
.topbar .badge { box-shadow: none; }
.topbar .badge.ai { background: rgba(139, 92, 246, .18); color: #d6c8ff; }
.topbar .badge.demo { background: rgba(250, 204, 21, .16); color: #fde68a; }
.tb-input, .topbar input[type=text], .topbar select { background: var(--chrome-2); color: #fff; border: 0; box-shadow: inset 0 0 0 1px var(--chrome-line); }
.topbar input[type=text]:focus, .topbar select:focus { outline: 0; box-shadow: inset 0 0 0 1px rgba(139, 139, 255, .7), 0 0 0 3px rgba(91, 91, 247, .3); }
.topbar select option { color: var(--ink); background: #fff; }
.tb-input { max-width: 240px; }
.tb-label { color: var(--chrome-muted); }
.topbar .btn.ghost.tb-danger { color: #ff9b93; }

/* ---------- asezarea: bara laterala + continut ---------- */
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 272px; flex-shrink: 0; background: var(--panel); box-shadow: 1px 0 0 var(--line); padding: 16px 12px; overflow-y: auto; height: calc(100vh - 56px); position: sticky; top: 56px; }
main { flex: 1; padding: 26px 32px 80px; max-width: 1320px; min-width: 0; }
.side-section { margin-bottom: 24px; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; margin: 0 8px 8px; }
.proj { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; border: 0; background: none; cursor: pointer; margin-bottom: 2px; font: inherit; font-weight: 550; color: var(--ink-2); transition: background-color 150ms ease, color 150ms ease; }
.proj.active { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(91, 91, 247, .16); }
.proj .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

.step { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 10px; border: none; background: none; cursor: pointer; font: inherit; color: var(--ink-2); text-align: left; margin-bottom: 1px; transition: background-color 150ms ease; }
.step.active { background: var(--accent-soft); font-weight: 650; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(91, 91, 247, .16); }
.step .num { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; background: #fff; box-shadow: inset 0 0 0 2px #dadee7; color: var(--muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.step .num.s-progress { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); }
.step .num.s-done { background: #10b981; box-shadow: none; color: #fff; }
.step .num.s-review { background: #f59e0b; box-shadow: none; color: #fff; }
.step .num.s-approved { background: var(--ok-soft); box-shadow: inset 0 0 0 2px #10b981; color: var(--ok); }
.step .num.s-blocked { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); color: var(--bad); }
.step .st { font-size: 11.5px; color: var(--muted); display: block; font-weight: normal; }
.step .st.t-review { color: var(--warn); } .step .st.t-blocked { color: var(--bad); } .step .st.t-approved, .step .st.t-done { color: var(--ok); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 4px; font-size: 11px; color: var(--muted); margin: 12px 8px 0; padding-top: 12px; box-shadow: 0 -1px 0 var(--line); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; box-shadow: inset 0 0 0 2px #dadee7; vertical-align: -1px; }
.dot.s-progress { box-shadow: inset 0 0 0 2px var(--accent); } .dot.s-done { background: #10b981; box-shadow: none; } .dot.s-review { background: #f59e0b; box-shadow: none; }
.dot.s-approved { background: var(--ok-soft); box-shadow: inset 0 0 0 2px #10b981; } .dot.s-blocked { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); }

/* ---------- componente ---------- */
.card { background: var(--panel); border: 0; border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: var(--edge); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); max-width: 760px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid6 { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: 10px; border: 0; background: var(--panel); box-shadow: var(--edge), 0 1px 2px rgba(15, 18, 34, .05); color: var(--ink); cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, filter 150ms ease, box-shadow 150ms ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--grad); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 4px 12px -4px rgba(91, 91, 247, .55); }
.btn.ai { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 4px 12px -4px rgba(124, 58, 237, .55); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.icon-btn { border: 0; box-shadow: var(--edge); background: var(--panel); border-radius: 8px; width: 28px; height: 28px; cursor: pointer; font-size: 13px; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

label.field { display: block; }
label.field > span { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
label.field > small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=number], input[type=url], textarea, select { width: 100%; font: inherit; color: inherit; padding: 8px 11px; border: 0; border-radius: 9px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 150ms ease, background-color 150ms ease; }
textarea { min-height: 70px; resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 130px; }
textarea.mono { font-family: var(--mono); font-size: 12px; }
input:focus, textarea:focus, select:focus { outline: 0; background: #fff; box-shadow: inset 0 0 0 1px rgba(91, 91, 247, .65), 0 0 0 4px var(--ring); }
input[type=number] { width: 90px; }
input[type=range] { width: 100%; accent-color: var(--accent); box-shadow: none; background: none; padding: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--soft); color: var(--muted); box-shadow: var(--edge); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); box-shadow: 0 0 0 1px var(--ok-line); }
.badge.warn { background: var(--warn-soft); color: var(--warn); box-shadow: 0 0 0 1px var(--warn-line); }
.badge.bad { background: var(--bad-soft); color: var(--bad); box-shadow: 0 0 0 1px var(--bad-line); }
.badge.info { background: var(--accent-soft); color: var(--accent-text); box-shadow: 0 0 0 1px rgba(91, 91, 247, .18); }
.badge.ai { background: #f3eeff; color: #5b21b6; box-shadow: 0 0 0 1px rgba(124, 58, 237, .2); }
.badge.demo { background: #fef9c3; color: #854d0e; box-shadow: 0 0 0 1px rgba(202, 138, 4, .25); }

.notice { position: relative; padding: 11px 14px 11px 16px; border-radius: 12px; border: 0; margin-bottom: 12px; color: var(--ink-2); }
.notice::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; }
.notice.info { background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(91, 91, 247, .14); } .notice.info::before { background: var(--accent); }
.notice.warn { background: var(--warn-soft); box-shadow: 0 0 0 1px var(--warn-line); } .notice.warn::before { background: #f59e0b; }
.notice.bad { background: var(--bad-soft); box-shadow: 0 0 0 1px var(--bad-line); } .notice.bad::before { background: var(--bad); }
.notice.ok { background: var(--ok-soft); box-shadow: 0 0 0 1px var(--ok-line); } .notice.ok::before { background: #10b981; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: none; }
.checks .ic { width: 22px; height: 22px; flex-shrink: 0; font-weight: 800; font-size: 12px; text-align: center; line-height: 22px; border-radius: 50%; background: var(--soft); }
.checks .ok .ic { color: var(--ok); background: var(--ok-soft); } .checks .warn .ic { color: var(--warn); background: var(--warn-soft); } .checks .fail .ic { color: var(--bad); background: var(--bad-soft); }
.checks b { display: block; font-weight: 650; }

.angle { border: 0; box-shadow: var(--edge); border-radius: 12px; padding: 11px 13px; background: var(--panel); }
.angle.na { opacity: .6; background: var(--soft); }
.angle .t { font-weight: 650; }
.angle .d { font-size: 12px; color: var(--muted); }

.scene-card { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.scene-card .sc-head { padding: 10px 14px; background: var(--panel-2); box-shadow: 0 1px 0 var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scene-card .sc-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.media-box { aspect-ratio: 4 / 5; background: #11131c; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--chrome-muted); overflow: hidden; position: relative; }
.media-box img, .media-box video { width: 100%; height: 100%; object-fit: contain; background: #07080d; }
.media-box .src { position: absolute; left: 8px; bottom: 8px; font-size: 11px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; padding: 2px 8px; border-radius: 999px; }
.versions { display: flex; gap: 6px; flex-wrap: wrap; }
.versions img { width: 48px; height: 60px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 2px var(--line); cursor: pointer; transition: box-shadow 150ms ease, transform 160ms var(--ease-out); }
.versions img:active { transform: scale(.95); }

.scene-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.scene-edit .wide { grid-column: 1 / -1; }
details.box { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); background: var(--panel); margin-bottom: 10px; }
details.box > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: center; list-style: none; border-radius: var(--radius); }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::before { content: ''; width: 18px; height: 18px; flex-shrink: 0; border-radius: 6px; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23363c4b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; transition: transform 200ms var(--ease-out); }
details.box[open] > summary::before { transform: rotate(90deg); }
details.box > .inner { padding: 4px 16px 16px; }

table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
table.tbl th, table.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--soft); border-bottom: 0; }
table.tbl th:first-child { border-radius: 8px 0 0 8px; } table.tbl th:last-child { border-radius: 0 8px 8px 0; }
table.tbl td input[type=number] { width: 78px; }
.tbl-wrap { overflow-x: auto; }

/* ---------- cronologie ---------- */
.tl-bar { position: relative; height: 56px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; overflow: hidden; margin: 8px 0 4px; }
.tl-seg { position: absolute; top: 0; bottom: 18px; border-right: 2px solid #fff; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; transition: filter 150ms ease; }
.tl-sub { position: absolute; bottom: 3px; height: 11px; background: #9aa0b1; border-radius: 3px; opacity: .7; }
.tl-voice { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--bad); }
.tl-target { position: absolute; top: 0; bottom: 0; border-left: 2px dotted var(--ink); opacity: .5; }
.tl-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.c1 { background: #e5534b; } .c2 { background: #e8891c; } .c3 { background: #22a06b; } .c4 { background: #5b5bf7; } .c5 { background: #8b5cf6; } .c6 { background: #0ea5b7; }
.chip { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 12px; align-items: center; justify-content: center; }

.sources { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.source { border: 0; box-shadow: var(--shadow); border-radius: 12px; overflow: hidden; background: var(--panel); }
.source .thumb { aspect-ratio: 4/5; background: #11131c; display: flex; align-items: center; justify-content: center; color: var(--chrome-muted); font-size: 12px; }
.source .thumb img { width: 100%; height: 100%; object-fit: cover; }
.source .meta { padding: 7px 9px; font-size: 12px; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
@media (max-width: 1200px) { .sources { grid-template-columns: repeat(3, 1fr); } }

.sim-bars { display: grid; grid-template-columns: 130px 1fr 44px; gap: 6px 10px; align-items: center; font-size: 12px; }
.meter { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.hi > i { background: var(--bad); } .meter.mid > i { background: #f59e0b; }

.progress { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 300ms var(--ease-out); }
.toast .progress { background: rgba(255, 255, 255, .14); box-shadow: none; height: 6px; }

/* ---------- subtitrari - previzualizare stil ---------- */
.sub-preview { aspect-ratio: 4/5; width: 220px; background: linear-gradient(160deg, #5b6b55, #2e3a4a); border-radius: 10px; position: relative; overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow); }
.sub-preview .prod { position: absolute; left: 30%; top: 42%; width: 40%; height: 14%; background: rgba(255,255,255,.85); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #333; font-weight: 700; }
.sub-preview .txt { position: absolute; left: 6%; right: 6%; text-align: center; font-weight: 700; color: #fff; line-height: 1.2; }

/* ---------- ferestre si notificari ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(11, 13, 20, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
  opacity: 1; transition: opacity 250ms var(--ease-out); }
.modal { background: var(--panel); border-radius: 20px; max-width: 620px; width: 100%; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain; padding: 24px 26px; box-shadow: var(--shadow-lg);
  transform-origin: center; opacity: 1; transform: scale(1); transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
@starting-style {
  .modal-back { opacity: 0; }
  .modal { opacity: 0; transform: scale(.96); }
}
.modal.wide { max-width: 920px; }
.modal h2 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 14px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; box-shadow: 0 -1px 0 var(--line); flex-wrap: wrap; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: rgba(17, 19, 28, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; padding: 11px 15px; border-radius: 13px; box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 16px 40px -12px rgba(0,0,0,.45); font-size: 13px; white-space: pre-line;
  opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease; }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast.bad { background: #b91c1c; } .toast.ok { background: #047857; }
.toast .muted { color: #c6cbd8; }
.saved-ind { font-size: 12px; color: var(--muted); }

.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty h1 { color: var(--ink); font-size: 28px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 7px 14px; font-size: 13px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.word-info { font-size: 12px; color: var(--muted); }
.list-plain { margin: 0; padding-left: 18px; }
.compare td { vertical-align: top; font-size: 13px; }
.hidden { display: none !important; }

/* cai lungi de fisiere: se rup pe mai multe randuri, fara derulare orizontala; calea intreaga ramane vizibila */
.path { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; word-break: break-all; min-width: 0; }
.path-row { display: flex; gap: 6px; align-items: baseline; min-width: 0; flex: 1 1 260px; }

/* exportul final: buton indisponibil cand serverul raporteaza blocari */
.export-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.export-state { flex-basis: 100%; }
.checks .pending .ic { color: var(--muted); }
.warn-text { color: var(--warn); } .bad-text { color: var(--bad); }
.export-bar .btn:disabled { background: var(--soft); box-shadow: var(--edge); color: var(--muted); opacity: 1; }

/* ---------- hover doar pe dispozitive cu mouse ---------- */
@media (hover: hover) and (pointer: fine) {
  .brand:hover { background: rgba(255, 255, 255, .06); }
  .brand:hover .brand-back { transform: translateX(-2px); }
  .topbar .btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
  .proj:hover:not(.active) { background: var(--soft); color: var(--ink); }
  .step:hover:not(.active) { background: var(--soft); }
  .btn:hover:not(:disabled) { background: var(--soft); }
  .btn.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.07); }
  .btn.ai:hover:not(:disabled) { background: linear-gradient(135deg, #7c3aed, #a855f7); filter: brightness(1.08); }
  .btn.ghost:hover:not(:disabled) { background: rgba(15, 18, 34, .05); }
  .icon-btn:hover:not(:disabled) { background: var(--soft); }
  .versions img:hover { box-shadow: 0 0 0 2px var(--accent); }
  .tl-seg:hover { filter: brightness(1.1); }
  details.box > summary:hover::before { background-color: var(--soft-2); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: opacity, background-color, color, box-shadow, filter !important; }
  .modal, .toast { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar { background: var(--chrome); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .toast, .modal-back { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ecrane inguste (sub 800 px): bara de sus pe mai multe randuri, bara laterala deasupra continutului, fara derulare orizontala */
.top-row { flex-wrap: nowrap; }
@media (max-width: 800px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px 10px; }
  .brand-sub { display: none; }
  .topbar-right { flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
  #topbar-center { order: 3; flex: 1 1 100%; min-width: 0; justify-content: flex-start; }
  .top-row { flex-wrap: wrap; width: 100%; }
  .top-row input, .top-row select { flex: 1 1 160px; min-width: 0; max-width: 100% !important; }
  .layout { flex-direction: column; min-height: 0; }
  .sidebar { width: auto; height: auto; position: static; box-shadow: 0 1px 0 var(--line); }
  main { padding: 18px 14px 60px; }
  .kv { grid-template-columns: minmax(80px, 30%) minmax(0, 1fr); }
}
