/* Inter, served from this site (no request to Google; one variable file per alphabet, only downloaded when a page uses it) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --bg: #030303;
    --panel: #100d17;
    --panel-2: #17131f;
    --card: #1a1522;
    --line: rgba(255,255,255,0.09);
    --line-strong: rgba(255,255,255,0.16);
    --ink: #f4f2fb;
    --muted: #968ead;
    --muted-2: #6f6782;
    --brand: #7c3aed;
    --brand-2: #a78bfa;
    --brand-soft: rgba(124,58,237,0.16);
    --danger: #f87171;
    --ok: #34d399;
    --warn: #fbbf24;
    --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font: 14px/1.5 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(1200px 600px at 80% -10%, rgba(124,58,237,0.10), transparent 60%), var(--bg);
    color: var(--ink);
    min-height: 100vh;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: #c4b5fd; }

/* top bar */
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 22px; background: rgba(13,9,24,0.75); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand img { height: 26px; width: auto; display: block; }
.topbar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar .who { color: var(--muted); font-size: 12.5px; }
.topbar .role { background: var(--brand-soft); color: var(--brand-2); padding: 2px 9px; border-radius: 20px; font-size: 11.5px; text-transform: capitalize; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 22px 70px; }
.foot { text-align: center; color: var(--muted-2); font-size: 12px; padding: 26px; }

.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
h1 { font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink); margin: 28px 0 10px; font-weight: 600; }
.count { color: var(--muted); font-weight: 500; font-size: 15px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* buttons */
.btn, .btn-ghost, .btn-danger {
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 9px;
    padding: 9px 15px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.btn { background: linear-gradient(180deg, #8b5cf6, var(--brand)); color: #fff; box-shadow: 0 2px 12px rgba(124,58,237,0.35); }
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.04); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--ink); }
.btn-danger { background: transparent; border-color: rgba(248,113,113,0.5); color: var(--danger); }

/* tabs (service) + view toggle */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
    padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
    background: rgba(255,255,255,0.04); color: var(--muted); border: 1px solid var(--line);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--brand-soft); color: var(--brand-2); border-color: rgba(124,58,237,0.5); }
.seg { display: inline-flex; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg a { padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg a.active { background: var(--brand-soft); color: var(--brand-2); }

.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input[type=search], .filters select { flex: 1 1 200px; }

/* inputs */
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
input, select, textarea {
    width: 100%; padding: 9px 11px; font-size: 13.5px; color: var(--ink); font-family: inherit;
    border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,0.03); margin-top: 4px;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select option { background: #17131f; color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.full { margin-top: 14px; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.chk { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.chk input { width: auto; margin: 0; accent-color: var(--brand); }
.owner-only { font-size: 11px; color: var(--muted-2); text-transform: none; letter-spacing: 0; font-weight: 400; }
.actions { display: flex; gap: 10px; margin-top: 24px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-narrow { max-width: 380px; margin: 56px auto; }

.alert { background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.35); color: #fca5a5; padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; }
.alert.ok { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.35); color: #6ee7b7; }
.alert ul { margin: 0; padding-left: 18px; }

/* table (list / sheet view) */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { background: rgba(255,255,255,0.02); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; }
tbody tr:hover { background: rgba(124,58,237,0.06); }
tbody tr:last-child td { border-bottom: none; }
td a.rowlink { color: var(--ink); font-weight: 600; }
td a.rowlink:hover { color: var(--brand-2); }
.svc .tag { display: inline-block; background: var(--brand-soft); color: var(--brand-2); border-radius: 6px; padding: 1px 7px; font-size: 11.5px; margin-right: 4px; }

/* inline-editable cells (sheet mode) */
.cell-edit { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 5px 7px; margin: 0; font-size: 13px; width: 100%; min-width: 90px; }
.cell-edit:hover { border-color: var(--line); background: rgba(255,255,255,0.03); }
.cell-edit:focus { border-color: var(--brand); background: rgba(255,255,255,0.05); box-shadow: 0 0 0 2px var(--brand-soft); }
.saved-flash { animation: flash 0.8s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 2px var(--ok); } 100% { box-shadow: none; } }

/* status chips */
.chip { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,0.07); color: var(--muted); white-space: nowrap; }
.chip-payment { background: rgba(251,191,36,0.15); color: var(--warn); }
.chip-closed { background: rgba(255,255,255,0.06); color: var(--muted-2); }
.chip-done-monitor { background: rgba(52,211,153,0.15); color: var(--ok); }
.chip-waiting-reply { background: rgba(251,191,36,0.14); color: var(--warn); }
.chip-revisions { background: rgba(251,191,36,0.14); color: var(--warn); }
.chip-checkin-only { background: rgba(255,255,255,0.08); color: var(--muted); }
.chip-blocked-access, .chip-blocked-content { background: rgba(248,113,113,0.14); color: #fca5a5; }

/* kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; }
.kcol { flex: 0 0 270px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: 72vh; }
.kcol-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; }
.kcol-head .kc { font-size: 11px; color: var(--muted-2); }
.kcards { padding: 10px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; min-height: 40px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: grab; }
.kcard:hover { border-color: var(--line-strong); }
.kcard.dragging { opacity: 0.4; }
.kcards.drop-hot { background: var(--brand-soft); border-radius: 10px; }
.kcard .kname { font-weight: 600; font-size: 13px; }
.kcard .kmeta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.kcard .ktags { margin-top: 6px; }

@media (max-width: 680px) {
    .grid { grid-template-columns: 1fr; }
    .wrap { padding: 16px; }
    .toolbar { align-items: flex-start; }
}

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .snum { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat .slabel { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat-money .snum { color: var(--brand-2); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.barrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.barrow:last-child { border-bottom: none; }
code { background: rgba(255,255,255,0.06); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* mobile */
@media (max-width: 760px) {
    .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
    .topbar nav { gap: 12px; font-size: 13px; width: 100%; overflow-x: auto; white-space: nowrap; }
    .topbar .who { display: none; }
    .wrap { padding: 14px; }
    .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .filters { flex-direction: column; }
    .grid { grid-template-columns: 1fr !important; }
    .pagehead { gap: 8px; }
    h1 { font-size: 20px; }
    .stat .snum { font-size: 22px; }
}

/* pagination */
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 12px; flex-wrap: wrap; }
.pager-nav { display: flex; align-items: center; gap: 10px; }
.cell-edit::placeholder { color: var(--muted-2); }

/* quick-action icon button + toast */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 12px; color: var(--muted); cursor: pointer; margin-left: 6px; text-decoration: none; font-family: inherit; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); text-decoration: none; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--ink); padding: 10px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; opacity: 0; transition: all .25s ease; z-index: 1000; box-shadow: 0 8px 28px rgba(0,0,0,0.45); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-err { border-color: rgba(248,113,113,0.5); color: var(--danger); }

/* company registry autocomplete */
.ac-wrap { position: relative; display: block; }
.ac-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
    background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5); max-height: 320px; overflow-y: auto;
}
.ac-item { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ac-item:last-child { border-bottom: 0; }
.ac-item.on { background: var(--brand-soft); }
.ac-name { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.ac-sub { color: var(--muted); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Pardavimai (sales) ===== */
.btn-sm { padding: 5px 10px !important; font-size: 12.5px !important; border-radius: 7px !important; }
.inline-form { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }
.late { color: var(--danger) !important; font-weight: 600; }
.nav-sales { color: var(--muted); font-weight: 500; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -6px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.card-accent { border-color: rgba(124,58,237,0.45); box-shadow: 0 0 0 1px rgba(124,58,237,0.15) inset; }
.tel { white-space: nowrap; font-weight: 600; }
.actions-cell { text-align: right; white-space: nowrap; }
.actions-cell .inline-form + .inline-form, .actions-cell .inline-form + a { margin-left: 4px; }

.sop-steps { display: grid; gap: 14px; }
.sop { padding: 16px 18px; }
.sop-head { display: flex; align-items: center; gap: 10px; }
.sop-head h2 { margin: 0; color: var(--ink); font-size: 13px; }
.sop-num { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-2); font-weight: 700; font-size: 12px; flex: none; }
.sop-hint { font-size: 12.5px; margin: 6px 0 10px; }
.sop table td { padding: 8px 10px; }

/* stage chips */
.st-new, .st-no_answer { background: rgba(255,255,255,0.07); color: var(--muted); }
.st-followup, .st-ghosting, .st-no_deposit, .st-offer { background: rgba(251,191,36,0.14); color: var(--warn); }
.st-booked { background: rgba(96,165,250,0.15); color: #93c5fd; }
.st-no_show, .st-cancelled, .st-lost, .st-bad_fit, .st-dnc { background: rgba(248,113,113,0.13); color: #fca5a5; }
.st-agreed, .st-signed { background: rgba(167,139,250,0.16); color: var(--brand-2); }
.st-paid { background: rgba(52,211,153,0.15); color: var(--ok); }
.ms-confirmed, .ms-held { background: rgba(52,211,153,0.15); color: var(--ok); }
.ms-no_show, .ms-cancelled { background: rgba(248,113,113,0.13); color: #fca5a5; }
.ms-rescheduled { background: rgba(251,191,36,0.14); color: var(--warn); }

/* lead card */
.lead-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; font-size: 13px; }
.stagebar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.stagepill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
    background: rgba(255,255,255,0.03); color: var(--muted); border: 1px solid var(--line); }
.stagepill:hover { color: var(--ink); border-color: var(--line-strong); }
.stagepill.on { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lead-main, .lead-side { display: grid; gap: 16px; min-width: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.radio { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); cursor: pointer; margin: 0; font-size: 13px; }
.radio input { width: auto; margin: 0; accent-color: var(--brand); }
.radio:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; }
.ev { padding: 9px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; }
.ev-meta { font-size: 11.5px; color: var(--muted-2); }
.ev-body { margin-top: 2px; font-size: 13px; overflow-wrap: anywhere; }
.ev-stage .ev-body { color: var(--brand-2); font-weight: 600; }
.ev-call .ev-body::before { content: ''; }
.ev-recording { background: rgba(124,58,237,0.05); border-radius: 8px; padding: 9px 10px; }
.taskline { display: grid; grid-template-columns: 38px 1fr auto; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.taskline.done a { text-decoration: line-through; color: var(--muted-2); }
.cell-edit.mini { min-width: 0; padding: 2px; }
.linkcol { display: grid; gap: 6px; font-size: 13px; }
.checklist { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.tpl { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tpl:last-child { border-bottom: 0; }
.tpl-act { white-space: nowrap; }
.mini-table { background: transparent; }
.mini-table td { padding: 6px 4px; font-size: 12.5px; }
.rec summary { cursor: pointer; padding: 6px 0; }
.rec-sum { white-space: normal; font-size: 13px; color: var(--ink); padding: 6px 0 4px; }
.transcript { white-space: pre-wrap; max-height: 360px; overflow: auto; font-size: 12px; background: rgba(255,255,255,0.03); padding: 10px; border-radius: 8px; }
.rec-card { padding: 14px 16px; margin-bottom: 10px; }
.rec-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.rec-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* board piles */
.pile-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; color: var(--ink); font-size: 13px; }
.pile .snum { font-weight: 700; font-size: 16px; margin-right: 4px; }
.pile-muted { color: var(--muted); }

/* dialer */
.dial-card { padding: 22px; }
.dial-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.dial-phone .tel { font-size: 22px; }
.dial-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.script summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 6px 0; }
.script p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }

@media (max-width: 900px) {
    .lead-grid { grid-template-columns: minmax(0, 1fr); }
    .lead-side .filters input, .lead-side .filters select { min-width: 0; flex: 1 1 auto; }
    .actions-cell { white-space: normal; text-align: left; }
}
@media (max-width: 760px) {
    .subnav { flex-wrap: nowrap; overflow-x: auto; }
    .subnav .tab { white-space: nowrap; }
    .sop table, .sop tbody, .sop tr, .sop td { display: block; width: 100%; }
    .sop tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
    .sop td { border: 0; padding: 3px 0; }
    .dial-buttons .btn, .dial-buttons .btn-ghost { flex: 1 1 45%; justify-content: center; }
}

input[type=date], input[type=datetime-local] { min-width: 0; max-width: 100%; }
.dash-2 { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 900px) { .dash-2 { grid-template-columns: minmax(0, 1fr); } }

/* global search in the top bar */
.topsearch { margin: 0; }
.topsearch input { width: 190px; padding: 6px 11px; font-size: 13px; border-radius: 8px; }
@media (max-width: 760px) { .topsearch input { width: 140px; } }
.nudge-done { display: inline; margin: 0; }

/* ===== 2026-10-14: navigation, client "now" card, money, files, notifications, tour, app ===== */
.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mainnav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.mainnav a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.mainnav a.on { color: var(--ink); background: var(--brand-soft); }
.toolnav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.iconlink { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px;
    color: var(--muted); border: 1px solid var(--line); font-weight: 700; text-decoration: none; }
.iconlink:hover { color: var(--ink); border-color: var(--line-strong); }
.badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 5px; line-height: 1.4; }
.tour { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; border-color: rgba(124,58,237,0.45); }
.tour ol { margin: 8px 0 0; padding-left: 20px; } .tour li { margin: 3px 0; }
.tour-act { display: flex; flex-direction: column; gap: 8px; }
.now-card { margin-bottom: 16px; }
.now-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; }
.now-grid label { font-size: 12px; color: var(--muted); }
.now-grid .now-next { grid-column: 1 / -1; }
.now-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.late-input { border-color: rgba(248,113,113,0.6) !important; color: #fca5a5; }
.section-nav { margin: 4px 0 6px; position: sticky; top: 58px; z-index: 5; background: var(--bg); padding: 8px 0; }
.stage-chip { background: rgba(96,165,250,0.14); color: #93c5fd; }
.tline { display: flex; gap: 8px; }
.tline select { width: 38px; }
details.fold { margin: 8px 0 12px; }
details.fold > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 8px 0; list-style: none; }
details.fold > summary::before { content: '▸ '; } details.fold[open] > summary::before { content: '▾ '; }
details.fold > summary:hover { color: var(--ink); }
.card.comment { padding: 12px 14px; margin-bottom: 8px; }
.comment-body { margin-top: 4px; white-space: normal; word-break: break-word; }
.mention { color: var(--brand-2); font-weight: 600; }
.filechip { display: inline-flex; gap: 6px; align-items: center; margin: 8px 8px 0 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; }
.money-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.money-row.inactive { opacity: .5; }
.money-act { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.mini-input { width: auto !important; padding: 4px 6px !important; font-size: 12px !important; }
.warn { color: var(--warn) !important; }
.mailrow { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.mail-dir.out { color: var(--brand-2); } .mail-dir.in { color: var(--ok); }
.mail-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.notif { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 8px; color: var(--muted); text-decoration: none; }
.card.notif.unread { color: var(--ink); border-color: rgba(124,58,237,0.45); }
.score-hi { background: rgba(52,211,153,0.15); color: var(--ok); }
.score-mid { background: rgba(251,191,36,0.15); color: var(--warn); }
.score-lo { background: rgba(255,255,255,0.06); color: var(--muted-2); }
.card.help { margin-bottom: 14px; } .card.help h2 { margin-top: 0; }
.card.help li { margin: 4px 0; }
.foot a { color: var(--muted); }
@media (max-width: 760px) {
    .toolnav { margin-left: 0; width: 100%; }
    .topsearch { flex: 1; } .topsearch input { width: 100%; }
    .mainnav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .mainnav a { white-space: nowrap; }
    .now-grid { grid-template-columns: 1fr 1fr; }
    .money-row { grid-template-columns: 1fr auto; } .money-act { grid-column: 1 / -1; justify-content: flex-start; }
    .mailrow { grid-template-columns: 1fr; gap: 2px; } .mail-subj { white-space: normal; }
    .tour { flex-direction: column; }
    .section-nav { top: 0; overflow-x: auto; flex-wrap: nowrap; } .section-nav .tab { white-space: nowrap; }
}
@media (display-mode: standalone) { .topbar { padding-top: max(10px, env(safe-area-inset-top)); } }

/* Email outreach grid: row colours like the tracking sheet */
.outreach tr.tone-green td { background: rgba(52,211,153,0.08); }
.outreach tr.tone-red td { background: rgba(248,113,113,0.08); }
.outreach tr.tone-new td { background: rgba(167,139,250,0.10); }
.outreach td { vertical-align: middle; }
.outreach input.cell-edit { background: rgba(255,255,255,0.03); }
.script-side details.script p { white-space: pre-wrap; }
.prompt-box { width: 100%; min-height: 150px; font-size: 12px; line-height: 1.4; }

/* lead card side column must never push the page wider than the viewport */
.lead-side > * { min-width: 0; max-width: 100%; }
.lead-side .card { overflow-x: auto; }
.lead-side .taskline { flex-wrap: wrap; }

/* Šiandien: empty steps collapse into one line; long lists fold after 8 rows */
.sop-clear { margin: 2px 0 0; font-size: 13px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; }
details.more-rows { margin: 6px 0 0; }

/* Collapsible cards (lead card): summary looks like the card's h2 */
details.fold-card > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
details.fold-card > summary::-webkit-details-marker { display: none; }
details.fold-card > summary h2 { margin: 0; }
details.fold-card > summary h2::after { content: ' ▸'; color: var(--muted); font-weight: 400; }
details.fold-card[open] > summary { margin-bottom: 12px; }
details.fold-card[open] > summary h2::after { content: ' ▾'; }
.fold-note { font-size: 12px; }
.stage-more { width: auto; padding: 3px 8px; font-size: 12px; border-radius: 999px; }
.stagebar .inline-form { display: inline-flex; }
.stagebar select.stage-more { width: auto; max-width: 150px; min-width: 0; flex: none; padding: 3px 26px 3px 10px; height: auto; }
.barrow .sub { display: block; }


/* ---- 2026-10-14 UX pass: less noise, one hero line, whole-card clicks, delivery-first ---- */
.client-title { font-size: 28px; margin-bottom: 4px; }
.kcard { cursor: pointer; border-left: 3px solid transparent; }
.kcard:hover { border-color: var(--brand-2); background: var(--panel-2); }
.kcard:has(.late) { border-left-color: var(--danger); }
.kcard .kname { font-size: 14px; }
.kcard .kname a { color: var(--ink); }
.hero-next { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.hero-input { font-size: 20px !important; font-weight: 600; padding: 12px 14px !important; margin-top: 6px; text-transform: none; letter-spacing: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.pill { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0; min-width: 150px; }
.pill select, .pill input { margin-top: 4px; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.pill-wait.pill-blocked-access select, .pill-wait.pill-blocked-content select { color: var(--danger); }
.pill-wait.pill-waiting-reply select, .pill-wait.pill-revisions select, .pill-wait.pill-payment select { color: var(--warn); }
.pill-wait.pill-done-monitor select { color: var(--ok); }
.pill-late input { color: var(--danger); border-color: rgba(248,113,113,.5); }
.pill-warn input { color: var(--warn); }
.pill-stage select { color: #93c5fd; }
.pill-flag { font-size: 12px; font-weight: 600; color: var(--warn); border: 1px solid rgba(251,191,36,.4); border-radius: 20px; padding: 4px 10px; }
.pill-flag.late { color: var(--danger); border-color: rgba(248,113,113,.5); }
.more-links { display: inline-block; }
.more-links > summary { list-style: none; cursor: pointer; display: inline-block; }
.more-links > summary::-webkit-details-marker { display: none; }
.more-links[open] > span { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 6px; }
.quickadd { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.quickadd > input[name=title] { flex: 1 1 260px; }
.quickadd .more-links[open] > span { display: inline-flex; }
details.fold.sect { margin: 14px 0; border-top: 1px solid var(--line); padding-top: 4px; }
details.fold.sect > summary { font-size: 14px; font-weight: 600; color: var(--ink); padding: 10px 0; }
details.fold.sect > summary .muted { font-weight: 400; }
.stats-delivery { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats-delivery .stat { text-decoration: none; display: block; }
.stats-delivery .snum { font-size: 28px; font-weight: 700; color: var(--ink); }
.stats-delivery .stat-bad .snum { color: var(--danger); }
.stats-delivery .stat-warn .snum { color: var(--warn); }
@media (max-width: 720px) { .stats-delivery { grid-template-columns: repeat(2, 1fr); } }

.kcard .knext { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 4px; line-height: 1.35; }
.late-input { color: var(--danger); border-color: rgba(248,113,113,.5); }

/* ---- project pop-up (quick card) ---- */
body.pop-open { overflow: hidden; }
.pop-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.pop-box { background: var(--panel); border: 1px solid var(--line-strong, var(--line)); border-radius: 14px; width: min(980px, 100%); padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.pop-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.pop-title { margin: 0 0 6px; font-size: 22px; }
.pop-actions { display: flex; gap: 8px; align-items: center; }
.pop-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pop-cols h3 { margin: 4px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pop-notes { width: 100%; margin-bottom: 14px; }
.pop-comment { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; position: relative; }
.pop-comment textarea { flex: 1; }
.pop-task { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pop-task input[name=title] { flex: 1 1 180px; }
.pop-task select, .pop-task input[type=date], .pop-task input.dp-input { flex: 0 1 130px; }
.comment-mini { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13.5px; }
.comment-mini > .muted { font-size: 12px; }
@media (max-width: 760px) { .pop-cols { grid-template-columns: 1fr; } .pop-box { padding: 16px; } }

/* ---- links, mentions, small bits ---- */
.sitelink { color: var(--brand-2, #a78bfa); font-size: 12.5px; word-break: break-all; }
.kmeta .sitelink { font-size: 12px; }
th a.sorted { color: var(--brand-2, #a78bfa); }
th a { color: inherit; }
.mention-list { position: absolute; left: 0; right: 0; top: auto; bottom: 100%; z-index: 90; }
.hero-next textarea { text-transform: none; letter-spacing: 0; font-size: 14px; width: 100%; margin-top: 4px; }
.table-scroll td .sitelink { white-space: nowrap; }

/* ---- overview bars ---- */
.bar { display: inline-flex; align-items: center; gap: 8px; flex: 0 1 55%; min-width: 90px; }
.bar i { display: block; height: 8px; border-radius: 5px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); min-width: 4px; }
.bar b { font-size: 13px; font-weight: 600; }
.bar-link { color: inherit; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; padding: 4px 6px; }
.mini-table td { padding: 6px; border-top: 1px solid var(--line); font-size: 13.5px; }

/* Susitikimai (meetings log) + yearly sales table */
.meet-table td { vertical-align: top; }
.meet-table .cell-edit { min-width: 0; }
.meet-table textarea.cell-edit { width: 100%; min-height: 34px; resize: vertical; font: inherit; font-size: 13px; }
.meet-table tr.row-green td { background: rgba(34,197,94,0.08); }
.meet-table tr.row-red td { background: rgba(239,68,68,0.07); }
.stats-year th, .stats-year td { text-align: right; white-space: nowrap; }
.stats-year th:first-child, .stats-year td:first-child { text-align: left; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* First-open splash: shiny DMNT logo, once per browser session (header.php sets .no-splash after) */
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; pointer-events: none;
    background: radial-gradient(600px 300px at 50% 50%, rgba(124,58,237,0.22), transparent 70%), var(--bg);
    animation: splash-out .35s ease-in 1.05s forwards; }
.no-splash .splash { display: none; }
.splash-logo { position: relative; width: min(220px, 56vw); aspect-ratio: 360 / 146;
    background: var(--logo) center / contain no-repeat;
    filter: drop-shadow(0 0 18px rgba(124,58,237,0.55));
    animation: splash-in .45s cubic-bezier(.2,.8,.2,1) both; }
.splash-logo::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.95) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
    -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
    animation: splash-shine .7s ease-in-out .35s both; }
@keyframes splash-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes splash-shine { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .splash { animation-delay: .4s; } .splash-logo, .splash-logo::after { animation: none; } }

/* ===== 2026-10-14: tasks list view grouped by status (ClickUp-style) + delivery inbox ===== */
.navbadge { display: inline-block; min-width: 18px; text-align: center; background: var(--warn); color: #1a1205; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 6px; line-height: 1.6; margin-left: 2px; }
.tgroups { display: flex; flex-direction: column; gap: 22px; }
details.tg > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 4px 0 8px; }
details.tg > summary::-webkit-details-marker { display: none; }
details.tg > summary::before { content: '▾'; color: var(--muted-2); font-size: 12px; width: 12px; }
details.tg:not([open]) > summary::before { content: '▸'; }
.stpill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 7px; font-size: 12px; font-weight: 700; letter-spacing: .03em; background: rgba(255,255,255,0.08); color: var(--ink); }
.stpill.st-review { background: #f5b82e; color: #231a02; }
.stpill.st-waiting_client { background: #ef5350; color: #fff; }
.stpill.st-doing { background: #3b6cf4; color: #fff; }
.stpill.st-todo { background: rgba(255,255,255,0.1); color: var(--ink); }
.stpill.st-done { background: #1fb98a; color: #04281e; }
.trow { display: grid; grid-template-columns: minmax(240px, 1fr) 170px 150px 130px 130px; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.trow.thead { color: var(--muted-2); font-size: 11.5px; padding: 2px 4px 6px; }
.trow:not(.thead):hover { background: rgba(255,255,255,0.025); }
.tname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tname .tinput { flex: 1 1 auto; min-width: 120px; margin: 0; font-weight: 500; }
.tclient { font-size: 11.5px; color: var(--muted); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.stdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted-2); flex: none; }
.stdot.st-review { border-color: #f5b82e; background: #f5b82e55; }
.stdot.st-waiting_client { border-color: #ef5350; background: #ef535055; }
.stdot.st-doing { border-color: #3b6cf4; background: #3b6cf455; }
.stdot.st-done { border-color: #1fb98a; background: #1fb98a; }
.tassg, .tprio, .tdue, .tstat { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tassg select, .tprio select, .tstat select, .tdue input { margin: 0; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar.none { background: transparent; border: 1px dashed var(--muted-2); }
.tdue { flex-direction: column; align-items: flex-start; gap: 0; }
.tdue input { font-size: 11.5px; color: var(--muted-2); padding-top: 0; padding-bottom: 0; }
.dueText { font-size: 13px; font-weight: 500; padding-left: 7px; }
.dueText.late { color: var(--danger); } .dueText.soon { color: var(--warn); } .dueText.okd { color: var(--ok); } .dueText.muted { color: var(--muted); }
.flag { font-size: 15px; flex: none; color: var(--muted-2); }
.flag.fl-urgent { color: #ef5350; } .flag.fl-high { color: #f5b82e; } .flag.fl-normal { color: #3b6cf4; } .flag.fl-low { color: var(--muted-2); }
.tadd { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 8px; color: var(--muted); }
.tadd input { border: 0; background: transparent; margin: 0; box-shadow: none !important; }
.tadd input:focus { background: rgba(255,255,255,0.04); }
@media (max-width: 900px) {
    .trow { grid-template-columns: 1fr 1fr; }
    .trow.thead { display: none; }
    .tname { grid-column: 1 / -1; }
}
/* delivery inbox */
.inbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 8px; }
.inbox-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inbox-actions select { margin: 0; width: auto; }
.inbox-msg { padding: 12px 16px; margin-bottom: 8px; border-left: 3px solid var(--line-strong); }
.inbox-msg.in { border-left-color: var(--warn); }
.inbox-msg.out { border-left-color: var(--brand); margin-left: 24px; }
.inbox-reply { margin: 10px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
details.inbox-replybox { margin-top: 8px; }
details.inbox-replybox > summary { cursor: pointer; color: var(--brand-2); font-size: 12.5px; list-style: none; }
details.inbox-replybox > summary::-webkit-details-marker { display: none; }
.inbox-list tr.unread td a.rowlink { font-weight: 700; }
.inbox-snip { font-size: 12.5px; margin-top: 2px; max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted-2); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(251,191,36,0.18); } .dot.ok { background: var(--ok); }

/* Tables everywhere: drag-resizable columns + zoom bar (assets/tables.js) */
table.tbl-resizable thead th { position: relative; }
.col-grip { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; }
.col-grip:hover, body.col-resizing .col-grip:hover { background: var(--brand-soft); border-right: 2px solid var(--brand-2); }
body.col-resizing { cursor: col-resize; user-select: none; }
.tbl-tools { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin: 0 0 6px; font-size: 11.5px; }
.tbl-tools .muted { margin-right: 4px; }
.btn-xs { padding: 2px 8px; font-size: 12px; line-height: 1.4; border-radius: 6px; min-width: 26px; }

/* Sales charts (src/pages/sales_charts.php) */
.chart-card { margin-bottom: 16px; }
.chart-pair { margin-bottom: 16px; }
.chart-hint { font-size: 12.5px; margin: -4px 0 10px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .ax { fill: var(--muted); font-size: 11px; font-family: inherit; }
svg.chart .mark:hover path, svg.chart .mark:hover circle:last-of-type { filter: brightness(1.25); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbar-track { height: 10px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: #3987e5; border-radius: 0 4px 4px 0; }
.hbar-val { white-space: nowrap; }
.month-tabs { flex-wrap: wrap; }

/* ===== App layout: left sidebar + slim top bar (GoHighLevel / ClickUp style) ===== */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.app.app-guest { display: block; }
.sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
    background: #0b0812; border-right: 1px solid var(--line); padding: 14px 10px 12px; z-index: 30;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; color: var(--ink); font-weight: 700; letter-spacing: .02em; }
.sidebar .brand img { height: 24px; width: auto; display: block; }
.sidenav { display: flex; flex-direction: column; gap: 2px; }
.sidenav-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.sidelink {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px;
    color: var(--muted); font-weight: 500; font-size: 14px; background: none; border: 0; text-align: left; cursor: pointer; font-family: inherit;
}
.sidelink:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.sidelink.on { color: var(--ink); background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.sidelink .si { width: 20px; text-align: center; font-size: 15px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ico { display: block; flex: none; }
.sidelink .sl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidesub { display: flex; flex-direction: column; margin: 2px 0 6px 30px; border-left: 1px solid var(--line); }
.sidesub a { padding: 6px 12px; font-size: 13px; color: var(--muted); border-radius: 0 6px 6px 0; }
.sidesub a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.sidesub a.on { color: var(--brand-2); font-weight: 600; border-left: 2px solid var(--brand-2); margin-left: -1px; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-main > .topbar {
    display: flex; align-items: center; gap: 12px; justify-content: space-between;
    padding: 10px 22px; position: sticky; top: 0; z-index: 20;
}
.app-main > .topbar .topsearch { flex: 1; max-width: 560px; }
.app-main > .topbar .topsearch input { width: 100%; padding: 8px 14px; border-radius: 10px; font-size: 13.5px; }
.app-main > .topbar .toolnav { margin-left: auto; width: auto; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(180deg, #8b5cf6, var(--brand)); color: #fff; font-weight: 700; font-size: 14px; }
.app-main > .wrap { width: 100%; max-width: 1480px; }
.nav-burger { display: none; cursor: pointer; }
.nav-scrim { display: none; }
/* Sales sub-pages live in the sidebar on desktop; the in-page tab row stays for phones. */
@media (min-width: 901px) { .subnav > .tab { display: none; } .subnav { border-bottom: 0; margin-bottom: 4px; justify-content: flex-end; } }
@media (max-width: 900px) {
    .app { display: block; }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.6); }
    .navtoggle:checked ~ .app .sidebar { transform: none; }
    .navtoggle:checked ~ .app .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
    .nav-burger { display: inline-flex; }
    .app-main > .topbar { padding: 8px 12px; }
    .app-main > .topbar .toolnav { width: auto; margin-left: 0; }
}
@media (display-mode: standalone) { .sidebar { padding-top: max(14px, env(safe-area-inset-top)); } }

/* ===== GHL-style tabbed cards: left tab list + one panel at a time ===== */
.tabbed.js-tabs { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 18px; }
.tabnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 70px; }
.tabnav button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 9px 12px; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.tabnav button:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.tabnav button.on { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.tabnav button em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); background: rgba(255,255,255,0.08); border-radius: 10px; padding: 0 7px; line-height: 1.6; }
.tabnav button.on em { background: rgba(124,58,237,0.3); color: #fff; }
.js-tabs > .tabpanel { display: none; min-width: 0; }
.js-tabs > .tabpanel.on { display: block; }
.pop-box .tabbed.js-tabs { grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin-top: 12px; }
.pop-box .tabnav { position: static; }
@media (max-width: 760px) {
    .tabbed.js-tabs, .pop-box .tabbed.js-tabs { grid-template-columns: 1fr; gap: 10px; }
    .tabnav, .pop-box .tabnav { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
    .tabnav button { white-space: nowrap; flex: none; }
}
/* revision rounds */
a.pill-flag { text-decoration: none; }
.pill-flag.rev-warn { background: rgba(251,191,36,0.16); color: var(--warn); }
.pill-flag.rev-over { background: rgba(248,113,113,0.16); color: #fca5a5; }
.pill-flag.rev-ok { background: var(--brand-soft); color: var(--brand-2); }
.rev-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; padding: 16px 20px; }
.rev-count { display: flex; align-items: baseline; gap: 4px; }
.rev-big { font-size: 38px; font-weight: 800; line-height: 1; }
.rev-of { color: var(--muted); font-size: 16px; }
.rev-head.rev-warn .rev-big { color: var(--warn); } .rev-head.rev-over .rev-big { color: var(--danger); }
.rev-dots { display: flex; gap: 6px; }
.rdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted-2); }
.rdot.on { background: var(--brand-2); border-color: var(--brand-2); } .rdot.over { border-color: var(--danger); } .rdot.over.on { background: var(--danger); }
.rev-hint { flex: 1 1 260px; font-size: 13px; }
.rev-add { margin-bottom: 14px; padding: 14px 18px; }
.rev-add-title { font-weight: 700; margin-bottom: 8px; }
.rev-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .rev-grid { grid-template-columns: 1fr 1fr; } }
.rev-row { padding: 12px 16px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.rev-row.over { border-color: rgba(248,113,113,0.4); }
.rev-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rev-row-head input, .rev-row-head select { margin: 0; width: auto; }
.rev-items input { width: 64px; display: inline-block; }
.rev-row textarea, .rev-row > input { margin: 0; }
/* lead card: tabs sit inside the main column (the side column stays) */
.lead-main.tabbed.js-tabs { display: block; margin-top: 0; }
.lead-main.tabbed.js-tabs > .tabnav { flex-direction: row; flex-wrap: wrap; position: static; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }

/* View as role (owner preview) */
.viewas-form { margin: 0 0 6px; padding: 6px 4px 8px; border-radius: 8px; background: rgba(124,58,237,0.08); }
.viewas-lab { display: flex; align-items: center; gap: 10px; padding: 2px 6px 5px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.viewas-form select { width: 100%; font-size: 13px; padding: 6px 8px; }
.viewas-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border-radius: 10px;
    background: rgba(124,58,237,0.16); border: 1px solid rgba(124,58,237,0.55); font-size: 13.5px; }
.viewas-banner span { display: inline-flex; align-items: center; gap: 8px; }

/* ---- ClickUp-style project workspace (pop-up + full card) ---- */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.ws-pop { margin-top: 4px; }
.ws-main { min-width: 0; }
.ws-rail { min-width: 0; border-left: 1px solid var(--line); padding-left: 22px; }
.ws-page .ws-rail { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; }
.pop-box:has(.ws) { width: min(1180px, 100%); }
.pop-bar { display: flex; justify-content: flex-end; gap: 8px; align-items: center; margin: -6px 0 6px; }
.ws-topbar { margin-bottom: 8px; }
.ws-crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.ws-crumbs a { color: var(--muted); }
.ws-title { display: block; width: 100%; font-size: 26px; font-weight: 700; letter-spacing: -.01em; background: transparent !important; border: 1px solid transparent !important; padding: 4px 8px !important; margin: 0 -8px; border-radius: 8px; color: var(--ink); }
.ws-title:hover, .ws-title:focus { border-color: var(--line-strong) !important; background: rgba(255,255,255,.03) !important; }
.ws-meta { margin: 2px 0 14px; }
.ws-props { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; margin: 0 0 18px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ws-prop { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.ws-prop .ws-k { flex: 0 0 96px; font-size: 12.5px; color: var(--muted); }
.ws-prop .ws-v { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; background: transparent; border: 1px solid transparent; padding: 6px 8px; font-size: 14px; font-weight: 500; border-radius: 8px; color: var(--ink); }
.ws-prop .ws-v:hover, .ws-prop .ws-v:focus { border-color: var(--line-strong); background: rgba(255,255,255,.04); }
.ws-prop .ws-v option { background: var(--panel); color: var(--ink); }
.ws-prop.ws-wide { grid-column: 1 / -1; }
.ws-assignee { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.ws-assignee select { flex: 1 1 auto; }
.ws-avatar { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-2); font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(167,139,250,.35); }
.ws-stage { color: #93c5fd; }
.ws-wait-blocked-access, .ws-wait-blocked-content { color: var(--danger); }
.ws-wait-waiting-reply, .ws-wait-revisions, .ws-wait-payment { color: var(--warn); }
.ws-wait-done-monitor { color: var(--ok); }
.ws-prio-urgent { color: var(--danger); } .ws-prio-high { color: var(--warn); } .ws-prio-low { color: var(--muted); }
.ws-late { color: var(--danger) !important; border-color: rgba(248,113,113,.5) !important; }
.ws-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.ws-desc { margin-bottom: 16px; }
.ws-desc-text { width: 100%; min-height: 110px; resize: vertical; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.55; }
.ws-desc-text:focus { border-color: var(--brand-2); background: rgba(255,255,255,.04); }
.ws-links { margin-bottom: 14px; padding: 10px 14px; }
.ws-compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; align-items: stretch; }
.ws-compose textarea { width: 100%; }
.ws-compose .btn { align-self: flex-end; }
.ws-compose-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.ws-compose-row input[type=file] { flex: 1 1 auto; min-width: 0; font-size: 12px; }
.ws-feed { display: flex; flex-direction: column; gap: 12px; }
.ws-item { display: flex; gap: 10px; align-items: flex-start; }
.ws-body { min-width: 0; flex: 1 1 auto; font-size: 13.5px; }
.ws-who { font-size: 12.5px; margin-bottom: 2px; }
.ws-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ws-event { font-size: 12.5px; align-items: center; }
.ws-dot { flex: none; width: 8px; height: 8px; margin: 0 8px; border-radius: 50%; background: var(--line-strong); }
.ws .tabbed.js-tabs { display: block; margin-top: 0; }
.ws .tabbed.js-tabs > .tabnav { flex-direction: row; flex-wrap: wrap; position: static; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.ws .tabbed.js-tabs > .tabnav button { flex: none; }
@media (max-width: 1000px) {
    .ws { grid-template-columns: 1fr; gap: 18px; }
    .ws-rail { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
    .ws-page .ws-rail { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) { .ws-props { grid-template-columns: 1fr; } .ws-title { font-size: 21px; } }

/* meetings filters */
.meet-filters { padding: 14px 16px; margin-bottom: 16px; }
.meet-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.meet-presets .chip { text-decoration: none; padding: 4px 11px; }
.chip.on { background: var(--brand-soft); color: var(--brand-2); }

/* GHL-style board + lead pop-up + switchable charts */
.kanban-wide .kcol { flex: 0 0 250px; }
.ws-v-static { padding: 6px 8px; font-size: 14px; font-weight: 500; }
.chart-switch .chart-types { margin-bottom: 10px; display: inline-flex; }
.chart-panel[hidden] { display: none; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
svg.donut { width: 170px; height: 170px; flex: none; transform: none; }
svg.donut circle { transform-origin: 21px 21px; }
svg.donut .donut-n { fill: var(--ink); font-size: 6px; font-weight: 700; font-family: inherit; }
.donut-legend { display: grid; gap: 6px; font-size: 13px; min-width: 190px; flex: 1 1 200px; }
.donut-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
.funnel { display: grid; gap: 10px; }
.funnel-step { display: grid; gap: 3px; }
.funnel-bar { margin: 0 auto; background: linear-gradient(90deg, #3987e5, #7c3aed); border-radius: 8px; padding: 9px 12px; text-align: center; min-width: 46px; }
.funnel-lab { text-align: center; font-size: 12.5px; }
.seg button { padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--brand-soft); color: var(--brand-2); }

/* ===== 2026-10-14: wins feedback (fx.js), login greeting, progress bar, page transitions ===== */
.fx-toast { position: fixed; left: 50%; bottom: 26px; z-index: 10002; transform: translate(-50%, 24px) scale(.96); opacity: 0; pointer-events: none;
    max-width: min(92vw, 460px); padding: 11px 18px 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink);
    background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(91,33,182,.95)); border: 1px solid rgba(196,181,253,.45);
    box-shadow: 0 10px 34px rgba(124,58,237,.45); transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .25s ease; }
.fx-toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.fx-toast + .fx-toast { bottom: 82px; }
.fx-toast.fx-call, .fx-toast.fx-task { background: var(--panel-2); border-color: var(--line-strong); box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.fx-toast.fx-big { font-size: 15.5px; padding: 13px 22px; }
html.fx-glow body::after { content: ""; position: fixed; inset: 0; z-index: 10000; pointer-events: none;
    box-shadow: inset 0 0 120px 10px rgba(124,58,237,.55); animation: fx-glow 1.3s ease-out forwards; }
@keyframes fx-glow { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

/* Greeting on the first page after login */
.welcome { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; cursor: pointer;
    background: radial-gradient(700px 360px at 50% 46%, rgba(124,58,237,.28), transparent 70%), var(--bg);
    animation: welcome-out .5s ease-in 2.7s forwards; }
.welcome-inner { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 0 20px; }
.welcome .splash-logo { margin-bottom: 18px; animation-duration: .6s; }
.welcome-greet { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: 0; animation: welcome-rise .6s cubic-bezier(.2,.8,.2,1) .55s forwards; }
.welcome-name { font-size: clamp(34px, 7vw, 56px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; opacity: 0;
    background: linear-gradient(90deg, #f4f2fb, #c4b5fd 55%, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: welcome-rise .7s cubic-bezier(.2,.8,.2,1) .7s forwards; }
.welcome-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.welcome-chip { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink); background: rgba(124,58,237,.16); border: 1px solid rgba(167,139,250,.35);
    opacity: 0; animation: welcome-pop .5s cubic-bezier(.2,1.5,.4,1) forwards; animation-delay: calc(1s + var(--i, 0) * .15s); }
.welcome-chip b { font-size: 17px; color: #c4b5fd; font-variant-numeric: tabular-nums; }
.welcome-sub { margin-top: 20px; color: var(--muted); font-size: 15px; opacity: 0; animation: welcome-rise .6s ease 1s forwards; }
@keyframes welcome-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes welcome-pop { from { opacity: 0; transform: scale(.8) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes welcome-out { to { opacity: 0; visibility: hidden; } }
html.welcome-skip .welcome { animation: welcome-out .25s ease-in forwards; }
/* page content eases in as the greeting fades */
html.welcome-on .wrap > * { animation: welcome-rise .55s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: 2.45s; }
html.welcome-on .wrap > *:nth-child(2) { animation-delay: 2.52s; }
html.welcome-on .wrap > *:nth-child(3) { animation-delay: 2.59s; }
html.welcome-on .wrap > *:nth-child(4) { animation-delay: 2.66s; }
html.welcome-on .wrap > *:nth-child(n+5) { animation-delay: 2.73s; }
html.welcome-skip .wrap > * { animation-delay: .1s !important; }
@media (prefers-reduced-motion: reduce) {
    .welcome { animation-delay: 1.2s; }
    .welcome-greet, .welcome-name, .welcome-chip, .welcome-sub { animation-duration: .01s; animation-delay: 0s; }
    html.welcome-on .wrap > * { animation: none; }
}

/* Thin bar at the top while a page is loading */
.navbar-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 10003; pointer-events: none; opacity: 0;
    background: linear-gradient(90deg, #7c3aed, #c4b5fd); box-shadow: 0 0 8px rgba(167,139,250,.8); transition: opacity .25s; }

/* Smooth cross-fade between pages (Chrome/Edge); the sidebar stays put */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

.sidelink[data-fx-toggle] { width: 100%; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.sidelink .si[hidden] { display: none; }

/* Sidebar logo: bigger, with an occasional glow + shine sweep */
.sidebar .brand { padding: 6px 8px 18px; }
.sidebar .brand-logo { position: relative; display: block; width: 100%; max-width: 168px; animation: logo-glow 9s ease-in-out infinite; }
.sidebar .brand img { height: auto; width: 100%; display: block; }
.sidebar .brand-logo::after { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.95) 50%, transparent 62%) -150% 0 / 250% 100% no-repeat;
    -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
    animation: logo-shine 9s ease-in-out infinite; }
@keyframes logo-shine { 0%, 82% { background-position: 150% 0; } 94%, 100% { background-position: -150% 0; } }
@keyframes logo-glow { 0%, 78%, 100% { filter: none; } 88% { filter: drop-shadow(0 0 14px rgba(167,139,250,.85)); } }
@media (prefers-reduced-motion: reduce) { .sidebar .brand-logo, .sidebar .brand-logo::after { animation: none; } }

/* ===== 2026-10-14: round task button (assets/tasks.js) ===== */
.tcheck { position: relative; flex: none; width: 20px; height: 20px; padding: 0; margin: 0; border-radius: 50%; border: 2px solid var(--muted-2); background: transparent; color: transparent;
    display: inline-grid; place-items: center; cursor: pointer; transition: border-color .12s, background .12s, color .12s, transform .12s; }
.tcheck::after { content: ""; position: absolute; inset: -7px; }
.tcheck:hover, .tcheck:focus-visible { border-color: #1fb98a; color: #1fb98a; outline: none; }
.tcheck:active { transform: scale(.85); }
.tcheck[data-status="review"] { border-color: #f5b82e; }
.tcheck[data-status="waiting_client"] { border-color: #ef5350; }
.tcheck[data-status="doing"] { border-color: #3b6cf4; }
.tcheck[data-status="doing"]:hover, .tcheck[data-status="review"]:hover, .tcheck[data-status="waiting_client"]:hover { border-color: #1fb98a; }
.tcheck.is-done, .tcheck.is-done:hover { border-color: #1fb98a; background: #1fb98a; color: #04281e; }
.tcheck.is-done svg { animation: tcheck-pop .28s cubic-bezier(.2,.9,.3,1.4); }
@keyframes tcheck-pop { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.trow.is-done .tinput, .taskline.is-done a, .barrow .is-done a { text-decoration: line-through; }
.trow.is-done .tname, .taskline.is-done > a, .taskline.is-done > .muted { opacity: .55; }
.tline { align-items: center; }
@media (prefers-reduced-motion: reduce) { .tcheck, .tcheck.is-done svg { transition: none; animation: none; } }

/* ===== 2026-10-15: ClickUp-style lists (Projektai, Užduotys), filter bar, calendar pop-up ===== */
input[type=date] { color-scheme: dark; cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .75; cursor: pointer; }
.dp { position: fixed; z-index: 100000; width: 276px; padding: 12px; background: #1a1522; border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 22px 60px rgba(0,0,0,.65); user-select: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-title { font-weight: 700; font-size: 14px; }
.dp-nav { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; padding: 0; }
.dp-nav:hover { background: var(--brand-soft); color: var(--brand-2); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--muted-2); padding: 4px 0; text-transform: uppercase; }
.dp-day { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.dp-day:hover { background: var(--brand-soft); color: var(--brand-2); }
.dp-day.dp-out { color: var(--muted-2); opacity: .55; }
.dp-day.dp-we { color: #c9b8ff; }
.dp-day.dp-today { box-shadow: inset 0 0 0 1.5px var(--brand-2); }
.dp-day.dp-sel { background: var(--brand); color: #fff; box-shadow: none; opacity: 1; }
.dp-day:disabled { opacity: .25; cursor: not-allowed; }
.dp-quick { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.dp-quick button { flex: 1 1 auto; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.dp-quick button:hover { background: var(--brand-soft); color: var(--brand-2); }
.dp-quick .dp-clear { color: var(--muted); flex: 0 0 auto; }

/* clearly separated columns everywhere in tables */
.table-scroll table th, .table-scroll table td { border-right: 1px solid var(--line); }
.table-scroll table th:last-child, .table-scroll table td:last-child { border-right: 0; }
.table-scroll table thead th { border-bottom: 1px solid var(--line-strong); background: #15111d; }
.tgrid td { padding: 6px 10px; height: 44px; }
.tgrid tbody tr:not(.grp):nth-child(even) td { background: rgba(255,255,255,0.012); }
.tgrid tbody tr:not(.grp):hover td { background: rgba(124,58,237,0.08); }
.tgrid th.num, .tgrid td.num { text-align: center; }

/* groups */
.tgrid tr.grp td { background: #14101c; padding: 7px 10px; border-top: 1px solid var(--line-strong); border-right: 0; height: auto; }
.gtoggle { display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.gtoggle:hover { background: rgba(255,255,255,.05); }
.gtoggle .caret { display: inline-flex; transition: transform .15s; color: var(--muted); }
.gtoggle[aria-expanded="false"] .caret { transform: rotate(-90deg); }
.gtoggle .gname { font-weight: 700; font-size: 13px; }
.gcount { color: var(--muted); font-weight: 600; font-size: 12px; }
tbody.g-folded tr:not(.grp) { display: none; }
body.f-active tbody.g-folded tr:not(.grp):not(.f-hide) { display: table-row; }
tbody.g-empty { display: none; }
.f-hide { display: none !important; }

/* pills */
.pillsel { position: relative; display: inline-flex; align-items: center; max-width: 100%; vertical-align: middle; }
.pillsel select.cell-edit { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; opacity: 0; cursor: pointer; padding: 0; margin: 0; border: 0; }
.pl { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; background: rgba(255,255,255,.08); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pl::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pillsel:hover .pl { filter: brightness(1.18); }
.pl-none { background: transparent; color: var(--muted-2); border: 1px dashed var(--line-strong); }
.pl-none::before { display: none; }
.pl-w_new, .pl-seo_new { background: rgba(148,163,184,.2); color: #cbd5e1; }
.pl-w_draft_needed { background: rgba(59,108,244,.24); color: #9db8ff; }
.pl-w_draft_done { background: rgba(167,139,250,.22); color: #c9b8ff; }
.pl-w_draft_sent, .pl-w_reply_10d { background: rgba(245,184,46,.2); color: #f7c94f; }
.pl-w_revision, .pl-w_rev_done_wait, .pl-w_rev_no_reply { background: rgba(249,115,22,.2); color: #fdba74; }
.pl-w_seo, .pl-seo_once { background: rgba(45,212,191,.2); color: #5eead4; }
.pl-w_needs_invoice, .pl-w_inv_sent { background: rgba(244,114,182,.2); color: #f9a8d4; }
.pl-w_inv_unpaid_10, .pl-w_inv_unpaid_30, .pl-w_legal { background: rgba(239,83,80,.2); color: #ff9c99; }
.pl-w_paid, .pl-seo_monthly { background: rgba(31,185,138,.22); color: #34d399; }
.pl-w_upsell_wait { background: rgba(96,165,250,.2); color: #93c5fd; }
.pl-w_done, .pl-seo_done { background: rgba(52,211,153,.18); color: #6ee7b7; }
.pl-seo_pause { background: rgba(148,163,184,.2); color: #cbd5e1; }
.pl-waiting-reply { background: rgba(245,184,46,.18); color: #f7c94f; }
.pl-blocked-access, .pl-blocked-content { background: rgba(239,83,80,.2); color: #ff9c99; }
.pl-payment { background: rgba(251,191,36,.2); color: #fcd34d; }
.pl-checkin-only { background: rgba(148,163,184,.2); color: #cbd5e1; }
.pl-done-monitor { background: rgba(31,185,138,.2); color: #34d399; }
.pl-closed { background: rgba(255,255,255,.07); color: var(--muted); }

/* project name cell, avatars, priority, due */
.pname { white-space: nowrap; }
.pavatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; color: #fff; font-size: 10.5px; font-weight: 700; margin-right: 9px; vertical-align: middle; flex: none; }
.pname .rowlink { vertical-align: middle; }
.avs { display: inline-flex; align-items: center; }
.av { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #100d17; margin-left: -7px; }
.av:first-child { margin-left: 0; }
.av-none { background: transparent; border: 1.5px dashed var(--muted-2); }
.av-more { background: rgba(255,255,255,.14); color: var(--ink); }
.avs-wrap { vertical-align: middle; }
.pwho { white-space: nowrap; }
.pnames { display: none; }
.priosel { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 74px; }
.priosel select.cell-edit { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; opacity: 0; cursor: pointer; padding: 0; margin: 0; border: 0; }
.priosel .ptxt { font-size: 12px; color: var(--muted); }
.flag.fl-none { color: var(--muted-2); opacity: .5; }
.pdue { white-space: nowrap; }
.pdue input.cell-edit { width: 128px; min-width: 128px; display: inline-block; }
.pdue .dueText { margin-left: 4px; font-size: 12px; }
.late-input { color: var(--danger); }

/* filter bar */
.fbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.fbar .fsearch { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; min-width: 180px; margin: 0; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--muted); }
.fbar .fsearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.fbar .fsearch input { border: 0; background: transparent; margin: 0; padding: 8px 0; box-shadow: none; }
.fbar select { flex: 0 1 auto; width: auto; min-width: 118px; max-width: 190px; margin: 0; padding: 8px 10px; }
.fbar .fgroup { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.fbar .fcount { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.fbar .btn-sm { padding: 6px 10px; font-size: 12.5px; }
.fbar [hidden] { display: none !important; }
.fbar.is-server select, .fbar.is-server input { margin: 0; }
.tparent { color: var(--muted-2); font-size: 11.5px; white-space: nowrap; margin-left: 6px; }
.trow .avs-wrap { margin-right: 4px; }

/* ---- Package A 2026-10-15: caller workflow (date+time picker, call recent notes, pop-up tasks, sales task list) ---- */
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.dp.dp-dt { width: auto; display: flex; gap: 12px; align-items: stretch; }
.dp-dt .dp-cal { width: 252px; }
.dp-times { width: 84px; display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 10px; }
.dp-tlabel { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 7px 0 9px; }
.dp-tlist { flex: 1 1 auto; max-height: 262px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 2px; }
.dp-time { border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--ink); font: inherit; font-size: 12.5px; padding: 6px 0; cursor: pointer; }
.dp-time:hover { background: var(--brand-soft); color: var(--brand-2); }
.dp-time.dp-sel { background: var(--brand); border-color: var(--brand); color: #fff; }
.dp-ok { margin-top: 8px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 0; cursor: pointer; }
@media (max-width: 420px) {
  .dp.dp-dt { flex-direction: column; width: calc(100vw - 16px); max-width: 300px; }
  .dp-dt .dp-cal { width: auto; }
  .dp-times { width: auto; border-left: 0; border-top: 1px solid var(--line); padding: 8px 0 0; }
  .dp-tlabel { display: none; }
  .dp-tlist { flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; }
  .dp-time { flex: 0 0 58px; }
}
.call-recent { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ev-pinned { background: rgba(124,58,237,.06); border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; border-bottom: 0; }
.ev-pinned .ev-meta { font-weight: 700; color: var(--brand-2); }
.pop-tasks .taskline { grid-template-columns: 30px 1fr auto; }
.pop-ltask { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pop-ltask input[name=title] { flex: 1 1 200px; min-width: 0; }
.pop-ltask input.dp-input, .pop-ltask input[type=date] { flex: 0 0 140px; }
.st-add input.dp-input, .st-add input[type=date] { flex: 0 0 150px; }
.st-when { margin: 0 0 10px; flex-wrap: wrap; max-width: 100%; }
.st-range { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.st-range input { width: 140px; }
.st-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.st-row { display: grid; grid-template-columns: 38px minmax(0, 2.4fr) minmax(0, 1.4fr) 120px 120px 92px; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.st-row:last-child { border-bottom: 0; }
.st-head { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted-2); background: rgba(255,255,255,.02); }
.st-title a { color: var(--ink); font-weight: 600; }
.st-title .sub { display: block; color: var(--muted-2); font-size: 12px; }
.st-row.is-done .st-title a { text-decoration: line-through; color: var(--muted-2); }
.st-due.soon { color: #fbbf24; font-weight: 600; }
@media (max-width: 760px) {
  .st-head { display: none; }
  .st-row { grid-template-columns: 34px 1fr auto; grid-template-areas: "c t d" "c l l"; row-gap: 2px; }
  .st-row > span:nth-child(1) { grid-area: c; }
  .st-title { grid-area: t; }
  .st-due { grid-area: d; text-align: right; font-size: 12px; }
  .st-lead { grid-area: l; font-size: 12px; }
  .st-who, .st-created { display: none; }
  .st-range input { width: 128px; }
}
.dp-input { cursor: pointer; caret-color: transparent; padding-right: 32px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.dp-input:not(.dp-input-dt) { min-width: 130px; max-width: 100%; }
.dp-input-dt { max-width: 100%; }
.dp-input-dt { min-width: 170px; }

/* Pardavimų eiga: pipeline tabs + GHL-style filters (package B) */
.pipe-tabs { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pipe-tabs a { padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.pipe-tabs a.active { color: var(--ink); border-bottom-color: var(--brand); }
.pipe-tabs .count { font-size: 11px; color: var(--muted-2); font-weight: 500; margin-left: 4px; }
.lead-filters select { flex: 1 1 150px; max-width: 260px; }
.lead-filters .fdir { flex: 0 1 150px; }
.more-filters { flex: 1 1 100%; order: 10; }
.more-filters summary { cursor: pointer; font-size: 13px; color: var(--brand-2); font-weight: 600; padding: 4px 0; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 16px; padding: 10px 0 4px; }
.frange { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.frange .flabel { font-size: 12px; color: var(--muted); flex: 0 0 100%; }
.frange input[type=text], .frange input[type=date], .frange input:not([type]) { flex: 1 1 110px; min-width: 0; }
.frange select { flex: 1 1 100%; }
.fchecks label { font-size: 12px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; margin-right: 8px; }
.kcol-sub { font-size: 11px; margin: -4px 0 6px 2px; }
.kcol-head .kc a { font-size: 11px; }
a.thsort { color: inherit; }
a.thsort.on { color: var(--brand-2); }
.pipe-pick { font-size: 12px; padding: 3px 6px; max-width: 200px; }
@media (max-width: 760px) {
    .lead-filters { flex-direction: row; }
    .lead-filters input[type=search] { flex: 1 1 100%; }
    .lead-filters select, .lead-filters .fdir { flex: 1 1 calc(50% - 10px); max-width: none; min-width: 0; }
    .lead-filters > .btn-ghost { flex: 1 1 auto; }
    .more-grid { grid-template-columns: 1fr; }
}

/* Final QA (package E): phone layout. Bottom app bar, nothing wider than the screen, bigger tap targets on touch. */
.bottomnav { display: none; }
@media (max-width: 900px) {
    .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
        background: rgba(16,13,23,0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line);
        padding: 4px 4px max(4px, env(safe-area-inset-bottom)); }
    .bottomnav a, .bottomnav label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 50px;
        color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 10px; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
    .bottomnav a.on { color: var(--brand-2); background: var(--brand-soft); }
    .bottomnav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .app-main { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .app-main .foot { display: none; }
    .toast, .fx-toast { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
    .wrap .card, .dash-grid > *, .toolbar > * { min-width: 0; max-width: 100%; }
    .toolbar .tabs, .wrap > .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
    .toolbar .tabs .tab, .wrap > .tabs .tab { white-space: nowrap; }
    .money-row > *, .card.notif > span:first-child { min-width: 0; overflow-wrap: anywhere; }
    .card.notif { flex-wrap: wrap; }
    .tparent { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-left: 0; }
    .tname { flex-wrap: wrap; }
    .rec-links, .rec-links .chip, .rec-sum, .rec-head > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
    .rec-sum pre, .rec-sum table { white-space: pre-wrap; max-width: 100%; overflow-x: auto; display: block; }
    .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
    .pagehead { flex-wrap: wrap; gap: 8px; }
    .pagehead .seg { max-width: 100%; overflow-x: auto; }
}
@media (pointer: coarse) {
    .btn, .btn-ghost, .icon-btn, .tab, .seg a, .seg button, .sidelink, .iconlink, .pipe-tabs a { min-height: 40px; }
    .seg a, .seg button, .pipe-tabs a { display: inline-flex; align-items: center; }
    .filters input:not([type=checkbox]):not([type=radio]), .filters select, .lead-filters input:not([type=checkbox]), .lead-filters select, .meet-filters input, .meet-filters select, .topsearch input { min-height: 40px; }
    .btn-sm, .btn-xs { min-height: 36px; }
    .icon-btn { min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
    .tcheck { min-width: 28px; min-height: 28px; }
}
/* Long lists: the browser skips layout/paint of rows that are off screen (Užduotys ~230 rows, Pardavimų eiga cards). */
.trow:not(.thead), .kcard { content-visibility: auto; contain-intrinsic-size: auto 44px; }
.kcard { contain-intrinsic-size: auto 96px; }
.trow:focus-within, .kcard:focus-within, .kcard.dragging { content-visibility: visible; }

/* rows that open their project when clicked anywhere (Gauta) */
tr.row-open { cursor: pointer; }
tr.row-open:hover td { background: rgba(124, 58, 237, .06); }

/* draggable table columns (assets/tables.js) */
.tbl-resizable thead th[draggable="true"] { cursor: grab; }
.tbl-resizable thead th.col-dragging { opacity: .45; }
.tbl-resizable thead th.col-drop-l { box-shadow: inset 3px 0 0 var(--brand-2); }
.tbl-resizable thead th.col-drop-r { box-shadow: inset -3px 0 0 var(--brand-2); }

/* GHL-style shortcut icons on contacts: call, SMS, e-mail, notes, tasks, book a call */
.ksh { display: inline-flex; gap: 4px; align-items: center; margin-top: 8px; }
td .ksh { margin-top: 0; }
.ks { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); border: 1px solid transparent; }
a.ks:hover { color: var(--brand-2); background: var(--brand-soft); border-color: var(--line-strong); }
.ks.off { opacity: .28; }
.ks-n { position: absolute; top: -5px; right: -5px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font: 700 9.5px/15px Inter, sans-serif; font-style: normal; text-align: center; }
.pop-lbook { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pop-lbook input[name=note] { flex: 1 1 160px; min-width: 120px; }

/* Call mode (Skambinimas): phone first */
.dm { max-width: 760px; margin: 0 auto; }
.dm-head h1 { margin: 0; }
.dm-src { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.dm-chip { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.dm-chip b { color: var(--ink); font-weight: 700; }
.dm-chip.em { border-style: dashed; }
.dm-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dm-chip.on b { color: #fff; }
.dm-card { padding: 20px; }
.dm-name { margin: 4px 0 6px; font-size: 24px; line-height: 1.2; }
.dm-name a { color: var(--ink); }
.dm-sub { font-size: 12.5px; }
.dm-phone { margin: 14px 0; padding: 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.dm-num { display: block; font-size: 30px; font-weight: 700; letter-spacing: .02em; color: var(--ink); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.dm-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-acts .btn, .dm-acts .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; font-size: 15px; }
.dm-call { flex: 1 1 100%; background: #16a34a; border-color: #16a34a; font-size: 18px !important; min-height: 56px !important; }
.dm-old, .dm-hist { margin: 10px 0; font-size: 13.5px; }
.dm-form textarea { width: 100%; min-height: 84px; margin-top: 8px; font-size: 16px; }
.dm-when { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 10px 0; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.dm-when label { flex: 1 1 180px; margin: 0; }
.dm-res { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dm-res .btn, .dm-res .btn-ghost { min-height: 50px; justify-content: center; font-size: 15px; }
.dm-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
@media (max-width: 900px) {
    .dm-name { font-size: 22px; }
    .dm-call { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
}

/* email-campaign table: contact-day columns are date fields */
.fu-cell .fu-in { width: 118px; }
.fu-cell .fu-day { display: block; font-size: 11.5px; margin-top: 2px; }

/* bulk contact upload */
.li-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.li-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.li-bar { height: 8px; border-radius: 6px; background: var(--panel-2); overflow: hidden; margin-top: 12px; }
.li-bar > div { height: 100%; width: 0; background: var(--brand); transition: width .25s; }
.tbl-tools [hidden] { display: none !important; }
.seg.seg-scroll { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }

/* Brief iš pardavimų (src/brief.php) */
.brief-f { display: block; margin: 0 0 12px; }
.brief-l { display: block; font-weight: 600; margin-bottom: 2px; }
.brief-h { display: block; font-size: 12.5px; margin-bottom: 4px; }
.brief-f textarea { width: 100%; }
.brief-card { margin-top: 14px; }
.brief-sec { margin: 0 0 12px; }
.brief-one + .brief-one { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.brief-meta { font-size: 12.5px; margin-bottom: 8px; }

.sidehead { margin: 12px 10px 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-w_own { background: rgba(148,163,184,.18); color: #cbd5e1; }
