/* Valpla – darbai ir laikas
   Paletė: rašalo mėlynai pilka, vėsus pagrindas, ultramarinas veiksmams,
   chloro geltona – tik tam, kas vyksta dabar (laikmačiai, vykstantys darbai). */

:root {
  --ink: #1B2733;
  --ink-2: #3A4754;
  --muted: #5F6B77;
  --paper: #EEF1F4;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --line: #D9DFE5;
  --line-soft: #E8ECF0;
  --brand: #2340C7;
  --brand-hover: #1A33A8;
  --brand-soft: #E7EBFB;
  --live: #F5D547;
  --live-strong: #D9B300;
  --ok: #1E8A5A;
  --ok-soft: #E3F3EA;
  --warn: #9A6200;
  --warn-soft: #FDF1D8;
  --danger: #C2382F;
  --danger-soft: #FBEAE8;
  --side: #1B2733;
  --side-text: #C9D2DB;
  --radius: 10px;
  --radius-lg: 16px;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(27, 39, 51, .06), 0 4px 16px rgba(27, 39, 51, .06);
  --focus: 0 0 0 3px rgba(35, 64, 199, .35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E6EBF0;
    --ink-2: #C3CCD5;
    --muted: #97A3AF;
    --paper: #12191F;
    --surface: #1A232B;
    --surface-2: #202B34;
    --line: #2F3C47;
    --line-soft: #26313A;
    --brand: #6D86FF;
    --brand-hover: #8A9EFF;
    --brand-soft: #232F5C;
    --ok: #4CC38A;
    --ok-soft: #173326;
    --warn: #F0B54A;
    --warn-soft: #3A2D12;
    --danger: #FF7A6E;
    --danger-soft: #3D1E1B;
    --side: #0D1318;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }
h1 { font-size: 26px; letter-spacing: -.01em; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
a { color: var(--brand); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; white-space: nowrap; }
.warn-text { color: var(--warn); }
[hidden] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { box-shadow: none; outline: 2px solid var(--brand); outline-offset: 2px; }

.ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.tiny { width: 15px; height: 15px; vertical-align: -3px; }

.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.boot.error { color: var(--danger); padding: 24px; text-align: center; }

/* ---------- Mygtukai ir laukai ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  font: 600 14px/1.2 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-hover); }
.btn.primary.ok { background: var(--ok); border-color: var(--ok); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger-text { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger-text:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.big { min-height: 50px; font-size: 16px; }
.btn.wide { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent;
  animation: spin .8s linear infinite;
}
.btn.primary.busy::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.link-btn { border: 0; background: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; display: inline-flex; gap: 4px; align-items: center; }
.link { text-decoration: none; }

input, select, textarea {
  width: 100%; font: 400 15px/1.4 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid #C5CED6; border-radius: 8px; padding: 9px 11px;
}
@media (prefers-color-scheme: dark) { input, select, textarea { border-color: var(--line); } }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
input.narrow { width: 64px; }
textarea { resize: vertical; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { color: var(--muted); font-size: 12.5px; }
.check { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; }
.radio { display: inline-flex; align-items: center; gap: 8px; margin-right: 16px; cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.row-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-inline input[type=date] { width: auto; }
.form-error { color: var(--danger); min-height: 1.2em; margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.live { background: var(--live); color: #1B2733; }
.pill.small { font-size: 11px; padding: 1px 7px; margin-left: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 500 13px/1.2 var(--font); cursor: pointer;
}
.chip.small { padding: 3px 9px; font-size: 12.5px; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.unassigned.on { background: var(--muted); border-color: var(--muted); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px; gap: 2px; }
.seg > * {
  border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; cursor: pointer;
  font: 600 13px var(--font); color: var(--muted); text-decoration: none; white-space: nowrap;
}
.seg > .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg.wide { display: flex; overflow-x: auto; margin-bottom: 16px; }
.seg.wide > * { flex: 1; text-align: center; }

.avatar {
  display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  font: 700 12px/1 var(--font); letter-spacing: .02em;
}
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.ghost { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2 { margin-bottom: 12px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.empty.soft { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); }

/* ---------- Išdėstymas ---------- */

.shell { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--side); color: var(--side-text); padding: 20px 12px;
}
.brand { font-size: 22px; font-weight: 700; color: #fff; padding: 0 10px 20px; letter-spacing: -.02em; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius);
  color: var(--side-text); text-decoration: none; font-weight: 500;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.on { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.on .ic { color: var(--live); }
.side-user { display: flex; align-items: center; gap: 4px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; }
.side-me { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--side-text); text-decoration: none; padding: 6px; border-radius: var(--radius); min-width: 0; }
.side-me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me:hover, .side-me.on { background: rgba(255, 255, 255, .06); color: #fff; }
.side-user .icon-btn { color: var(--side-text); }
.side-user .icon-btn:hover { background: rgba(255, 255, 255, .08); }

.content { padding: 24px 28px 48px; min-width: 0; outline: none; }
.shell.worker .content, .page-mano .content, .content.page-mano, .content.page-savaite, .content.page-mano-laikas, .content.page-profilis {
  max-width: 680px; width: 100%; margin: 0 auto;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 340px; }
.toolbar > select { width: auto; min-width: 200px; }
.range { display: flex; align-items: center; gap: 6px; }
.range input { width: auto; }

.bottom-nav { display: none; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
  body { font-size: 16px; }
  h1 { font-size: 23px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px;
    color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; border-radius: 10px;
  }
  .bottom-nav a.on { color: var(--brand); }
  .bottom-nav .ic { width: 24px; height: 24px; }
  .two { grid-template-columns: 1fr; }
}

/* ---------- Prisijungimas ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.login-card {
  width: 100%; max-width: 380px; background: var(--surface); border-radius: 20px; padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.wordmark { display: flex; flex-direction: column; margin-bottom: 26px; }
.wm-name { font-size: 40px; font-weight: 700; letter-spacing: -.035em; line-height: 1; color: var(--ink); }
.wm-name::after { content: ''; display: block; width: 44px; height: 6px; border-radius: 3px; background: var(--live); margin-top: 10px; }
.wm-sub { color: var(--muted); margin-top: 8px; }
.login-card .btn { width: 100%; margin-top: 8px; }

/* ---------- Pranešimai ir modalai ---------- */

#toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
@media (max-width: 820px) { #toasts { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: none; } }
.toast {
  background: var(--ink); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 500; transition: opacity .3s, transform .3s;
}
.toast.ok { background: var(--ok); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.warn { background: var(--warn-soft); color: var(--ink); border: 1px solid var(--live-strong); }
.toast.out { opacity: 0; transform: translateY(8px); }

.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(13, 19, 24, .5);
  display: grid; place-items: center; padding: 16px; overflow-y: auto;
}
.dialog {
  width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.dialog.wide { max-width: 860px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 22px; }
.dialog-body { padding: 8px 22px 12px; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.dialog-foot .spacer { flex: 1; }
@media (max-width: 820px) {
  .overlay { padding: 0; align-items: end; }
  .dialog, .dialog.wide { max-width: none; max-height: 94vh; border-radius: 18px 18px 0 0; }
  .dialog-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .dialog-foot .btn { flex: 1; }
  .dialog-foot .spacer { display: none; }
}
.creds { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 8px; font: 14px/1.5 var(--font); user-select: all; }

/* ---------- Darbo forma ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 820px) { .form-grid { grid-template-columns: 1fr; } }
.when { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 10px; }
.dur-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; }
.quick-durs { display: flex; gap: 6px; flex-wrap: wrap; }
.dur-label { color: var(--muted); font-size: 13px; }
.site-note { margin: -8px 0 8px; color: var(--warn); font-size: 13px; }
.site-note:empty { display: none; }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font: 500 13.5px var(--font); color: var(--ink); cursor: pointer;
}
.person-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); font-weight: 600; }
.repeat { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0 0 14px; }
.repeat legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 6px; display: inline-flex; gap: 4px; align-items: center; }
.repeat.muted { opacity: .55; }
.repeat-details { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.weekday-pick { display: flex; gap: 4px; }
.wd-btn { width: 38px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: 600 13px var(--font); color: var(--muted); cursor: pointer; }
.wd-btn.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.scope-pick { background: var(--brand-soft); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.task-extra { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 14px; }
.task-extra h3 { margin: 4px 0 8px; }
.time-rows, .comments { list-style: none; padding: 0; margin: 0 0 14px; }
.time-rows li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.comment { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; }
.c-meta { font-size: 12px; color: var(--muted); }
.task-extra .row-inline input { flex: 1; min-width: 160px; }

.live { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.live.on { background: var(--ok-soft); color: var(--ok); }
.live.working { background: var(--live); color: #1B2733; }

/* ---------- Kalendorius ---------- */

.page-kalendorius.content { padding-bottom: 16px; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav, .cal-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-title { font-size: 22px; margin-left: 6px; }
.cal-title::first-letter { text-transform: uppercase; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.tg { overflow-x: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tg { --gut: 52px; --colmin: 112px; }
.tg.mode-day { --colmin: 168px; }
.tg-inner { min-width: calc(var(--gut) + var(--cols) * var(--colmin)); }
.tg-head, .tg-body { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr)); }
.tg-head { border-bottom: 1px solid var(--line); overflow-y: hidden; scrollbar-gutter: stable; }
.tg-scroll { max-height: calc(100vh - 210px); min-height: 360px; overflow-y: auto; scrollbar-gutter: stable; }
.tg-colhead { padding: 8px 6px; border-left: 1px solid var(--line-soft); min-width: 0; }
.tg-colhead.today .dn { background: var(--brand); color: #fff; }
.col-head-btn { width: 100%; display: flex; align-items: baseline; justify-content: center; gap: 6px; border: 0; background: none; cursor: pointer; color: var(--ink); font: inherit; padding: 2px; border-radius: 8px; }
.col-head-btn:hover { background: var(--surface-2); }
.col-head-btn .wd { color: var(--muted); font-size: 13px; font-weight: 600; }
.col-head-btn .dn { font-size: 18px; font-weight: 600; min-width: 30px; height: 30px; line-height: 30px; border-radius: 50%; text-align: center; }
.person-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.person-head > div { display: flex; flex-direction: column; min-width: 0; }
.person-head strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-head small { color: var(--muted); font-size: 12px; }
.tg-gutter { position: relative; }
.tg-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); }
.tg-hour:first-child { transform: none; }
.tg-col {
  position: relative; border-left: 1px solid var(--line-soft); cursor: copy;
  background-image:
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, transparent calc(var(--hour) / 2), color-mix(in srgb, var(--line-soft) 55%, transparent) calc(var(--hour) / 2), transparent calc(var(--hour) / 2 + 1px));
  background-size: 100% var(--hour);
}
.tg-col.today { background-color: color-mix(in srgb, var(--brand) 3%, transparent); }
.tg-col.unassigned-col { background-color: var(--surface-2); }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.ev {
  --c: var(--muted);
  position: absolute; z-index: 2; overflow: hidden; padding: 3px 7px 4px 8px;
  background: color-mix(in srgb, var(--c) 15%, var(--surface));
  border-left: 3px solid var(--c); border-radius: 6px;
  font-size: 12px; line-height: 1.3; color: var(--ink); cursor: grab; user-select: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent);
}
@media (any-pointer: fine) { .ev { touch-action: none; } }
.ev:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); z-index: 4; }
.ev.unassigned {
  background: repeating-linear-gradient(135deg, var(--surface) 0 6px, var(--surface-2) 6px 12px);
  border-left-style: dashed; box-shadow: 0 0 0 1px var(--line);
}
.ev-time { font-size: 11px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 3px; }
.ev-time .ic.tiny { width: 12px; height: 12px; }
.ev-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-people { display: flex; gap: 2px; margin-top: 3px; }
.ev.compact { display: flex; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.ev.compact .ev-title { -webkit-line-clamp: 1; }
.ev.compact .ev-sub, .ev.compact .ev-people { display: none; }
.ev.s-vykdoma { box-shadow: 0 0 0 2px var(--live-strong); }
.ev.s-vykdoma::after { content: ''; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--live-strong); }
.ev.s-atlikta { opacity: .6; }
.ev.s-atsaukta { opacity: .45; }
.ev.s-atsaukta .ev-title { text-decoration: line-through; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev.dragging { opacity: .3; }
.ev.ghost { opacity: .92; z-index: 6; pointer-events: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.month-head { padding: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; }
.month-cell { min-height: 112px; padding: 4px 5px 6px; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 2px; cursor: copy; min-width: 0; }
.month-cell:nth-child(7n + 1) { border-left: 0; }
.month-cell.other { background: var(--surface-2); }
.month-cell.other .month-num { color: var(--muted); }
.month-num { align-self: flex-start; border: 0; background: none; font: 600 13px var(--font); color: var(--ink); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.month-num:hover { background: var(--surface-2); }
.month-cell.today .month-num { background: var(--brand); color: #fff; }
.mchip {
  --c: var(--muted);
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  padding: 2px 6px; border-radius: 5px; font: 500 12px/1.35 var(--font); color: var(--ink);
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); border-left: 3px solid var(--c);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mchip.unassigned { background: var(--surface-2); border-left: 3px dashed var(--muted); }
.mchip.s-atlikta { opacity: .6; }
.mchip.s-atsaukta { opacity: .45; text-decoration: line-through; }
.mchip-time { font-weight: 700; }
.more { border: 0; background: none; color: var(--brand); font: 600 12px var(--font); text-align: left; padding: 2px 6px; cursor: pointer; }
@media (max-width: 820px) {
  .month-cell { min-height: 72px; }
  .mchip { font-size: 10.5px; padding: 1px 4px; }
  .mchip-time { display: none; }
  .cal-title { font-size: 18px; width: 100%; margin: 6px 0 0; order: 5; }
  .cal-actions .btn.primary { padding: 8px 10px; }
  .tg-scroll { max-height: calc(100vh - 290px); }
}

/* ---------- Darbuotojo diena ---------- */

.worker-head h1 { font-size: 28px; }
.worker-head p { margin: 2px 0 0; }
.shift { margin-bottom: 26px; }
.shift-start {
  width: 100%; min-height: 104px; display: flex; align-items: center; justify-content: center; gap: 14px;
  border: 0; border-radius: 22px; cursor: pointer;
  background: var(--brand); color: #fff; font: 700 22px/1.2 var(--font); letter-spacing: -.01em;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 35%, transparent);
}
.shift-start .ic { width: 34px; height: 34px; padding: 6px; background: rgba(255, 255, 255, .18); border-radius: 50%; }
.shift-start:active { transform: scale(.99); }
.shift-meta { text-align: center; color: var(--muted); margin-top: 10px; }
.live-card { background: var(--live); color: #1B2733; border-radius: 22px; padding: 20px 20px 18px; }
.shift-label { font-weight: 600; font-size: 14px; opacity: .8; }
.shift-clock { font-size: 56px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.shift-task { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; background: rgba(27, 39, 51, .08); border-radius: 12px; margin-bottom: 12px; font-size: 14.5px; }
.shift-warn { font-size: 13.5px; font-weight: 500; }
.btn.shift-end { width: 100%; min-height: 50px; background: #1B2733; color: #fff; border-color: #1B2733; font-size: 16px; }
.btn.shift-end:hover { background: #2A3846; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; font-size: 17px; margin: 22px 0 10px; }
.section-title .count { font-size: 13px; color: var(--muted); font-weight: 500; }
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.job.running { border: 2px solid var(--live-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 45%, transparent); }
.job.done { background: var(--surface-2); box-shadow: none; }
.job.done .job-title { color: var(--muted); }
.job-top { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.job-time { font-weight: 700; font-size: 15px; }
.job-title { font-size: 18px; margin-bottom: 2px; }
.job-client { color: var(--ink-2); margin-bottom: 8px; }
.job-line { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; color: var(--ink-2); font-size: 14.5px; }
.job-line .ic { color: var(--muted); margin-top: 1px; }
a.job-line { color: var(--brand); font-weight: 500; }
a.job-line .ic { color: var(--brand); }
.job-desc { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0; white-space: pre-line; font-size: 14.5px; }
.job-team { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin: 6px 0; }
.teammate { display: inline-flex; align-items: center; gap: 4px; }
.job-spent { font-size: 13.5px; margin-top: 4px; }
.job-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.job-actions .btn { flex: 1 1 auto; min-height: 48px; font-size: 15px; }
.job-actions .btn.ghost { flex: 0 0 auto; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #1B2733; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse, .btn.busy::after { animation: none; } }
.tomorrow { margin-top: 8px; }
.mini-job { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--surface); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat-num { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.day-list { display: flex; flex-direction: column; gap: 10px; }
.day-block { background: var(--surface); border-radius: var(--radius); padding: 10px 14px; border: 1px solid var(--line-soft); }
.day-row { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; }
.entry-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; padding: 4px 0; font-size: 14px; border-top: 1px dashed var(--line-soft); }
.entry-row.shift { color: var(--muted); }

.profile-id { display: flex; align-items: center; gap: 14px; }
.narrow-form { max-width: 460px; }
.narrow-form h2 { margin-bottom: 14px; }

/* ---------- Klientai ---------- */

.split { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.client-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-soft); overflow: hidden; max-height: calc(100vh - 200px); overflow-y: auto; }
.client-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.client-row small { color: var(--muted); white-space: nowrap; }
.client-row:hover { background: var(--surface-2); }
.client-row.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.archived { opacity: .55; }
.client-detail { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line-soft); padding: 18px 20px; box-shadow: var(--shadow); min-height: 200px; }
.client-detail .empty.soft { border: 0; }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-head h2 { display: flex; align-items: center; gap: 8px; }
.client-detail h3 { margin-top: 10px; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; }
dl.info dt { color: var(--muted); font-size: 13.5px; }
dl.info dd { margin: 0; }
.notes { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; white-space: pre-line; }
.site-list { list-style: none; padding: 0; margin: 0; }
.site-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.site-list .muted { font-size: 13.5px; display: flex; gap: 4px; align-items: flex-start; margin-top: 2px; }

/* ---------- Lentelės ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .right { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table tr.shift-row td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.table tr.flag td { background: var(--warn-soft); }
.table .icon-btn { width: 32px; height: 32px; }
.who { display: flex; align-items: center; gap: 10px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }

.time-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 0 18px; align-items: start; }
.time-grid > .card:nth-child(3) { grid-column: 1 / -1; }
@media (max-width: 1100px) { .time-grid { grid-template-columns: 1fr; } }
.now-list { list-style: none; padding: 0; margin: 0; }
.now-list li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.now-list li:first-child { border-top: 0; }
.dialog:focus { outline: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }

/* ---------- v2: žymos, kontroliniai sąrašai, failai, objektai ---------- */

.tag-chip {
  --c: var(--muted);
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: color-mix(in srgb, var(--c) 80%, var(--ink)); background: color-mix(in srgb, var(--c) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); white-space: nowrap;
}
.tag-pick, .tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-toggle {
  --c: var(--muted);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 4px 11px; font: 500 13px var(--font); cursor: pointer; display: inline-flex; gap: 4px; align-items: center;
}
.tag-toggle.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--ink); font-weight: 600; }
.tag-toggle.add { border-style: dashed; color: var(--muted); }
.tag-new { width: 140px; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.tag-edit { border: 0; background: none; padding: 2px; cursor: pointer; border-radius: 999px; }
.tag-edit .tag-chip { font-size: 13px; padding: 3px 10px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 8px; }

.check-edit { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 4px; }
.check-edit li { display: flex; align-items: center; gap: 8px; }
.check-edit li input { padding: 6px 9px; font-size: 14px; }
.check-edit li.done input { color: var(--muted); text-decoration: line-through; }
.check-box { width: 16px; height: 16px; border: 1.5px solid var(--line); border-radius: 4px; flex: none; }
.check-mark { width: 16px; height: 16px; border-radius: 4px; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.check-mark .ic.tiny { width: 12px; height: 12px; vertical-align: 0; }
.icon-btn.small { width: 30px; height: 30px; }
.inline-select { width: auto; padding: 5px 9px; font-size: 13px; }
.check.inline { margin: 0; }

.job-check { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 10px 0 6px; }
.job-check-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.check-progress { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--muted); }
.check-progress.all { color: var(--ok); }
.job-check ul { list-style: none; padding: 0; margin: 6px 0 0; }
.job-check li .check { margin: 0; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 15px; align-items: flex-start; }
.job-check li:first-child .check { border-top: 0; }
.job-check li input[type=checkbox] { width: 22px; height: 22px; margin-top: 1px; }
.job-check li input:checked + span { color: var(--muted); text-decoration: line-through; }
.job-photos { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.job-photos .thumb.add { width: auto; height: 42px; flex-direction: row; padding: 0 14px; gap: 8px; font-size: 14px; }
.job-photos .thumb.add small { font-size: 14px; font-weight: 600; }
.warn-box { background: var(--warn-soft); color: var(--ink); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; font-size: 14px; }

.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.thumb-wrap { position: relative; }
.thumb {
  width: 88px; height: 88px; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2); text-decoration: none; gap: 4px; cursor: pointer; font: inherit;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-file { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; text-align: center; }
.thumb-file small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 76px; white-space: nowrap; }
.thumb.add { border: 1.5px dashed var(--line); color: var(--brand); }
.thumb.add small { font-size: 12px; font-weight: 600; }
.thumb-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: var(--surface); display: grid; place-items: center; cursor: pointer; }
.upload-wrap { display: inline-flex; }

details.log { margin-top: 10px; }
details.log summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.log-list { list-style: none; padding: 0; margin: 6px 0 0; max-height: 260px; overflow-y: auto; }
.log-list li { padding: 6px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.log-text { white-space: pre-line; }

.ev-check { font-size: 10.5px; font-weight: 700; padding: 0 4px; border-radius: 4px; background: rgba(27, 39, 51, .08); }
.ev-check.all { background: var(--ok-soft); color: var(--ok); }

.shift-buttons { display: flex; gap: 10px; }
.shift-buttons .btn.shift-end { flex: 1; }
.btn.shift-down { min-height: 50px; background: rgba(27, 39, 51, .1); border-color: transparent; color: #1B2733; font-size: 15px; }
.shift-task.down { align-items: center; flex-wrap: wrap; }
.shift-task.down .btn { margin-left: auto; background: #1B2733; color: #fff; border-color: #1B2733; }
.reason-list { display: flex; flex-direction: column; gap: 8px; }
.btn.reason { min-height: 50px; justify-content: flex-start; font-size: 16px; }

.row-sub { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.client-row > span { min-width: 0; }
.table.compact td, .table.compact th { padding: 7px 8px; }
.link-btn.plain { color: var(--ink); font-weight: 500; text-align: left; padding: 0; }
.link-btn.plain:hover { color: var(--brand); text-decoration: underline; }
.link-btn.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.pill.down { background: var(--warn-soft); color: var(--warn); }
.table tr.down-row td { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.downtime-break { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 1100px) { .two-cards { grid-template-columns: 1fr; } }
.toolbar .seg { flex: none; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
@media (max-width: 1000px) { .settings-grid { grid-template-columns: 1fr; } }
.set-list { list-style: none; padding: 0; margin: 0; }
.set-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.set-list li:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; }
.block { display: block; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.swatch.none { background: repeating-linear-gradient(45deg, var(--surface) 0 4px, var(--line) 4px 6px); }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; }
.kind-select { width: auto; flex: none; padding: 6px 6px; font-size: 12.5px; color: var(--ink-2); }
.check-value { font-weight: 700; font-size: 13px; color: var(--ok); white-space: nowrap; }
.check-editor .row-inline { margin-top: 2px; }
.job-check .check-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.job-check li:first-child.check-row { border-top: 0; }
.check-state { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; background: var(--surface); }
.check-state.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.check-state .ic.tiny { vertical-align: 0; }
.check-input { width: 140px; flex: none; padding: 7px 10px; }
.check-input.num { width: 90px; text-align: right; }
.check-row .thumb.add { width: auto; height: 38px; flex-direction: row; padding: 0 10px; gap: 6px; }
.check-row .thumb.add small { font-size: 13px; }

/* ---------- Personalas ---------- */
.content.page-atostogos { max-width: 680px; width: 100%; margin: 0 auto; }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.btn.primary.danger { background: var(--danger); border-color: var(--danger); }
.hr-tabs { margin-bottom: 18px; }
.hr-tabs > a { text-decoration: none; white-space: nowrap; }
.hr-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 12px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-weight: 600; text-decoration: none; }
.hr-alert.danger { background: var(--danger-soft); color: var(--danger); }
.hr-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius); background: var(--brand-soft); color: var(--ink-2); font-size: 13.5px; margin: 0 0 14px; }
.hr-note .ic, .hr-alert .ic { flex: none; }
.month-label { min-width: 140px; text-align: center; }
input.narrow { width: 80px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; color: var(--brand); font-weight: 600; }
.hr-person { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hr-person h2 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.hr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 820px) { .hr-cards { grid-template-columns: 1fr; } }
.hr-card { margin: 0; }
.hr-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hr-card-head h2 { margin: 0; font-size: 17px; flex: 1; display: flex; align-items: center; gap: 6px; }
.hr-list { list-style: none; margin: 0; padding: 0; }
.hr-list > li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.hr-list > li:last-child { border-bottom: 0; }
.hr-list .grow { min-width: 160px; }
.hr-list .row-end { margin-top: 0; gap: 6px; }
.hr-details { margin-top: 10px; }
.hr-details summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.hr-stats { margin: 4px 0 8px; }
.stat.danger .stat-num { color: var(--danger); }
.abs-code { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.c-A { background: var(--brand-soft) !important; color: var(--brand) !important; }
.c-L { background: var(--danger-soft) !important; color: var(--danger) !important; }
.c-NA, .c-M, .c-VP, .c-KT { background: var(--warn-soft) !important; color: var(--warn) !important; }
.c-DP { background: var(--live) !important; color: #1B2733 !important; }
.c-P, .c-S { color: var(--muted) !important; }
.pending { background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255, 255, 255, .55) 4px 8px) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.grid-month { font-size: 12.5px; }
.grid-month th.d, .grid-month td.d { text-align: center; padding: 6px 1px; min-width: 25px; border-left: 1px solid var(--line-soft); }
.grid-month th.d small { display: block; font-weight: 500; font-size: 10px; }
.grid-month .off { background: var(--surface-2); }
.grid-month th.today { color: var(--brand); }
.grid-month td.d[onclick], .grid-month td.d.c-A, .grid-month td.d.c-L { font-weight: 700; }
.grid-month .sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 130px; }
.grid-month.ts td.d { font-variant-numeric: tabular-nums; }
.pending-list { display: grid; gap: 10px; margin-bottom: 10px; }
.card.pending { display: grid; grid-template-columns: minmax(180px, 240px) 1fr auto; gap: 14px; align-items: center; background-image: none !important; }
.card.pending .row-end { margin: 0; gap: 8px; }
@media (max-width: 820px) { .card.pending { grid-template-columns: 1fr; } }
.pending-what ul { margin: 6px 0 0; padding-left: 18px; }
.table.pay td, .table.pay th { white-space: nowrap; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.role-card { margin: 0; }
.perm-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chips li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; font-size: 12.5px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 10px; margin: 0; }
.perm-group legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.perm-group .check { margin: 6px 0; }
.profile-hr .card { margin-bottom: 16px; }
.profile-hr h2 { font-size: 17px; margin: 0 0 10px; }
.cal-absent { display: block; font-size: 10.5px; font-weight: 600; color: var(--warn); }
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; color: #000; }
  .sidebar, .bottom-nav, .page-head, .hr-tabs, .no-print, #toasts { display: none !important; }
  .shell { display: block !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
  .table-wrap { overflow: visible !important; }
  .grid-month { font-size: 9px; }
  .grid-month th.d, .grid-month td.d { min-width: 0; padding: 2px 1px; border: 1px solid #999; }
  .grid-month td, .grid-month th { border: 1px solid #999; padding: 2px 4px; }
  .grid-month .sticky { position: static; min-width: 0; }
  .print-only { display: block; }
  .print-head { margin-bottom: 8px; font-size: 13px; }
  .print-sign { display: flex; justify-content: space-between; margin-top: 30px; font-size: 12px; }
  .legend { font-size: 9px; }
  .c-A, .c-L, .c-NA, .c-M, .c-VP, .c-KT, .c-DP { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
