/* Osilanda apskaita: išvaizda
   Šviesi ir tamsi tema: pagal telefono nustatymą arba <html data-theme="light|dark"> (perjungiklis įsimenamas).
   Spalvos tik per kintamuosius žemiau, kad abi temos atrodytų tvarkingai. */
:root {
  color-scheme: light;
  /* Prekės ženklas (brand/SKAITYK.md): grafitas #202D33, šalavijo žalia #80A675 */
  --brand-graphite: #202d33;
  --brand-green: #80a675;
  --accent: #80a675;
  --accent-d: #6d9462;
  --accent-grad: linear-gradient(180deg, #8cb281 0%, #80a675 60%, #779f6b 100%);
  --accent-soft: #ebf2e8;
  --accent-ink: #46663d;
  --hero-num: #a9cb9d;

  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --surface-3: #edf1ef;
  --ink: #202d33;
  --ink-2: #3d4c52;
  --muted: #667479;
  --line: #e2e8e5;
  --line-2: #d0d9d5;
  --glass: rgba(255, 255, 255, .86);

  --graphite: #202d33;
  --graphite-2: #2a3a41;
  --on-graphite: #f1f5f3;
  --on-graphite-2: #a7b5b9;

  --red: #e5484d;
  --green: #2f9e6a;
  --orange: #6d9462;
  --ok-bg: #e2f5ec; --ok-ink: #1a7a4c;
  --wait-bg: #fdf1dc; --wait-ink: #8a5a00;
  --chk-bg: #efe8ff; --chk-ink: #5b35c4; --chk-line: #8b5cf6;
  --no-bg: #fde6e7; --no-ink: #b02a30;
  --tag-bg: #edf1ef; --tag-ink: #3d4c52;

  --sh-1: 0 1px 2px rgba(32, 45, 51, .06), 0 1px 3px rgba(32, 45, 51, .04);
  --sh-2: 0 1px 2px rgba(32, 45, 51, .05), 0 6px 18px rgba(32, 45, 51, .07);
  --sh-3: 0 4px 10px rgba(32, 45, 51, .07), 0 18px 44px rgba(32, 45, 51, .14);
  --sh-a: 0 3px 10px rgba(96, 135, 86, .28);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 12px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-h: Manrope, Inter, "Segoe UI", system-ui, sans-serif;

  /* seni pavadinimai (naudojami kode) */
  --yellow: var(--accent);
  --blue: var(--accent);
  --blue-l: var(--accent-soft);
  --dark: var(--ink);
  --card: var(--surface);

  font-family: var(--font);
  font-feature-settings: "cv11", "ss01";
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent-soft: rgba(128, 166, 117, .15);
    --accent-ink: #a9cb9d;
    --bg: #0f1517;
    --surface: #162024;
    --surface-2: #1b262b;
    --surface-3: #223036;
    --ink: #e8efec;
    --ink-2: #c0ccc8;
    --muted: #8a9a9e;
    --line: #24333a;
    --line-2: #314249;
    --glass: rgba(22, 32, 36, .86);
    --graphite: #131c20;
    --graphite-2: #1c282d;
    --orange: #a9cb9d;
    --ok-bg: rgba(47, 158, 106, .18); --ok-ink: #6fd8a5;
    --wait-bg: rgba(240, 170, 40, .16); --wait-ink: #f0c060;
  --chk-bg: rgba(139, 92, 246, .2); --chk-ink: #c4b2ff; --chk-line: #a78bfa;
    --no-bg: rgba(229, 72, 77, .18); --no-ink: #ff8a8e;
    --tag-bg: #223036; --tag-ink: #c0ccc8;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
    --sh-3: 0 6px 14px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .55);
    --sh-a: 0 4px 16px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent-soft: rgba(128, 166, 117, .15);
  --accent-ink: #a9cb9d;
  --bg: #0f1517;
  --surface: #162024;
  --surface-2: #1b262b;
  --surface-3: #223036;
  --ink: #e8efec;
  --ink-2: #c0ccc8;
  --muted: #8a9a9e;
  --line: #24333a;
  --line-2: #314249;
  --glass: rgba(22, 32, 36, .86);
  --graphite: #131c20;
  --graphite-2: #1c282d;
  --orange: #a9cb9d;
  --ok-bg: rgba(47, 158, 106, .18); --ok-ink: #6fd8a5;
  --wait-bg: rgba(240, 170, 40, .16); --wait-ink: #f0c060;
  --chk-bg: rgba(139, 92, 246, .2); --chk-ink: #c4b2ff; --chk-line: #a78bfa;
  --no-bg: rgba(229, 72, 77, .18); --no-ink: #ff8a8e;
  --tag-bg: #223036; --tag-ink: #c0ccc8;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
  --sh-3: 0 6px 14px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .55);
  --sh-a: 0 4px 16px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--font-h); letter-spacing: -.01em; }
::selection { background: rgba(128, 166, 117, .35); }

.boot { min-height: 100vh; display: grid; place-items: center; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rot .8s linear infinite; }
.boot .spin, .spin.dark { border-color: var(--line-2); border-top-color: var(--accent); }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Dvispalvės ikonos (kaip logotipas: kontūras + žalias užpildo elementas) ---------- */
.duo { width: 24px; height: 24px; flex: none; overflow: visible; --icon-ink: var(--ink); }
.duo .duo-s { stroke: var(--icon-ink); stroke-width: 1.8; }
.duo .duo-f { fill: var(--accent); stroke: none; }
.hero .duo, .side .duo { --icon-ink: #ffffff; }

/* ---------- Logotipas (karkasas ir užrašas grafito, tamsiame fone balti; užpildas žalias) ---------- */
.lg { display: block; flex: none; --logo-ink: var(--ink); }
.lg .lg-k { fill: var(--logo-ink); stroke: var(--logo-ink); stroke-width: 3; stroke-linejoin: round; }
.lg .lg-t { fill: var(--logo-ink); }
.lg .lg-z { fill: var(--brand-green); stroke: var(--brand-green); stroke-width: 3; stroke-linejoin: round; }
.hero .lg, .side .lg { --logo-ink: #ffffff; }

/* ---------- Pagrindinis: viršutinė juosta ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(128, 166, 117, .16), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgba(255, 255, 255, .05), transparent 70%),
    linear-gradient(165deg, #2a3a41 0%, #202d33 60%, #182227 100%);
  color: #fff;
  padding: 16px 16px 46px;
  padding-top: max(16px, env(safe-area-inset-top));
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hello { display: flex; align-items: center; gap: 12px; }
.hello .hello-mark { width: 40px; height: 40px; }
.hello small { display: block; font-size: 12px; font-weight: 500; color: var(--hero-num); letter-spacing: .2px; }
.hello h2 { margin: 1px 0 0; font-size: 20px; font-weight: 700; }
.hero-btns { display: flex; gap: 8px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 8px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); transition: background .15s, transform .1s;
}
.pill:hover { background: rgba(255, 255, 255, .14); }
.pill:active { transform: scale(.96); }
.pill svg { width: 17px; height: 17px; color: var(--hero-num); }
.bell { position: relative; width: 38px; padding: 0; justify-content: center; }
.bell .badge {
  position: absolute; right: -3px; top: -3px; min-width: 18px; height: 18px; border-radius: 6px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px #202d33;
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.stat-big {
  position: relative; overflow: hidden; border-radius: var(--r); text-align: left; padding: 14px 16px 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .10); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.stat-big p { margin: 0; font-size: 13px; font-weight: 500; display: inline-flex; gap: 7px; align-items: center; color: #d9dbe0; }
.stat-big p svg { width: 18px; height: 18px; }
.stat-big h2 { margin: 6px 0 0; font-size: 32px; font-weight: 800; color: var(--hero-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stats-small { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.stat-sm { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; padding: 11px 12px 12px; min-height: 64px; }
.stat-sm p { margin: 0; display: flex; gap: 6px; align-items: center; color: #c9ccd2; font-size: 12px !important; font-weight: 500; }
.stat-sm p svg { width: 16px; height: 16px; flex: none; }
.stat-sm h4 { margin: 8px 0 0; font-size: 16px; font-weight: 700; color: #fff; }
a.stat-sm { color: #fff; transition: background .15s; }
a.stat-sm:hover { background: rgba(255, 255, 255, .1); }
.running {
  margin-top: 10px; background: rgba(255, 255, 255, .96); color: #202d33; border-radius: 8px; padding: 10px 12px 10px 14px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}
.running .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,158,106,.18); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(47,158,106,.05); } }
.running b { font-variant-numeric: tabular-nums; }
.running a { margin-left: auto; color: #202d33; background: var(--accent-grad); padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 13px; }

.sheet-main { position: relative; background: var(--bg); margin-top: -24px; border-radius: 14px 14px 0 0; padding: 22px 14px 28px; min-height: 50vh; }

/* Dienų juosta */
.days { display: flex; justify-content: space-between; gap: 4px; padding: 0 4%; margin-bottom: 22px; overflow: hidden; }
.day { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; min-width: 52px; }
.day .c {
  width: 58px; height: 58px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; align-content: center;
  background: var(--surface); line-height: 1; box-shadow: var(--sh-1); transition: transform .12s;
}
.day:active .c { transform: scale(.95); }
.day .c small { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.day .c b { font-size: 20px; font-weight: 700; margin-top: 4px; font-family: var(--font-h); }
.day.has .c { background: var(--accent-grad); border-color: transparent; color: #202d33; box-shadow: var(--sh-a); }
.day.has .c small { color: #203520; }
.day.today .c { background: linear-gradient(165deg, #2a3a41, #182227); border-color: rgba(128, 166, 117, .7); color: var(--hero-num); box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.day.today .c small { color: #e6e6e6; }
.day .t { font-size: 9px; font-weight: 700; letter-spacing: .7px; color: var(--ink); height: 10px; }

/* Meniu kortelės */
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mcard {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: center; padding: 14px 10px;
  box-shadow: var(--sh-2); transition: box-shadow .2s, transform .15s, border-color .2s;
}
.mcard::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(128, 166, 117, .07), transparent 60%);
}
.mcard:hover { box-shadow: var(--sh-3); border-color: rgba(128, 166, 117, .55); transform: translateY(-2px); }
.mcard:active { transform: scale(.97); box-shadow: var(--sh-1); }
.mcard .ic { width: 60px; height: 60px; border-radius: 0; display: grid; place-items: center; background: none !important; box-shadow: none; }
.mcard .ic .duo { width: 44px; height: 44px; }
.mcard .ic .duo .duo-s { stroke-width: 1.6; }
.mcard .ic > svg:not(.duo) { width: 28px; height: 28px; color: var(--accent-d); }
.mcard .cnt { font-size: 12px; color: #fff; background: var(--red); border-radius: 6px; padding: 1px 7px; margin-left: 4px; }

/* ---------- Vidiniai puslapiai ---------- */
.page { min-height: 100vh; background: var(--bg); }
.pbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.pbar h1 { margin: 0; font-size: 20px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar .pb-ic { width: 30px; height: 30px; }
.back { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 0; cursor: pointer; display: grid; place-items: center; flex: none; box-shadow: var(--sh-1); transition: transform .1s; }
.back:active { transform: scale(.94); }
.back svg { width: 20px; height: 20px; }
.prog { flex: 1; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--accent-grad); border-radius: 4px; transition: width .3s; }
.prog-n { font-size: 12px; font-weight: 600; color: var(--muted); }
.pbody { padding: 16px 14px 28px; max-width: 1600px; margin: 0 auto; }
.step-title { text-align: center; font-size: 22px; font-weight: 800; font-family: var(--font-h); margin: 8px 0 14px; }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; box-shadow: var(--sh-1); }
.box h3 { margin: 0 0 14px; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.box h3 svg { width: 19px; height: 19px; color: var(--orange); }

.geo { border-radius: var(--r); padding: 6px; background: var(--surface); box-shadow: var(--sh-2); border: 1px solid var(--line); }
.geo > div {
  height: 200px; border-radius: 8px;
  background: radial-gradient(80% 80% at 70% 0%, rgba(128, 166, 117, .16), transparent 60%), linear-gradient(160deg, #2a3a41, #182227);
  display: grid; place-items: center; text-align: center; color: #eee; font-size: 14px; padding: 10px;
}
.geo .big { font-size: 32px; font-weight: 800; color: var(--hero-num); font-family: var(--font-h); font-variant-numeric: tabular-nums; }
.addr { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; margin: 14px 0; }
.addr svg { width: 18px; height: 18px; color: var(--red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px;
  border-radius: 8px; border: 1px solid transparent; background: var(--accent-grad); color: #202d33; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: var(--sh-a), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .1s, box-shadow .15s, filter .15s, background .15s;
}
.btn:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn:hover:not(:disabled) { filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--sh-1); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-2); filter: none; }
.btn.red { background: linear-gradient(180deg, #ef5a5f, #dc3d43); color: #fff; box-shadow: 0 4px 14px rgba(229, 72, 77, .3); }
.btn.green { background: linear-gradient(180deg, #38b07a, #28905f); color: #fff; box-shadow: 0 4px 14px rgba(47, 158, 106, .3); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn.block { width: 100%; min-height: 48px; font-size: 15px; border-radius: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.search {
  display: flex; align-items: center; background: var(--surface); border-radius: 8px; border: 1px solid var(--line); margin: 16px 0; box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(128, 166, 117, .2); }
.search input { flex: 1; border: 0; outline: 0; padding: 12px 16px; font-size: 16px; background: transparent; min-width: 0; }
.search svg { width: 20px; height: 20px; margin-right: 14px; color: var(--muted); }
.lbl { font-weight: 700; font-size: 15px; margin: 8px 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }

.plist { display: grid; gap: 10px; }
.pitem {
  display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-2);
  border-radius: 8px; padding: 10px 14px 10px 10px; min-height: 60px; cursor: pointer; width: 100%; text-align: left; box-shadow: var(--sh-1);
  transition: border-color .15s, background .15s, transform .1s;
}
.pitem:hover { border-left-color: var(--accent); }
.pitem:active { transform: scale(.99); }
.pitem.sel { border-color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.pitem .no { width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.pitem .nm { flex: 1; font-size: 16px; color: var(--ink); font-weight: 600; }
.pitem .nm small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pitem .pin { width: 20px; height: 20px; color: var(--accent-d); flex: none; }
.pitem .dist { font-size: 12px; color: var(--muted); }

/* Formos */
.form { display: grid; gap: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 13px; font-size: 16px; background: var(--surface); outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(128, 166, 117, .2); }
.field textarea { min-height: 76px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.err { color: var(--red); font-size: 14px; min-height: 18px; }
.date-in { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; max-width: 420px; background: var(--surface); }
.date-in svg { width: 18px; height: 18px; color: var(--orange); flex: none; }
.date-in input { border: 0; outline: 0; padding: 10px 0; font-size: 14px; min-width: 0; flex: 1; background: transparent; }

/* Valandų santrauka ir skirtukai */
.sum { display: flex; gap: 16px 48px; flex-wrap: wrap; }
.sum div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sum .i { width: 34px; height: 34px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.sum .i.v { background: var(--surface-3); color: var(--ink-2); }
.sum .i svg { width: 17px; height: 17px; }
.tabs { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--surface-3); }
.tabs button { flex: 1; border: 0; background: none; border-radius: 6px; padding: 9px 10px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 760px; }
.tbl th { background: var(--surface-2); text-align: left; font-weight: 600; color: var(--muted); padding: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child { border-radius: 8px 0 0 0; } .tbl th:last-child { border-radius: 0 8px 0 0; }
.tbl td { padding: 12px; vertical-align: middle; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.tbl tr:nth-child(even) td { background: var(--surface-2); }
.tbl tbody tr:hover td { background: var(--accent-soft); }
.tbl td b { color: var(--ink); }
.tbl td small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.tbl .act { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.icon-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.icon-btn:active { transform: scale(.93); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.del svg { color: var(--red); }
.icon-btn.del:hover { border-color: var(--red); background: var(--no-bg); }
.foot { font-size: 13px; padding: 12px 0; color: var(--ink-2); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--tag-bg); color: var(--tag-ink); }
.tag.ok, .tag.run { background: var(--ok-bg); color: var(--ok-ink); }
.tag.wait { background: var(--wait-bg); color: var(--wait-ink); }
.tag.no { background: var(--no-bg); color: var(--no-ink); }

/* Sąrašų eilutės (įrankiai, darbuotojai ir kt.) */
.rows { display: grid; gap: 10px; }
.row { background: var(--surface); border-radius: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); box-shadow: var(--sh-1); }
.row .main { flex: 1; min-width: 0; }
.row .main b { display: block; font-weight: 600; font-size: 15px; }
.row .main small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.row .ri { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--surface-3) !important; color: var(--ink-2); }
.row .ri svg { width: 20px; height: 20px; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty input { width: 64px; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px; text-align: center; font-size: 15px; background: var(--surface); }

/* Apatinis lapas (meniu) */
.sheet-bg { position: fixed; inset: 0; background: rgba(8, 10, 14, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 40; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--surface); border-radius: 14px 14px 0 0; box-shadow: var(--sh-3);
  max-height: 86vh; overflow-y: auto; padding: 22px 0 max(14px, env(safe-area-inset-bottom)); animation: up .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-2); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-inner { max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.sheet h3 { margin: 6px 0 10px; font-size: 18px; font-weight: 800; }
.sheet .opt {
  display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; cursor: pointer; width: 100%;
  background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; border-radius: 0; transition: background .15s;
}
.sheet .opt:hover { background: var(--surface-2); }
.sheet .opt:last-child { border-bottom: 0; }
.sheet .opt svg.l { width: 20px; height: 20px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 8px; padding: 9px; box-sizing: content-box; flex: none; }
.sheet .opt .duo.l { width: 24px; height: 24px; padding: 8px; background: var(--accent-soft); border-radius: 8px; box-sizing: content-box; flex: none; }
.sheet .opt svg.r { width: 18px; height: 18px; color: var(--muted); margin-left: auto; flex: none; }
.sheet .opt .val { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 14px; }
.note-item { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.note-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.note-item.new { font-weight: 600; }

/* Kalendorius */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head b { font-size: 18px; text-transform: capitalize; font-family: var(--font-h); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal .cd { background: var(--surface); border-radius: 6px; min-height: 74px; padding: 6px; font-size: 12px; cursor: pointer; border: 1px solid var(--line); overflow: hidden; transition: border-color .15s; }
.cal .cd:hover { border-color: var(--line-2); }
.cal .cd.out { opacity: .4; }
.cal .cd.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal .cd.sel { background: var(--accent-soft); }
.cal .cd .n { font-weight: 700; font-size: 13px; }
.cal .ev { display: block; margin-top: 2px; padding: 1px 5px; border-radius: 5px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #202d33; color: #a9cb9d; }
.cal .ev.h { background: rgba(230, 120, 50, .16); color: #c25a16; }
.cal .ev.s { background: rgba(255, 190, 0, .2); color: #9a7400; }
.cal .ev.done { text-decoration: line-through; opacity: .6; }

/* Prisijungimas */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(128, 166, 117, .18), transparent 70%),
    linear-gradient(170deg, #2a3a41 0%, #202d33 55%, #141d21 100%); }
.auth-card { width: 100%; max-width: 390px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); padding: 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.auth-card .auth-logo { width: 200px; height: auto; margin: 6px auto 18px; }
.auth-card h1 { text-align: center; margin: 0 0 4px; font-size: 20px; color: var(--muted); font-weight: 700; font-weight: 800; }
.auth-card p { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: #202d33; color: #fff;
  padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); max-width: 90vw; text-align: center;
  border: 1px solid rgba(255, 255, 255, .08); animation: tup .22s ease-out;
}
@keyframes tup { from { opacity: 0; transform: translate(-50%, 10px); } }
.toast.bad { background: var(--red); }

@media (max-width: 700px) {
  .stats-small { grid-template-columns: repeat(3, 1fr); }
  .stat-big h2 { font-size: 27px; }
  .menu { gap: 12px; }
  .mcard { min-height: 118px; font-size: 14px; }
  .mcard .ic .duo { width: 40px; height: 40px; }
  .day .c { width: 50px; height: 50px; border-radius: 8px; }
  .day .c b { font-size: 17px; }
  .days { padding: 0; }
  .pill .lbl-hide { display: none; }
  .cal .cd { min-height: 56px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* GPS ribos */
.geo-ok { margin: 0; color: var(--green); font-size: 14px; font-weight: 600; }
.geo-bad { background: var(--no-bg); color: var(--no-ink); border-radius: 8px; padding: 11px 13px; font-size: 14px; line-height: 1.45; }
.cnt-l { display: block; text-align: right; font-size: 12px; color: var(--red); margin-top: 4px; }
.cnt-l.ok { color: var(--green); }
.geo-cell { font-size: 13px; white-space: nowrap; }
.geo-cell + .geo-cell { margin-top: 4px; }
.geo-cell.bad { color: var(--red); font-weight: 600; white-space: normal; max-width: 220px; }
.geo-cell.bad small { color: var(--no-ink); font-weight: 400; }

/* Pakvietimai */
.invite-text { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.5; word-break: break-word; border: 1px solid var(--line); }
a.btn.block { text-align: center; }

/* Atostogų likučiai */
.neg { color: var(--red) !important; }
.pos { color: var(--green); }
.vac-big { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.vac-big b { font-size: 36px; font-weight: 800; color: var(--ink); font-family: var(--font-h); letter-spacing: -.02em; }
.vac-big span { color: var(--muted); font-size: 14px; }
.vac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.vac-grid div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.vac-grid small { display: block; color: var(--muted); font-size: 12px; }
.vac-grid b { display: block; font-size: 16px; margin-top: 3px; }
.vac-calc { background: var(--accent-soft); color: var(--accent-ink); border-radius: 8px; padding: 11px 13px; font-size: 14px; line-height: 1.5; }
.box-in { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 12px; }
.vac-row { display: flex; align-items: center; gap: 12px; }
.vac-row > span:first-child { min-width: 70px; font-weight: 700; }
.vac-row .t { flex: 1; }
.vac-row.muted { opacity: .55; }
@media (max-width: 700px) { .vac-grid { grid-template-columns: 1fr 1fr; } .stats-small { grid-template-columns: 1fr 1fr; } }

/* Platus ekranas (kompiuteris) */
@media (min-width: 1000px) {
  .shell .menu { grid-template-columns: repeat(4, 1fr); }
  .days { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* ================= Šoninis meniu ir išdėstymas ================= */
.shell { min-height: 100vh; }
.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: 268px; z-index: 50;
  background: radial-gradient(120% 40% at 0% 0%, rgba(128, 166, 117, .08), transparent 60%), linear-gradient(180deg, #26353c 0%, #1a252a 100%);
  color: var(--on-graphite);
  display: flex; flex-direction: column; overflow-y: auto; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.shell.open .side { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
.side-bg { position: fixed; inset: 0; z-index: 49; background: rgba(8, 10, 14, .5); backdrop-filter: blur(3px); display: none; }
.shell.open .side-bg { display: block; }
.side-logo { display: block; padding: 22px 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, .07); margin-bottom: 6px; }
.side-logo .side-lg { width: 150px; height: auto; }
.side-logo small { display: block; margin: 8px 0 0 1px; color: var(--hero-num); font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; }
.nav { flex: 1; padding: 8px 12px 12px; display: grid; gap: 3px; align-content: start; }
.nav-a {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 8px; border: 0; background: none;
  color: #d3d6dc; font-size: 15px; font-weight: 600; cursor: pointer; text-align: left; transition: background .15s, color .15s;
}
.nav-a > svg { width: 24px; height: 24px; flex: none; }
.nav-a > svg:not(.duo) { color: var(--accent); }
.nav-a span { flex: 1; }
.nav-a .chev { width: 16px; height: 16px; color: #7d828b; transition: transform .2s; }
.nav-a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-g.open > .nav-a { color: #fff; }
.nav-a.on { background: rgba(128, 166, 117, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(128, 166, 117, .22); }
.nav-a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.nav-g.open > .nav-a .chev { transform: rotate(180deg); color: #fff; }
.nav-sub { display: none; padding: 2px 0 8px 23px; }
.nav-g.open .nav-sub { display: grid; }
.nav-sub a { position: relative; display: block; padding: 8px 12px 8px 20px; color: #a3a8b1; font-size: 14px; font-weight: 500; border-left: 1px solid rgba(255, 255, 255, .1); line-height: 1.3; border-radius: 0 6px 6px 0; transition: color .15s, background .15s; }
.nav-sub a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav-sub a.on { color: #fff; font-weight: 600; background: rgba(128, 166, 117, .12); border-left: 2px solid var(--accent); margin-left: -.5px; }
.side-me { display: flex; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 12px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); font-size: 14px; }
.side-me span { flex: 1; color: #fff; font-weight: 600; min-width: 0; }
.side-me small { display: block; color: #8e939c; font-size: 12px; font-weight: 500; }
.side-me .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .14); color: var(--accent); }
.side-me .icon-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(128, 166, 117, .5); }
.menu-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; flex: none; box-shadow: var(--sh-1); }
.menu-btn svg { width: 22px; height: 22px; }
.hero .menu-btn.pill { width: 38px; padding: 0; justify-content: center; }
.hero-top .hello { flex: 1; }
.pbell { position: relative; margin-left: auto; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: var(--sh-1); transition: transform .1s; }
.pbell:active { transform: scale(.94); }
.pbell svg { width: 18px; height: 18px; }
.pbell .badge { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; border-radius: 6px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--surface); }
.pbar .prog { max-width: 520px; }

@media (min-width: 1000px) {
  .side { transform: none; }
  .smain { margin-left: 268px; }
  .menu-btn, .side-bg, .shell .pbar .back { display: none !important; }
  .pbar { padding-left: 28px; padding-right: 28px; min-height: 66px; }
  .pbody { padding: 24px 28px 40px; }
  .hero { padding-left: 28px; padding-right: 28px; }
  .sheet-main { padding-left: 28px; padding-right: 28px; }
  /* Apatinis lapas kompiuteryje rodomas kaip langas viduryje */
  .sheet { left: 268px; right: 0; top: 6vh; bottom: auto; margin: 0 auto; max-width: 760px; max-height: 88vh; border-radius: var(--r-lg); padding: 18px 0 20px; animation: pop .2s ease-out; border: 1px solid var(--line); }
  .sheet::before { display: none; }
  .sheet-inner { padding: 0 24px; }
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ================= Bendri elementai ================= */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar .btn-row { align-items: center; }
.tb-title { font-family: var(--font-h); font-weight: 800; font-size: 18px; }
.sel { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; background: var(--surface); font-size: 14px; max-width: 240px; outline: 0; }
.sel:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(128, 166, 117, .2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: var(--surface-3); }
.seg button { border: 0; background: none; border-radius: 6px; padding: 7px 14px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); transition: background .15s, color .15s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; position: relative; overflow: hidden; box-shadow: var(--sh-1); }
.kpi::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent-grad); }
.kpi svg { position: absolute; right: 14px; top: 14px; width: 22px; height: 22px; color: var(--accent-d); opacity: .9; }
.kpi small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi b { display: block; font-size: 24px; margin-top: 4px; color: var(--ink); font-family: var(--font-h); font-weight: 800; letter-spacing: -.02em; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
.cols > .box, .cols > div { min-width: 0; }
.muted { color: var(--muted); font-weight: 400; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; font-size: 14px; font-weight: 500; }
.dot-c { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; flex: none; }
.bar { height: 6px; background: var(--surface-3); border-radius: 3px; margin-top: 5px; overflow: hidden; max-width: 140px; }
.bar i { display: block; height: 100%; border-radius: 3px; }
.wchecks { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 2px 12px; background: var(--surface); }
.wchecks .check { padding: 8px 0; font-size: 14px; }
.wchecks .check.all { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.color-in { height: 44px; padding: 4px !important; cursor: pointer; }
.tabs-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.tabs-line button, .tabs-line a { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 8px 13px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); box-shadow: var(--sh-1); transition: border-color .15s, background .15s; }
.tabs-line button:hover, .tabs-line a:hover { border-color: var(--line-2); }
.tabs-line .on { background: var(--accent-grad); color: #202d33; border-color: transparent; box-shadow: var(--sh-a); }
.tabs-line.big a { font-size: 14px; padding: 10px 18px; }
.bulk { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--ink); border-radius: 8px; padding: 9px 13px; margin-bottom: 10px; font-size: 14px; }
.tbl input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent-d); }
.tbl td a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 11px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; }
.sumbox { padding: 12px 18px; }
.sumbox summary { cursor: pointer; font-size: 15px; }
.sumbox table { margin-top: 10px; }
.hub { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important; }

/* ================= Savaitės grafikas ================= */
.board-box { padding: 0; overflow: hidden; }
table.board { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 900px; }
.board th, .board td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; text-align: center; vertical-align: middle; }
.board thead th { background: var(--surface-2); padding: 10px 4px; font-weight: 500; position: sticky; top: 0; z-index: 2; }
.board thead th b { display: block; font-size: 14px; font-weight: 700; }
.board thead th small { display: block; color: var(--muted); font-size: 11px; }
.board th.today, .board td.today { background: var(--accent-soft); }
.board thead th.today { background: var(--accent); color: #202d33; }
.board thead th.today small { color: #203520; }
.board th.we, .board td.we { background: var(--surface-3); }
.board .bw { text-align: left; min-width: 200px; max-width: 220px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.board thead .bw { z-index: 3; background: var(--surface-2); color: var(--ink); font-family: var(--font-h); font-weight: 800; font-size: 16px; }
.board td.bw { border-right: 1px solid var(--line-2); }
.board .bwi { display: flex; align-items: center; gap: 8px; }
.board td.bw small { display: block; color: var(--muted); font-size: 11px; }
.board .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(160deg, #2a3a41, #182227); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.board td[data-u] { cursor: pointer; min-width: 96px; height: 52px; transition: box-shadow .12s; }
.board td[data-u]:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.chip { display: block; border-radius: 7px; padding: 5px 7px; font-weight: 600; font-size: 12px; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.chip b { color: var(--red); background: #fff; border-radius: 50%; padding: 0 5px; margin-left: 3px; }
.chip.run { box-shadow: 0 0 0 2px #fff inset; animation: pulse2 1.6s infinite; }
@keyframes pulse2 { 50% { opacity: .65; } }
.dstat { display: inline-flex; gap: 4px; margin-top: 4px; }
.dstat em { font-style: normal; font-size: 11px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 7px; background: var(--surface); }
.dstat em.a { border-color: #f5a623; color: var(--wait-ink); }
.board tr.tot td { background: var(--surface-2); font-weight: 700; }
.board.month td[data-u] { min-width: 54px; }
.board.month .chip { font-size: 11px; padding: 4px 3px; }
.board.month thead th b { font-size: 13px; }

@media (max-width: 999px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .sel { max-width: none; flex: 1; }
  .msel { flex: 1 1 150px; }
  .msel .msel-b { width: 100%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- QR skenavimas (Issue #38) ---------- */
.scan-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.scan-row .search { flex: 1; margin: 0; }
.scan-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.scan-btn svg, #tsc svg, #bqr svg, #qsc svg, #qnext svg { width: 18px; height: 18px; vertical-align: -3px; }
.scan-ov { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; }
.scan-ov video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scan-frame i { width: min(68vw, 300px); aspect-ratio: 1; border-radius: var(--r-lg); border: 3px solid var(--brand-green); box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
.scan-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 16px 14px; background: linear-gradient(rgba(0,0,0,.6), transparent); font-family: var(--font-h); }
.scan-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.scan-x svg { width: 22px; height: 22px; }
.scan-bot { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px max(18px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: center; }
.scan-msg { margin: 0 0 12px; font-size: 15px; }
.scan-man { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.scan-man input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: var(--r); border: 0; font-size: 16px; }
.qr-tool { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.qr-tool h3 { margin: 0; }
.qr-tool small { color: var(--muted); }
.qr-tool .ri { width: 46px; height: 46px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--ink); }
.qr-tool .ri svg { width: 22px; height: 22px; }
.qr-where { margin: 4px 0 14px; font-weight: 600; }
.qr-photo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r); cursor: pointer; color: var(--muted); }
.qr-photo svg { width: 22px; height: 22px; }
.qr-prev { display: block; max-width: 100%; max-height: 260px; border-radius: var(--r); margin-top: 6px; }
.qr-gps { margin: 0; font-size: 13px; }
.qr-field { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-field input { flex: 1 1 200px; }

/* ---------- Darbuotojo įrankiai kaip Workernu (Issue #38) ---------- */
.scan-flash { position: absolute; left: 16px; right: 16px; top: calc(max(14px, env(safe-area-inset-top)) + 64px); padding: 14px 16px; border-radius: var(--r); font-weight: 600; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.scan-flash.ok { background: var(--brand-green); color: var(--brand-graphite); }
.scan-flash.bad { background: #d9534f; color: #fff; }
.scan-flash.info { background: #fff; color: var(--brand-graphite); }
.scan-ask { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: var(--surface); color: var(--ink); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
.scan-ask-t { font-size: 16px; margin-bottom: 12px; }
.scan-ask-t small { display: block; color: var(--muted); margin-top: 4px; font-size: 14px; }
.scan-ask-f { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.scan-ask-f input { padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r); font-size: 16px; background: var(--surface); color: var(--ink); }
.scan-ask .btn-row .btn { flex: 1; }
.scan-done { margin-top: 12px; width: 100%; max-width: 420px; }
.tk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.tk .stat-sm { background: var(--surface); border: 1px solid var(--line); }
.tk .stat-sm p { color: var(--muted); }
.tk .stat-sm h4 { color: var(--ink); }
.tk-btns { margin-bottom: 14px; }
.tk-btns .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tk-btns .btn svg, .tcard-a .btn svg, .wide svg { width: 18px; height: 18px; }
.tfilt { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tfilt .sel { flex: 1 1 150px; max-width: none; }
.tfilt .check { border: 0; padding: 4px 0; font-size: 14px; }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 10px; }
.tcard-h { display: flex; gap: 12px; align-items: center; }
.tcard-h .main { flex: 1; min-width: 0; }
.tcard-h .main b { display: block; }
.tcard-h .main small { color: var(--muted); }
.tcard-h .ri { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--ink); }
.tcard-h .ri svg { width: 20px; height: 20px; }
.tcard-w { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.tcard-i { margin-top: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--bg); font-size: 14px; }
.tcard-i div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.tcard-i span { color: var(--muted); }
.tcard-a { margin-top: 10px; flex-wrap: wrap; gap: 6px; }
.tcard-a .btn { display: inline-flex; align-items: center; gap: 6px; }
.wide { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.pick { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.pick-i { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.pick-i input { width: 20px; height: 20px; accent-color: var(--brand-green); flex: none; }
.pick-i small { display: block; color: var(--muted); font-weight: 400; }
.pick-i:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(128,166,117,.2); }
.qr-big { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 14px; text-align: center; }
.qr-big svg { width: min(72vw, 280px); height: auto; border-radius: var(--r); }
.qr-big small { color: var(--muted); }
.scan-row .search { flex: 1 1 0; min-width: 0; }
@media (max-width: 420px) { .scan-btn span { display: none; } .scan-btn { padding-left: 14px; padding-right: 14px; } }

/* ---------- Valandos žingsniais (Issue #40) ---------- */
.sumry div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sumry div:last-child { border-bottom: 0; }
.sumry span { color: var(--muted); }
.sumry b { text-align: right; }
.sumry .tot b { font-size: 18px; color: var(--accent-d); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 8px; }
.ph-grid .ph { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; }
.ph-grid img { width: 100%; height: 100%; object-fit: cover; }
.ph-grid button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ph-grid button svg { width: 16px; height: 16px; }
.link svg { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- Atostogos ir liga darbuotojui (Issue #44) ---------- */
.lv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.lv-stats.two { grid-template-columns: 1fr 1fr; }
.lv-st { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lv-st .ic svg { width: 34px; height: 34px; }
.lv-st small { color: var(--muted); font-size: 12px; line-height: 1.25; }
.lv-st b { font-family: var(--font-h); font-size: 20px; }
.lv-h { margin: 6px 0 10px; font-family: var(--font-h); }
.lv-tabs { margin-bottom: 12px; }
.lv-m { text-align: right; color: var(--muted); font-size: 13px; margin: 14px 2px 6px; }
.lv-c { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; margin-bottom: 8px; }
.lv-n { flex: none; width: 56px; border-radius: var(--r); background: var(--accent-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0; }
.lv-n b { font-family: var(--font-h); font-size: 20px; }
.lv-n small { font-size: 11px; color: var(--muted); }
.lv-b { flex: 1; min-width: 0; }
.lv-t { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.lv-d { margin-top: 4px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.lv-d svg { width: 15px; height: 15px; color: var(--accent-d); }
.lv-x { margin-top: 3px; font-size: 13px; color: var(--muted); }
.lv-b .link { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--red); font-size: 13px; cursor: pointer; }
.lv-foot { position: sticky; bottom: 0; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
@media (max-width: 420px) { .lv-stats { gap: 6px; } .lv-st { padding: 12px 6px; } .lv-st b { font-size: 17px; } }

/* ---------- Darbuotojo pradžia, projektai, ID (Issue #45) ---------- */
.days.scroll { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; padding: 0 2%; }
.days.scroll::-webkit-scrollbar { display: none; }
.seg a { border-radius: 6px; padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 10px; }
.pcard-h { display: flex; gap: 12px; align-items: flex-start; }
.pcard-h .no { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.pcard-h b { display: block; font-family: var(--font-h); }
.pcard-h small { color: var(--muted); }
.pcard-s { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.pcard-s svg, .pcard .btn svg { width: 15px; height: 15px; }
.pcard-i { margin-top: 8px; font-size: 14px; background: var(--bg); border-radius: var(--r); padding: 8px 10px; white-space: pre-line; }
.pcard-i p { margin: 2px 0; }
.pcard-i span { color: var(--muted); }
.pcard .link { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--accent-d); font-size: 13px; cursor: pointer; }
.pcard .btn-row { margin-top: 10px; }
.pcard .btn { display: inline-flex; align-items: center; gap: 6px; }
.idc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 12px; background: var(--surface); }
.idc-h { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.idc-h b { display: block; font-family: var(--font-h); font-size: 17px; }
.idc-h small { color: var(--muted); }
.idc-lg { width: 40px; height: 40px; }
.idc-img { text-align: center; }
.idc-img img { max-width: 100%; max-height: 300px; border-radius: var(--r); cursor: zoom-in; }
.idc-img img.big { max-height: none; cursor: zoom-out; }
.idc-img small { display: block; color: var(--muted); margin-top: 6px; }
.inst-b { display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 16px; }
.inst-b > div { flex: 1; min-width: 0; }
.inst-b b { display: block; font-size: 14px; }
.inst-b small { color: var(--muted); font-size: 12px; }
.inst-lg { width: 34px; height: 34px; }
.inst-steps { padding-left: 20px; line-height: 1.6; }
.inst-steps li { margin-bottom: 6px; }

/* ---------- Valandų patvirtinimas ir žiniaraštis (#45) ---------- */
.appr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.tag.appr { background: var(--ok-bg); color: var(--ok-ink); }
.ts-wrap { max-height: 70vh; }
table.tbl.ts { min-width: 0; font-size: 12px; }
.tbl.ts th, .tbl.ts td { padding: 6px 4px; text-align: center; white-space: nowrap; border-right: 1px solid var(--line); }
.tbl.ts th { position: sticky; top: 0; z-index: 1; text-transform: none; letter-spacing: 0; font-size: 11px; }
.tbl.ts th small { display: block; font-weight: 400; font-size: 10px; }
.tbl.ts .ts-n { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; min-width: 140px; max-width: 180px; white-space: normal; padding-left: 8px; }
.tbl.ts th.ts-n { z-index: 3; background: var(--surface-2); }
.tbl.ts .rest { background: var(--surface-2); }
.tbl.ts td.code { font-weight: 700; color: var(--ink); }
.tbl.ts td.c-A, .tbl.ts td.c-NA { background: rgba(62, 199, 166, .16); }
.tbl.ts td.c-L, .tbl.ts td.c-NS { background: rgba(245, 166, 35, .18); }
.tbl.ts td.c-K { background: rgba(91, 141, 239, .16); }
.tbl.ts td.c-PN { background: rgba(158, 158, 158, .18); }
.tbl.ts td.c-NN, .tbl.ts td.c-q { background: rgba(229, 72, 77, .15); }
.ts-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.ts-legend b { color: var(--ink); }
.rest-sw { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line-2); background: var(--surface-2); vertical-align: -2px; }
@media print {
  .side, .pbar, .ts-tools, .ts-noprint, .appr-bar button, #toast { display: none !important; }
  .shell, .smain { display: block !important; margin: 0 !important; padding: 0 !important; }
  .ts-wrap { max-height: none; overflow: visible !important; }
  .tbl.ts th, .tbl.ts .ts-n { position: static; }
  .box { box-shadow: none !important; border: 0 !important; }
  @page { size: A4 landscape; margin: 8mm; }
}

/* ---------- Pamiršau slaptažodį (Issue #53) ---------- */
.auth-link { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--accent-d); font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.rc-code { font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: 1px; text-align: center; padding: 16px; margin: 8px 0 12px; border: 2px dashed var(--accent); border-radius: var(--r-lg); background: var(--accent-soft); user-select: all; }

/* Ranka nurodyta pabaiga, laukia administratoriaus patikrinimo (violetinė) */
.tag.chk { background: var(--chk-bg); color: var(--chk-ink); }
.tbl tr.chk td, .tbl tr.chk:nth-child(even) td { background: var(--chk-bg); }
.tbl tr.chk td:first-child { box-shadow: inset 4px 0 0 var(--chk-line); }
.chk-bar { display: flex; align-items: center; gap: 12px; border: 1px solid var(--chk-line); background: var(--chk-bg); }
.chk-bar > div { flex: 1; min-width: 0; }
.chk-bar b { color: var(--chk-ink); }
.chk-bar small { display: block; color: var(--ink-2); margin-top: 2px; }
.chk-bar .i { color: var(--chk-ink); display: flex; }
.chk-bar .i svg { width: 22px; height: 22px; }
.chk-note { border-left: 4px solid var(--chk-line); background: var(--chk-bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.chk-note b { color: var(--chk-ink); }
.chk-note small { display: block; color: var(--ink-2); margin-top: 3px; }
.tbl.ts td.chk { background: var(--chk-bg); box-shadow: inset 0 0 0 2px var(--chk-line); color: var(--chk-ink); font-weight: 700; cursor: pointer; }
.chk-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--chk-bg); box-shadow: inset 0 0 0 2px var(--chk-line); vertical-align: -2px; margin-right: 4px; }
@media print { .tbl.ts td.chk { box-shadow: none; } }
/* Išskleidžiamas sąrašas su varnelėmis (įrankių filtrai) */
.msel { position: relative; display: inline-flex; }
.msel-b { position: relative; min-width: 170px; text-align: left; cursor: pointer; padding-right: 34px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-b::after { content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.msel-b.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.msel-p { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: max-content; min-width: max(100%, 260px); max-width: 340px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: 8px; }
.msel-q { width: 100%; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 14px; background: var(--surface); color: var(--ink); outline: 0; }
.msel-q:focus { border-color: var(--accent); }
.msel-l { max-height: 300px; overflow-y: auto; }
.msel-i { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--ink); }
.msel-i:hover { background: var(--surface-2); }
.msel-i[hidden] { display: none; }
.msel-i input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; }
.msel-f { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
/* ---------- Projekto redagavimas kaip Workernu (Issue #81) ---------- */
.pe .box h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pe .box h3 .sw { margin: 0; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.pe-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.pe-hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.lbl-s { font-size: 14px; font-weight: 600; color: var(--ink); margin: 6px 0 8px; display: flex; align-items: center; gap: 6px; }
.pe-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; display: flex; gap: 6px; align-items: center; }
.pe-info { background: var(--accent-soft); color: var(--accent-ink); border-radius: 8px; padding: 9px 12px; font-size: 13px; display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.accent { color: var(--accent-ink); font-weight: 600; }
.info-i { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); font: 700 10px/1 Inter, sans-serif; cursor: help; flex: none; vertical-align: middle; }
.info-i[title=""] { cursor: default; }
/* Jungiklis */
.sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 8px 0; font-size: 14px; color: var(--ink); }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw i { width: 38px; height: 22px; border-radius: 11px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(16px); }
.sw input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Pasirinkimo kortelės */
.rcards { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.rcard { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 14px; font-size: 14px; cursor: pointer; background: var(--surface); }
.rcard:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rcard input { accent-color: var(--accent); margin: 0; }
.rcard.inl { padding: 2px 12px; margin-bottom: 12px; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row input[type=color] { width: 44px; height: 40px; padding: 2px; border-radius: 8px; flex: none; }
/* Žemėlapis ir spindulys */
.pmap { height: 300px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); z-index: 0; }
#radr { width: 100%; accent-color: var(--accent); }
/* Pamaina */
.pe-hours { display: grid; grid-template-columns: 1fr 1fr 1fr 170px 170px; gap: 16px; align-items: start; }
.hm2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kcard { background: var(--accent); color: #fff; border-radius: 10px; padding: 16px; min-height: 120px; display: flex; flex-direction: column; gap: 4px; }
.kcard b { font: 700 24px/1.1 Manrope, sans-serif; }
.kcard span { font-size: 14px; opacity: .95; }
/* Darbuotojai */
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 16px; }
.check.plain { border: 0; padding: 5px 0; align-items: center; font-size: 14px; gap: 8px; }
.check.plain input { accent-color: var(--accent); }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px 10px; }
/* Raiškusis tekstas */
.rte { border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rte-bar button, .rte-bar select { border: 0; background: transparent; color: var(--ink); min-width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.rte-bar button:hover { background: var(--line); }
.rte-bar select { padding: 0 6px; border: 1px solid var(--line-2); background: var(--surface); }
.rte-ed { min-height: 160px; padding: 12px 14px; outline: 0; font-size: 14px; line-height: 1.55; }
.rte-ed:empty::before { content: attr(data-ph); color: var(--muted); }
.rte-ed ul, .rte-ed ol, .rte-view ul, .rte-view ol { padding-left: 22px; margin: 6px 0; }
.rte-ed h3, .rte-view h3 { font-size: 17px; margin: 8px 0 4px; } .rte-ed h4, .rte-view h4 { font-size: 15px; margin: 6px 0 4px; }
.rte-ed blockquote, .rte-view blockquote { border-left: 3px solid var(--line-2); margin: 6px 0; padding-left: 10px; color: var(--ink-2); }
.rte-ed p, .rte-view p { margin: 0 0 6px; }
/* Failai */
.flist { margin-top: 10px; display: grid; gap: 4px; }
.fgroup-h { font-weight: 600; font-size: 13px; margin: 6px 0 2px; }
.frow { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.frow a, .frow > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Klientas */
.cinfo { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cinfo-h { background: var(--accent-soft); color: var(--accent-ink); padding: 10px 14px; font-weight: 600; font-size: 14px; }
.crow { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.crow > span:first-child { width: 22px; text-align: center; color: var(--muted); }
/* Įkainiai, laukai, žymenys */
.prow { display: grid; grid-template-columns: 1fr 120px 36px; gap: 8px; margin: 8px 0; }
.prow select, .prow input, .fdt input, .fdt select { width: 100%; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 8px; font-size: 13px; background: var(--surface); color: var(--ink); box-sizing: border-box; }
.fdt td { padding: 6px; }
/* Išsaugoti – visada matomas apačioje */
.pe-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 12px 0; background: linear-gradient(transparent, var(--bg, var(--surface-2)) 35%); }
.pe-quick { display: flex; align-items: center; gap: 8px; }
/* Darbuotojui: projekto informacija */
.pinfo { margin-top: 12px; background: var(--accent-soft); border-radius: 8px; padding: 11px 13px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.pinfo .flist { margin-top: 8px; } .pinfo .frow { background: var(--surface); }
.pinfo-c { margin-top: 8px; font-weight: 600; }
@media (max-width: 999px) {
  .g4, .wgrid { grid-template-columns: 1fr 1fr; }
  .pe-2 { grid-template-columns: 1fr; }
  .pe-hours { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .g4, .wgrid { grid-template-columns: 1fr; } }
/* Jungikliai ir redaktorius formos laukuose (.field taisyklės neturi jų perrašyti) */
.sw input[type=checkbox] { position: absolute !important; opacity: 0 !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.field .sw, .field label.sw { display: inline-flex !important; font-weight: 400; margin: 8px 0 0; color: var(--ink); font-size: 14px; }
.sw { position: relative; }
.rte-bar select { width: auto !important; height: 30px !important; padding: 0 8px !important; font-size: 13px !important; }
.rte-bar button { width: auto !important; padding: 0 8px !important; font-size: 15px !important; }
.pmap .leaflet-control-attribution { font-size: 10px; }

/* ---------- Kalendoriaus filtrai, rūšiavimas, statistika kaip Workernu (Issue #83) ---------- */
.bf-bar { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; background: var(--surface-2); border-radius: var(--r); padding: 12px; margin-bottom: 14px; }
.bf-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 22px; padding: 10px 18px; font: 500 15px Inter, sans-serif; cursor: pointer; }
.bf-btn svg { width: 17px; height: 17px; }
.bf-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.bf-n { background: #fff; color: var(--accent-ink); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.bf-btn:not(.on) .bf-n { background: var(--accent-soft); }
.bf-panel h3 { margin-top: 4px; }
.bf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 8px; }
.bf-grid .msel, .bf-grid .msel-b, .bf-grid .sel, .bf-grid .date-in { width: 100%; max-width: none; box-sizing: border-box; }
.bf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 390px)); gap: 16px; margin-bottom: 16px; }
.bf-card { border-radius: 12px; padding: 22px 26px; display: flex; flex-direction: column; gap: 6px; }
.bf-card.b { background: #e9edfb; } .bf-card.y { background: #fbf3d6; }
[data-theme=dark] .bf-card.b { background: rgba(120,140,255,.14); } [data-theme=dark] .bf-card.y { background: rgba(240,200,80,.14); }
.bf-card .ic svg { width: 26px; height: 26px; color: var(--ink); }
.bf-card small { font-size: 15px; color: var(--ink-2); }
.bf-card b { font: 700 30px/1.1 Manrope, sans-serif; color: var(--ink); }
.bf-card .sub { font-size: 14px; color: var(--ink-2); }
.board tr.bgrp td { background: var(--surface-2) !important; font-weight: 600; font-size: 13px; padding: 7px 10px; text-align: left; }
.board tr.bgrp span { display: inline-flex; align-items: center; gap: 8px; }
.board tr.bgrp i { width: 12px; height: 12px; border-radius: 50%; }
@media (max-width: 999px) { .bf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bf-grid { grid-template-columns: 1fr; } .bf-bar { justify-content: stretch; } .bf-btn { flex: 1; justify-content: center; } }

/* Suskleidžiama dėžutė (valandų „Rūšiuoti“) */
details.fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; user-select: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details.fold[open] > summary { margin-bottom: 14px; }
details.fold .fold-i svg { width: 20px; height: 20px; color: var(--muted); transition: transform .15s; }
details.fold[open] .fold-i svg { transform: rotate(90deg); }

/* Įrankių nuotraukos (Issue #89) */
img.tpic { width: 46px; height: 46px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; box-sizing: border-box; flex: none; cursor: zoom-in; }
.tcard-h img.tpic, .qr-tool img.tpic { width: 60px; height: 60px; }
.tname { display: flex; align-items: center; gap: 10px; } .tname img.tpic { width: 40px; height: 40px; }
img.tpic-big { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #fff; border-radius: 10px; }
.tpic-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.tpic-edit img.tpic { width: 90px; height: 90px; }
.tpic-edit .ri { width: 90px; height: 90px; }
