/* Belukha Baltics — UI upgrade layer. Loaded after the page's own <style>; changes look only, no logic.
   Keeps the brand (dark, Oswald / Manrope / JetBrains Mono, cyan accent, cut corners) and fixes:
   contrast of small labels, 44px touch targets, visible focus, sticky glass header + tabs, table
   readability, stat-tile hierarchy, wider layout on desktop, calmer motion. Remove the <link> to revert. */

:root{
  --ink-dim:#a4acb8;            /* was #8b93a0 — small text now passes 4.5:1 on the panels */
  --ink-faint:#7c8592;          /* was #525963 — labels/table headers were too faint to read */
  --panel:#13161b;
  --panel-raised:#1a1e25;
  --line:rgba(238,241,244,0.09);
  --line-strong:rgba(238,241,244,0.20);
  --accent-soft:rgba(127,216,255,0.10);
  --ok:#3ddc84; --bad:#ff5d6c; --warn:#ffc94d;
  --ease:cubic-bezier(.2,.8,.2,1);
  --tap:44px;
}

/* ---------- app shell: soft ambient light behind the content */
.screen--app{
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(127,216,255,.07), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(160,120,255,.05), transparent 60%);
  scroll-behavior:smooth;
}

/* ---------- header: glass, compact, aligned */
.app-header{
  position:relative; z-index:6;
  background:rgba(12,14,18,.78);
  -webkit-backdrop-filter:blur(14px) saturate(140%); backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid var(--line);
  padding:14px clamp(16px,4vw,48px);
}
.app-header-brand img{ width:30px; }
.app-title{ font-size:16px; letter-spacing:.12em; }
.app-user-tag{ color:var(--ink-faint); }
.app-user-switch{
  min-height:36px; padding:6px 10px; border-radius:0; background:var(--panel-raised);
  transition:border-color .2s, box-shadow .2s;
}
.app-user-switch:focus-visible{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.app-user-role{ background:var(--accent-soft); border-color:rgba(127,216,255,.35); padding:5px 10px; }
.logout-btn{ min-height:36px; transition:border-color .2s, color .2s, background .2s; }
.logout-btn:hover{ background:var(--accent-soft); }
.logout-btn:focus-visible{ outline:none; border-color:var(--accent); color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }

/* ---------- tabs: stick to the top once the header scrolls away, pill highlight, edge fade */
.app-tabs{
  position:sticky; top:0; z-index:5;
  background:rgba(8,9,11,.82);
  -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px);
  gap:6px; padding:8px clamp(12px,4vw,48px);
  -webkit-mask-image:linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
          mask-image:linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.app-tab{
  margin-right:0; min-height:var(--tap); padding:0 16px;
  border:1px solid transparent; border-bottom-width:1px;
  color:var(--ink-dim); font-size:11.5px; position:relative;
  transition:color .2s, background .2s, border-color .2s;
}
.app-tab:hover{ color:var(--ink); background:rgba(238,241,244,.04); }
.app-tab.active{
  color:var(--accent); background:var(--accent-soft); border-color:rgba(127,216,255,.28);
  box-shadow:inset 0 -2px 0 var(--accent), 0 0 24px -8px var(--accent-glow);
}
.app-tab:focus-visible{ outline:none; box-shadow:0 0 0 2px var(--accent); }

/* ---------- content width + panel entrance */
.app-content{ max-width:1180px; padding-top:clamp(18px,3vw,32px); }
.app-panel{ gap:20px; }
.app-panel.active{ animation:uiPanelIn .45s var(--ease) both; }
.app-panel.active > *{ animation:uiRise .5s var(--ease) both; }
.app-panel.active > *:nth-child(2){ animation-delay:.06s; }
.app-panel.active > *:nth-child(3){ animation-delay:.12s; }
.app-panel.active > *:nth-child(n+4){ animation-delay:.18s; }
@keyframes uiPanelIn{ from{ opacity:0; } to{ opacity:1; } }
@keyframes uiRise{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }

/* ---------- panels: raised surface, hairline highlight, accent heading tick */
.panel-block{
  background:linear-gradient(180deg, rgba(238,241,244,.028), rgba(238,241,244,0) 140px), var(--panel);
  border:1px solid var(--line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04), 0 24px 60px -36px rgba(0,0,0,.8);
  transition:border-color .3s, box-shadow .3s;
}
.panel-block:hover{ border-color:var(--line-strong); }
.panel-block h2, .panel-block-header h2{
  display:flex; align-items:center; gap:10px; letter-spacing:.08em;
}
.panel-block h2::before, .panel-block-header h2::before{
  content:""; width:3px; height:1em; background:linear-gradient(var(--accent), rgba(127,216,255,.2));
  box-shadow:0 0 12px var(--accent-glow); flex-shrink:0;
}
.app-empty{ color:var(--ink-dim); }

/* ---------- stat tiles: clearer hierarchy, accent bar, hover lift */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:14px; }
.stat-tile{
  background:linear-gradient(160deg, rgba(127,216,255,.06), rgba(127,216,255,0) 55%), var(--panel-raised);
  border:1px solid var(--line); overflow:hidden; padding:18px 20px 20px;
}
.stat-tile::after{
  content:""; position:absolute; left:0; top:0; bottom:0; width:2px;
  background:linear-gradient(var(--accent), transparent); opacity:.8;
}
.stat-tile:hover{ border-color:rgba(127,216,255,.3); box-shadow:0 18px 44px -24px var(--accent-glow); }
.stat-tile-label{ color:var(--ink-faint); font-size:10.5px; }
.stat-tile-value{ font-size:clamp(26px,3vw,34px); color:var(--ink); text-shadow:0 0 24px rgba(127,216,255,.12); }

/* ---------- warehouse cards */
.warehouse-grid{ gap:14px; }
.warehouse-card{ background:var(--panel-raised); }
.warehouse-card:hover{ border-color:rgba(127,216,255,.3); }

/* ---------- forms: 44px fields, visible focus ring */
.field label{ color:var(--ink-faint); }
.field input, .field select, .employee-form .field select, .finance-form-row .field select,
.unit-select, .inline-input, .request-row input{
  min-height:var(--tap); background:var(--bg-1); border:1px solid var(--line-strong); color:var(--ink);
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.field input:hover, .field select:hover, .inline-input:hover{ border-color:rgba(238,241,244,.3); }
.field input:focus, .field select:focus, .employee-form .field select:focus, .finance-form-row .field select:focus,
.unit-select:focus, .inline-input:focus, .request-row input:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); background:#0f1217;
}
.field input.error-field, .inline-input.error-field{ border-color:var(--bad); box-shadow:0 0 0 3px rgba(255,93,108,.15); }

/* ---------- buttons */
.submit-btn{
  min-height:var(--tap);
  background:linear-gradient(180deg, #9be3ff, var(--accent) 60%, #5cc6f0);
  box-shadow:0 10px 28px -12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.5);
  transition:transform .15s var(--ease), box-shadow .2s, filter .2s;
}
.submit-btn:hover{ filter:brightness(1.06); box-shadow:0 14px 34px -12px rgba(127,216,255,.6), inset 0 1px 0 rgba(255,255,255,.5); }
.submit-btn:active{ transform:translateY(1px) scale(.99); }
.submit-btn:focus-visible{ outline:none; box-shadow:0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.clear-btn, .request-approve, .request-reject, .employee-remove, .qty-btn{
  min-height:36px; transition:border-color .2s, color .2s, background .2s;
}
.request-approve:hover{ background:rgba(61,220,132,.1); }
.request-reject:hover, .employee-remove:hover{ background:rgba(255,93,108,.1); }
.clear-btn:focus-visible, .request-approve:focus-visible, .request-reject:focus-visible,
.employee-remove:focus-visible, .qty-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }

/* ---------- tables: readable header, zebra rows, hover, tabular numbers */
.employee-table, .request-table{ font-size:13.5px; font-variant-numeric:tabular-nums; }
.employee-table th, .request-table th{
  color:var(--ink-faint); padding-top:10px; background:var(--panel);
  position:sticky; top:0; z-index:1;
}
.employee-table tbody tr, .request-table tbody tr{ transition:background .15s; }
.employee-table tbody tr:nth-child(even) td, .request-table tbody tr:nth-child(even) td{ background:rgba(238,241,244,.018); }
.employee-table tbody tr:hover td, .request-table tbody tr:hover td{ background:rgba(127,216,255,.05); }
.employee-table td, .request-table td{ border-bottom-color:rgba(238,241,244,.06); }

/* ---------- status badges and amounts */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:10.5px; }
.badge::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; box-shadow:0 0 8px currentColor; }
.badge-pending{ color:var(--warn); background:rgba(255,201,77,.1); border-color:rgba(255,201,77,.3); }
.badge-approved{ color:var(--ok); background:rgba(61,220,132,.1); border-color:rgba(61,220,132,.3); }
.badge-rejected{ color:var(--bad); background:rgba(255,93,108,.1); border-color:rgba(255,93,108,.3); }
.amount-positive{ color:var(--ok); }
.amount-negative{ color:var(--bad); }

/* ---------- login card */
.login-card{ background:linear-gradient(180deg, rgba(238,241,244,.035), rgba(238,241,244,0) 160px), var(--panel); }

/* ---------- Christmas decor tuned for the app: garland along the very top edge, frost line on cards */
.app-header .xGarland{ top:0; bottom:auto; height:16px; z-index:0; opacity:.9; }
.app-header .xGarland .bulb{ width:6px; height:9px; }
.app-header-brand, .app-header-user{ position:relative; z-index:1; }
.stat-tile::before, .warehouse-card::before, .login-card::before{
  height:1px; background:linear-gradient(90deg, transparent, rgba(238,241,244,.7), transparent); opacity:.6;
}

/* ---------- small screens */
@media (max-width:640px){
  .app-header{ padding:10px 14px; }
  .app-tabs{ padding:6px 8px; }
  .app-tab{ padding:0 12px; font-size:11px; }
  .stat-grid{ grid-template-columns:1fr 1fr; gap:10px; }
  .stat-tile{ padding:14px; }
  .stat-tile-value{ font-size:22px; }
  .app-content{ padding-left:12px; padding-right:12px; }
}

@media (prefers-reduced-motion: reduce){
  .app-panel.active, .app-panel.active > *{ animation:none !important; }
  .screen--app{ scroll-behavior:auto; }
}

/* ---------- multi-line sale form: queued lines + total */
.finance-form-row .sale-add-btn{ min-height:var(--tap); padding:0 16px; white-space:nowrap; }
.sale-cart-list{ list-style:none; margin:14px 0 0; padding:0; border:1px solid var(--line); background:var(--bg-1); }
.sale-cart-list li{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-bottom:1px solid var(--line);
  animation:uiRise .25s var(--ease) both; }
.sale-cart-list li:last-child{ border-bottom:none; }
.sale-cart-name{ flex:1; min-width:0; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sale-cart-meta{ font-family:var(--font-mono); font-size:12px; color:var(--ink-dim); font-variant-numeric:tabular-nums; white-space:nowrap; }
.sale-cart-total{ text-align:right; margin-top:10px; font-family:var(--font-display); font-size:18px; letter-spacing:.04em; color:var(--accent); }
@media (max-width:640px){ .sale-cart-list li{ flex-wrap:wrap; } .sale-cart-meta{ order:3; width:100%; } }

/* ---------- warehouse value in the "Prekės sandėlyje" header (admin only) */
.panel-block-header .stock-value{ margin-left:auto; display:inline-flex; align-items:baseline; gap:10px; flex-wrap:wrap;
  padding:6px 12px; border:1px solid rgba(127,216,255,.25); background:var(--accent-soft); }
.stock-value[hidden]{ display:none; }
.stock-value-label{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint); }
.stock-value b{ font-family:var(--font-display); font-size:20px; font-weight:600; color:var(--accent); font-variant-numeric:tabular-nums; }
.stock-value-units{ font-family:var(--font-mono); font-size:11px; color:var(--ink-dim); }
.panel-block-header{ gap:12px; }
