:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --border: #334155;
    
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); background: var(--bg-dark); color: var(--text-main); line-height: 1.5; }

.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.9); display: none; align-items: flex-start; justify-content: center; z-index: 2000; backdrop-filter: blur(4px); overflow-y: auto; padding: 1rem; }
.overlay.active { display: flex; z-index: 2000; }

.pin-box { background: var(--bg-card); padding: 2rem; border-radius: 12px; border: 1px solid var(--border); text-align: center; width: 320px; }
.pin-box h2 { font-family: var(--font-heading); margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.pin-box p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.pin-box input { width: 100%; padding: 0.75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-dark); color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.pin-box input:focus { outline: none; border-color: var(--primary); }
.error-msg { color: var(--danger); font-size: 0.875rem; margin-top: 0.5rem; min-height: 1.2rem; }
.back-link { display: block; margin-top: 1rem; color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.back-link:hover { color: var(--primary); }

.app-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1rem; display: none; }
body.authenticated .app-container { display: block; }
body.authenticated #pin-overlay { display: none; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}
.logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.logo i {
    color: var(--primary);
}
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    color: #60a5fa;
    font-weight: 600;
}
.cloud-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
}
.btn-checkin-top {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: 1px solid #16a34a;
    color: #fff;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25);
    transition: all 0.2s;
}
.btn-checkin-top:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.35);
}
.btn-incoming-top {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    position: relative;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(245,158,11,0.35);
    color: #f59e0b;
    background: rgba(245,158,11,0.08);
}
.btn-incoming-top:hover {
    background: rgba(245,158,11,0.18);
}
.badge-count {
    background: #ef4444;
    color: #fff;
    border-radius: 99px;
    font-size: 0.7rem;
    padding: 1px 6px;
    font-weight: 700;
}

/* Dropdown Menu */
.crm-menu-dropdown-container {
    position: relative;
    display: inline-block;
}
.btn-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}
.crm-menu-dropdown-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    min-width: 250px;
    overflow: hidden;
    box-shadow: 0 12px 24px -4px rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}
.menu-dropdown-header {
    padding: 0.5rem 0.85rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.menu-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}
.menu-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: var(--font-sans);
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    transition: background 0.15s;
}
.menu-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.menu-dropdown-item.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
}
.menu-dropdown-item.item-danger {
    color: #ef4444;
}
.menu-dropdown-item.item-danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; background: var(--bg-hover); color: var(--text-main); border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-weight: 500; text-decoration: none; font-family: var(--font-sans); transition: 0.2s; }
.btn:hover { background: var(--border); }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }

.icon-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.25rem; transition: 0.2s; }
.icon-btn:hover { color: var(--text-main); }
.btn-danger { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

.kbd-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 0.12rem 0.35rem;
    font-size: 0.68rem;
    font-family: monospace;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-left: 0.3rem;
}
@media (max-width: 600px) {
    .kbd-shortcut { display: none !important; }
}

/* KPI Mini-Bar */
.kpi-mini-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.2rem 0;
    scrollbar-width: none;
}
.kpi-mini-bar::-webkit-scrollbar { display: none; }
.kpi-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border);
    padding: 0.45rem 0.85rem;
    border-radius: 99px;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    font-family: var(--font-sans);
}
.kpi-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: var(--bg-hover);
    color: var(--text-main);
}
.kpi-pill.active-pill {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
    color: #fff;
}
.kpi-pill .kpi-val {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}
.kpi-pill .kpi-val.highlight-blue { color: #38bdf8; }
.kpi-pill .kpi-val.highlight-amber { color: #f59e0b; }

/* Workspace Header & View Selector Dropdown */
.workspace-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.view-dropdown-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 45;
    margin-left: auto;
}

.view-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.35rem 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    user-select: none;
}

.view-dropdown-trigger:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.view-dropdown-container.open .view-dropdown-trigger {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.view-trigger-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.current-view-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.current-view-badge {
    font-size: 0.75rem;
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.05rem 0.5rem;
    border-radius: 99px;
    font-weight: 700;
}

.view-dropdown-caret {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.15s;
    margin-left: 0.15rem;
}

.view-dropdown-container.open .view-dropdown-caret {
    transform: rotate(180deg);
    color: #fff;
}

/* Dropdown meniu langas */
.view-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    min-width: 290px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 0.4rem;
    z-index: 100;
    flex-direction: column;
    gap: 0.25rem;
    animation: fadeInViewMenu 0.15s ease-out;
}

.view-dropdown-container.open .view-dropdown-menu {
    display: flex;
}

@keyframes fadeInViewMenu {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
    border: 1px solid transparent;
}

.view-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.view-dropdown-item.active {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
}

.view-item-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.view-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.view-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.view-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.view-item-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-item-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    flex-shrink: 0;
}

.view-dropdown-item.active .view-item-badge {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.workspace-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.active-jobs-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}
.active-filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}
.active-filters-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.active-header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.active-header-search {
    position: relative;
}

#active-jobs-search-input:focus {
    border-color: #38bdf8 !important;
    outline: none !important;
    background: rgba(56, 189, 248, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
}

#active-jobs-search-clear:hover {
    color: #ef4444 !important;
}
.active-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.badge-count-pill {
    font-size: 0.78rem;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.15rem 0.55rem;
    border-radius: 99px;
    font-weight: 700;
}

/* Vientisa moderni segmentuota kapsulė */
.segmented-control {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.segmented-control::-webkit-scrollbar { display: none; }

.seg-filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
}

.seg-filter-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.seg-filter-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

/* Subtilus skaitliuko burbuliukas */
.seg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.seg-filter-btn.active .seg-badge {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

/* Pritemdytas nulinis skaičius - akių nevargina */
.seg-badge.is-zero {
    opacity: 0.28;
    background: transparent;
    font-weight: 500;
    color: inherit;
}

.seg-filter-btn.active .seg-badge.is-zero {
    opacity: 0.45;
    background: transparent;
    color: inherit;
}

/* Kompaktiškas "Išskleisti visus" mygtukas šalia segmentuotos juostos */
.btn-compact-toggle {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 8px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-compact-toggle:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.clients-section h2 { font-family: var(--font-heading); margin-bottom: 1rem; }
.table-container { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1rem; border-bottom: 1px solid var(--border); }
th { background: rgba(0,0,0,0.2); font-weight: 600; color: var(--text-muted); font-size: 0.875rem; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }
.actions-cell { display: flex; gap: 0.5rem; }

.modal { background: var(--bg-card); width: 100%; max-width: 560px; border-radius: 12px; border: 1px solid var(--border); display: flex; flex-direction: column; max-height: calc(100vh - 2rem); margin: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem 1rem; flex-shrink: 0; border-bottom: 1px solid var(--border); margin-bottom: 0; }
.modal-body { overflow-y: auto; padding: 1.5rem 2rem; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
.modal-footer { padding: 1rem 2rem 1.5rem; flex-shrink: 0; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.875rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.75rem; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 6px; color: #fff; font-family: var(--font-sans); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-actions { display: flex; justify-content: flex-end; }


/* Quick Services Settings */
.quick-services { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.quick-btn { background: var(--bg-hover); border: 1px solid var(--border); color: #fff; font-family: var(--font-sans); padding: 0.35rem 0.75rem; border-radius: 99px; font-size: 0.75rem; cursor: pointer; transition: 0.2s; font-weight: 500; }
.quick-btn:hover { background: var(--primary); border-color: var(--primary); }

/* Profile View Specifics */
.profile-header { background: linear-gradient(145deg, var(--bg-card) 0%, rgba(30, 41, 59, 0.4) 100%); padding: 2rem; border-radius: 12px; border: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.profile-info h2 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 0.5rem; }
.prof-meta { color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; font-size: 1rem; }
.mt-4 { margin-top: 2rem; }
/* Mobile modal fix */
@media (max-width: 600px) {
    .overlay { padding: 0; align-items: flex-end; }
    .modal { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; margin: 0; }
}
/* Client Search Bar */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 420px;
    min-width: 220px;
}
.search-wrapper input {
    width: 100%;
    padding: 0.55rem 2.5rem 0.55rem 2.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.search-wrapper input::placeholder { color: var(--text-muted); }
.search-icon {
    position: absolute;
    left: 0.6rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}
#client-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: none;
    align-items: center;
    padding: 0.2rem;
    transition: color 0.15s;
}
#client-search-clear:hover { color: var(--text-main); }

.search-wrapper .search-kbd {
    position: absolute;
    right: 0.75rem;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 0.12rem 0.4rem;
}
.search-wrapper input:focus ~ .search-kbd,
.search-wrapper input:not(:placeholder-shown) ~ .search-kbd {
    display: none !important;
}

.view-item-title .kbd-shortcut {
    font-size: 0.65rem;
    padding: 0.08rem 0.32rem;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .search-wrapper { max-width: 100%; }
}
/* ============================================================
   PAYMENTS & STATUS STYLES 
   ============================================================ */
.pay-filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.pay-filter-btn:hover { border-color: var(--primary); color: var(--text-main); }
.pay-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.pay-toggle-btn {
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-sans);
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.pay-badge, .pay-toggle-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
}
.paid {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}
.unpaid {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}
.pay-toggle-btn.paid:hover { background: rgba(74, 222, 128, 0.25); }
.pay-toggle-btn.unpaid:hover { background: rgba(248, 113, 113, 0.25); }

.pay-remind-btn {
    color: #f59e0b !important;
}
.pay-filters {
    display: flex;
    gap: 0.5rem;
}

#unpaid-badge { pointer-events: none; }

/* ============================================================
   MULTI-CAR STYLES
   ============================================================ */
.car-card {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
}
.car-card:hover {
    border-color: var(--primary);
}
.car-card-model {
    font-weight: 600;
    color: #fff;
    font-size: 0.88rem;
}
.car-plate-badge {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    padding: 1px 6px;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.car-tech-pill {
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* ============================================================
   MODERN JOB ITEMS SEARCH & TABLE STYLES
   ============================================================ */
.item-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid #38bdf8;
    border-radius: 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.7);
}
.dropdown-item-row {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
    gap: 1rem;
}
.dropdown-item-row:last-child {
    border-bottom: none;
}
.dropdown-item-row:hover {
    background: #1e293b;
}
.dropdown-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}
.item-type-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.badge-service {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.badge-part {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.item-name-text {
    font-weight: 500;
    font-size: 0.95rem;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dropdown-item-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}
.item-price-tag {
    font-weight: 700;
    color: #34d399;
    font-size: 0.95rem;
    min-width: 60px;
    text-align: right;
}
.btn-row-add {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.18s ease;
}
.btn-row-add:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
    transform: scale(1.08);
}
.btn-row-add.added {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    transform: scale(1);
}

/* Quick pills */
.quick-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.25rem 0.65rem;
    font-size: 0.76rem;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s;
}
.quick-pill:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
}
.quick-pill-service:hover { border-color: #38bdf8; color: #38bdf8; }
.quick-pill-part:hover { border-color: #f59e0b; color: #f59e0b; }
.btn-toggle-srv-frequent {
    transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-toggle-srv-frequent:hover {
    transform: scale(1.28);
}
.chk-quick-tag-pill:hover {
    border-color: #38bdf8 !important;
    color: #38bdf8 !important;
    transform: translateY(-1px);
}

/* Items Table */
.job-items-table-wrapper {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 280px;
    overflow-y: auto;
}
.category-header-row {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.category-header-row td {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Summary Bar */
.job-summary-bar {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.summary-breakdown {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.summary-grand-total {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
}
.summary-grand-total strong {
    font-size: 1.5rem;
    color: #4ade80;
    font-weight: 800;
}

/* ==========================================================================
   AKTYVŪS REMONTAI ("Šiuo metu servise") & INCOMING BOOKINGS
   ========================================================================== */

.active-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.25rem;
}

.active-job-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.active-job-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.active-job-card.is-expanded {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.active-job-card.status-border-queue { border-left: 4px solid #f59e0b; }
.active-job-card.status-border-waiting_approval { border-left: 4px solid #0284c7; }
.active-job-card.status-border-approved { border-left: 4px solid #10b981; }
.active-job-card.status-border-in_progress { border-left: 4px solid #38bdf8; }
.active-job-card.status-border-waiting_parts { border-left: 4px solid #a855f7; }
.active-job-card.status-border-ready { border-left: 4px solid #4ade80; }

/* Kompaktiška viršutinė dalis (visada matoma, paspaudžiama) */
/* Kompaktiška viršutinė dalis (visada matoma, paspaudžiama) */
.active-card-summary {
    padding: 0.9rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.active-card-summary:hover {
    background: rgba(255, 255, 255, 0.035);
}

/* 1 EILUTĖ: Valst. Nr, Modelis (kairėje) ir Būsena + Chevron (dešinėje) */
.active-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    flex-wrap: wrap;
}

.active-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1 1 auto;
}

.active-plate-badge {
    background: #000;
    border: 1px solid #475569;
    color: #f8fafc;
    font-family: monospace;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.active-car-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.active-card-status-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* 2 EILUTĖ: Kliento kontaktai, atvykimo laikas, užduočių pill */
.active-card-contact-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.84rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    line-height: 1.4;
}

.active-sub-client {
    color: #f1f5f9;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.active-sub-client a {
    color: #f1f5f9;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,255,255,0.25);
    transition: color 0.15s, border-color 0.15s;
}

.active-sub-client a:hover {
    color: #38bdf8;
    border-color: #38bdf8;
}

.active-sub-phone a {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.active-sub-phone a:hover {
    background: rgba(34, 197, 94, 0.22);
    border-color: #22c55e;
}

.active-summary-time {
    font-size: 0.78rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.active-sub-tasks-pill {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.active-sub-note-preview {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.78rem;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 3 EILUTĖ: Atsakingi asmenys (Vadyba ir Meistras) */
.active-card-assign-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.2rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.active-assign-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.active-assign-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.active-card-chevron-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-size: 0.9rem;
    transition: transform 0.2s ease, background 0.15s, color 0.15s;
}

.active-card-summary:hover .active-card-chevron-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.active-job-card.is-expanded .active-card-chevron-btn {
    transform: rotate(180deg);
    background: rgba(59, 130, 246, 0.22);
    color: #38bdf8;
}

/* Išskleidžiama dalis (paslėpta pagal nutylėjimą) */
.active-card-details {
    display: none;
    padding: 0 1rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
    gap: 0.55rem;
    animation: fadeInCardDetails 0.2s ease-out;
}

.active-job-card.is-expanded .active-card-details {
    display: flex;
}

@keyframes fadeInCardDetails {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.active-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.active-status-badge.status-queue {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.active-status-badge.status-waiting_approval {
    background: rgba(2, 132, 199, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(2, 132, 199, 0.4);
}
.active-status-badge.status-approved {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.active-status-badge.status-in_progress {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.active-status-badge.status-waiting_parts {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.active-status-badge.status-ready {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.active-client-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.active-client-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.active-client-info a:hover {
    color: var(--primary);
}

.active-notes-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.4;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
}

.active-status-selector {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Jutikliniai būsenos mygtukai planšetei ir dirbtuvėms - išskleidžiamas statuso pasirinkiklis */
.active-status-badge.is-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.active-status-badge.is-trigger:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.active-status-badge.is-trigger .status-caret {
    font-size: 0.72rem;
    opacity: 0.85;
    transition: transform 0.15s ease;
}

/* Būsenos juostelė kortelės viduje */
.active-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin: 0.65rem 0;
}
.active-status-bar-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.status-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.status-dropdown-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.status-dropdown-btn .status-caret {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* Plaukiojantis būsenų meniu (Dropdown popup) */
.status-dropdown-popup {
    position: absolute;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.2);
    width: 290px;
    padding: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: statusMenuFadeIn 0.12s ease-out;
}
@keyframes statusMenuFadeIn {
    from { opacity: 0; transform: translateY(-4px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.status-dd-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0.35rem 0.5rem 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.2rem;
}
.status-dd-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s ease;
    user-select: none;
    gap: 0.5rem;
}
.status-dd-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.status-dd-item.is-active {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.status-dd-item-left {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}
.status-dd-badge {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
    display: inline-block;
    width: fit-content;
}
.status-dd-desc {
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.25;
}

/* Istoriniai/atsarginiai status mygtukų stiliai */
.active-status-pills-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 0.35rem;
    width: 100%;
}
.status-pill-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.25rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.status-pill-btn i {
    font-size: 0.95rem;
}
.status-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}
.status-pill-btn.active.pill-queue {
    background: rgba(245, 158, 11, 0.18);
    border-color: #f59e0b;
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}
.status-pill-btn.active.pill-waiting_approval {
    background: rgba(2, 132, 199, 0.25);
    border-color: #0284c7;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}
.status-pill-btn.active.pill-approved {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #34d399;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}
.status-pill-btn.active.pill-in_progress {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}
.status-pill-btn.active.pill-waiting_parts {
    background: rgba(168, 85, 247, 0.18);
    border-color: #a855f7;
    color: #c084fc;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}
.status-pill-btn.active.pill-ready {
    background: rgba(34, 197, 94, 0.22);
    border-color: #22c55e;
    color: #4ade80;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
}

/* Papildomos žymos sąmatų rekomendacijoms ir kliento komentarui */
.badge-opt-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 99px;
    padding: 0.15rem 0.5rem;
    margin-top: 0.25rem;
}
.badge-opt-summary.all-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-opt-summary.partial {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-opt-summary.declined {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.estimate-mini-item.item-approved-opt {
    background: rgba(16, 185, 129, 0.08);
    border-left: 2px solid #10b981;
    padding-left: 0.35rem;
    border-radius: 2px;
}
.estimate-mini-item.item-declined-opt {
    opacity: 0.55;
    text-decoration: line-through;
    background: rgba(239, 68, 68, 0.05);
    border-left: 2px solid #ef4444;
    padding-left: 0.35rem;
    border-radius: 2px;
}

.active-client-note-box {
    margin: 0.35rem 0;
    padding: 0.45rem 0.65rem;
    background: rgba(2, 132, 199, 0.08);
    border: 1px dashed rgba(56, 189, 248, 0.35);
    border-radius: 6px;
    font-size: 0.79rem;
    color: #e0f2fe;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    line-height: 1.4;
}

.btn-start-approved-work {
    background: #10b981;
    border-color: #059669;
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-start-approved-work:hover {
    background: #059669;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* Nauja, švari ir intuityvi užduočių kortelė aktyvaus automobilio kortelėje */
.active-tasks-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    white-space: normal;
}

.active-tasks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.active-tasks-header-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.active-tasks-title {
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.active-tasks-counter {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 99px;
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.active-tasks-counter.all-done {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.35);
}

/* Checklist dirbtuvių kortelėje */
.active-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.checklist-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    padding: 0.45rem 0.65rem;
    font-size: 0.84rem;
    color: #f1f5f9;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
}
.checklist-item:hover {
    background: rgba(56, 189, 248, 0.07);
    border-color: rgba(56, 189, 248, 0.28);
}
.checklist-item.done {
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.04);
}
.checklist-item.done .checklist-item-title {
    color: #64748b;
    text-decoration: line-through;
}
.checklist-item.done .task-check-icon {
    color: #22c55e !important;
}
.checklist-item.my-task {
    border-left: 3px solid #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}
.checklist-item.my-task.done {
    border-left: 3px solid #22c55e;
    background: rgba(34, 197, 94, 0.06);
}

.checklist-item-main {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
}
.checklist-item-main .task-check-icon {
    font-size: 1.15rem;
    margin-top: 1px;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.checklist-item-title {
    flex: 1;
    font-weight: 500;
    font-size: 0.86rem;
    line-height: 1.35;
    word-break: break-word;
    color: #f1f5f9;
}
.checklist-item-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 1.7rem;
    flex-wrap: wrap;
}

.active-estimate-works-summary {
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 0.35rem;
    margin-top: 0.2rem;
    transition: all 0.2s ease;
}

.estimate-summary-header {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.15s ease;
}
.estimate-summary-header:hover {
    opacity: 0.9;
}

.estimate-items-mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 190px;
    overflow-y: auto;
    padding-right: 2px;
}
.estimate-items-mini-list::-webkit-scrollbar {
    width: 4px;
}
.estimate-items-mini-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.estimate-mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    font-size: 0.78rem;
    color: #cbd5e1;
    transition: background 0.15s ease;
}
.estimate-mini-item.is-done-in-tasks {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.tasks-progress-wrap {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
}

.btn-toggle-tasks-expand {
    transition: all 0.15s ease;
    cursor: pointer;
}
.btn-toggle-tasks-expand:hover {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: #38bdf8 !important;
}

.btn-import-estimate-tasks {
    transition: all 0.15s ease;
    cursor: pointer;
}
.btn-import-estimate-tasks:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: #38bdf8 !important;
    transform: translateY(-1px);
}

.estimate-mini-name {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.estimate-mini-price {
    font-weight: 600;
    color: #38bdf8;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* Darbo laiko ir kainos žyma prie užduoties */
.task-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none !important;
}
.task-time-badge.hourly {
    background: rgba(2, 132, 199, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(2, 132, 199, 0.38);
}
.task-time-badge.hourly:hover {
    background: rgba(2, 132, 199, 0.32);
    border-color: #38bdf8;
}
.task-time-badge.fixed {
    background: rgba(16, 185, 129, 0.15);
    color: #4ade80;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.task-time-badge.fixed:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #22c55e;
}
.task-time-badge.empty {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px dashed rgba(255, 255, 255, 0.22);
}
.task-time-badge.empty:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}
.task-my-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-right: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.task-other-badge {
    font-size: 0.68rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-right: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.mech-multi-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}
.mech-dot-xs {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Užduočių pastabų ir nuokrypio žymų stiliai */
.checklist-item-note {
    font-size: 0.72rem;
    color: #94a3b8;
    font-style: italic;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
    line-height: 1.25;
}
.checklist-item-note i {
    color: #38bdf8;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.task-diff-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}
.task-diff-badge.diff-plus {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.task-diff-badge.diff-minus {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}
.task-note-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    padding: 0.25rem 0.55rem;
    border-radius: 99px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.task-note-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

/* Techninės istorijos stiliai */
.tech-hist-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.85rem;
}
.tech-hist-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
    margin-bottom: 0.65rem;
}
.tech-hist-date {
    font-weight: 600;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}
.tech-hist-mileage {
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(0,0,0,0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.tech-hist-item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.tech-hist-tag {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #e0f2fe;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}
.tech-hist-notes {
    font-size: 0.82rem;
    color: #94a3b8;
    background: rgba(0,0,0,0.2);
    border-left: 3px solid #64748b;
    padding: 0.4rem 0.65rem;
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

.active-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.active-card-actions .btn {
    font-size: 0.82rem;
}
.active-card-main-actions {
    display: flex;
    gap: 0.45rem;
    width: 100%;
    align-items: stretch;
}
.active-card-main-actions .btn {
    min-height: 38px;
    font-size: 0.85rem;
    border-radius: 8px;
    font-weight: 600;
}
.active-card-tools-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}
.active-card-tools-row .btn {
    flex: 1 1 auto;
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.active-card-tools-row .btn:hover {
    transform: translateY(-1px);
}
.active-card-tools-row .btn-edit-active,
.active-card-tools-row .btn-delete-active {
    flex: 0 0 34px !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
}
.active-card-tools-row .btn-delete-active:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
}

/* Quick Tags inside Check-in modal */
.chk-tag-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.chk-tag-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
}

#chk-extended-fields {
    animation: chkSlideDown 0.22s ease-out;
}
@keyframes chkSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Vadovo Finansinis KPI Skydelis su Minimalistiniu Toggle mygtuku */
.owner-kpi-section {
    margin-bottom: 1.25rem;
}

.kpi-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.kpi-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid var(--border);
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-family: var(--font-sans);
}

.kpi-toggle-pill:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.kpi-toggle-pill.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.kpi-toggle-pill .kpi-caret {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.kpi-toggle-pill.active .kpi-caret {
    transform: rotate(180deg);
}

.owner-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
    animation: fadeInKpi 0.25s ease-out;
}

@keyframes fadeInKpi {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.kpi-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.35);
}

.kpi-card-debts:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 8px 16px -2px rgba(239, 68, 68, 0.2);
}

.kpi-card-stuck:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 8px 16px -2px rgba(245, 158, 11, 0.2);
}

.kpi-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.kpi-sub-badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    white-space: nowrap;
}

.kpi-sub-badge.badge-debt {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Vadybos rolės (role-manager) apribojimai */
body.role-manager .owner-kpi-section,
body.role-mechanic .owner-kpi-section,
body.role-manager .owner-kpi-bar,
body.role-mechanic .owner-kpi-bar {
    display: none !important;
}

/* Automobilio valst. numerio pasiūlymų išskleidžiamasis sąrašas */
.plate-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #090d16;
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 8px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.8), 0 0 15px rgba(56, 189, 248, 0.15);
    z-index: 1050;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.plate-suggest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plate-suggest-item:last-child {
    border-bottom: none;
}

.plate-suggest-item:hover,
.plate-suggest-item.highlighted {
    background: rgba(56, 189, 248, 0.16);
}

.plate-suggest-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
}

.plate-suggest-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.plate-suggest-badge {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.08rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.plate-suggest-model {
    font-weight: 600;
    color: #f8fafc;
}

.plate-suggest-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.plate-suggest-sub span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.plate-suggest-right {
    font-size: 0.75rem;
    color: #38bdf8;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.plate-suggest-item:hover .plate-suggest-right,
.plate-suggest-item.highlighted .plate-suggest-right {
    opacity: 1;
    color: #7dd3fc;
}

/* Incoming Bookings Cards */
.incoming-booking-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.15s;
}
.incoming-booking-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
}
.incoming-booking-card.is-new {
    border-left: 4px solid #f59e0b;
}

.pulse-badge {
    animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* Car picker pills in Check-in modal */
.chk-car-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    color: #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s;
}
.chk-car-pill:hover {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    color: #fff;
}
.chk-car-pill.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    font-weight: 600;
}
.chk-car-pill.add-new {
    border-style: dashed;
    color: var(--text-muted);
}
.chk-car-pill.add-new:hover, .chk-car-pill.add-new.active {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

/* Main Dashboard Tabs */
.main-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.2rem;
    gap: 0.25rem;
}
.tab-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s;
}
.tab-btn:hover {
    color: #fff;
}
.tab-btn.active {
    background: var(--primary);
    color: #000;
}

/* Toast Notification */
#crm-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #0f172a;
    color: #fff;
    border: 1px solid #16a34a;
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s;
    transform: translateY(100px);
    opacity: 0;
    max-width: 520px;
}

/* ================================================================
   ROLIŲ SISTEMA & MEISTRO PIN STILIAI
   ================================================================ */

.auth-tab-btn {
    transition: all 0.2s ease;
}
.auth-tab-btn:hover {
    color: #fff !important;
}

.key-btn {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.75rem 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}
.key-btn:hover {
    background: var(--bg-hover);
}
.key-btn:active {
    transform: scale(0.94);
    background: var(--primary);
}

/* Meistro (Dirbtuvių) vaizdas: 100% paslėptos kainos ir apyvartos */
body.role-mechanic .stats-row,
body.role-mechanic .kpi-mini-bar,
body.role-mechanic .workspace-header,
body.role-mechanic #workspace-table-section,
body.role-mechanic #subview-tech-reminders {
    display: none !important;
}
body.role-mechanic #main-view-tabs {
    display: none !important;
}
body.role-mechanic #subview-clients {
    display: none !important;
}
body.role-mechanic #subview-recent-jobs {
    display: none !important;
}
body.role-mechanic #btn-incoming-bookings {
    display: none !important;
}
body.role-mechanic #add-client-btn {
    display: none !important;
}
body.role-mechanic #btn-quick-checkin-banner,
body.role-mechanic #btn-quick-checkin,
body.role-mechanic #btn-quick-checkin-top {
    display: none !important;
}
body.role-mechanic .go-client-prof {
    pointer-events: none !important;
    text-decoration: none !important;
    color: var(--text-main) !important;
}
body.role-mechanic .btn-complete-active,
body.role-mechanic .btn-delete-active {
    display: none !important;
}
body.role-mechanic #active-jobs-section {
    display: block !important;
}

/* ================================================================
   SKAITMENINĖS SĄMATOS IR TA PRIMINIMŲ STILIAI
   ================================================================ */

.active-estimate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-weight: 600;
    margin-top: 0.4rem;
}

.active-estimate-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.active-estimate-badge.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.tech-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tech-status-badge.upcoming {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.tech-status-badge.expired {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.tech-status-badge.valid {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.item-opt-btn {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.item-opt-btn.active {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #fbbf24;
    font-weight: 600;
}

/* ================================================================
   RESPONSIVE MOBILE & TABLET STYLES
   ================================================================ */

@media (max-width: 768px) {
    .app-container {
        padding: 0.85rem 0.65rem;
    }
    .topbar {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    .kpi-mini-bar {
        margin-bottom: 0.85rem;
        gap: 0.45rem;
    }
    .kpi-pill {
        padding: 0.35rem 0.65rem;
        font-size: 0.78rem;
    }
    .workspace-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .main-tabs {
        width: 100%;
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .main-tabs::-webkit-scrollbar { display: none; }
    .tab-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.5rem 0.6rem;
        min-height: 44px; /* Apple/Google touch standard */
    }
    .workspace-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    .search-wrapper {
        max-width: 100%;
        width: 100%;
    }
    .search-wrapper input {
        height: 44px;
        font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
    }
    .active-jobs-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    /* Mobilus kortelių atvaizdavimas & ergonomika */
    .active-job-card {
        padding: 0 !important;
        border-radius: 10px;
    }
    .active-card-summary {
        padding: 0.75rem 0.85rem;
        gap: 0.5rem;
    }
    .active-card-details {
        padding: 0 0.85rem 0.85rem 0.85rem;
        gap: 0.75rem;
    }
    .active-plate-badge {
        font-size: 0.8rem;
        padding: 0.12rem 0.45rem;
    }
    .active-car-title {
        font-size: 0.95rem;
    }
    .checklist-item {
        min-height: 44px;
        padding: 0.6rem 0.75rem;
        font-size: 0.88rem;
        border-radius: 8px;
    }
    .checklist-item i {
        font-size: 1.25rem !important;
    }
    .active-sub-phone a {
        background: rgba(34, 197, 94, 0.15);
        color: #4ade80;
        border: 1px solid rgba(34, 197, 94, 0.3);
        padding: 0.15rem 0.5rem;
        border-radius: 6px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.78rem;
    }
    .status-pill-btn {
        min-height: 46px;
        padding: 0.45rem 0.2rem;
    }
    .status-pill-btn span {
        font-size: 0.7rem;
    }
    .active-filters-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
        margin-bottom: 0.85rem;
    }
    .active-filters-row .segmented-control {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: calc(100% - 46px);
        flex-shrink: 1;
    }
    .active-filters-row .segmented-control::-webkit-scrollbar { display: none; }
    .seg-filter-btn {
        padding: 0.32rem 0.6rem;
        font-size: 0.76rem;
    }
    .active-filters-actions {
        flex-shrink: 0;
    }
    .btn-compact-toggle {
        padding: 0.35rem 0.55rem;
        font-size: 0.8rem;
    }
    .btn-compact-toggle #toggle-all-cards-label {
        display: none;
    }
    .view-dropdown-menu {
        max-width: calc(100vw - 32px);
        right: 0;
        left: auto;
    }
    .active-card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .active-card-actions .btn {
        min-height: 42px;
        justify-content: center;
    }
    .active-card-tools-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        width: 100%;
    }
    .active-card-tools-row .btn {
        min-height: 40px;
        font-size: 0.82rem;
    }
    .pay-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        padding-bottom: 4px;
        display: flex;
        gap: 0.4rem;
    }
    .pay-filters::-webkit-scrollbar { display: none; }
    .pay-filter-btn {
        white-space: nowrap;
        min-height: 44px;
        flex-shrink: 0;
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
    }
    .table-container {
        border-radius: 12px;
        background: transparent;
        border: none;
        overflow: visible;
    }

    /* MOBILUS KORTELIŲ VAIZDAS LENTELĖMS (≤768px) */
    #clients-table,
    #recent-jobs-table,
    #tech-reminders-table {
        display: block;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 0.85rem;
    }
    #clients-table thead,
    #recent-jobs-table thead,
    #tech-reminders-table thead {
        display: none; /* Paslepiame antraštes telefone */
    }
    #clients-table tbody,
    #recent-jobs-table tbody,
    #tech-reminders-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    #clients-table tr,
    #recent-jobs-table tr,
    #tech-reminders-table tr {
        display: flex;
        flex-direction: column;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 0.85rem 1rem;
        gap: 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
        transition: transform 0.15s ease, border-color 0.15s ease;
    }
    #clients-table tr:active,
    #recent-jobs-table tr:active,
    #tech-reminders-table tr:active {
        border-color: rgba(56, 189, 248, 0.4);
    }
    #clients-table td,
    #recent-jobs-table td,
    #tech-reminders-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.25rem 0;
        border: none;
        white-space: normal;
        font-size: 0.88rem;
    }

    /* Klientų lentelės kortelės stilizavimas */
    #clients-table td:first-child {
        font-size: 1.05rem;
        font-weight: 700;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0.5rem;
        margin-bottom: 0.25rem;
    }
    #clients-table td.actions-cell,
    #recent-jobs-table td.actions-cell,
    #tech-reminders-table td.actions-cell {
        margin-top: 0.4rem;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        gap: 0.5rem;
        justify-content: stretch;
    }
    #clients-table td.actions-cell .btn,
    #recent-jobs-table td.actions-cell .btn,
    #tech-reminders-table td.actions-cell .btn {
        flex: 1;
        min-height: 42px;
        justify-content: center;
    }

    /* Užsakymų lentelės kortelės stilizavimas */
    #recent-jobs-table tr td:first-child {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0.45rem;
        margin-bottom: 0.2rem;
        font-weight: 600;
        color: var(--text-muted);
    }
    #recent-jobs-table tr td:nth-child(5) {
        /* Sumos eilutė */
        background: rgba(34, 197, 94, 0.08);
        padding: 0.4rem 0.6rem;
        border-radius: 6px;
        margin: 0.2rem 0;
    }

    /* Bendras td elgesys kitoms įprastoms lentelėms */
    .table-container:not(#subview-clients):not(#subview-recent-jobs):not(#subview-tech-reminders) th,
    .table-container:not(#subview-clients):not(#subview-recent-jobs):not(#subview-tech-reminders) td {
        padding: 0.65rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .overlay {
        padding: 0;
        align-items: flex-end;
    }
    .modal {
        max-width: 100%;
        width: 100%;
        border-radius: 18px 18px 0 0;
        max-height: 90vh;
        margin: 0;
    }
    .modal-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }
    .modal-body {
        padding: 1rem 1.25rem;
    }
    .modal-footer {
        padding: 0.75rem 1.25rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.15rem;
        gap: 0.35rem;
    }
    .role-badge {
        padding: 0.15rem 0.45rem;
        font-size: 0.7rem;
    }
    .btn-checkin-text,
    .btn-incoming-text,
    .btn-menu-label {
        display: none;
    }
    .btn-checkin-top {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1.25rem;
    }
    .btn-incoming-top {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1.15rem;
    }
    .btn-incoming-top .badge-count {
        position: absolute;
        top: -3px;
        right: -3px;
    }
    .btn-menu-trigger {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 1.15rem;
    }
    .tab-btn {
        padding: 0.4rem 0.45rem;
        font-size: 0.74rem;
    }
    .tab-btn i {
        font-size: 0.95rem;
    }
    .pin-box {
        padding: 1.5rem 1rem;
        width: 100%;
    }
}
/* ===== MEISTRO PRISKYRIMAS ===== */
.mech-assign-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.25);
    color: #94a3b8; border-radius: 99px; padding: 0.22rem 0.65rem;
    font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.18s; white-space: nowrap; margin: 0;
}
.mech-assign-btn:hover { background: rgba(56,189,248,0.18); color: #e2e8f0; border-color: rgba(56,189,248,0.5); }
.mgr-assign-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: rgba(168,85,247,0.08); border: 1px solid rgba(168,85,247,0.25);
    color: #c084fc; border-radius: 99px; padding: 0.22rem 0.65rem;
    font-size: 0.75rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.18s; white-space: nowrap; margin: 0;
}
.mgr-assign-btn:hover { background: rgba(168,85,247,0.2); color: #e9d5ff; border-color: rgba(168,85,247,0.5); }
.mech-dot-sm {
    display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; flex-shrink: 0; border: 1.5px solid rgba(255,255,255,0.3);
}
.task-mech-dot-btn {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding: 0;
    outline: none;
    opacity: 0.95;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.task-mech-dot-btn:hover,
.task-mech-dot-btn:active {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
    opacity: 1;
}
.task-mech-dot-btn.empty {
    background: rgba(51, 65, 85, 0.7) !important;
    border: 2px dashed rgba(255,255,255,0.35);
}
.task-mech-dot-btn.inherited {
    opacity: 0.85;
}
.task-mech-dot-btn.overridden {
    opacity: 1;
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}
.mech-dropdown-popup {
    position: absolute; z-index: 9999;
    background: #1e293b; border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 0.35rem; min-width: 160px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6); animation: fadeInDown 0.12s ease;
}
.mech-dd-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.65rem; border-radius: 7px; cursor: pointer;
    font-size: 0.83rem; color: #cbd5e1; transition: background 0.1s;
}
.mech-dd-item:hover { background: rgba(255,255,255,0.08); color: #f8fafc; }
.mech-dd-clear { color: #64748b; font-style: italic; }

#quick-task-modal {
    z-index: 2500;
}

/* ================================================================
   TASK TIME & HYBRID PRICING STYLES (Sugaištas laikas & Tarifai)
   ================================================================ */
.task-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    line-height: 1.2;
}
.task-time-badge.hourly {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.task-time-badge.hourly:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}
.task-time-badge.fixed {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.task-time-badge.fixed:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: #c084fc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
}
.task-time-badge.empty {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}
.task-time-badge.empty:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.task-quick-edit-btn {
    background: none;
    border: none;
    color: #64748b;
    padding: 3px 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s ease;
}
.task-quick-edit-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

/* Quick Task Modal styling */
.pricing-type-selector {
    display: flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
    margin-bottom: 1.15rem;
}
.pricing-type-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 0.8rem;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.pricing-type-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.pricing-type-btn.active.hourly {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.2);
}
.pricing-type-btn.active.fixed {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.45);
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.2);
}

.hours-presets-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
    margin-bottom: 0.85rem;
}
.hours-preset-chip {
    padding: 0.32rem 0.65rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.hours-preset-chip:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-1px);
}
.hours-preset-chip.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.4);
}

.task-calc-preview-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}
.task-calc-preview-title {
    font-size: 0.82rem;
    color: #94a3b8;
}
.task-calc-preview-formula {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-family: monospace;
}
.task-calc-preview-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #38bdf8;
}

/* ==========================================================================
   OCR / DOKUMENTŲ IR VIN SKENAVIMAS TELEFONU
   ========================================================================== */
.btn-scan-tech-doc {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(2, 132, 199, 0.28));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.btn-scan-tech-doc:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.28), rgba(2, 132, 199, 0.45));
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
    color: #fff;
}
.btn-scan-tech-doc i {
    font-size: 0.95rem;
}

.btn-scan-only-vin {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #94a3b8;
    padding: 0.18rem 0.45rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.btn-scan-only-vin:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    transform: translateY(-1px);
}
.btn-scan-only-vin i {
    font-size: 0.8rem;
}

/* Skenavimo progreso persidengimas su lazerio animacija */
.ocr-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    animation: fadeIn 0.15s ease-out;
}
.ocr-scanner-box {
    position: relative;
    width: 240px;
    height: 150px;
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    margin-bottom: 1.25rem;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.2);
}
.ocr-laser-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, #22c55e, #38bdf8, transparent);
    box-shadow: 0 0 14px 2px #38bdf8;
    animation: laserScan 1.6s ease-in-out infinite alternate;
}
@keyframes laserScan {
    0% { top: 5%; }
    100% { top: 92%; }
}
.ocr-progress-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.35rem;
}
.ocr-progress-status {
    font-size: 0.85rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.ocr-progress-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    max-width: 280px;
}

/* Skenavimo rezultatų patvirtinimo modalas */
.ocr-result-modal {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 1.25rem;
    max-width: 440px;
    width: 92%;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    animation: scaleIn 0.18s ease-out;
}
.ocr-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ocr-result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ocr-result-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.ocr-field-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}
.ocr-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    justify-content: space-between;
}
.ocr-field-input {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    width: 100%;
}
.ocr-field-input.vin {
    font-family: monospace;
    letter-spacing: 0.05em;
    color: #38bdf8;
}
.ocr-field-input.plate {
    font-family: monospace;
    letter-spacing: 0.08em;
    color: #4ade80;
}
.ocr-result-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}

/* ================================================================ */
/* DIRBTUVĖS VAIZDO REŽIMAS: SĄRAŠAS / KORTELĖS IR STULPELIŲ MENIU  */
/* ================================================================ */

/* Vaizdo režimo jungiklis (Sąrašas / Kortelės) */
.view-mode-control {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.view-mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.32rem 0.65rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    line-height: 1;
}
.view-mode-btn i {
    font-size: 0.95rem;
}
.view-mode-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.06);
}
.view-mode-btn.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

/* Stulpelių parinkiklis (dropdown) */
.columns-customizer-wrap {
    position: relative;
    display: inline-block;
}
.columns-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 150;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    min-width: 240px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    animation: fadeInDropdown 0.15s ease-out;
}
@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.col-menu-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #38bdf8;
    margin-bottom: 0.45rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.col-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #e2e8f0;
    padding: 0.28rem 0.35rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.12s ease;
    user-select: none;
}
.col-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.06);
}
.col-checkbox-label input[type="checkbox"] {
    accent-color: #38bdf8;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Aktyvių darbų lentelė (Sąrašo vaizdas) */
.active-jobs-table-wrap {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    -webkit-overflow-scrolling: touch;
}
#active-jobs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.83rem;
}
#active-jobs-table th {
    background: rgba(30, 41, 59, 0.85);
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    user-select: none;
}
#active-jobs-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    color: #f1f5f9;
}
#active-jobs-table tr.active-job-row {
    transition: background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}
#active-jobs-table tr.active-job-row:hover {
    background: rgba(56, 189, 248, 0.06);
}

/* Spalviniai akcentai eilučių kraštinėms */
#active-jobs-table tr.row-status-ready {
    border-left: 3px solid #22c55e;
    background: rgba(34, 197, 94, 0.04);
}
#active-jobs-table tr.row-status-ready:hover {
    background: rgba(34, 197, 94, 0.08);
}
#active-jobs-table tr.row-alert-delayed {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}
#active-jobs-table tr.row-alert-delayed:hover {
    background: rgba(239, 68, 68, 0.09);
}
#active-jobs-table tr.row-status-in_progress {
    border-left: 3px solid #0284c7;
}
#active-jobs-table tr.row-status-waiting_parts {
    border-left: 3px solid #f59e0b;
}
#active-jobs-table tr.row-status-waiting_approval {
    border-left: 3px solid #a855f7;
}

/* Lentelės ląstelių specifiniai elementai */
.tbl-car-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 170px;
}
.tbl-car-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.tbl-car-model {
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.86rem;
}
.tbl-client-name {
    font-weight: 600;
    color: #f1f5f9;
    display: block;
}
.tbl-client-phone-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.77rem;
    margin-top: 0.15rem;
}
.tbl-phone-link {
    color: #38bdf8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.tbl-phone-link:hover {
    text-decoration: underline;
}
.tbl-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 4px;
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.3);
    text-decoration: none;
    font-size: 0.72rem;
    transition: transform 0.15s ease, background 0.15s ease;
}
.tbl-wa-btn:hover {
    background: #25d366;
    color: #fff;
    transform: scale(1.1);
}

/* Laiko / Termino žymelės */
.tbl-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.74rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    white-space: nowrap;
}
.tbl-time-badge.alert-delayed {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    font-weight: 700;
}
.tbl-time-badge.alert-ready {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
    font-weight: 700;
}

/* Išmaniosios dokumentų mikropiliulės (Smart Pills) */
.docs-pill-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}
.doc-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.45rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    line-height: 1.2;
    cursor: pointer;
}
.doc-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Priėmimo aktas */
.doc-pill.pill-act {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.doc-pill.pill-act:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #34d399;
}

/* Sąmata */
.doc-pill.pill-est {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.doc-pill.pill-est:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
}
.doc-pill.pill-est.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.35);
}

/* Sąskaita */
.doc-pill.pill-inv {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.doc-pill.pill-inv:hover {
    background: rgba(168, 85, 247, 0.22);
    border-color: #c084fc;
}

/* Sutartis */
.doc-pill.pill-contract {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.doc-pill.pill-contract:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: #fbbf24;
}

/* Tuščia / Sukurti piliulė */
.doc-pill.pill-empty {
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}
.doc-pill.pill-empty:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Lentelės veiksmų mygtukai */
.tbl-actions-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: flex-end;
}
.tbl-actions-wrap .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Pilnos kortelės modalas paspaudus ant lentelės eilutės */
#active-job-detail-modal.is-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    z-index: 1000 !important;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: fadeInModal 0.18s ease-out;
}
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}
#active-job-detail-modal .modal-card {
    animation: slideUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Antriniai / iškylantys meniu, popups ir greitos užduotys */
#quick-task-modal.active {
    z-index: 2500 !important;
}
.status-dropdown-popup {
    z-index: 3500 !important;
}
.mech-dropdown-popup, .mgr-dropdown-popup {
    z-index: 3500 !important;
}

/* ==========================================================================
   PATOBULINTA „NAUJAS PRIĖMIMAS“ (CHECK-IN) FORMA - AUKSO VIDURIUKAS
   ========================================================================== */
.checkin-modal-container {
    max-width: 860px !important;
    width: 95vw !important;
    max-height: 92vh !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(56, 189, 248, 0.08) !important;
    background: #0b1120 !important;
}

.checkin-modal-header {
    padding: 0.9rem 1.25rem !important;
    border-bottom: 1px solid var(--border) !important;
    background: rgba(15, 23, 42, 0.65);
}

.checkin-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(22, 163, 74, 0.15);
    color: #22c55e;
    font-size: 1.25rem;
}

.checkin-modal-body {
    overflow-y: auto;
    padding: 1rem 1.15rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.checkin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .checkin-modal-container {
        max-width: 96vw !important;
        margin: 0.5rem auto;
    }
    .checkin-grid {
        grid-template-columns: 1fr;
    }
}

.checkin-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.checkin-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    padding: 0.85rem 0.95rem;
    transition: border-color 0.18s ease;
}

.checkin-card:focus-within {
    border-color: rgba(56, 189, 248, 0.35);
}

.checkin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.checkin-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.checkin-act-accordion {
    background: rgba(15, 23, 42, 0.45);
    border: 1px dashed rgba(16, 185, 129, 0.35);
    border-radius: 9px;
    padding: 0.7rem 0.9rem;
    transition: all 0.2s ease;
}

.checkin-act-accordion[open] {
    background: rgba(15, 23, 42, 0.7);
    border-style: solid;
    border-color: rgba(16, 185, 129, 0.45);
}

.checkin-act-summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    user-select: none;
}

.checkin-act-summary::-webkit-details-marker {
    display: none;
}

.checkin-act-badge {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: normal;
}

.checkin-act-content {
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.checkin-modal-footer {
    padding: 0.8rem 1.25rem !important;
    border-top: 1px solid var(--border) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
}

.checkin-submit-btn {
    background: #16a34a !important;
    border-color: #15803d !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    padding: 0.55rem 1.35rem !important;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.checkin-submit-btn:hover {
    background: #15803d !important;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
}

/* ============================================================
   PAGRINDINĖ MODULIŲ IR SKIRTUKŲ NAVIGACIJOS JUOSTA (ATVIRAS TAB BAR)
   ============================================================ */
.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-nav-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.25rem 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 100%;
}
.workspace-nav-bar::-webkit-scrollbar {
    display: none;
}

.workspace-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: 7px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 0.81rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
    font-family: inherit;
    flex-shrink: 0;
}

.workspace-nav-tab i {
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.workspace-nav-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.workspace-nav-tab:hover i {
    transform: scale(1.08);
}

.workspace-nav-tab.active {
    color: #fff;
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

.workspace-nav-tab .tab-label {
    letter-spacing: 0.01em;
}

.workspace-nav-tab .tab-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.08rem 0.38rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    min-width: 1.15rem;
    text-align: center;
}

.workspace-nav-tab.active .tab-badge {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   SERVICES CATALOG POLISH
   ========================================================================== */
#services-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#services-table th {
    padding: 0.65rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    background: #0f172a;
}

#services-table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.84rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#services-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Sticky Veiksmai (Actions) column so delete/edit buttons are ALWAYS visible */
#services-table th:last-child {
    position: sticky;
    right: 0;
    background: #0f172a;
    z-index: 3;
    box-shadow: -6px 0 10px rgba(0, 0, 0, 0.4);
    text-align: right;
}

#services-table td:last-child {
    position: sticky;
    right: 0;
    background: #141e33;
    z-index: 2;
    box-shadow: -6px 0 10px rgba(0, 0, 0, 0.4);
    text-align: right;
    white-space: nowrap;
}

#services-table tr:hover td:last-child {
    background: #1e293b;
}

#services-table td.actions-cell {
    display: table-cell;
    vertical-align: middle;
}

#services-table td.actions-cell .srv-actions-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.btn-toggle-srv-frequent:hover {
    transform: scale(1.2);
}





