/* SkyVisuals — platforma (client + administrare) */
:root {
  --bg: #07090c;
  --bg-2: #0d1116;
  --bg-3: #141a21;
  --bg-4: #1b232c;
  --line: rgba(232, 240, 245, 0.1);
  --line-2: rgba(232, 240, 245, 0.2);
  --text: #eef2f4;
  --muted: #8d99a3;
  --accent: #e8ff5a;
  --accent-ink: #11140a;
  --danger: #ff6b6b;
  --ok: #5ee6a0;
  --warn: #ffc65a;
  --info: #6ab8ff;
  --text-2: #c9d1d7;
  --accent-hover: #f1ff8f;
  --accent-text: #e8ff5a;
  --danger-text: #ff9a9a;
  --glass: rgba(13, 17, 22, 0.94);
  --shadow: none;
  color-scheme: dark;
  --r: 14px;
  --side: 248px;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.1; margin: 0; font-weight: 700; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-3); padding: 2px 6px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- Butoane, formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--text); font: 600 14px/1 "Inter", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .2s, border-color .2s, transform .15s; }
.btn:hover { background: var(--bg-4); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--danger); border-color: rgba(255,107,107,.35); background: rgba(255,107,107,.06); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 17px; height: 17px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; padding: 0; transition: color .2s, background-color .2s; }
.icon-btn:hover { color: var(--text); background: var(--bg-3); }
.icon-btn .ic { width: 18px; height: 18px; }

.form { display: grid; gap: 14px; }
.form label, .field { display: grid; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.form label.check, label.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; cursor: pointer; }
input, select, textarea { width: 100%; font: 400 15px/1.4 "Inter", sans-serif; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; flex: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,255,90,.14); }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238d99a3' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 11px; }
textarea { resize: vertical; min-height: 96px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }

.alert { padding: 12px 14px; border-radius: 11px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert.ok { background: rgba(94,230,160,.08); border-color: rgba(94,230,160,.3); color: var(--ok); }
.alert.err { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.3); color: var(--danger-text); }
.alert.info { background: rgba(106,184,255,.08); border-color: rgba(106,184,255,.3); color: var(--info); }

.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 3px; background: var(--bg); }

/* ---------- Autentificare ---------- */
body.auth { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(rgba(7,9,12,.72), rgba(7,9,12,.92)), var(--auth-bg, none) center / cover no-repeat, var(--bg); }
.auth-card { width: min(420px, 100%); background: rgba(13,17,22,.86); border: 1px solid var(--line-2); border-radius: 22px; padding: 32px 28px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: grid; gap: 16px; }
.auth-card h1 { font-size: 28px; margin-top: 18px; }
.auth-card .back { font-size: 13px; color: var(--muted); text-decoration: none; }
.auth-card .back:hover { color: var(--text); }

/* ---------- Layout aplicație ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 20; }
.side .brand { padding: 0 10px; }
.role-tag { margin: 12px 10px 0; align-self: flex-start; font: 500 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); background: rgba(232,255,90,.1); padding: 6px 8px; border-radius: 6px; }
.side-nav { display: grid; gap: 2px; margin-top: 28px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14.5px; transition: background-color .2s, color .2s; }
.side-nav a:hover { color: var(--text); background: var(--bg-3); }
.side-nav a.on { color: var(--text); background: var(--bg-3); box-shadow: inset 2px 0 0 var(--accent); }
.side-nav a.on .ic { color: var(--accent-text); }
.count { margin-left: auto; font: 600 11px/1 var(--mono); font-style: normal; background: var(--accent); color: var(--accent-ink); padding: 4px 7px; border-radius: 999px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-4); display: grid; place-items: center; font-weight: 700; color: var(--accent-text); flex: none; }
.who { min-width: 0; flex: 1; }
.who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { margin-left: var(--side); padding: 28px clamp(16px, 3vw, 40px) 60px; min-height: 100vh; max-width: calc(var(--side) + 1440px); }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.topbar h1 { font-size: clamp(24px, 3vw, 32px); }
.topbar p { margin-top: 6px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb { display: inline-block; margin-bottom: 8px; font-size: 13px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--text); }
.only-sm { display: none; }
.tabbar { display: none; }

/* ---------- Carduri ---------- */
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-decoration: none; }
.kpi small { display: block; color: var(--muted); font-size: 12.5px; }
.kpi b { display: block; font: 700 30px/1.1 var(--display); letter-spacing: -0.03em; margin-top: 6px; }
.kpi.hl b { color: var(--accent-text); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 38px; height: 38px; color: var(--line-2); margin: 0 auto 12px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* Etichete de stare */
.tag { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--mono); padding: 6px 9px; border-radius: 999px; background: var(--bg-3); color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.activ, .tag.finalizata, .tag.acceptata { color: var(--ok); background: rgba(94,230,160,.1); }
.tag.noua { color: var(--accent-text); background: rgba(232,255,90,.1); }
.tag.programata { color: var(--info); background: rgba(106,184,255,.1); }
.tag.pauza { color: var(--warn); background: rgba(255,198,90,.1); }
.tag.respinsa { color: var(--danger); background: rgba(255,107,107,.1); }
.tag.finalizat { color: var(--muted); }

/* ---------- Lista de șantiere ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project { display: block; text-decoration: none; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color .25s, transform .25s; }
.project:hover { border-color: var(--line-2); transform: translateY(-2px); }
.project-cover { aspect-ratio: 16 / 9; background: var(--bg-3); position: relative; overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project:hover .project-cover img { transform: scale(1.04); }
.project-cover .tag { position: absolute; top: 12px; left: 12px; backdrop-filter: blur(8px); background: rgba(7,9,12,.6); }
.project-body { padding: 16px 18px 18px; }
.project-body h2 { font-size: 18px; }
.project-body p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.project-meta { display: flex; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.project-meta b { color: var(--text); font-weight: 600; }

/* ---------- Taburi ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font: 600 14px/1 "Inter", sans-serif; cursor: pointer; transition: background-color .2s, color .2s; }
.tabs button .ic { width: 17px; height: 17px; }
.tabs button.on { background: var(--bg-4); color: var(--text); }
.tabs button.on .ic { color: var(--accent-text); }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.cal-head h3 { font-size: 16px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; color: var(--muted); text-align: center; padding: 6px 0; text-transform: uppercase; }
.cal-day { position: relative; aspect-ratio: 1; border-radius: 9px; border: 1px solid transparent; background: var(--bg-3); color: var(--muted); font: 500 13px/1 "Inter", sans-serif; cursor: default; display: grid; place-items: center; padding: 0; overflow: hidden; }
.cal-day.out { visibility: hidden; }
.cal-day.today { border-color: var(--line-2); color: var(--text); }
.cal-day.has { cursor: pointer; color: var(--text); background: var(--bg-4); }
.cal-day.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; transition: opacity .2s; }
.cal-day.has span { position: relative; z-index: 1; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.cal-day.has::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); z-index: 1; }
.cal-day.has.vid::before { content: ""; position: absolute; top: 5px; right: 5px; width: 0; height: 0; border-left: 6px solid var(--accent); border-top: 4px solid transparent; border-bottom: 4px solid transparent; z-index: 1; }
.cal-day.has:hover img { opacity: .7; }
.cal-day.in-range { background: rgba(232,255,90,.1); }
.cal-day.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal-day.sel img { opacity: .8; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.cal-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.range-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.range-bar label { font-size: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: 500 12.5px/1 "Inter", sans-serif; cursor: pointer; }
.chip:hover, .chip.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------- Galerie ---------- */
.day-group + .day-group { margin-top: 24px; }
.day-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.day-title h3 { font-size: 15px; }
.day-title small { color: var(--muted); font-size: 12.5px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg-3); cursor: pointer; border: 0; padding: 0; color: inherit; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile:hover img { transform: scale(1.05); }
.tile .badge-v { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; font: 500 11px/1 var(--mono); padding: 5px 7px; border-radius: 6px; background: rgba(7,9,12,.7); color: #fff; }
.tile .badge-v .ic { width: 13px; height: 13px; fill: var(--accent); stroke: none; }
.tile .tile-check { position: absolute; top: 8px; left: 8px; z-index: 2; }
.tile .tile-star { position: absolute; top: 8px; right: 8px; color: #e8ff5a; }
.tile .tile-star .ic { width: 16px; height: 16px; fill: var(--accent); stroke: none; }

/* Lightbox */
.lb { --text: #eef2f4; --muted: #8d99a3; --line-2: rgba(232,240,245,.2); --bg-3: #141a21; color: var(--text); position: fixed; inset: 0; z-index: 100; background: rgba(4,5,7,.96); display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
.lb-top .meta { min-width: 0; }
.lb-top b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-top small { color: var(--muted); font-size: 12.5px; }
.lb-actions { display: flex; gap: 6px; flex: none; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 56px; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(13,17,22,.8); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
.lb-strip { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); scrollbar-width: thin; }
.lb-strip button { flex: none; width: 76px; height: 50px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--bg-3); cursor: pointer; opacity: .55; }
.lb-strip button.on { border-color: var(--accent); opacity: 1; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Timelapse ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player .stamp { position: absolute; left: 14px; top: 14px; font: 500 12.5px/1 var(--mono); padding: 8px 10px; border-radius: 7px; background: rgba(7,9,12,.7); color: #fff; backdrop-filter: blur(6px); }
.player .stamp b { color: #e8ff5a; font-weight: 500; }
.controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.controls .play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.controls .play .ic { fill: currentColor; stroke: none; }
.controls input[type=range] { flex: 1 1 200px; padding: 0; height: 4px; border: 0; background: var(--bg-4); accent-color: var(--accent); }
.controls .speed { display: flex; gap: 4px; }
.angle-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--muted); }

/* ---------- Comparare ---------- */
.compare { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; user-select: none; touch-action: pan-y; }
.compare > img, .compare-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; padding: 0; border: 0; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--accent); transform: translateX(-1px); pointer-events: none; }
.compare-handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.compare-tag { position: absolute; top: 12px; font: 500 12px/1 var(--mono); padding: 7px 9px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; }
.compare-tag.l { left: 12px; } .compare-tag.r { right: 12px; }
.compare-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }

/* ---------- Tabele ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table-wrap table { min-width: 720px; }
td:first-child { min-width: 190px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Liste mobile (cereri) */
.list { display: grid; gap: 10px; }
.item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.item-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.item-head h3 { font-size: 15.5px; }
.item-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--muted); }
.item p { margin-top: 10px; color: var(--text-2); font-size: 14px; white-space: pre-line; }
.note { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--bg-3); border-radius: 0 8px 8px 0; font-size: 13.5px; }
details.inline > summary { cursor: pointer; color: var(--accent-text); font-size: 13.5px; margin-top: 12px; list-style: none; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { margin-bottom: 12px; }

/* ---------- Upload ---------- */
.drop { display: block; border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 38px 20px; text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s; background: var(--bg-2); }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(232,255,90,.04); }
.drop .ic { width: 36px; height: 36px; color: var(--accent-text); margin: 0 auto 12px; }
.drop b { display: block; font-size: 16px; }
.drop small { color: var(--muted); }
.queue { display: grid; gap: 8px; margin-top: 14px; }
.qitem { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; background: var(--bg-3); border-radius: 11px; padding: 8px 10px; }
.qitem .qthumb { width: 56px; height: 40px; border-radius: 6px; background: var(--bg-4) center / cover no-repeat; }
.qitem .qname { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qitem .qbar { height: 4px; border-radius: 4px; background: var(--bg-4); margin-top: 6px; overflow: hidden; }
.qitem .qbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.qitem .qstate { font: 500 12px/1 var(--mono); color: var(--muted); }
.qitem.done .qstate { color: var(--ok); }
.qitem.fail .qstate { color: var(--danger); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar .left { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.modal { position: fixed; inset: 0; z-index: 90; background: rgba(4,5,7,.75); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(6px); }
.modal-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; }
.modal-card h2 { margin-bottom: 16px; }

.checks { display: grid; gap: 8px; max-height: 240px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg-2); }

/* ---------- Mobil / tabletă ---------- */
@media (max-width: 1100px) {
  .cols { grid-template-columns: 1fr; }
  #calCard { order: -1; }
  #calCard .cal-grid { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 18px 16px calc(90px + env(safe-area-inset-bottom)); padding-top: calc(18px + env(safe-area-inset-top)); }
  .only-sm { display: block; }
  .tabbar { display: flex; position: fixed; inset: auto 0 0 0; z-index: 30; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 4px; padding: 6px 2px; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 500; position: relative; border-radius: 10px; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .ic { color: var(--accent-text); }
  .tabbar .dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
  .grid2, .grid3, .compare-pick { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .lb-stage { padding: 0 8px; }
  .lb-nav { display: none; }
  .tabs button { padding: 0 12px; font-size: 13.5px; }
  .topbar { align-items: flex-start; }
  .topbar-actions .btn { height: 38px; }
}
@media (max-width: 520px) {
  .kpi b { font-size: 24px; }
  .projects { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
}

/* ---------- Tema de zi ---------- */
:root[data-theme="light"] {
  --bg: #f2f4f6;
  --bg-2: #ffffff;
  --bg-3: #edf0f3;
  --bg-4: #e1e6eb;
  --line: rgba(13, 22, 32, 0.09);
  --line-2: rgba(13, 22, 32, 0.17);
  --text: #0e141a;
  --text-2: #33404b;
  --muted: #5d6974;
  --accent: #d6f03a;
  --accent-hover: #cbe621;
  --accent-text: #5a6c00;
  --accent-ink: #11140a;
  --danger: #d43b3b;
  --danger-text: #bf2e2e;
  --ok: #138f57;
  --warn: #b0700c;
  --info: #2473c4;
  --glass: rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 2px rgba(13, 22, 32, 0.05), 0 4px 16px -8px rgba(13, 22, 32, 0.12);
  color-scheme: light;
}
.card, .kpi, .project, .item, .tabs, .side { box-shadow: var(--shadow); }
:root[data-theme="light"] .cal-day.has img { opacity: .72; }
:root[data-theme="light"] .cal-day.has:hover img { opacity: .9; }
:root[data-theme="light"] .tag.noua, :root[data-theme="light"] .role-tag { background: rgba(150, 180, 0, .14); }
:root[data-theme="light"] .side-nav a.on { box-shadow: inset 2px 0 0 var(--accent-text); }
:root[data-theme="light"] .side-nav a.on .ic, :root[data-theme="light"] .tabs button.on .ic { color: var(--accent-text); }
:root[data-theme="light"] .brand-mark::after { background: var(--bg-2); }

/* Butonul de schimbare a temei: în tema închisă arată soarele, în cea de zi luna */
.theme-toggle .ic-moon { display: none; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: block; }
html { transition: background-color .25s ease; }
/* ---------- Limba (RO / EN) ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; }
.lang-switch a { font: 600 11px/1 var(--mono); letter-spacing: .06em; padding: 6px 8px; border-radius: 999px; text-decoration: none; color: var(--muted); transition: color .2s, background-color .2s; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.on { background: var(--text); color: var(--bg); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 8px 0; margin-top: auto; }
.side-tools + .side-user { margin-top: 12px; }