/* Гараж 211 — Unified components for tables/cards/tabs */

:root {
    --uc-panel-bg: var(--color-surface);
    --uc-panel-border: var(--color-border);
    --uc-panel-shadow: 0 10px 28px rgba(8, 12, 36, 0.34);
    --uc-head-bg: linear-gradient(180deg, rgba(167,139,250,.15), rgba(148,163,255,.08));
    --uc-head-color: #c9d4f9;
    --uc-row-hover: var(--color-hover);
    --uc-row-border: rgba(177, 189, 255, 0.16);
    --uc-head-grad: var(--uc-head-bg);
    --uc-row-even: rgba(255, 255, 255, 0.015);
}

/* Tabs and view switches */
.tabs-container,
.view-toggle {
    border-radius: 12px;
}

.tabs-container {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--uc-panel-border) !important;
    padding: 8px !important;
    box-shadow: var(--uc-panel-shadow) !important;
}

.tab-buttons,
.uc-tabs,
.fe-type-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.view-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--uc-panel-border);
    padding: 4px;
}

.tab-btn,
.vt-btn,
.tab-button,
.fmt-tab,
.uc-tab,
.fe-type-tab {
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.tab-btn:not(.active),
.vt-btn:not(.active),
.tab-button:not(.active),
.fmt-tab:not(.fmt-active),
.uc-tab:not(.active),
.fe-type-tab:not(.active-income):not(.active-expense):not(.active-salary) {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--color-text-sub) !important;
}

.tab-btn.active,
.vt-btn.active,
.tab-button.active,
.fmt-tab.fmt-active,
.uc-tab.active,
.fe-type-tab.active-income,
.fe-type-tab.active-expense,
.fe-type-tab.active-salary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border-color: rgba(198, 208, 255, 0.35);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.3);
}

.fmt-tab {
    padding: 6px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer;
}

.tab-count {
    background: rgba(255, 255, 255, 0.18) !important;
    color: inherit !important;
    border-radius: 999px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.tab-btn.active .tab-count,
.uc-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.26) !important;
    color: #fff !important;
}

/* Typography consistency */
.main-content {
    font-size: 15px;
    line-height: 1.58;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4 {
    color: var(--color-text);
    letter-spacing: .012em;
}

.main-content p,
.main-content li,
.main-content td,
.main-content th,
.main-content label {
    font-size: inherit;
    line-height: inherit;
}

.main-content .muted-text,
.main-content small {
    color: var(--color-text-sub);
}

/* Unified dropdown selects */
.main-content select,
.main-content .form-select,
.main-content .filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    min-height: 42px;
    padding: 10px 40px 10px 12px;
    border-radius: 11px;
    border: 1px solid rgba(177, 189, 255, 0.3);
    background-color: rgba(18, 24, 56, 0.56);
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(225, 232, 255, 0.9) 50%),
        linear-gradient(135deg, rgba(225, 232, 255, 0.9) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% + 1px),
        calc(100% - 12px) calc(50% + 1px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: var(--color-text);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 6px 18px rgba(8, 12, 36, 0.18);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease, transform .15s ease;
}

.main-content select:hover,
.main-content .form-select:hover,
.main-content .filter-select:hover {
    border-color: rgba(167, 139, 250, 0.48);
    background-color: rgba(25, 33, 72, 0.64);
}

.main-content select:focus,
.main-content .form-select:focus,
.main-content .filter-select:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 3px rgba(124, 58, 237, 0.18),
        0 10px 24px rgba(8, 12, 36, 0.24);
}

.main-content select:disabled,
.main-content .form-select:disabled,
.main-content .filter-select:disabled {
    opacity: .6;
    cursor: not-allowed;
    background-color: rgba(30, 36, 70, 0.42);
}

.main-content select[multiple],
.main-content select[size]:not([size="1"]) {
    background-image: none;
    min-height: 120px;
    padding-right: 12px;
}

.main-content select option,
.main-content .form-select option,
.main-content .filter-select option {
    background: #1b2351;
    color: #eef2ff;
}

/* Unified search fields */
.main-content input[type="search"],
.main-content input[name="q"],
.main-content .search-box input,
.main-content .inv-search input,
.main-content .uc-search input,
.main-content .ch-search input,
.main-content .ch-search-inner input {
    min-height: 42px;
    border-radius: 12px !important;
    border: 1px solid rgba(177, 189, 255, 0.3) !important;
    background: linear-gradient(180deg, rgba(23, 30, 67, 0.72), rgba(20, 28, 62, 0.62)) !important;
    color: var(--color-text) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 6px 18px rgba(8, 12, 36, 0.18);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.main-content .search-box input,
.main-content .inv-search input,
.main-content .uc-search input,
.main-content .ch-search input,
.main-content .ch-search-inner input {
    padding-left: 38px !important;
}

.main-content .search-box .clear-search,
.main-content .inv-search .ci {
    right: 10px !important;
}

.main-content .search-box input,
.main-content .inv-search input {
    padding-right: 38px !important;
}

.main-content input[type="search"]::placeholder,
.main-content input[name="q"]::placeholder,
.main-content .search-box input::placeholder,
.main-content .inv-search input::placeholder,
.main-content .uc-search input::placeholder,
.main-content .ch-search input::placeholder,
.main-content .ch-search-inner input::placeholder {
    color: rgba(225, 232, 255, 0.6) !important;
}

.main-content input[type="search"]:hover,
.main-content input[name="q"]:hover,
.main-content .search-box input:hover,
.main-content .inv-search input:hover,
.main-content .uc-search input:hover,
.main-content .ch-search input:hover,
.main-content .ch-search-inner input:hover {
    border-color: rgba(167, 139, 250, 0.48) !important;
    background: linear-gradient(180deg, rgba(30, 39, 82, 0.76), rgba(24, 33, 74, 0.68)) !important;
}

.main-content input[type="search"]:focus,
.main-content input[name="q"]:focus,
.main-content .search-box input:focus,
.main-content .inv-search input:focus,
.main-content .uc-search input:focus,
.main-content .ch-search input:focus,
.main-content .ch-search-inner input:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.82) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 3px rgba(124, 58, 237, 0.18),
        0 12px 24px rgba(8, 12, 36, 0.25) !important;
}

.main-content .search-icon,
.main-content .inv-search .si,
.main-content .ch-search-ic,
.main-content .uc-search svg {
    color: rgba(204, 216, 255, 0.78) !important;
}

.main-content .search-box:focus-within .search-icon,
.main-content .inv-search:focus-within .si,
.main-content .ch-search-inner:focus-within .ch-search-ic {
    color: #d8cbff !important;
}

.main-content .search-box .clear-search,
.main-content .inv-search .ci {
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(177, 189, 255, 0.2) !important;
    color: #eef2ff !important;
}

.main-content .search-box .clear-search:hover,
.main-content .inv-search .ci:hover {
    background: rgba(167, 139, 250, 0.42) !important;
}

/* Sidebar navigation refresh */
.sidebar-left .sidebar-left-inner {
    padding: 14px 0 10px;
}

.sidebar-left .menu-head {
    padding: 0 18px 12px;
}

.sidebar-left .menu-head-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(229, 236, 255, 0.84);
}

.sidebar-left .menu-head-role {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #e6ecff;
    border: 1px solid rgba(167, 139, 250, 0.32);
    border-radius: 999px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(56, 74, 152, 0.55), rgba(99, 102, 241, 0.35));
}

.sidebar-left .menu-quick-wrap {
    margin: 0 14px 16px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(156, 163, 175, 0.24);
    background: linear-gradient(160deg, rgba(36, 52, 110, 0.36), rgba(22, 31, 72, 0.22));
}

.sidebar-left .menu-quick-title {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(229, 236, 255, 0.72);
}

.sidebar-left .menu-quick {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.sidebar-left .menu-quick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 11px;
    border: 1px solid rgba(177, 189, 255, 0.2);
    text-decoration: none;
    color: var(--color-text);
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(120deg, rgba(77, 94, 176, 0.26), rgba(37, 50, 112, 0.16));
    transition: transform .15s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.sidebar-left .menu-quick-item:hover {
    transform: translateX(2px);
    border-color: rgba(129, 140, 248, 0.56);
    background: linear-gradient(120deg, rgba(96, 112, 205, 0.44), rgba(54, 67, 144, 0.28));
    box-shadow: 0 8px 20px rgba(30, 41, 97, 0.28);
    color: #f7f8ff;
}

.sidebar-left .menu-quick-item i,
.sidebar-left .menu-quick-item span:first-child {
    width: 16px;
    text-align: center;
    color: #c7d2fe;
}

.sidebar-left .menu-section {
    margin-bottom: 7px;
    padding-top: 2px;
}

.sidebar-left .menu-section-toggle {
    width: calc(100% - 16px);
    margin: 0 8px 2px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.sidebar-left .menu-section-toggle:hover {
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.24);
}

.sidebar-left .menu-section-title {
    padding: 0;
    margin: 0;
    color: rgba(190, 201, 242, 0.75);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.sidebar-left .menu-section-chevron {
    font-size: 11px;
    color: rgba(190, 201, 242, 0.7);
    transition: transform .15s ease;
}

.sidebar-left .menu-section-chevron.is-open {
    transform: rotate(180deg);
}

/* ── Підменю (вкладені пункти) ── */
.sidebar-left .menu-item--parent {
    width: 100%;
    text-align: left;
    background: transparent;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-left .menu-item--parent .menu-submenu-chevron.rotated {
    transform: rotate(90deg);
}
.sidebar-left .menu-submenu {
    padding-left: 14px;
}
.sidebar-left .menu-item--child {
    font-size: 12px;
    padding: 7px 10px;
    margin: 0 6px 1px 14px;
    border-radius: 8px;
    color: rgba(200, 210, 250, 0.8);
}
.sidebar-left .menu-item--child .menu-icon {
    font-size: 11px;
}
.sidebar-left .menu-item--child.active {
    color: #a5b4fc;
}

.sidebar-left .menu-item {
    margin: 0 10px 3px;
    border-radius: 11px;
    border-left: none;
    padding: 10px 12px;
    border: 1px solid transparent;
}

.sidebar-left .menu-item:hover {
    border-left-color: transparent;
    border-color: rgba(129, 140, 248, 0.35);
    background: linear-gradient(90deg, rgba(42, 59, 128, 0.3), rgba(30, 40, 95, 0.14));
}

.sidebar-left .menu-item.active {
    border-left-color: transparent;
    border-color: rgba(129, 140, 248, 0.56);
    background: linear-gradient(90deg, rgba(76, 89, 196, 0.38), rgba(44, 56, 129, 0.18));
    box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.18);
}

.sidebar-left .menu-item .menu-icon {
    font-size: 13px;
    color: rgba(211, 220, 250, 0.9);
}

.sidebar-left .menu-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 1px solid rgba(255, 255, 255, 0.26);
    flex-shrink: 0;
}

.sidebar-left .menu-section-bottom {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(177, 189, 255, 0.18);
}

.sidebar-left .menu-item-logout {
    color: #ffb0b0;
}

.sidebar-left .menu-item-logout:hover {
    border-color: rgba(248, 113, 113, 0.45);
    color: #ffd6d6;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.42), rgba(127, 29, 29, 0.2));
}

@media (max-width: 768px) {
    .sidebar-left .menu-quick {
        grid-template-columns: 1fr;
    }

    .sidebar-left .menu-quick-wrap {
        margin-left: 12px;
        margin-right: 12px;
    }

    .sidebar-left .menu-item {
        margin-left: 8px;
        margin-right: 8px;
    }
}

/* Card surfaces */
.page-card,
.service-card,
.od-card,
.kpi-card,
.form-card,
.glass-panel,
.services-table-shell,
.fin-table-card,
.ga-card,
.panel-card,
.tab-content-wrapper,
.clients-stat-card,
.client-card,
.vehicle-card,
.res-card,
.prob-card,
.hist-card,
.pg-card {
    border: 1px solid var(--uc-panel-border) !important;
    background: var(--uc-panel-bg) !important;
    box-shadow: var(--uc-panel-shadow) !important;
    border-radius: 14px !important;
}

/* Unified table frame */
.table-responsive,
.od-table-wrap {
    border-radius: 12px;
}

.data-table,
.services-table,
.od-table,
.orders-table,
.svc-table,
.clients-table,
.projects-table,
.ref-table,
.fin-table,
.hist-table,
.inv-tbl,
.workers-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--uc-panel-bg) !important;
    border: 1px solid var(--uc-panel-border) !important;
    border-radius: 14px !important;
    overflow: hidden;
    table-layout: auto;
}

.main-content .table-responsive,
.main-content .od-table-wrap,
.main-content .services-table-shell,
.main-content .fin-table-card,
.main-content #workers-list > div,
.main-content .ns-card > div[style*="overflow-x:auto"] {
    width: 100%;
    max-width: 100%;
    border-radius: 14px;
    overflow-x: auto;
}

.data-table thead th,
.services-table thead th,
.od-table thead th,
.orders-table thead th,
.svc-table thead th,
.clients-table thead th,
.projects-table thead th,
.ref-table thead th,
.fin-table thead th,
.hist-table thead th,
.inv-tbl thead th,
.workers-table thead th,
.services-table-head-cell,
.services-inv-head-cell,
.main-content #materialsTable thead th {
    background: var(--uc-head-grad) !important;
    color: var(--uc-head-color, #c9d4f9) !important;
    border-bottom: 1px solid var(--uc-panel-border) !important;
    font-weight: 800;
    padding: 12px 14px !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: .55px;
    white-space: nowrap;
}

.data-table tbody td,
.services-table tbody td,
.od-table tbody td,
.orders-table tbody td,
.svc-table tbody td,
.clients-table tbody td,
.projects-table tbody td,
.ref-table tbody td,
.fin-table tbody td,
.hist-table tbody td,
.inv-tbl tbody td,
.workers-table tbody td,
.services-table-cell,
.services-inv-cell,
.main-content #materialsTable tbody td {
    color: var(--color-text) !important;
    border-bottom: 1px solid var(--uc-row-border) !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
    background: transparent !important;
    vertical-align: middle;
}

.data-table tbody tr:nth-child(even) td,
.services-table tbody tr:nth-child(even) td,
.od-table tbody tr:nth-child(even) td,
.orders-table tbody tr:nth-child(even) td,
.svc-table tbody tr:nth-child(even) td,
.clients-table tbody tr:nth-child(even) td,
.projects-table tbody tr:nth-child(even) td,
.ref-table tbody tr:nth-child(even) td,
.fin-table tbody tr:nth-child(even) td,
.hist-table tbody tr:nth-child(even) td,
.inv-tbl tbody tr:nth-child(even) td,
.workers-table tbody tr:nth-child(even) td,
.main-content #materialsTable tbody tr:nth-child(even) td {
    background: var(--uc-row-even) !important;
}

.data-table tbody tr:hover td,
.services-table tbody tr:hover td,
.od-table tbody tr:hover td,
.orders-table tbody tr:hover td,
.svc-table tbody tr:hover td,
.clients-table tbody tr:hover td,
.projects-table tbody tr:hover td,
.ref-table tbody tr:hover td,
.fin-table tbody tr:hover td,
.hist-table tbody tr:hover td,
.inv-tbl tbody tr:hover td,
.workers-table tbody tr:hover td,
.main-content #materialsTable tbody tr:hover td,
.service-table-row:hover,
.service-inv-row:hover {
    background: var(--uc-row-hover) !important;
    transition: background .16s ease;
}

.data-table tbody tr:last-child td,
.services-table tbody tr:last-child td,
.od-table tbody tr:last-child td,
.orders-table tbody tr:last-child td,
.svc-table tbody tr:last-child td,
.clients-table tbody tr:last-child td,
.projects-table tbody tr:last-child td,
.ref-table tbody tr:last-child td,
.fin-table tbody tr:last-child td,
.hist-table tbody tr:last-child td,
.inv-tbl tbody tr:last-child td,
.workers-table tbody tr:last-child td,
.main-content #materialsTable tbody tr:last-child td {
    border-bottom: none !important;
}

.data-table tbody tr.is-unavailable td,
.services-table tbody tr.is-unavailable td,
.service-table-row.is-unavailable,
.service-inv-row.is-unavailable {
    background: rgba(239, 68, 68, 0.11) !important;
}

/* Header rows — прозорий фон на TR, градієнт живе на TH */
.services-table-head-row,
.services-inv-head-row {
    background: transparent;
}

/* Badges and chips baseline */
.status-badge,
.services-category-badge,
.orders-mechanic-chip,
.queue-chip,
.queue-pill {
    border-radius: 999px;
}

/* Table action controls */
.main-content table td .btn-action,
.main-content table td .act,
.main-content table td .btn-icon,
.main-content table td .btn-sm {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    border-radius: 10px !important;
}

/* Unified chips/badges/actions text clarity */
.status-badge,
.services-category-badge,
.orders-mechanic-chip,
.projects-mini-btn,
.qa,
.chip,
.filter-chip {
    font-weight: 700;
    letter-spacing: .01em;
}

/* Mobile consistency */
@media (max-width: 768px) {
    .main-content .table-responsive,
    .main-content .od-table-wrap,
    .main-content .services-table-shell,
    .main-content .fin-table-card,
    .main-content #workers-list > div,
    .main-content .ns-card > div[style*="overflow-x:auto"] {
        overflow-x: auto !important;
        max-width: 100% !important;
    }

    .data-table th,
    .services-table th,
    .od-table th,
    .orders-table th,
    .svc-table th,
    .clients-table th,
    .projects-table th,
    .ref-table th,
    .fin-table th,
    .hist-table th,
    .inv-tbl th,
    .workers-table th,
    .main-content #materialsTable th,
    .data-table td,
    .services-table td,
    .od-table td,
    .orders-table td,
    .svc-table td,
    .clients-table td,
    .projects-table td,
    .ref-table td,
    .fin-table td,
    .hist-table td,
    .inv-tbl td,
    .workers-table td,
    .main-content #materialsTable td {
        padding: 11px 10px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .data-table,
    .services-table,
    .od-table,
    .orders-table,
    .svc-table,
    .clients-table,
    .projects-table,
    .ref-table,
    .fin-table,
    .hist-table,
    .inv-tbl,
    .workers-table,
    .main-content #materialsTable {
        min-width: 640px;
    }

    .ref-table {
        min-width: 640px;
        table-layout: auto;
    }

    .hist-table {
        min-width: 1120px;
        table-layout: auto;
    }

    .inv-tbl {
        min-width: 920px;
        table-layout: auto;
    }

    .ref-table th,
    .ref-table td {
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
    }

    .hist-table th,
    .hist-table td,
    .inv-tbl th,
    .inv-tbl td {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .workers-table {
        min-width: 980px;
        table-layout: auto;
    }

    .workers-table th,
    .workers-table td {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        font-size: 12px !important;
        padding: 10px 8px !important;
    }

    .main-content #workers-list td div,
    .main-content #workers-list td span,
    .main-content #workers-list td code,
    .main-content #workers-list td i {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .data-table {
        min-width: 860px;
        table-layout: auto;
    }

    .clients-table {
        min-width: 760px;
        table-layout: auto;
    }

    .projects-table {
        min-width: 980px;
        table-layout: auto;
    }

    .od-table {
        min-width: 760px;
        table-layout: auto;
    }

    .data-table th,
    .data-table td,
    .clients-table th,
    .clients-table td,
    .projects-table th,
    .projects-table td,
    .od-table th,
    .od-table td {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    .data-table th,
    .clients-table th,
    .projects-table th,
    .od-table th,
    .hist-table th {
        font-size: 12px !important;
    }

    .data-table td,
    .clients-table td,
    .projects-table td,
    .od-table td,
    .hist-table td {
        font-size: 12px !important;
    }

    .main-content table td .btn-action,
    .main-content table td .act,
    .main-content table td .btn-icon,
    .main-content table td .btn-sm {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .tab-btn,
    .vt-btn,
    .tab-button,
    .fmt-tab {
        min-height: 40px;
    }

    .uc-tab,
    .fe-type-tab {
        min-height: 40px;
    }
}

/* ══ Стандартні компоненти фільтрів ══ */

/* Фільтр-чіп — стандарт для всіх сторінок */
.projects-filter-chip,
.filter-chip {
    padding: 5px 13px;
    border-radius: 20px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.projects-filter-chip:hover,
.filter-chip:hover {
    background: rgba(167,139,250,.15);
    border-color: rgba(167,139,250,.3);
    color: #c9d4f9;
}
.projects-filter-chip.active,
.projects-filter-chip.active-all,
.projects-filter-chip.active-on,
.projects-filter-chip.active-off,
.filter-chip.active {
    background: rgba(167,139,250,.22);
    border-color: rgba(167,139,250,.5);
    color: #e2e8f0;
}

/* Кнопки сортування */
.projects-sort-btn,
.sort-btn {
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.projects-sort-btn:hover,
.sort-btn:hover {
    background: rgba(255,255,255,.1);
    color: #c9d4f9;
}
.projects-sort-btn.active,
.sort-btn.active {
    background: rgba(167,139,250,.2);
    border-color: rgba(167,139,250,.4);
    color: #c9d4f9;
}

/* Вибір кількості на сторінку */
.projects-per-page-select {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
}
.projects-per-page-select:focus {
    outline: none;
    border-color: rgba(167,139,250,.4);
}

/* Пагінація */
.pg-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.pg-btn:hover:not(:disabled) {
    background: rgba(167,139,250,.2);
    border-color: rgba(167,139,250,.4);
    color: #c9d4f9;
}
.pg-btn:disabled {
    opacity: .35;
    cursor: default;
}

/* Таблиця клієнтів — темна версія */
.clients-table-shell {
    overflow: hidden;
}
.clients-table {
    width: 100%;
    border-collapse: collapse;
}
.clients-table thead th {
    background: var(--uc-head-grad) !important;
    color: var(--uc-head-color, #c9d4f9) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .6px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(177,189,255,.18) !important;
}
.clients-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: 13px;
    color: #c9d4f9;
    vertical-align: middle;
}
.clients-table tbody tr.data-row:hover td {
    background: rgba(167,139,250,.08) !important;
}
.clients-table tbody tr {
    transition: background .15s;
    cursor: pointer;
}

/* Workers table */
.workers-table {
    width: 100%;
    border-collapse: collapse;
}
.workers-table thead th {
    background: var(--uc-head-grad) !important;
    color: var(--uc-head-color, #c9d4f9) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .6px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(177,189,255,.18) !important;
}
.workers-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: 13px;
    color: #c9d4f9;
    vertical-align: middle;
}
.workers-table tbody tr:hover td {
    background: rgba(167,139,250,.08);
}

/* Оверрайд для inventory картки */
.inv-card {
    background: linear-gradient(160deg, rgba(30,41,90,.72) 0%, rgba(20,28,68,.68) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.07);
    border-left: 3px solid rgba(148,163,255,.3);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .2s, transform .15s;
}
.inv-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.3);
    transform: translateY(-2px);
}
.inv-card .price-val {
    font-weight: 700;
    color: #86efac;
    font-size: 15px;
}
.inv-card .price-sup {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.inv-card .cat-badge {
    background: rgba(167,139,250,.15);
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,.25);
    border-radius: 12px;
    padding: 2px 9px;
    font-size: 10px;
    font-weight: 600;
}
.inv-card .code-badge {
    background: rgba(148,163,255,.1);
    color: #93a4f8;
    border: 1px solid rgba(148,163,255,.2);
    border-radius: 8px;
    padding: 2px 7px;
    font-size: 10px;
}
.inv-card .shop-badge {
    background: rgba(74,222,128,.08);
    color: #86efac;
    border: 1px solid rgba(74,222,128,.2);
    border-radius: 8px;
    padding: 2px 7px;
    font-size: 10px;
}
.inv-card div[style*="background:#f8fafc"],
.inv-card div[style*="background:#f8fafc"] {
    background: rgba(255,255,255,.06) !important;
    border: 1px solid rgba(255,255,255,.08) !important;
}
.inv-card div[style*="background:#f0f4ff"] {
    background: rgba(148,163,255,.08) !important;
    border: none !important;
}
.inv-card code[style*="background:#f1f5f9"] {
    background: rgba(255,255,255,.07) !important;
    color: #c9d4f9 !important;
}
.inv-card div[style*="color:#1e293b"] {
    color: #e2e8f0 !important;
}
.inv-card div[style*="font-size:12px; color:#64748b"] {
    color: #94a3b8 !important;
}

/* Картки service groups — темна версія */
.sg-card {
    background: linear-gradient(160deg, rgba(30,41,90,.72) 0%, rgba(20,28,68,.68) 100%) !important;
    border: 1px solid rgba(255,255,255,.07) !important;
    border-radius: 14px !important;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}
.sg-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.3) !important;
    transform: translateY(-2px);
}
.sg-title {
    color: #e2e8f0 !important;
}
.sg-desc {
    color: #94a3b8 !important;
}
.sg-item-row {
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.06) !important;
}
.sg-item-name { color: #c9d4f9 !important; }
.sg-item-hours, .sg-item-price { color: #94a3b8 !important; }
.sg-footer {
    background: rgba(0,0,0,.2) !important;
    border-top: 1px solid rgba(255,255,255,.07) !important;
}
.sg-total { color: #e2e8f0 !important; }
.sg-body { color: #c9d4f9; }

/* Статусні чіпи в sg-card */
.sg-card span[style*="background:#d1fae5"] {
    background: rgba(74,222,128,.12) !important;
    color: #86efac !important;
    border: 1px solid rgba(74,222,128,.25) !important;
}
.sg-card span[style*="background:#f1f5f9"] {
    background: rgba(255,255,255,.06) !important;
    color: #64748b !important;
}
.sg-card span[style*="background:#ede9fe"] {
    background: rgba(167,139,250,.15) !important;
    color: #a78bfa !important;
}
.sg-card span[style*="background:#f0f4ff"] {
    background: rgba(148,163,255,.1) !important;
    color: #93a4f8 !important;
}

/* Promotions card — темна версія */
.services-card .fin-header-top,
.services-card .fin-header {
    background: transparent;
}

/* Empty-state всередині projects-card */
.projects-card [style*="background:white"] {
    background: transparent !important;
}

/* Pagination input */
.projects-card input[type="number"] {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    color: #c9d4f9;
    font-size: 12px;
}
