/* AvoraCity — Soft UI: neumorfism discret + glassmorphism ușor */
:root {
  --bg: #F3F5F8;
  --surface: #F8FAFC;
  --text: #192536;
  --text-2: #8491A3;
  --text-3: #5A6A80;
  --accent: #2563EB;
  --accent-2: #4C8DFF;
  --ok: #19A77A;
  --warn: #F4A340;
  --bad: #E45C5C;
  --repair: #7C6BDB;
  --line: rgba(25, 37, 54, .07);
  --sh-light: -6px -6px 16px rgba(255, 255, 255, .9);
  --sh-dark: 6px 6px 16px rgba(170, 185, 205, .22);
  --sh-lg-dark: 10px 14px 32px rgba(150, 168, 195, .28);
  --sh: var(--sh-light), var(--sh-dark);
  --sh-in: inset 3px 3px 8px rgba(170, 185, 205, .3), inset -3px -3px 8px rgba(255, 255, 255, .9);
  --r-card: 24px; --r-btn: 18px; --r-sheet: 30px; --r-input: 16px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --nav-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  font-family: 'Inter', -apple-system, 'SF Pro Display', system-ui, sans-serif;
  color: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none; overflow: hidden;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
i[data-lucide], svg.lucide { width: 20px; height: 20px; stroke-width: 1.9; flex: none; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 2px; border-radius: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
#app { position: fixed; inset: 0; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: calc(var(--sat) + 18px) 20px calc(var(--nav-h) + var(--sab) + 36px);
  animation: view-in .38s var(--ease) both;
}
.view.flush { padding: 0; overflow: hidden; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.h1 { font-size: 28px; font-weight: 750; letter-spacing: -.025em; line-height: 1.12; }
.h2 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }

/* ---------- Suprafețe ---------- */
.card { background: linear-gradient(145deg, #F9FBFD, #F0F3F7); border-radius: var(--r-card); box-shadow: var(--sh); }
.card.pad { padding: 18px; }
.inset { background: var(--bg); box-shadow: var(--sh-in); border-radius: var(--r-input); }
.glass { background: rgba(250, 252, 255, .72); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .7); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: var(--r-btn); font-weight: 600; font-size: 15px;
  background: linear-gradient(145deg, #FAFBFD, #EEF1F6); box-shadow: var(--sh); color: var(--text);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.97); box-shadow: var(--sh-in); }
.btn.primary { color: #fff; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 10px 22px -6px rgba(37, 99, 235, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.primary:active { box-shadow: inset 0 3px 8px rgba(0, 0, 0, .2); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #FAFBFD, #EEF1F6); box-shadow: var(--sh); transition: transform .18s var(--ease), box-shadow .18s;
}
.icon-btn:active { transform: scale(.92); box-shadow: var(--sh-in); }
.icon-btn.glass { box-shadow: 0 6px 20px -6px rgba(60, 80, 110, .35); }

.chips { display: flex; gap: 10px; overflow-x: auto; padding: 6px 20px 12px; margin: 0 -20px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 14px; font-weight: 550; font-size: 14px; color: var(--text-3);
  background: linear-gradient(145deg, #FAFBFD, #EEF1F6); box-shadow: 4px 4px 10px rgba(170, 185, 205, .2), -4px -4px 10px rgba(255, 255, 255, .9);
  display: inline-flex; align-items: center; gap: 7px; transition: all .2s var(--ease); scroll-snap-align: start;
}
.chip.active { color: var(--accent); background: var(--bg); box-shadow: var(--sh-in); font-weight: 650; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-functional { color: #0E8460; background: rgba(25, 167, 122, .12); }
.b-maintenance { color: #B9710F; background: rgba(244, 163, 64, .17); }
.b-damaged { color: #C23F3F; background: rgba(228, 92, 92, .13); }
.b-repair { color: #5B49C0; background: rgba(124, 107, 219, .14); }
.b-new { color: #1D4ED8; background: rgba(37, 99, 235, .11); }
.b-done { color: #0E8460; background: rgba(25, 167, 122, .12); }
.b-urgent { color: #C23F3F; background: rgba(228, 92, 92, .13); }
.b-high { color: #B9710F; background: rgba(244, 163, 64, .17); }
.b-medium, .b-low, .b-review, .b-planned, .b-in_progress { color: #4A5B73; background: rgba(132, 145, 163, .16); }
.b-in_progress { color: #5B49C0; background: rgba(124, 107, 219, .14); }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-3); padding-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-input); background: var(--bg); box-shadow: var(--sh-in); font-size: 16px; outline: none; appearance: none; -webkit-appearance: none;
  transition: box-shadow .2s;
}
.textarea { padding: 14px 16px; min-height: 92px; resize: none; }
.input:focus, .select:focus, .textarea:focus { box-shadow: var(--sh-in), 0 0 0 3px rgba(37, 99, 235, .35); }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238491A3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.search { position: relative; }
.search i, .search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.search .input { padding-left: 46px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--bg); box-shadow: var(--sh-in); gap: 2px; }
.seg button { min-height: 40px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--text-3); transition: all .25s var(--ease); }
.seg button.active { background: linear-gradient(145deg, #fff, #F1F4F8); color: var(--accent); box-shadow: 3px 3px 8px rgba(170, 185, 205, .3), -2px -2px 6px rgba(255, 255, 255, .9); }

/* ---------- Antet ---------- */
.header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.header .sub { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: var(--accent); background: linear-gradient(145deg, #FAFBFD, #EAEFF5); box-shadow: var(--sh); }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }

/* ---------- Statistici ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { padding: 16px; display: grid; gap: 10px; text-align: left; }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .ic { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--bg); box-shadow: var(--sh-in); }
.stat .num { font-size: 32px; font-weight: 750; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 12.5px; color: var(--text-2); line-height: 1.25; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; position: relative; }
.pulse-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3); opacity: 0; } }

/* ---------- Hartă ---------- */
.map-card { position: relative; height: clamp(300px, 46vh, 520px); overflow: hidden; border-radius: var(--r-card); box-shadow: var(--sh); background: #E6ECF3; isolation: isolate; }
.map-card .map, .map { position: absolute; inset: 0; }
.map-card .overlay-top { position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.map-card .overlay-top > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 14px; font-size: 13px; font-weight: 600; }
.legend { position: absolute; z-index: 5; left: 12px; bottom: 12px; display: flex; gap: 10px; padding: 8px 12px; border-radius: 14px; font-size: 11.5px; font-weight: 550; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.maplibregl-ctrl-attrib { font-size: 10px !important; background: rgba(255, 255, 255, .6) !important; border-radius: 8px 0 0 0; }
.maplibregl-ctrl-bottom-right { bottom: 0; }
.map-card.mini { height: 190px; border-radius: 20px; }
.map-card.mini .maplibregl-ctrl-attrib { display: none; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 16px rgba(37, 99, 235, .45); display: grid; place-items: center; animation: drop .5s var(--ease) both; }
.pin::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; }
@keyframes drop { from { opacity: 0; transform: rotate(-45deg) translate(14px, -14px) scale(.6); } }

/* ---------- Acțiuni rapide ---------- */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick button { padding: 16px 8px 14px; display: grid; justify-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2; transition: transform .18s var(--ease), box-shadow .18s; }
.quick button:active { transform: scale(.96); box-shadow: var(--sh-in); }
.quick .qi { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: var(--accent); background: var(--bg); box-shadow: var(--sh-in); }

/* ---------- Carduri obiecte ---------- */
.asset-card { display: flex; gap: 14px; align-items: center; padding: 12px; width: 100%; text-align: left; transition: transform .18s var(--ease), box-shadow .18s; animation: rise .45s var(--ease) both; }
.asset-card:active { transform: scale(.985); box-shadow: var(--sh-in); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.thumb { width: 78px; height: 78px; border-radius: 18px; object-fit: cover; background: #DCE4EF; flex: none; box-shadow: 0 6px 14px -6px rgba(60, 80, 110, .4); }
.asset-card .nm { font-weight: 650; font-size: 15.5px; letter-spacing: -.01em; }
.code { font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.asset-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 7px; }

/* ---------- Navigare ---------- */
.nav {
  position: fixed; z-index: 40; left: 14px; right: 14px; bottom: calc(var(--sab) + 12px); height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border-radius: 28px;
  background: rgba(247, 249, 252, .78); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 18px 40px -12px rgba(60, 80, 110, .35), var(--sh-light);
}
.nav a, .nav button.nv { display: grid; justify-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-2); padding: 8px 0; border-radius: 18px; transition: color .2s, transform .2s var(--ease); position: relative; }
.nav a:active { transform: scale(.92); }
.nav a.active { color: var(--accent); }
.nav a.active::before { content: ''; position: absolute; top: 2px; width: 22px; height: 3px; border-radius: 3px; background: var(--accent); }
.nav .fab {
  width: 64px; height: 64px; border-radius: 50%; margin: -30px auto 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #5B9BFF, var(--accent)); border: 4px solid var(--bg);
  box-shadow: 0 16px 28px -8px rgba(37, 99, 235, .65), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .2s var(--ease);
}
.nav .fab:active { transform: scale(.92); }
.nav .fab i, .nav .fab svg { width: 27px; height: 27px; }
.nav .fab-wrap { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--accent); }
.sidebar { display: none; }

/* ---------- Sheet ---------- */
#layer-sheet { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(25, 37, 54, .32); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s; pointer-events: auto; }
.scrim.show { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; pointer-events: auto;
  background: linear-gradient(180deg, #FBFCFE, #F3F6FA); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: 0 -20px 50px -10px rgba(40, 60, 90, .3); transform: translateY(105%); transition: transform .42s var(--ease);
  padding-bottom: var(--sab); max-width: 640px; margin: 0 auto; will-change: transform;
}
.sheet.show { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet .grab { padding: 10px 0 6px; display: grid; place-items: center; cursor: grab; touch-action: none; flex: none; }
.sheet .grab::after { content: ''; width: 40px; height: 5px; border-radius: 5px; background: rgba(25, 37, 54, .14); }
.sheet .content { overflow-y: auto; padding: 4px 20px 22px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet.full { height: 92dvh; }
.sheet .photo { width: 100%; height: 168px; object-fit: cover; border-radius: 22px; background: #DCE4EF; }
.btn-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; }
.kv { display: grid; gap: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.kv > div:last-child { border: 0; }
.kv span:first-child { color: var(--text-2); }
.kv span:last-child { font-weight: 600; text-align: right; }

/* ---------- Toast ---------- */
#layer-toast { position: fixed; z-index: 120; left: 0; right: 0; top: calc(var(--sat) + 12px); display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; max-width: min(92vw, 420px); font-weight: 550; font-size: 14px; background: rgba(25, 37, 54, .92); color: #fff; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .4); animation: toast-in .4s var(--ease) both; }
.toast.err { background: rgba(190, 56, 56, .96); }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }
.offline { position: fixed; z-index: 110; top: 0; left: 0; right: 0; padding: calc(var(--sat) + 6px) 12px 6px; text-align: center; font-size: 12.5px; font-weight: 600; color: #fff; background: #B9710F; }

/* ---------- Skeleton / goluri ---------- */
.skel { border-radius: 14px; background: linear-gradient(100deg, #E8ECF2 30%, #F5F7FA 50%, #E8ECF2 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }
.empty { text-align: center; padding: 48px 24px; display: grid; justify-items: center; gap: 10px; color: var(--text-2); }
.empty .eic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); box-shadow: var(--sh-in); color: var(--text-2); margin-bottom: 6px; }
.empty b { color: var(--text); font-size: 17px; }

/* ---------- Detaliu obiect ---------- */
.hero { position: relative; height: 280px; margin: calc(-1 * (var(--sat) + 18px)) -20px 0; overflow: visible; }
.hero img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 0 32px 32px; background: #DCE4EF; }
.hero .back { position: absolute; top: calc(var(--sat) + 14px); left: 16px; }
.hero .more { position: absolute; top: calc(var(--sat) + 14px); right: 16px; }
.hero::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(rgba(10, 20, 35, .35), transparent); border-radius: 0; pointer-events: none; }
.hero .back, .hero .more { z-index: 2; }
.timeline { position: relative; display: grid; gap: 18px; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--line), var(--line)); border-radius: 2px; }
.tl { position: relative; }
.tl::before { content: ''; position: absolute; left: -26px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: var(--sh-in); }
.tl::after { content: ''; position: absolute; left: -21px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tl .t { font-weight: 650; font-size: 14.5px; }
.tl .d { font-size: 12.5px; color: var(--text-2); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions .btn { justify-content: flex-start; min-height: 56px; font-size: 14px; padding: 0 14px; text-align: left; line-height: 1.2; }
.actions .btn i { color: var(--accent); }
.photos { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 4px 20px 10px; scrollbar-width: none; }
.photos img { width: 112px; height: 112px; object-fit: cover; border-radius: 18px; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ba figure { margin: 0; position: relative; }
.ba img { width: 100%; height: 120px; object-fit: cover; border-radius: 16px; }
.ba figcaption { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, .85); }
.ba .slot { height: 120px; border-radius: 16px; display: grid; place-items: center; text-align: center; gap: 4px; color: var(--text-2); font-size: 12px; background: var(--bg); box-shadow: var(--sh-in); cursor: pointer; }
.task { padding: 14px; display: grid; gap: 10px; width: 100%; text-align: left; }
.progress { display: flex; gap: 4px; }
.progress i { flex: 1; height: 4px; border-radius: 4px; background: rgba(25, 37, 54, .08); }
.progress i.on { background: var(--accent); }

/* ---------- Cameră ---------- */
.cam { position: fixed; inset: 0; z-index: 100; background: #0B1220; color: #fff; display: flex; flex-direction: column; animation: cam-in .4s var(--ease) both; overflow: hidden; }
@keyframes cam-in { from { opacity: 0; transform: scale(1.04); } }
.cam video, .cam .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .shade { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 10, 20, .55)); pointer-events: none; }
.cam .top { position: relative; z-index: 3; display: flex; justify-content: space-between; padding: calc(var(--sat) + 14px) 16px 0; }
.cam .cbtn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .16); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .22); }
.cam .cbtn.on { background: #fff; color: #111; }
.frame { position: relative; z-index: 2; margin: auto; width: min(78vw, 360px); aspect-ratio: 1; border-radius: 34px; }
.frame i.c { position: absolute; width: 38px; height: 38px; border: 4px solid rgba(255, 255, 255, .95); }
.frame i.c1 { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 34px; }
.frame i.c2 { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 34px; }
.frame i.c3 { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 34px; }
.frame i.c4 { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 34px; }
.frame .scan { position: absolute; left: 10%; right: 10%; height: 2px; top: 10%; border-radius: 2px; background: linear-gradient(90deg, transparent, #7FB0FF, transparent); box-shadow: 0 0 18px 4px rgba(90, 150, 255, .7); animation: scan 2.6s ease-in-out infinite alternate; }
@keyframes scan { to { top: 90%; } }
.cam .hint { position: relative; z-index: 3; text-align: center; font-size: 13.5px; font-weight: 550; opacity: .92; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); padding: 0 24px; }
.cam .bottom { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-around; padding: 18px 24px calc(var(--sab) + 30px); }
.shutter { width: 82px; height: 82px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; transition: transform .15s; }
.shutter::after { content: ''; width: 64px; height: 64px; border-radius: 50%; background: #fff; transition: transform .15s; }
.shutter:active::after { transform: scale(.88); }
.cam .analysis { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgba(8, 14, 26, .55); backdrop-filter: blur(10px); text-align: center; }
.orb { width: 96px; height: 96px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 30%, #8DB8FF, var(--accent)); animation: breathe 1.8s ease-in-out infinite; box-shadow: 0 0 60px rgba(70, 130, 255, .7); }
.orb::before, .orb::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(140, 180, 255, .5); animation: ring 1.8s ease-out infinite; }
.orb::after { animation-delay: .9s; }
@keyframes breathe { 50% { transform: scale(1.08); } }
@keyframes ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* ---------- Flux adăugare (full-screen) ---------- */
.flow { position: fixed; inset: 0; z-index: 90; background: var(--bg); overflow-y: auto; animation: view-in .4s var(--ease) both; padding: calc(var(--sat) + 14px) 20px calc(var(--sab) + 32px); }
.flow .inner { max-width: 640px; margin: 0 auto; display: grid; gap: 16px; }
.flow .thumb-lg { width: 100%; height: 180px; object-fit: cover; border-radius: 22px; box-shadow: var(--sh); }
.conf { height: 8px; border-radius: 8px; background: var(--bg); box-shadow: var(--sh-in); overflow: hidden; }
.conf i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .8s var(--ease); }
.note { display: flex; gap: 12px; padding: 14px; border-radius: 18px; font-size: 13.5px; line-height: 1.4; }
.note.info { background: rgba(37, 99, 235, .08); color: #1D4ED8; }
.note.warn { background: rgba(244, 163, 64, .16); color: #8A5409; }
.note.err { background: rgba(228, 92, 92, .12); color: #A63636; }
.note i, .note svg { margin-top: 1px; }
.dup { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: var(--bg); box-shadow: var(--sh-in); width: 100%; text-align: left; }
.dup img { width: 50px; height: 50px; border-radius: 14px; object-fit: cover; }
.success { position: fixed; inset: 0; z-index: 130; display: grid; place-content: center; justify-items: center; gap: 18px; background: rgba(243, 245, 248, .92); backdrop-filter: blur(14px); text-align: center; animation: view-in .3s ease both; }
.check { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #3CCB9C, var(--ok)); box-shadow: 0 20px 40px -10px rgba(25, 167, 122, .6); animation: pop .6s var(--ease) both; }
.check svg { width: 52px; height: 52px; stroke-width: 3; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .3s ease forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.det-stage { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--sh); background: #DCE4EF; line-height: 0; }
.det-stage img { width: 100%; height: auto; display: block; }
.det-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- Autentificare ---------- */
.login { position: fixed; inset: 0; overflow-y: auto; padding: calc(var(--sat) + 40px) 24px 40px; display: grid; align-content: center; justify-items: center; background: radial-gradient(900px 500px at 50% -10%, rgba(76, 141, 255, .18), transparent), var(--bg); }
.login .box { width: 100%; max-width: 400px; display: grid; gap: 22px; }
.logo { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #5B9BFF, var(--accent)); box-shadow: 0 18px 32px -10px rgba(37, 99, 235, .6); }
.logo svg { width: 34px; height: 34px; }
.demo-users { display: grid; gap: 8px; }
.demo-users button { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 14px; background: var(--bg); box-shadow: var(--sh-in); font-size: 13px; text-align: left; }
.demo-users b { font-weight: 650; }

/* ---------- Sticky bară filtre (inventar) ---------- */
.sticky-top { margin: 0 -20px; padding: 0 20px; }

/* ---------- Hartă pe tot ecranul ---------- */
.mapview .search-bar { position: absolute; z-index: 10; left: 14px; right: 14px; top: calc(var(--sat) + 12px); }
.mapview .search-bar .input { height: 54px; border-radius: 20px; background: rgba(250, 252, 255, .86); backdrop-filter: blur(20px); box-shadow: 0 10px 30px -10px rgba(60, 80, 110, .4); }
.mapview .filters { position: absolute; z-index: 9; left: 0; right: 0; top: calc(var(--sat) + 76px); padding: 0 14px; }
.mapview .filters .chips { padding: 4px 14px 8px; margin: 0 -14px; }
.mapview .filters .chip { background: rgba(250, 252, 255, .86); backdrop-filter: blur(16px); box-shadow: 0 6px 16px -8px rgba(60, 80, 110, .35); }
.mapview .filters .chip.active { background: var(--accent); color: #fff; box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .55); }
.mapview .ctrls { position: absolute; z-index: 9; right: 14px; bottom: calc(var(--nav-h) + var(--sab) + 38px); display: grid; gap: 12px; }
.mapview .counter { position: absolute; z-index: 9; left: 14px; bottom: calc(var(--nav-h) + var(--sab) + 40px); }
.results { position: absolute; top: 60px; left: 0; right: 0; max-height: 50vh; overflow-y: auto; border-radius: 20px; padding: 6px; background: rgba(250, 252, 255, .96); backdrop-filter: blur(20px); box-shadow: 0 20px 40px -12px rgba(40, 60, 90, .4); }
.results button { display: flex; width: 100%; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; text-align: left; }
.results button:active, .results button:hover { background: rgba(37, 99, 235, .07); }
.results img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  body { overflow: hidden; }
  .nav { display: none; }
  .sidebar { display: flex; position: fixed; z-index: 30; inset: 0 auto 0 0; width: 264px; flex-direction: column; padding: 28px 18px 22px; gap: 6px; background: linear-gradient(180deg, #F7F9FC, #EFF2F7); box-shadow: 8px 0 30px -14px rgba(100, 120, 150, .35); }
  .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; }
  .sidebar .brand .logo { width: 44px; height: 44px; border-radius: 14px; }
  .sidebar .brand .logo svg { width: 22px; height: 22px; }
  .sidebar a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; font-weight: 600; color: var(--text-3); transition: all .2s var(--ease); }
  .sidebar a:hover { color: var(--text); }
  .sidebar a.active { color: var(--accent); background: var(--bg); box-shadow: var(--sh-in); }
  .sidebar .add { margin: 10px 0 14px; min-height: 54px; }
  .sidebar .foot { margin-top: auto; }
  #app { left: 264px; }
  .view { padding: 32px 40px 48px; }
  .view.flush { padding: 0; }
  .view > .wrap { max-width: 1280px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
  .map-card { height: clamp(420px, 62vh, 760px); }
  .chips { padding-left: 4px; padding-right: 4px; margin: 0; flex-wrap: wrap; overflow: visible; }
  .list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
  .hero { margin: -32px -40px 0; height: 340px; }
  .detail-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .sticky-top { margin: 0; padding: 0; }
  .sheet { max-width: 480px; left: auto; right: 24px; bottom: 24px; border-radius: var(--r-sheet); transform: translateY(120%); padding-bottom: 0; }
  .sheet.full { height: auto; max-height: 88vh; }
  .sheet.center { left: 0; right: 0; margin: auto; max-width: 560px; top: 0; bottom: 0; height: fit-content; max-height: 88vh; transform: translateY(40px) scale(.97); opacity: 0; transition: transform .35s var(--ease), opacity .3s; }
  .sheet.center.show { transform: none; opacity: 1; }
  .mapview .ctrls { bottom: 36px; }
  .mapview .counter { bottom: 40px; }
  .mapview .search-bar { max-width: 460px; left: 20px; right: auto; width: 100%; }
  .mapview .filters { left: 20px; right: auto; max-width: 720px; padding: 0; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .home-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
