/* ===== Gamtos ateitis — design system (tokens extracted from Figma) ===== */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e3e3e3;
  --border-soft: #eef0f2;
  --text: #201f23;
  --text-muted: #898b94;
  --navy: #004e7c;
  --navy-strong: #013a5e;
  --green: #82bf9e;
  --green-700: #6fae8c;
  --yellow: #f4c233;
  --orange: #e8633a;
  --orange-soft: #ef6c3d;

  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 14px;
  --field-h: 43px;
  --shadow-card: 0 10px 30px rgba(16, 40, 66, 0.06);
  --shadow-soft: 0 2px 8px rgba(16, 40, 66, 0.04);
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ===== Typography helpers ===== */
.h-page { font-size: 22px; font-weight: 600; color: var(--navy); margin: 0; }
.card-title { font-size: 20px; font-weight: 600; color: var(--navy); margin: 0; }
.muted { color: var(--text-muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--field-h); padding: 0 18px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-strong); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.btn-block { width: 100%; }
.btn .ico { width: 16px; height: 16px; display: inline-block; }

/* ===== Form fields ===== */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; letter-spacing: .6px; color: var(--text);
  margin-bottom: 6px;
}
.input-wrap { position: relative; }
.input {
  width: 100%; height: var(--field-h); padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; font-family: var(--font); font-size: 14px; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-muted); }
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(130,191,158,.18); }
.input-wrap .toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; color: var(--text-muted); padding: 0;
  display: inline-flex;
}

/* checkbox */
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; letter-spacing:.6px; cursor: pointer; }
.check input { width: 14px; height: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); accent-color: var(--green); margin: 0; }

/* ===== Auth screen ===== */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-top: 48px; }
.auth__logo { height: 60px; margin-bottom: 90px; }
.auth__card {
  width: 458px; max-width: calc(100vw - 32px);
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); padding: 48px 66px;
}
.auth__card .card-title { margin-bottom: 26px; }
.auth__card--center { text-align: center; }
.auth__card--center .card-title { margin-bottom: 0; }
.auth__card--wide { width: 520px; padding: 40px 56px; }
.auth__card--wide .field { margin-bottom: 16px; }
.auth__card--wide input[disabled] { background: #f4f6f5; color: var(--text-muted); cursor: not-allowed; }
.otp-row { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.otp-box {
  width: 46px; height: 71px; flex: 1 1 0;
  font: 600 28px/1 'Poppins', sans-serif;
  text-align: center; padding: 0;
  border: 1px solid var(--border-soft); border-radius: 8px;
  color: var(--navy); background: #fff;
}
.otp-box:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 2px rgba(130, 191, 158, 0.18); }
.auth__row { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 22px; }
.auth__row a { color: var(--text-muted); font-size: 12px; }
.alert { background: #fdecea; color: #b42318; border: 1px solid #f6cfca; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 18px; }

/* ===== App shell / top navigation ===== */
.topbar {
  height: 64px; background: #fff; border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 20;
}
.topbar__inner {
  max-width: 1440px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 36px; padding: 0 28px;
}
.topbar__logo { height: 36px; }
.nav { display: flex; align-items: center; gap: 30px; height: 100%; }
.nav a {
  position: relative; height: 100%; display: inline-flex; align-items: center;
  color: var(--text); font-size: 14px; font-weight: 500;
}
.nav a:hover { color: var(--navy); }
.nav a.is-active { color: var(--green-700); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--green); border-radius: 3px 3px 0 0;
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.icon-btn { position: relative; width: 20px; height: 20px; border: 0; background: transparent; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; padding: 0; }
.icon-btn.is-filled { background: var(--navy); color: #fff; border-radius: 8px; }
.icon-btn--task { width: 20px; height: 20px; }
.icon-btn--bell { width: 20px; height: 20px; overflow: visible; }
.badge-count {
  position: absolute; top: -6px; right: -10px;
  background: var(--green); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 1;
  border-radius: 999px;
  min-width: 18px; height: 18px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  pointer-events: none; padding: 0 4px;
}
.topbar__divider { width: 1px; height: 28px; background: var(--border); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu[open] .chev { transform: rotate(180deg); transition: transform .12s; }
.user-menu__panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: 12px; box-shadow: var(--shadow-card); padding: 8px; z-index: 30;
}
.user-menu__panel a {
  display: block; padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text);
}
.user-menu__panel a:hover { background: #f4f6f5; color: var(--navy); }
.user-menu__panel a.is-disabled { color: var(--text-muted); cursor: not-allowed; }
.user-menu__panel a.is-disabled:hover { background: transparent; color: var(--text-muted); }
.user-menu__panel hr { border: 0; border-top: 1px solid var(--border-soft); margin: 6px 4px; }

/* Tasks-icon dropdown — same look as the avatar dropdown, anchored to the icon */
.topbar-menu { position: relative; display: inline-flex; }
.topbar-menu summary { list-style: none; cursor: pointer; }
.topbar-menu summary::-webkit-details-marker { display: none; }
.topbar-menu__panel {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  min-width: 220px;
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: 12px; box-shadow: var(--shadow-card); padding: 8px; z-index: 30;
}
.topbar-menu__panel a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; color: var(--text); text-decoration: none;
  white-space: nowrap;
}
.topbar-menu__panel a:hover { background: #f4f6f5; color: var(--navy); }
.topbar-menu__panel a.is-active { color: var(--green); }

/* Bell-icon dropdown — recent attention-worthy ImportLog rows */
.topbar-menu--bell .topbar-menu__panel {
  left: auto; right: 0; transform: none;
  width: 320px; min-width: 320px;
  padding: 0;
}
.notif-panel__head {
  padding: 12px 14px 8px;
  font-size: 13px; font-weight: 600; color: var(--navy);
  border-bottom: 1px solid var(--border-soft);
}
.notif-panel__empty {
  padding: 28px 14px; text-align: center;
  font-size: 13px; color: var(--text-muted);
}
.notif-list { list-style: none; margin: 0; padding: 6px; max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 10px; border-radius: 8px;
}
.notif-item + .notif-item { margin-top: 2px; }
.notif-item:hover { background: #f4f6f5; }
.notif-item__icon {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: #eef0ee; color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.notif-item__body { flex: 1 1 auto; min-width: 0; }
.notif-item__name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item__meta {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.notif-item__time { font-size: 12px; color: var(--text-muted); }
.notif-panel__foot {
  border-top: 1px solid var(--border-soft);
  padding: 10px 14px;
  text-align: center;
}
.notif-panel__foot a {
  font-size: 13px; color: var(--green-700); font-weight: 500; text-decoration: none;
}
.notif-panel__foot a:hover { color: var(--green); }

/* ===== Filter popover (Filtrai icon button -> details panel) ===== */
.filter-pop { position: relative; display: inline-block; }
.filter-pop summary { list-style: none; cursor: pointer; position: relative; }
.filter-pop summary::-webkit-details-marker { display: none; }
.filter-pop summary.is-active { color: var(--green); border-color: var(--green); }
.filter-pop .filter-dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.filter-pop__panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 280px;
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: 12px; box-shadow: var(--shadow-card); padding: 14px; z-index: 30;
}
.filter-pop__head { font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 10px; }
.filter-field { display: block; margin-bottom: 12px; }
.filter-field span { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.filter-field .input { width: 100%; }
.filter-pop__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.user__name { font-size: 14px; font-weight: 500; }
.chev { color: var(--text-muted); }

/* ===== Page layout ===== */
.page { max-width: 1440px; margin: 0 auto; padding: 24px 28px 48px; }
.page__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.col-stack { display: grid; gap: 24px; }

/* ===== Card ===== */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 24px 26px; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card__head .ico { width: 30px; height: 30px; color: var(--green); flex: none; }
.card__head--right { margin-left: auto; }

/* ===== Legend ===== */
.legend { display: flex; gap: 22px; margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--blue { background: var(--navy); }
.dot--green { background: var(--green); }
.dot--yellow { background: var(--yellow); }

/* ===== Proving-doc list rows ===== */
.req-row { display: grid; grid-template-columns: 1.5fr 110px 230px; align-items: center; padding: 9px 0; gap: 14px; color: inherit; text-decoration: none; }
.req-row__name { font-size: 13px; }
/* Status dots used by PA suderinimas + Tikimi dokumentai (our screens, not on Figma dashboard) */
.req-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 7px; }
.req-dot--short { background: #e5574e; }
.req-dot--warn  { background: #e9b143; }
.req-dot--ok    { background: var(--green); }

/* ===== PA reconciliation screen ===== */
.recon-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.recon-tile { background: #f4f6f5; border-radius: 12px; padding: 14px 16px; }
.recon-tile__label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.recon-tile__value { font-size: 22px; font-weight: 600; color: var(--navy); }
.recon-tile__value span { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.recon-tile--received { background: rgba(130, 191, 158, .14); }
.recon-tile--received .recon-tile__value { color: var(--green-700); }
.recon-tile--missing { background: rgba(232, 99, 58, .10); }
.recon-tile--missing .recon-tile__value { color: var(--orange); }
.recon-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; line-height: 1.6; }
.recon-pill--short { background: rgba(229, 87, 78, .15); color: #c84a44; }
.recon-pill--warn  { background: rgba(233, 177, 67, .18); color: #a87a14; }
.recon-pill--ok    { background: rgba(130, 191, 158, .22); color: var(--green-700); }
.recon-pill--unset { background: #eef0ee; color: var(--text-muted); }
.recon-row--short td { background: rgba(229, 87, 78, .04); }
.th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.th-sort.is-active { color: var(--green-700); }
.th-sort.is-active::after { content: "↓"; font-size: 11px; }

.lock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(130, 191, 158, .18); color: var(--green-700); margin-left: 10px; vertical-align: middle; }

/* ===== Detail (read-only) layout ===== */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 160px 1fr; gap: 8px 18px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.detail-list > div:last-child { border-bottom: none; }
.detail-list dt { font-size: 12px; color: var(--text-muted); margin: 0; }
.detail-list dd { margin: 0; font-size: 14px; color: var(--text); }
.detail-list a { color: var(--green-700); }
.req-bars { display: flex; flex-direction: column; gap: 4px; }
.req-bars i { height: 4px; border-radius: 2px; display: block; min-width: 12px; }
.req-vals { display: flex; gap: 14px; justify-content: flex-end; font-size: 12px; white-space: nowrap; }
.req-vals span { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }

/* ===== Progress bar ===== */
.progress { position: relative; height: 10px; border-radius: 6px; background: #eceef0; }
.progress > i { position: relative; display: block; height: 100%; background: var(--yellow); border-radius: 6px; }
.progress > i::after { content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px #fff, 0 1px 4px rgba(16,40,66,.25); }
.progress-scale { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.progress-title { text-align: center; color: var(--navy); font-weight: 600; margin-bottom: 10px; }

/* Dashboard KPI tiles */

/* ===== Plan bar chart ===== */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.bars {
  display: flex; align-items: flex-end; justify-content: flex-start; gap: 14px;
  height: 240px; padding: 18px 0 0;
}
.bars i { width: 14px; min-height: 14px; border-radius: 999px; display: block; }
.bars .b-yellow { background: var(--yellow); }
.bars .b-green  { background: var(--green); }
.bars .b-navy   { background: var(--navy); }
.plan-legend { margin-top: 16px; display: grid; gap: 8px; }
.plan-legend > div { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.plan-legend .lbl { display: inline-flex; align-items: center; gap: 8px; }
.plan-legend b { color: var(--text); font-weight: 600; }

/* ===== Table ===== */
.table { width: 100%; border-collapse: collapse; }
.table thead th { background: #f2f6f4; color: var(--text); font-weight: 600; font-size: 13px; text-align: left; padding: 12px 16px; }
.table thead th:first-child { border-radius: 8px 0 0 8px; }
.table thead th:last-child { border-radius: 0 8px 8px 0; }
.table tbody td { padding: 16px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.table tbody tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 14px; font-size: 12px; font-weight: 500; }
.pill--warn { background: var(--orange); color: #fff; }
.row-go { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.row-go.is-active { background: var(--green); color: #fff; border-color: var(--green); }

.warn-icon { color: var(--orange); }
.count-strong { color: var(--orange); font-weight: 600; }

/* ===== Toolbar (search + actions) ===== */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.search { position: relative; width: 320px; max-width: 100%; }
.search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); }
.search__input { padding-left: 38px; }
.toolbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.icon-btn--outline { border: 1px solid var(--border); background: #fff; color: var(--navy); }
.icon-btn--outline:hover { border-color: var(--navy); }

/* ===== Row-style table (Vežėjai etc.) ===== */
.table--rows tbody td { border-bottom: 1px solid var(--border-soft); padding: 18px 16px; }
.table--rows tbody tr:last-child td { border-bottom: 0; }
.muted-cell { color: var(--text-muted); }

/* ===== Pagination ===== */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 18px; }
.pager__next { grid-column: 2; justify-self: center; }
.pager__cta { padding: 0 22px; }
.pager__cta.is-disabled { background: #c8dcd1; color: #fff; cursor: not-allowed; }
.pager__pos { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; color: var(--green-700); font-size: 13px; font-weight: 500; }
.pager__label { color: var(--green-700); }
.row-go.is-muted { background: #e9ebec; color: #b8bbbf; border-color: #e9ebec; cursor: not-allowed; }
.row-go--ghost { background: #f3f5f4; border-color: #e3e3e3; color: var(--text-muted); }
.row-actions { display: inline-flex; gap: 8px; }

/* Status text labels (Sistemos vartotojai) */
.status-text { font-size: 14px; font-weight: 500; }
.status-text--active   { color: var(--green); }
.status-text--invited  { color: var(--yellow); }
.status-text--disabled { color: var(--text-muted); }

/* Entity forms (Carrier, Preparer, etc.) */
.form-card { padding: 28px 32px; max-width: 920px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; margin-bottom: 22px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--wide { grid-column: 1 / -1; }
.form-field label { font-size: 12px; letter-spacing: .6px; color: var(--text); }
.form-field input.input { height: var(--field-h); }
.form-field select.input { height: var(--field-h); appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23898b94' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-field .form-errors, .form-field ul { color: #b42318; font-size: 12px; margin: 0; padding: 0; list-style: none; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.btn-danger { color: #b42318; border-color: #f6cfca; }
.btn-danger:hover { background: #fdecea; color: #b42318; border-color: #b42318; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid--single { grid-template-columns: 1fr; max-width: 420px; }

/* ===== Profile screen ===== */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; margin: 0 0 18px; padding: 14px 16px; background: #f4f6f5; border-radius: 10px; }
.profile-meta dt { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.profile-meta dd { margin: 0; font-size: 14px; color: var(--text); }

/* GPAIS dokumentai — per-category totals grid */
.gpais-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.gpais-totals__cell { background: #f4f6f5; border-radius: 8px; padding: 12px 14px; display: block; color: inherit; transition: background .12s, transform .12s; }
.gpais-totals__cell:hover { background: #e9ece9; transform: translateY(-1px); }
.gpais-totals__cell.is-selected { background: rgba(130,191,158,.20); outline: 1.5px solid var(--green); }
.gpais-totals__label { font-size: 11px; color: var(--text-muted); line-height: 1.35; margin-bottom: 6px; }
.gpais-totals__value { font-size: 18px; font-weight: 600; color: var(--navy); }
.gpais-totals__value.is-empty { color: var(--text-muted); }
.gpais-totals__value span { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* Audit log */
.audit-pill { display: inline-flex; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.audit-pill--create { background: rgba(130,191,158,.18); color: var(--green-700); }
.audit-pill--update { background: rgba(244,194,51,.20); color: #8a6a06; }
.audit-pill--delete { background: rgba(232,99,58,.16); color: #b04212; }
.audit-changes summary { cursor: pointer; color: var(--navy); font-size: 13px; }
.audit-changes summary::-webkit-details-marker { display: none; }
.audit-changes summary::before { content: "▸ "; margin-right: 4px; }
.audit-changes[open] summary::before { content: "▾ "; }
.audit-changes ul { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: var(--text); }
.audit-changes li { margin-bottom: 4px; }
.audit-changes code { background: #f3f5f6; padding: 1px 6px; border-radius: 4px; }

/* Surinkimo ataskaita */
.collection-filter { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; flex-wrap: wrap; }
.collection-filter__head { display: flex; align-items: center; gap: 10px; }
.collection-filter__chips { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 24px; border: 1px solid var(--border); background: #fff; font-size: 13px; color: var(--text); }
.chip--active { background: var(--yellow); border-color: var(--yellow); font-weight: 600; }
.chip-clear { color: var(--orange); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.collection-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.collection-table thead th { background: #f3f7f4; padding: 14px 14px; font-size: 13px; }
.collection-table tbody td { padding: 14px 14px; font-size: 13px; }
.collection-table tfoot td { background: #f3f7f4; padding: 16px 14px; font-weight: 600; }
.collection-table .collection-th-name { min-width: 200px; }
.collection-th-highlight { color: var(--orange) !important; }
.collection-td-highlight { color: var(--orange); background: rgba(232, 99, 58, 0.05); }
.share-badge { display: inline-block; padding: 8px 14px; border-radius: 8px; background: rgba(130, 191, 158, .14); color: var(--green-700); font-size: 13px; margin-bottom: 14px; margin-right: 8px; }
.share-badge--carry { background: rgba(232, 99, 58, 0.10); color: var(--orange); }
.share-badge--carry .muted { color: var(--text-muted); margin-left: 6px; }
.quarter-tabs { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.quarter-tabs .qtab { padding: 8px 14px; font-size: 13px; color: var(--text-muted); border-right: 1px solid var(--border); }
.quarter-tabs .qtab:last-child { border-right: 0; }
.quarter-tabs .qtab.is-active { background: var(--navy); color: #fff; }
.quarter-tabs .qtab:hover:not(.is-active) { background: #f4f6f5; color: var(--navy); }
.collection-table thead th[colspan="2"] { text-align: center; border-bottom: 1px solid var(--border-soft); }

/* Gpais priėmimų lentelė (Receipts) */
.search--inline { width: 240px; max-width: 100%; }
.receipts-scroll { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.receipts-table thead th { background: #ffffff; padding: 18px 12px 16px; font-size: 12px; font-weight: 500; color: var(--text-muted); border-bottom: 1px solid var(--border-soft); }
.receipts-table tbody td { padding: 14px 12px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; font-size: 13px; }
.receipts-table tbody tr:last-child td { border-bottom: 0; }
.receipts-th-highlight { background: var(--yellow) !important; color: var(--text) !important; font-weight: 600 !important; }
.receipts-td-highlight { background: rgba(244, 194, 51, 0.12); }
.receipts-totals td { background: #f3f7f4; font-weight: 600; padding: 16px 12px !important; }
.is-excluded { opacity: .5; }

/* PA įrodančių dokumentų poreikis */
.pa-card { padding: 28px 32px; }
.pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 60px; }
.pa-col__head { display: grid; grid-template-columns: 1fr 180px; background: #f2f6f4; border-radius: 8px; padding: 12px 16px; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.pa-col__h--qty { text-align: left; }
.pa-row { display: grid; grid-template-columns: 1fr 180px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.pa-row:last-child { border-bottom: 0; }
.pa-row__qty .input { width: 130px; }
@media (max-width: 1000px) { .pa-grid { grid-template-columns: 1fr; } }

/* Planavimas */
.plan-card { padding: 28px 32px; }
.plan-block__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.plan-block__form { display: grid; grid-template-columns: 200px 200px 200px 1fr; gap: 18px; align-items: end; }
.plan-block__form .btn { grid-column: 3; }
.plan-block__form .field { margin-bottom: 0; }
.plan-block__form .btn { height: var(--field-h); }
.plan-divider { border: 0; border-top: 1px solid var(--border-soft); margin: 28px 0; }

/* Planavimas — year-switcher chip row + "Sukurti planavimą" modal (Figma 267:1722). */
.planning-filter { margin-bottom: 18px; }
.planning-modal { border: 0; padding: 0; border-radius: var(--radius-lg); width: 474px; max-width: calc(100vw - 32px); background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.planning-modal::backdrop { background: rgba(0, 0, 0, .5); }
.planning-modal__form { padding: 36px 40px 32px; display: flex; flex-direction: column; }
.planning-modal__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.planning-modal__head .card-title { font-size: 20px; }
.planning-modal__submit { margin-top: 8px; }

/* Flash messages */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px; }
.flash--success { background: #e8f4ec; color: #2e6b48; border: 1px solid #c4e2cf; }
.flash--error   { background: #fdecea; color: #b42318; border: 1px solid #f6cfca; }

/* Finansavimo procentas layout */
.funding-grid { display: grid; grid-template-columns: 410px 1fr; gap: 24px; align-items: start; }
.funding-card { padding: 22px; }
.funding-row  { display: flex; gap: 18px; }
.trend { font-size: 11px; margin-left: 8px; }
.trend--up   { color: var(--green); }
.trend--down { color: var(--orange); }
@media (max-width: 1100px) { .funding-grid { grid-template-columns: 1fr; } }

/* Morfologija */
.morph-filters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 22px; }
.morph-filters .field { margin-bottom: 0; }
.morph-filters select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%23898b94' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.morph-card { padding: 0; }
.morph-table { font-size: 13px; }
.morph-table thead th { padding: 14px 12px; white-space: nowrap; font-size: 12px; }
.morph-table tbody td { padding: 12px 12px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.morph-table tfoot td { padding: 14px 12px; border-top: 1px solid var(--border); font-weight: 600; }
.morph-th-name { min-width: 220px; }
.morph-th-code { min-width: 80px; }
.morph-th-col { min-width: 140px; }
.morph-col-code { font-weight: 600; color: var(--text); }
.morph-col-label { color: var(--text-muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
.morph-cell-highlight { color: var(--orange); }
.morph-table tfoot td.morph-cell-highlight { color: var(--orange); }
/* Editable composition cells: read like the clean Figma %-matrix, reveal as inputs on hover/focus. */
.morph-input {
  width: 72px; text-align: right; padding: 6px 8px;
  font-family: var(--font); font-size: 13px; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  transition: border-color .12s ease, background-color .12s ease;
  -moz-appearance: textfield;
}
.morph-input::-webkit-outer-spin-button, .morph-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.morph-input:hover { border-color: var(--border-soft); }
.morph-input:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(130, 191, 158, 0.18); }
@media (max-width: 900px) { .morph-filters { grid-template-columns: 1fr 1fr; } }

/* Stream tabs (Stiklas / Lengvos pakuotės) — reuse the .qtab pattern */
.morph-tabs { margin-bottom: 18px; }

/* Pasirinkite-modal (Figma 286:2038) — <details>-based popover */
.morph-apply { position: relative; display: inline-block; }
.morph-apply summary { list-style: none; cursor: pointer; }
.morph-apply summary::-webkit-details-marker { display: none; }
.morph-apply__panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 420px; max-width: calc(100vw - 28px);
  background: #fff; border: 1px solid var(--border-soft);
  border-radius: 12px; box-shadow: var(--shadow-card); padding: 18px; z-index: 40;
}
.morph-apply__head { margin-bottom: 14px; }
.morph-apply__head strong { color: var(--navy); font-size: 14px; }
.morph-apply__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.morph-apply__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.morph-apply__label { font-size: 12px; letter-spacing: .4px; color: var(--text); font-weight: 500; }
.morph-apply__checklist {
  max-height: 200px; overflow-y: auto; border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 8px 10px; background: #fafbfa;
}
.morph-apply__check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--text); cursor: pointer; }
.morph-apply__check input { accent-color: var(--green); }
.morph-apply__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
@media (max-width: 720px) {
  .morph-apply__panel { right: -8px; width: calc(100vw - 28px); }
  .morph-apply__row { grid-template-columns: 1fr; }
}

/* Wide table scroller (Savivaldybės: 11 columns) */
.table-scroll { overflow-x: auto; }
.table--compact thead th { padding: 12px 10px; font-size: 12px; white-space: nowrap; }
.table--compact tbody td { padding: 16px 10px; font-size: 13px; white-space: nowrap; }

@media (max-width: 1100px) {
  .grid-2, .plans { grid-template-columns: 1fr; }
  .nav { gap: 18px; }
}

/* ===== Mobile menu drawer (Figma 382:1565 "Meniu dropas") ===== */
.mobile-menu { display: none; position: relative; }
.icon-btn--ghost { background: transparent; border: none; padding: 6px; cursor: pointer; color: var(--text); }
.icon-btn--ghost:hover { color: var(--green-700); }
.mobile-menu summary { list-style: none; cursor: pointer; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu__panel {
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--surface); overflow-y: auto; z-index: 40;
  padding: 18px 16px 32px; display: flex; flex-direction: column;
}
.mobile-menu__user { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.mobile-menu__name { font-size: 16px; font-weight: 500; color: var(--navy); }
.mobile-menu__item {
  display: block; padding: 12px 14px; font-size: 15px; font-weight: 500;
  color: var(--navy); text-decoration: none; border-radius: 8px;
}
.mobile-menu__item:hover { background: #f4f6f5; }
.mobile-menu__item.is-active { color: var(--green); position: relative; padding-left: 18px; }
.mobile-menu__item.is-active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px;
  background: var(--green); border-radius: 0 4px 4px 0;
}
.mobile-menu__group { padding: 18px 14px 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.mobile-menu__panel hr { border: 0; border-top: 1px solid var(--border-soft); margin: 6px 4px; }

/* ===== Mobile / Skydelis mobile (Figma 382:1382, 360px) ===== */
@media (max-width: 720px) {
  .mobile-menu { display: inline-block; margin-right: 4px; }
  .page { padding: 16px 14px 32px; }
  .page__head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page__head .h-page { font-size: 20px; }
  .page__actions { width: 100%; }
  .page__actions .btn { flex: 1 1 auto; justify-content: center; }

  /* Topbar: keep logo + icons; hide horizontal nav links + the user name. */
  .topbar { height: 64px; }
  .topbar__inner { padding: 0 14px; }
  .topbar__logo { height: 28px; }
  .topbar .nav { display: none; }
  .topbar__right { gap: 10px; }
  .topbar__divider { display: none; }
  .user__name { display: none; }
  .chev { display: none; }

  /* Avatar dropdown panel widens to almost-full viewport on mobile. */
  .user-menu__panel { right: -8px; min-width: 260px; max-width: calc(100vw - 28px); }

  /* Cards lose their horizontal padding so content can breathe. */
  .card { padding: 16px 14px; border-radius: 14px; }
  .card__head { gap: 10px; margin-bottom: 12px; }
  .card-title { font-size: 16px; }

  /* Reconciliation / detail summary tile rows: 2x2. */
  .recon-summary, .detail-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .recon-tile { padding: 12px 14px; }
  .recon-tile__value { font-size: 18px; }
  .profile-grid { grid-template-columns: 1fr; }

  /* Surinkimo ataskaita filter chip row: wrap. */
  .collection-filter { padding: 12px; }
  .collection-filter__chips { flex-wrap: wrap; gap: 6px; }
  .quarter-tabs { flex-wrap: wrap; }

  /* PA poreikis req-row: stack name above bars+vals so 360px fits. */
  .req-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 0; }
  .req-row__name { font-size: 13px; }
  .req-vals { justify-content: flex-start; flex-wrap: wrap; gap: 10px; }

  /* Form grid is already 1-col below 720; reduce gaps. */
  .form-grid { gap: 12px 0; }
  .form-card { padding: 18px 14px; }

  /* Auth screens already cap width — just trim top padding. */
  .auth { padding-top: 24px; }
  .auth__logo { margin-bottom: 32px; }
  .auth__card { padding: 32px 24px; }
  .auth__card--wide { padding: 28px 22px; }

  /* Tables already scroll horizontally via .table-scroll. */
  .table--rows thead th { padding: 10px 8px; font-size: 11px; }
  .table--rows tbody td { padding: 12px 8px; font-size: 13px; }

  /* Filter popover: anchor to viewport right edge. */
  .filter-pop__panel { width: calc(100vw - 28px); right: -14px; }
}
