/* =====================================================================
 * FURA — дизайн-шар (форма, ритм, рух). Підключається ОСТАННІМ.
 * Кольори FURA не змінюються: лише радіуси, відступи, шрифти, тіні,
 * ховери, анімації та завантаження сторінок.
 * ===================================================================== */

:root {
    --d-radius-xl: 22px;   /* великі картки, вікна */
    --d-radius-lg: 16px;   /* картки, таблиці */
    --d-radius-md: 12px;   /* кнопки, поля */
    --d-radius-sm: 9px;
    --d-ease: cubic-bezier(.2, .8, .2, 1);
    --d-shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
    --d-shadow-2: 0 4px 10px -2px rgba(16, 24, 40, .06), 0 2px 4px -2px rgba(16, 24, 40, .04);
    --d-shadow-3: 0 24px 48px -12px rgba(16, 24, 40, .18);
    --d-line: var(--f-line, #e4e8ef);
    --d-line-soft: #eef1f5;
}

/* ---------- Типографіка ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { font-feature-settings: "cv11", "ss01", "ss03"; letter-spacing: -0.006em; }
.top-bar h1, .cb-h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
h2, h3 { letter-spacing: -0.015em; }
td, .kpi b, .num, [class*="count"] { font-variant-numeric: tabular-nums; }

/* ---------- Плавність усього, на що можна натиснути ---------- */
a, button, .btn, input, select, textarea, [role="button"], .fura-nav-item, .quick-card, .lead-tab, .trip-chip, tbody tr {
    transition: background-color .18s var(--d-ease), border-color .18s var(--d-ease), color .18s var(--d-ease),
        box-shadow .22s var(--d-ease), transform .18s var(--d-ease), opacity .18s var(--d-ease);
}
:focus-visible { outline: 2px solid rgba(120, 134, 134, .45); outline-offset: 2px; border-radius: 8px; }

/* ---------- Бічне меню ---------- */
.fura-nav-item { border-radius: var(--d-radius-md); font-weight: 500; letter-spacing: -0.005em; }
.fura-nav-item:hover:not(.active) { transform: translateX(2px); }
.fura-nav-item.active { box-shadow: 0 6px 16px -6px rgba(201, 151, 58, .55); font-weight: 600; }
.fura-nav-title { letter-spacing: .08em; font-weight: 600; }

/* ---------- Верхня панель ---------- */
.fura-topbar { backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.fura-nav-arrows button, .fura-date { border-radius: var(--d-radius-md); }
.fura-nav-arrows button:active:not(:disabled) { transform: scale(.94); }

/* ---------- Кнопки ---------- */
.btn, .cb-btn, .pa-btn {
    border-radius: var(--d-radius-md);
    font-weight: 600;
    letter-spacing: -0.005em;
    min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-primary { box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(120, 134, 134, .45), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-secondary { box-shadow: var(--d-shadow-1); }
.btn-secondary:hover:not(:disabled) { border-color: #cfd6e2; transform: translateY(-1px); box-shadow: var(--d-shadow-2); }
.btn:active:not(:disabled), .cb-btn:active:not(:disabled), .pa-btn:active:not(:disabled), .req-chat-send:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.req-chat-send, .req-chat-clip { border-radius: var(--d-radius-md); }
.req-chat-send:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(201, 151, 58, .6); }

/* ---------- Поля ---------- */
.search-input, .lead-select, .form-group input, .form-group select, .form-group textarea, .cb-in, .pa-in {
    border-radius: var(--d-radius-md);
    min-height: 42px;
    box-shadow: var(--d-shadow-1);
}
.form-group textarea, textarea.pa-in, textarea.cb-in { min-height: 84px; }
.search-input:hover, .lead-select:hover, .form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #cfd6e2; }
.form-group label { font-weight: 600; font-size: 13px; letter-spacing: -0.005em; }
input::placeholder, textarea::placeholder { color: #9aa4b5; }

/* ---------- Картки ---------- */
.table-card, .trip-detail, .trip-card, .home-section, .quick-card, .kpi, .rep-card, .home-hero, .card-section, .cb-card, .gd-card {
    border-radius: var(--d-radius-xl);
    border-color: var(--d-line-soft);
    box-shadow: var(--d-shadow-1);
}
.quick-card:hover, .trip-card:hover, .rep-card:hover { transform: translateY(-2px); box-shadow: var(--d-shadow-2); border-color: var(--d-line); }

/* ---------- Таблиці: як у дизайнерських дашбордах ---------- */
/* (скрол таблиць лишається як був — overflow не чіпаємо) */
thead { background: #fff; border-bottom: 1px solid var(--d-line-soft); }
th {
    text-transform: uppercase;
    font-size: 11px; font-weight: 600; letter-spacing: .07em;
    color: #94a0b4;
    padding-top: 15px; padding-bottom: 15px;
}
.th-label { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; }
td { border-bottom: 1px solid var(--d-line-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }

/* ---------- Бейджі й «пілюлі» ---------- */
.status-badge, .type-badge, .badge, .tbadge, .badge-country, .route-chip, .trade-badge, .chosen-badge, .role-badge, .new-badge, .flexible-badge, .cm-tag, .pa-chip, .cb-chip {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.35;
}
.badge-country { border-radius: 7px; font-variant-numeric: tabular-nums; }

/* ---------- Вкладки ---------- */
.lead-tabs, .trip-chips { border-radius: var(--d-radius-lg); box-shadow: var(--d-shadow-1); border-color: var(--d-line-soft); }
.lead-tab, .trip-chip { font-weight: 500; }
.lead-tab.active, .trip-chip[aria-pressed="true"] { font-weight: 600; }

/* ---------- Вікна ---------- */
.modal-overlay.active { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: d-fade .2s var(--d-ease); }
.modal { border-radius: var(--d-radius-xl); box-shadow: var(--d-shadow-3); }

/* ---------- Картки перевізника / запиту / клієнта у вікні ----------
 * Сірі «шапки» і смугасті рядки → чисті білі блоки з тонкими лініями.
 * Кольорові шапки (Клієнт, Відповідь логіста, Фурик…) лишаються своїми кольорами. */
.carrier-card-modal { background: var(--f-bg, #f3f5f9); }
.carrier-card-topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--d-line-soft); padding: 14px 22px; z-index: 5; }
.carrier-card-topbar h2 { font-size: 15px; font-weight: 600; color: #334155; letter-spacing: -0.01em; }
.btn-card-edit { border-radius: 10px; min-height: 36px; }
.btn-card-edit:hover { transform: translateY(-1px); box-shadow: var(--d-shadow-2); }
.close-btn { border-radius: 10px; width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0; }
.close-btn:hover { background: #eef1f5; color: #0f172a; }
#requestCardBody, #carrierCardBody { padding: 18px 22px 26px; }
.card-header-block { border-radius: var(--d-radius-lg); border: 1px solid var(--d-line-soft); box-shadow: var(--d-shadow-1); }
.card-section { border-radius: var(--d-radius-lg); border: 1px solid var(--d-line-soft); box-shadow: var(--d-shadow-1); }
#requestCardBody > .card-section + .card-section, #requestCardBody > * + .card-section { margin-top: 14px; }
.card-section-title { font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em; padding: 13px 18px; }
.card-section-title:not([style*="background"]):not(.answer-section-title):not(.bd-title):not(.fr-title):not(.lead-in-request-title):not(.lead-section-title) { background: #fff; border-bottom: 1px solid var(--d-line-soft); color: #0f172a; }
.card-row { padding: 11px 18px; border-top: 1px solid var(--d-line-soft); }
.card-row:first-of-type { border-top: 0; }
.card-row:nth-child(even) { background: transparent; }
.card-row-label { color: #8a94a6; }
.card-avatar-wrap .carrier-avatar, .card-avatar-wrap .carrier-avatar-placeholder { border-radius: 18px; }
.modal-overlay.active .modal { animation: d-pop .28s var(--d-ease); }
@keyframes d-fade { from { opacity: 0; } }
@keyframes d-pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* ---------- Тонкі скролбари ---------- */
* { scrollbar-width: thin; scrollbar-color: #cdd4df transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd4df; border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #aeb8c7; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Завантаження сторінки ----------
 * Поки сторінка вантажить дані, вона прихована (body visibility:hidden).
 * Замість порожнього екрана — каркас із «мерехтінням» і смужка прогресу вгорі. */
body:not([style*="visible"])::before {
    content: "";
    visibility: visible;
    position: fixed; inset: 0; z-index: 9999;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, 0) 100%) -60% 0 / 40% 100% no-repeat,
        /* бічне меню */
        linear-gradient(var(--f-navy, #13203f), var(--f-navy, #13203f)) 0 0 / 250px 100% no-repeat,
        /* заголовок */
        linear-gradient(#e6eaf0, #e6eaf0) 282px 96px / 260px 30px no-repeat,
        /* пошук */
        linear-gradient(#eceff4, #eceff4) 282px 150px / calc(100% - 314px) 44px no-repeat,
        /* картка зі списком */
        linear-gradient(#fff, #fff) 282px 214px / calc(100% - 314px) calc(100% - 250px) no-repeat,
        var(--f-bg, #f3f5f9);
    animation: d-shimmer 1.3s ease-in-out infinite;
}
body:not([style*="visible"])::after {
    content: "";
    visibility: visible;
    position: fixed; top: 0; left: 0; z-index: 10000;
    height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--f-orange, #c9973a), var(--f-orange-2, #e9c46a));
    transform-origin: 0 50%;
    animation: d-progress 2.4s var(--d-ease) forwards;
}
@keyframes d-shimmer { to { background-position: 160% 0, 0 0, 282px 96px, 282px 150px, 282px 214px, 0 0; } }
@keyframes d-progress { 0% { transform: scaleX(0); } 60% { transform: scaleX(.7); } 100% { transform: scaleX(.92); } }
@media (max-width: 900px) {
    body:not([style*="visible"])::before {
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, 0) 100%) -60% 0 / 40% 100% no-repeat,
            linear-gradient(#e6eaf0, #e6eaf0) 16px 80px / 200px 28px no-repeat,
            linear-gradient(#eceff4, #eceff4) 16px 128px / calc(100% - 32px) 44px no-repeat,
            linear-gradient(#fff, #fff) 16px 188px / calc(100% - 32px) calc(100% - 220px) no-repeat,
            var(--f-bg, #f3f5f9);
    }
    @keyframes d-shimmer { to { background-position: 160% 0, 16px 80px, 16px 128px, 16px 188px, 0 0; } }
}
/* Коли дані готові — вміст м'яко з'являється */
body[style*="visible"] .main-content { animation: d-in .38s var(--d-ease) both; }
@keyframes d-in { from { opacity: 0; transform: translateY(6px); } }

/* Повага до тих, хто вимкнув анімації в системі */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =====================================================================
 * «Скло» (як на iPhone) — легко й лише там, де щось лежить поверх сторінки:
 * верхня панель, шапки вікон, випадні списки, плаваючі кнопки, підказки.
 * Кольори ті самі — просто напівпрозоро з розмиттям того, що під ними.
 * ===================================================================== */
:root {
    --g-bg: rgba(255, 255, 255, .72);
    --g-bg-strong: rgba(255, 255, 255, .86);
    --g-blur: saturate(1.8) blur(18px);
    --g-edge: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .fura-topbar {
        position: sticky; top: 0; z-index: 30;
        background: var(--g-bg);
        -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
        border-bottom-color: rgba(228, 232, 239, .7);
    }
    .fura-topbar .gs, .fura-date, .fura-nav-arrows button {
        background: rgba(255, 255, 255, .6);
        box-shadow: var(--g-edge);
    }
    .carrier-card-topbar { background: var(--g-bg-strong); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
    /* випадні списки фільтрів, меню, підказки */
    .eq-msel-panel, .fura-dropdown, .gs-panel, .fh-panel, .fk-panel, .cb-toast, .notif-panel {
        background: var(--g-bg-strong) !important;
        -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
        box-shadow: var(--g-edge), 0 18px 40px -16px rgba(16, 24, 40, .28) !important;
        border-color: rgba(228, 232, 239, .8) !important;
    }
    /* плаваюча кнопка «Помічник» — темне скло */
    .fh-fab {
        background: rgba(19, 32, 63, .82) !important;
        -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 26px -10px rgba(19, 32, 63, .55) !important;
    }
    .fh-fab:hover { transform: translateY(-2px); }
    /* фон під вікнами — трохи сильніше розмиття */
    .modal-overlay.active { -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2); }
}

/* =====================================================================
 * Скло v2 — щоб ефект було ВИДНО: ледь помітне кольорове світіння FURA
 * на фоні (помаранчеве згори праворуч, синє знизу ліворуч) і напівпрозорі
 * «скляні» картки поверх нього. Таблиці лишаються майже білими — читаються.
 * ===================================================================== */
body {
    background-color: var(--f-bg, #f3f5f9);
    background-image:
        radial-gradient(900px 520px at 92% -6%, rgba(201, 151, 58, .14), transparent 62%),
        radial-gradient(820px 560px at 18% 108%, rgba(120, 134, 134, .12), transparent 64%),
        radial-gradient(600px 420px at 55% 40%, rgba(233, 196, 106, .04), transparent 70%);
    background-attachment: fixed;
}
.main-content, html, .page-wrap { background: transparent !important; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root {
        --g-card: rgba(255, 255, 255, .64);
        --g-card-hi: rgba(255, 255, 255, .80);
        --g-card-blur: saturate(1.7) blur(16px);
        --g-card-edge: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .45), 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -14px rgba(16, 24, 40, .16);
    }
    /* картки й блоки */
    .home-hero, .quick-card, .home-section, .kpi, .eq-kpi, .rep-card, .rop-kpi, .rop-task,
    .lead-tabs, .trip-chips, .gd-card, .gd-lead, .gd-faq, .trip-card {
        background-color: var(--g-card) !important;
        -webkit-backdrop-filter: var(--g-card-blur); backdrop-filter: var(--g-card-blur);
        border-color: rgba(255, 255, 255, .7) !important;
        box-shadow: var(--g-card-edge) !important;
    }
    .quick-card:hover, .trip-card:hover { background-color: var(--g-card-hi) !important; }
    /* таблиці й великі списки — майже білі, щоб текст читався */
    .table-card, .trip-detail, .card-section, .card-header-block {
        background-color: rgba(255, 255, 255, .86) !important;
        -webkit-backdrop-filter: var(--g-card-blur); backdrop-filter: var(--g-card-blur);
        border-color: rgba(255, 255, 255, .75) !important;
        box-shadow: var(--g-card-edge) !important;
    }
    thead { background: rgba(255, 255, 255, .55); }
    tbody tr:hover { background: rgba(255, 255, 255, .7); }
    /* поля пошуку, кнопки «другого плану», вкладки-сегменти */
    .search-input, .btn-secondary, .lead-select {
        background-color: rgba(255, 255, 255, .7) !important;
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(16, 24, 40, .05) !important;
    }
    .search-input:focus { background-color: #fff !important; }
    /* бічне меню (темне скло всередині): пункти при наведенні — матове світло */
    .fura-nav-item:hover:not(.active) { background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
    .fura-nav-item.active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 16px -6px rgba(201, 151, 58, .55); }
    /* вікно картки: фон — світле скло */
    .carrier-card-modal { background: rgba(243, 245, 249, .9); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
}

/* =====================================================================
 * Картка перевізника — компактніше; редагування прямо в картці
 * ===================================================================== */
#carrierCardOverlay .carrier-card-modal { max-width: 1080px; }
#carrierCardBody { padding: 14px 18px 20px !important; }
#carrierCardBody .card-header-block { padding: 12px 16px; gap: 14px; margin-bottom: 10px; align-items: center; }
#carrierCardBody .card-avatar-wrap .carrier-avatar,
#carrierCardBody .card-avatar-wrap .carrier-avatar-placeholder { width: 56px; height: 56px; border-radius: 14px; font-size: 26px; }
#carrierCardBody .card-title { font-size: 19px; }
#carrierCardBody .card-subtitle { font-size: 13.5px; margin-top: 2px; }
#carrierCardBody .card-header-badges { margin-top: 6px; gap: 8px; }
#carrierCardBody .card-rating-badge { font-size: 13px; padding: 3px 9px; border-radius: 8px; }
#carrierCardBody .card-stars i { font-size: 15px; }
#carrierCardBody .card-columns, #carrierCardBody .card-col { gap: 10px; }
#carrierCardBody .card-section + .card-section, #carrierCardBody > * + * { margin-top: 10px; }
#carrierCardBody .card-section-title, #carrierCardBody .ch-title { padding: 9px 14px !important; font-size: 13.5px !important; }
#carrierCardBody .card-row { padding: 7px 14px; grid-template-columns: 130px 1fr; font-size: 13.5px; }
#carrierCardBody .card-block-text { padding: 9px 14px; font-size: 13.5px; }
#carrierCardBody .ch-body { padding: 10px 14px; }
/* Редагування в картці */
.cc-edit-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: #fbf5e8; border: 1px solid #efdcb0; }
.cc-edit-head b { display: block; font-size: 15px; }
.cc-edit-head span { font-size: 12.5px; color: #7a5414; }
.cc-edit-ava .carrier-avatar, .cc-edit-ava .carrier-avatar-placeholder { width: 48px; height: 48px; border-radius: 12px; font-size: 22px; }
#carrierCardBody.cc-editing #addCarrierForm { background: #fff; border: 1px solid var(--d-line-soft, #eef1f5); border-radius: 16px; padding: 14px 16px 0; }
#carrierCardBody.cc-editing .modal-footer { position: sticky; bottom: -20px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin: 12px -16px 0; padding: 12px 16px; border-top: 1px solid var(--d-line-soft, #eef1f5); border-radius: 0 0 16px 16px; display: flex; justify-content: flex-end; gap: 8px; }

/* Рядок, який щойно відкривали (перевізник / машина) — видно в списку */
tr.carrier-last > td:first-child { box-shadow: inset 4px 0 0 var(--f-blue, #1d5bd8); }
tr.carrier-last { outline: 2px solid rgba(120, 134, 134, .35); outline-offset: -2px; }
tr.row-flash { animation: d-row-flash 1.6s ease-out; }
@keyframes d-row-flash { 0%, 30% { background: rgba(120, 134, 134, .16); } 100% { background: inherit; } }

/* Картка перевізника — ще компактніше */
#carrierCardBody .card-header-block { padding: 10px 14px; }
#carrierCardBody .card-header-info { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
#carrierCardBody .card-title { grid-column: 1 / -1; font-size: 18px; }
#carrierCardBody .card-subtitle { grid-column: 1; margin: 0; }
#carrierCardBody .card-header-badges { grid-column: 2; margin: 0; }
#carrierCardBody .card-avatar-wrap .carrier-avatar,
#carrierCardBody .card-avatar-wrap .carrier-avatar-placeholder { width: 48px; height: 48px; border-radius: 12px; font-size: 22px; }
#carrierCardBody .card-section-title, #carrierCardBody .ch-title { padding: 8px 12px !important; font-size: 13px !important; min-height: 0; }
#carrierCardBody .card-row { padding: 6px 12px; grid-template-columns: 120px 1fr; font-size: 13px; }
#carrierCardBody .card-block-text, #carrierCardBody .ch-body { padding: 8px 12px; font-size: 13px; }
#carrierCardBody .card-columns, #carrierCardBody .card-col { gap: 8px; }
#carrierCardBody .card-section + .card-section, #carrierCardBody > * + * { margin-top: 8px; }
#carrierCardBody .eqc, #carrierCardBody .regc, #carrierCardBody .pa-box { padding: 9px 12px !important; margin: 8px 0 0 !important; font-size: 13px; }
#carrierCardBody .eqc-title, #carrierCardBody .regc-title, #carrierCardBody .pa-title { font-size: 13.5px !important; margin-bottom: 6px; }
#carrierCardBody .cm-collapsed { box-shadow: none !important; }
#carrierCardBody .cm-collapsed > .card-section-title, #carrierCardBody .cm-collapsed > .ch-title { border-bottom: 0; }

/* Картка перевізника — однакові м'які кути, акуратні рамки й тіні */
#carrierCardOverlay .carrier-card-modal { border-radius: 24px; overflow-y: auto; overscroll-behavior: contain; }
#carrierCardOverlay .carrier-card-topbar { border-radius: 24px 24px 0 0; }
#carrierCardBody .card-header-block,
#carrierCardBody .card-section,
#carrierCardBody .eqc, #carrierCardBody .regc, #carrierCardBody .pa-box,
#carrierCardBody .ch-box, #carrierCardBody [class*="cm-sec"] {
    border-radius: 18px !important;
    border: 1px solid rgba(15, 23, 42, .06) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px -12px rgba(16, 24, 40, .14) !important;
    overflow: hidden;
}
#carrierCardBody .card-section > .card-section-title:first-child,
#carrierCardBody .cm-coll > .ch-title:first-child { border-radius: 18px 18px 0 0; }
#carrierCardBody .cm-collapsed > .card-section-title, #carrierCardBody .cm-collapsed > .ch-title { border-radius: 18px; }
#carrierCardBody .cm-coll { transition: box-shadow .2s ease, transform .2s ease; }
#carrierCardBody .cm-coll:hover { box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 24px -14px rgba(16, 24, 40, .22) !important; }
/* стрілка згортання — кругла кнопочка, плавно повертається */
#carrierCardBody .cm-coll > .card-section-title::after, #carrierCardBody .cm-coll > .ch-title::after,
#carrierCardBody .cm-coll > .eqc-title::after, #carrierCardBody .cm-coll > .regc-title::after, #carrierCardBody .cm-coll > .pa-title::after {
    content: "" !important; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(15, 23, 42, .05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 12px no-repeat;
    transition: transform .2s ease, background-color .2s ease;
}
#carrierCardBody .cm-coll.cm-collapsed > *::after { transform: translateY(-50%) rotate(-90deg); }
#carrierCardBody .cm-coll > *:hover::after { background-color: rgba(15, 23, 42, .09); }
/* дрібні елементи всередині — теж округлі */
#carrierCardBody .badge, #carrierCardBody code, #carrierCardBody .regc-chip, #carrierCardBody .eq-body { border-radius: 8px; }
#carrierCardBody .ch-kpi, #carrierCardBody .ch-stat, #carrierCardBody .ch-body > div > div { border-radius: 14px; }
#carrierCardBody .card-avatar-wrap .carrier-avatar, #carrierCardBody .card-avatar-wrap .carrier-avatar-placeholder { border-radius: 14px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06); }
#carrierCardBody .pa-in, #carrierCardBody .pa-btn { border-radius: 10px; }
/* Довгий список машин у черзі — прокручується всередині блоку */
#carrierCardBody .eqc { max-height: 360px; overflow-y: auto !important; }
#carrierCardBody .eqc > .eqc-title { position: sticky; top: -9px; background: #fbf5e8; z-index: 1; padding: 4px 32px 4px 0; }
/* Картка перевізника вужча — зручніше читати */
#carrierCardOverlay .carrier-card-modal { max-width: 880px !important; width: 100%; margin: 0 auto; }
@media (max-width: 920px) { #carrierCardBody .card-columns { grid-template-columns: 1fr; } }

/* =====================================================================
 * Задній фон: м'які кольорові «кулі» FURA, що повільно пливуть,
 * і ледь помітна сітка з крапок. Усе за контентом і дуже легко.
 * ===================================================================== */
html::before, html::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
/* кулі зі світінням */
html::before {
    background:
        radial-gradient(closest-side, rgba(201, 151, 58, .22), transparent) 0 0 / 46vmax 46vmax no-repeat,
        radial-gradient(closest-side, rgba(120, 134, 134, .18), transparent) 0 0 / 52vmax 52vmax no-repeat,
        radial-gradient(closest-side, rgba(233, 196, 106, .14), transparent) 0 0 / 34vmax 34vmax no-repeat;
    filter: blur(30px);
    animation: d-orbs 38s ease-in-out infinite alternate;
}
@keyframes d-orbs {
    0%   { background-position: 78vw -10vh, -8vw 62vh, 42vw 30vh; }
    50%  { background-position: 64vw 8vh,  6vw 48vh, 55vw 52vh; }
    100% { background-position: 84vw 18vh, -2vw 70vh, 30vw 12vh; }
}
/* сітка з крапок, що зникає до країв */
html::after {
    background-image: radial-gradient(rgba(19, 32, 63, .10) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 85%);
    mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 30%, transparent 85%);
}
/* щоб фон просвічував, сторінка сама не зафарбовує його */
html { background: var(--f-bg, #f3f5f9); }
body { background-color: transparent !important; }
/* підсвітка карток при наведенні — тонкий кольоровий обідок */
.quick-card:hover, .home-section:hover, .kpi:hover, .eq-kpi:hover, .rop-kpi:hover {
    box-shadow: 0 0 0 1px rgba(201, 151, 58, .25), 0 12px 30px -14px rgba(201, 151, 58, .35) !important;
}
@media (prefers-reduced-motion: reduce) { html::before { animation: none; } }
/* вікно картки у «Черзі» (iframe) — без фону */
html.fura-cpop::before, html.fura-cpop::after { display: none; }
html.fura-cpop { background: transparent !important; }

/* Сині хаотичні лінії-хвилі на фоні (ледь помітні) */
body::after {
    content: "";
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' viewBox='0 0 1600 1000' fill='none' stroke-linecap='round'%3E%3Cg stroke='%23788686' stroke-width='1.6'%3E%3Cpath opacity='.30' d='M-50 820 C 250 700 420 900 700 760 S 1150 520 1650 640'/%3E%3Cpath opacity='.22' d='M-50 860 C 260 760 460 940 740 810 S 1180 580 1650 700'/%3E%3Cpath opacity='.26' d='M-80 180 C 200 260 380 60 640 150 S 1100 330 1700 120'/%3E%3Cpath opacity='.18' d='M-80 230 C 220 310 400 110 660 200 S 1120 380 1700 170'/%3E%3Cpath opacity='.22' d='M300 1050 C 420 820 380 640 560 520 S 900 380 980 -40'/%3E%3Cpath opacity='.18' d='M1200 1050 C 1080 860 1260 700 1180 520 S 1300 260 1460 -40'/%3E%3C/g%3E%3Cg stroke='%23c9973a' stroke-width='1.2'%3E%3Cpath opacity='.22' d='M-50 520 C 300 440 520 620 820 500 S 1300 360 1650 430'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
    animation: d-lines 60s ease-in-out infinite alternate;
}
@keyframes d-lines { from { transform: translate3d(0, 0, 0) scale(1.02); } to { transform: translate3d(-2%, 1.5%, 0) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }

/* Картка у вікні (з Черги, Запитів): власний фон із тими ж кулями й лініями */
html.fura-cpop #carrierCardOverlay .carrier-card-modal,
.carrier-card-modal {
    background-color: #f3f5f9 !important;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900' fill='none'%3E%3Cg stroke='%23788686' stroke-width='1.3'%3E%3Cpath opacity='.26' d='M-40 700 C 160 600 300 780 480 660 S 760 470 940 560'/%3E%3Cpath opacity='.18' d='M-40 740 C 170 650 320 820 500 700 S 780 520 940 610'/%3E%3Cpath opacity='.22' d='M-40 160 C 140 230 280 60 450 140 S 740 300 940 110'/%3E%3C/g%3E%3Cpath stroke='%23c9973a' stroke-width='1.1' opacity='.22' d='M-40 430 C 200 360 360 520 560 420 S 820 330 940 380'/%3E%3C/svg%3E"),
        radial-gradient(520px 360px at 100% 0%, rgba(201, 151, 58, .14), transparent 70%),
        radial-gradient(560px 420px at 0% 100%, rgba(120, 134, 134, .13), transparent 70%),
        radial-gradient(rgba(19, 32, 63, .07) 1px, transparent 1.2px) !important;
    background-size: 100% auto, auto, auto, 20px 20px !important;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat !important;
    background-attachment: local !important;
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* блоки в картці — напівпрозоре скло, щоб фон просвічував */
#carrierCardBody .card-header-block, #carrierCardBody .card-section, #carrierCardBody .cm-coll:not(.eqc):not(.regc):not(.pa-box) {
    background-color: rgba(255, 255, 255, .80) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
}


/* =====================================================================
 * Скло всюди: картки, таблиці, вікна — напівпрозорі, фон просвічує
 * ===================================================================== */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .table-card, .trip-detail, .dv-card, .dv-kpi, .eq-card, .eq-kpi, .card-section, .card-header-block,
    .home-hero, .quick-card, .home-section, .rep-card, .kpi, .rop-kpi, .rop-task, .rop-top, .lead-tabs, .trip-chips,
    .gd-card, .cm-panel, .pa-reg, #requestCardBody .card-section, .eq-views, .eq-search input, .search-input {
        background-color: rgba(255, 255, 255, .68) !important;
        -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
        border-color: rgba(255, 255, 255, .75) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -16px rgba(16, 24, 40, .2) !important;
    }
    thead, .eq-table thead, .eq-foot { background: rgba(255, 255, 255, .45) !important; }
    tbody tr:hover { background: rgba(255, 255, 255, .55) !important; }
    .modal:not(.carrier-card-modal) { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); }
    .carrier-card-topbar { background: rgba(255, 255, 255, .72) !important; }
    .fura-topbar { background: rgba(255, 255, 255, .55) !important; }
}

/* ---------- Черга: фільтри згортаються ---------- */
.eq-filters-toggle { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.8); border-radius: 12px; background: rgba(255,255,255,.68); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: inherit; font-size: 14px; font-weight: 600; color: #0f172a; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.eq-filters-toggle:hover { background: rgba(255,255,255,.9); }
.eq-filters-toggle b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--f-orange, #c9973a); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.eq-filters-toggle b:empty { display: none; }
.eq-filters-toggle i { font-size: 18px; transition: transform .2s; }
.eq-filters-toggle[aria-expanded="true"] i.bx-chevron-down { transform: rotate(180deg); }
.eq-filters.eq-collapsed { display: none !important; }
.eq-filters { gap: 6px !important; }
.eq-filters .eq-chips button, .eq-filters .eq-chips span { padding: 3px 9px !important; font-size: 12.5px !important; }
.eq-kpis { gap: 8px !important; margin-bottom: 10px !important; }
.eq-kpi { padding: 9px 14px !important; }
.eq-kpi b { font-size: 19px !important; }

/* Перевізники: напрямки короткими кодами (TR, GE… / ЛЬВ, ОДЕ…) */
.cc-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 150px; }
.cc-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; cursor: help; }
.cc-country { background: #e8efff; color: #1d4ed8; }
.cc-oblast { background: #eef6ff; color: #0f4c81; }
.cc-more { background: #f1f5f9; color: #475569; }
/* у вікні фільтра — код і кількість */
.filter-option-item { display: flex; align-items: center; gap: 8px; }
.filter-option-item > span { flex: 1; min-width: 0; }
.cf-code { display: inline-block; min-width: 30px; padding: 0 5px; margin-right: 4px; border-radius: 5px; background: #e8efff; color: #1d4ed8; font-size: 11px; text-align: center; }
.cf-n { color: #94a3b8; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.cc-trailers .badge { margin: 0 4px 4px 0; display: inline-flex; }
/* Перевізники: без окремого пошуку — «Підібрати під запит» і «Колонки» в один рядок */
.filters-bar.carriers-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 10px; }
.filters-bar.carriers-tools + .fura-cols-bar, .carriers-tools ~ .fura-cols-bar { margin-top: -50px; margin-bottom: 10px; display: flex; justify-content: flex-end; padding-right: 230px; pointer-events: none; }
.carriers-tools ~ .fura-cols-bar > * { pointer-events: auto; }

/* ── Форма перевізника: блоки, що згортаються ── */
#addCarrierForm .cf-hidden { display: none !important; }
#addCarrierForm .cf-tools { display: flex; justify-content: flex-end; margin: -4px 0 -6px; }
#addCarrierForm .cf-coll-all {
    border: 1px solid rgba(37, 99, 235, .25); background: rgba(37, 99, 235, .06); color: #2563eb;
    font: 600 12px/1 inherit; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: background .15s;
}
#addCarrierForm .cf-coll-all:hover { background: rgba(37, 99, 235, .14); }
#addCarrierForm .cf-sec {
    display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
    padding: 9px 12px; margin-top: 4px; border-radius: 12px;
    background: rgba(241, 245, 249, .8); border: 1px solid rgba(148, 163, 184, .25);
    font-size: 13px; font-weight: 700; color: #0f172a; letter-spacing: .01em;
    transition: background .15s, border-color .15s;
}
#addCarrierForm .cf-sec:hover { background: rgba(226, 232, 240, .9); border-color: rgba(37, 99, 235, .3); }
#addCarrierForm .cf-sec-ic { font-size: 14px; }
#addCarrierForm .cf-sec-n { margin-left: auto; font-size: 11px; font-weight: 600; color: #64748b; }
#addCarrierForm .cf-sec-n:empty { display: none; }
#addCarrierForm .cf-sec-chev { margin-left: auto; color: #64748b; transition: transform .2s; }
#addCarrierForm .cf-sec-n:not(:empty) + .cf-sec-chev { margin-left: 6px; }
#addCarrierForm .cf-sec.closed .cf-sec-chev { transform: rotate(-90deg); }

/* ── Форма перевізника: компактна сітка на 4 колонки ── */
#addCarrierForm > .modal-body {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px 10px !important;
}
#addCarrierForm .cf-tools,
#addCarrierForm .cf-sec,
#addCarrierForm .form-group:has(#company_name),
#addCarrierForm .form-group:has(#city),
#addCarrierForm .form-group:has(#trailersContainer) { grid-column: span 2 !important; }
#addCarrierForm .cf-tools, #addCarrierForm .cf-sec,
#addCarrierForm .form-group:has(#trailersContainer) { grid-column: 1 / -1 !important; }
#addCarrierForm .form-group:has(#destinations),
#addCarrierForm .form-group:has(#ukraine_directions),
#addCarrierForm .form-group:has(#volume),
#addCarrierForm .form-group:has(#additional) { grid-column: span 2 !important; }
#addCarrierForm .form-group:has(#notes) { grid-column: span 3 !important; }
#addCarrierForm .form-group:has(#carrierRating) { grid-column: span 1 !important; }

#addCarrierForm .form-group { margin: 0 !important; gap: 4px; min-width: 0; }
#addCarrierForm .form-group > label {
    font-size: 11.5px !important; margin-bottom: 3px !important; color: #64748b !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#addCarrierForm .form-group input:not([type=hidden]),
#addCarrierForm .form-group select {
    height: 36px !important; min-height: 36px !important; padding: 6px 10px !important;
    font-size: 13px !important; border-radius: 10px !important;
}
#addCarrierForm .form-group textarea { min-height: 60px !important; font-size: 13px !important; padding: 8px 10px !important; }
#addCarrierForm .country-row { padding: 4px 8px !important; margin-top: 4px !important; }
#addCarrierForm .country-row .input-country-region { height: 30px !important; min-height: 30px !important; }
#addCarrierForm .btn-chip { padding: 4px 9px !important; font-size: 11.5px !important; }
#addCarrierForm .trailer-chips { margin-bottom: 6px !important; }

#addCarrierForm .cf-sec { padding: 6px 10px; margin-top: 6px; border-radius: 10px; font-size: 12.5px; }
#addCarrierForm .cf-tools { margin: -2px 0 -8px; }
#addCarrierForm .cf-coll-all { padding: 5px 10px; font-size: 11.5px; }
#addCarrierForm .modal-footer { padding-top: 10px !important; padding-bottom: 10px !important; }

@media (max-width: 760px) {
    #addCarrierForm > .modal-body { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #addCarrierForm .form-group:has(#notes),
    #addCarrierForm .form-group:has(#destinations),
    #addCarrierForm .form-group:has(#ukraine_directions) { grid-column: 1 / -1 !important; }
}
#addCarrierForm .form-group:has(#volume) > div { display: flex !important; gap: 8px !important; min-width: 0; }
#addCarrierForm .form-group:has(#volume) > div > input { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; }
#addCarrierForm .country-row .input-country-region { padding: 4px 8px !important; }
#addCarrierForm #destinationsContainer, #addCarrierForm #ukraineDirectionsContainer { gap: 4px !important; }

/* ── Картка перевізника: блоки як у формі + швидке редагування ── */
#carrierCardBody .card-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start;
}
#carrierCardBody .card-grid .card-section-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { #carrierCardBody .card-grid { grid-template-columns: 1fr; } }

#carrierCardBody .qe { cursor: text; position: relative; border-radius: 8px; transition: background .12s, box-shadow .12s; }
#carrierCardBody .card-row.qe:hover .card-row-value:not(.qe-on),
#carrierCardBody .qe-block:hover:not(.qe-on) { background: rgba(37, 99, 235, .06); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18); }
#carrierCardBody .card-row.qe .card-row-value { border-radius: 8px; padding: 2px 6px; margin: -2px -6px; min-width: 0; }
#carrierCardBody .qe-block { padding: 4px 6px; margin: 0 -6px 4px; }
#carrierCardBody .card-row.qe:hover .card-row-value:not(.qe-on)::after,
#carrierCardBody .qe-block:hover:not(.qe-on)::after {
    content: "✎"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: #2563eb; opacity: .7;
}
#carrierCardBody .card-row.qe .card-row-value { position: relative; padding-right: 22px; }
#carrierCardBody .qe-add { color: #94a3b8; font-size: 12.5px; }
#carrierCardBody .card-stars .qe-star { cursor: pointer; transition: transform .12s; }
#carrierCardBody .card-stars .qe-star:hover { transform: scale(1.2); color: #f59e0b; }

#carrierCardBody .qe-editor { display: flex; flex-direction: column; gap: 6px; width: 100%; }
#carrierCardBody .qe-inputs { display: flex; gap: 6px; }
#carrierCardBody .qe-inputs > * { flex: 1 1 0; min-width: 0; }
#carrierCardBody .qe-editor input, #carrierCardBody .qe-editor select, #carrierCardBody .qe-editor textarea {
    font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid rgba(37, 99, 235, .45);
    border-radius: 9px; background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); width: 100%;
}
#carrierCardBody .qe-editor textarea { resize: vertical; min-height: 90px; }
#carrierCardBody .qe-actions { display: flex; gap: 6px; justify-content: flex-end; }
#carrierCardBody .qe-actions button {
    border: 0; border-radius: 8px; height: 28px; min-width: 34px; font-weight: 700; cursor: pointer;
}
#carrierCardBody .qe-save { background: #2563eb; color: #fff; }
#carrierCardBody .qe-save:hover { background: #1d4ed8; }
#carrierCardBody .qe-cancel { background: #f1f5f9; color: #475569; }
#carrierCardBody .qe-chips { display: flex; flex-wrap: wrap; gap: 4px; }
#carrierCardBody .qe-chip {
    border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 3px 9px;
    font-size: 11px; font-weight: 600; color: #475569; cursor: pointer;
}
#carrierCardBody .qe-chip.on { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
#carrierCardBody .card-grid > .card-section { margin: 0 !important; }
#carrierCardBody .card-block-text.qe-block { padding: 10px 12px !important; margin: 0 !important; border-radius: 0 0 12px 12px; }
#carrierCardBody .qe-add-btn {
    margin-top: 4px; border: 1px dashed rgba(37, 99, 235, .4); background: rgba(37, 99, 235, .04); color: #2563eb;
    border-radius: 8px; padding: 5px 10px; font: 600 12px/1.2 inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
#carrierCardBody .qe-add-btn:hover { background: rgba(37, 99, 235, .1); }
#carrierCardBody .qe-del { background: #fef2f2; color: #dc2626; margin-right: auto; }
#carrierCardBody .qe-del:hover { background: #fee2e2; }
#carrierCardBody .qe-link { color: #2563eb; text-decoration: none; font-size: 12.5px; word-break: break-all; }
#carrierCardBody .qe-link:hover { text-decoration: underline; }
#carrierCardBody .qe-link-muted { color: #64748b; font-size: 12.5px; word-break: break-all; }
#carrierCardBody .qe-ava { cursor: pointer; position: relative; }
#carrierCardBody .qe-ava:hover::after {
    content: "✎"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .45); color: #fff; border-radius: inherit; font-size: 16px;
}
#carrierCardBody .qe { cursor: default; user-select: text; }
#carrierCardBody .qe-actions .qe-del { margin-right: 0; padding: 0 10px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
#carrierCardBody .qe-actions { justify-content: flex-start; }
/* Директор + місто в одному рядку; фото й профіль — по половині */
#addCarrierForm .form-group:has(#director) { grid-column: span 2 !important; }
#addCarrierForm .form-group:has(#logo_url), #addCarrierForm .form-group:has(#profile_url) { grid-column: span 2 !important; }
/* Кнопка «Копіювати» */
#carrierCardBody .card-row.has-copy .card-row-value { display: flex; align-items: center; gap: 6px; }
#carrierCardBody .qe-copy {
    flex-shrink: 0; width: 24px; height: 24px; border: 1px solid #e2e8f0; background: #fff; border-radius: 7px;
    color: #64748b; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
    transition: background .12s, color .12s, border-color .12s; margin-left: auto;
}
#carrierCardBody .qe-copy:hover { background: #eff6ff; color: #2563eb; border-color: rgba(37, 99, 235, .35); }
#carrierCardBody .qe-copy.done { background: #ecfdf5; color: #059669; border-color: #a7f3d0; }
#carrierCardBody .card-row.has-copy:hover .card-row-value::after { right: 34px; }


/* ================================================================= *
 * GRANDAR — графіт + металеве золото з глянцем (кольори компанії)    *
 * ================================================================= */
:root {
    --gd-gold: linear-gradient(135deg, #fff3c4 0%, #e9c46a 30%, #c9973a 60%, #a8781f 85%, #e6c06a 100%);
    --gd-ink: #2b1d06;
    --f-orange: #c9973a;
    --f-orange-2: #e9c46a;
    --f-blue: #a8781f;
    --f-blue-2: #8f6a1f;
    --f-bg: #f6f4ef;
}
html { background: #f6f4ef; }
body {
    background-image:
        radial-gradient(900px 520px at 92% -6%, rgba(214, 168, 72, .20), transparent 62%),
        radial-gradient(820px 560px at 18% 108%, rgba(120, 134, 134, .18), transparent 64%) !important;
}
html::before {
    background:
        radial-gradient(closest-side, rgba(214, 168, 72, .30), transparent) 0 0 / 46vmax 46vmax no-repeat,
        radial-gradient(closest-side, rgba(120, 134, 134, .26), transparent) 0 0 / 52vmax 52vmax no-repeat,
        radial-gradient(closest-side, rgba(240, 205, 120, .18), transparent) 0 0 / 34vmax 34vmax no-repeat !important;
}

/* Меню зліва: графітове скло + золотий візерунок + золота лінія по краю */
.sidebar.fura-sidebar {
    background:
        radial-gradient(420px 320px at 0% 0%, rgba(240, 205, 120, .22), transparent 70%),
        radial-gradient(360px 300px at 100% 100%, rgba(160, 172, 172, .25), transparent 70%),
        linear-gradient(180deg, rgba(72, 80, 82, .95), rgba(40, 45, 47, .98)) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 140px 120px -120px rgba(255, 255, 255, .10);
    position: relative;
    isolation: isolate;
}
.sidebar.fura-sidebar::before {
    content: "";
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='520' viewBox='0 0 260 520' fill='none' stroke='%23f0cf7a' stroke-linecap='round'%3E%3Cg stroke-width='1' opacity='.6'%3E%3Cpath d='M-20 40 C 40 10 90 70 150 40 S 240 10 290 40'/%3E%3Cpath d='M-20 70 C 40 40 90 100 150 70 S 240 40 290 70'/%3E%3Cpath d='M-20 100 C 40 70 90 130 150 100 S 240 70 290 100'/%3E%3Cpath d='M-20 200 C 60 170 110 240 170 205 S 250 170 290 195'/%3E%3Cpath d='M-20 228 C 60 198 110 268 170 233 S 250 198 290 223'/%3E%3Cpath d='M-20 340 C 30 310 100 370 160 335 S 240 300 290 330'/%3E%3Cpath d='M-20 368 C 30 338 100 398 160 363 S 240 328 290 358'/%3E%3Cpath d='M-20 396 C 30 366 100 426 160 391 S 240 356 290 386'/%3E%3Cpath d='M-20 480 C 50 450 110 510 170 478 S 250 450 290 470'/%3E%3C/g%3E%3Cg fill='%23f6dd9a' stroke='none' opacity='.7'%3E%3Ccircle cx='40' cy='150' r='1.3'/%3E%3Ccircle cx='210' cy='130' r='1.1'/%3E%3Ccircle cx='120' cy='280' r='1.4'/%3E%3Ccircle cx='230' cy='300' r='1'/%3E%3Ccircle cx='60' cy='440' r='1.2'/%3E%3Ccircle cx='190' cy='450' r='1.3'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 260px 520px repeat-y;
    opacity: .2;
}
.sidebar.fura-sidebar::after {
    content: "";
    position: absolute; top: 0; right: 0; bottom: 0; width: 2px; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(240, 205, 120, .9) 20%, #c9973a 50%, rgba(240, 205, 120, .9) 80%, transparent);
    box-shadow: 0 0 14px rgba(240, 205, 120, .7);
}
.fura-brand-name { background: var(--gd-gold); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.fura-brand-icon svg { filter: drop-shadow(0 6px 14px rgba(201, 151, 58, .55)); }
.fura-nav-title { color: rgba(240, 205, 120, .8) !important; letter-spacing: .14em !important; }
.fura-nav-item, .fura-nav-item span { color: #eef0ee; }
.fura-nav-item i, .fura-nav-item svg { color: #f0cd78 !important; }
.fura-nav-item { border-radius: 12px !important; }
.fura-nav-item:hover { background: rgba(214, 168, 72, .16) !important; }
.fura-nav-item.active {
    position: relative; overflow: hidden;
    background: var(--gd-gold) !important;
    border: 1px solid rgba(255, 240, 200, .6);
    color: var(--gd-ink) !important; font-weight: 700 !important;
    box-shadow: 0 10px 24px -10px rgba(201, 151, 58, .9), inset 0 1px 0 rgba(255, 255, 255, .4) !important;
}
.fura-nav-item.active span, .fura-nav-item.active i, .fura-nav-item.active svg { color: var(--gd-ink) !important; }
.sidebar-toggle-btn, #sidebarToggleBtn {
    background: #3a4244 !important; border: 1px solid rgba(214, 168, 72, .55) !important; color: #f6e3b0 !important;
}

/* Глянець: світлий відблиск зверху на золоті */
.fura-nav-item.active::after, .btn-primary::after, .btn-card-edit::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08));
    border-radius: inherit;
}

/* Головні кнопки — металеве золото з темним текстом */
.btn-primary, .btn-card-edit, .ld-btn-main, .eq-mtop .eq-ok, .req-chat-send {
    position: relative; overflow: hidden;
    background: var(--gd-gold) !important;
    border: 1px solid rgba(255, 240, 200, .7) !important;
    color: var(--gd-ink) !important; font-weight: 700 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
    box-shadow: 0 10px 24px -12px rgba(201, 151, 58, .9), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}
.btn-primary i, .btn-card-edit i, .ld-btn-main i { color: var(--gd-ink) !important; }
.btn-primary:hover:not(:disabled), .btn-card-edit:hover, .ld-btn-main:hover, .req-chat-send:hover:not(:disabled) {
    filter: brightness(1.05) saturate(1.08);
    box-shadow: 0 14px 28px -12px rgba(201, 151, 58, 1), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}
.card-rating-badge { background: var(--gd-gold) !important; color: var(--gd-ink) !important; }

/* Золоті рамки, шапки таблиць, вкладки, заголовок */
.table-card, .lead-tabs, #carrierCardBody .card-section {
    border: 1px solid rgba(214, 168, 72, .28) !important;
}
.table-card { box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 12px 30px -18px rgba(201, 151, 58, .45) !important; }
.table-card thead th { background: linear-gradient(180deg, rgba(240, 205, 120, .16), rgba(240, 205, 120, .06)) !important; color: #8f6a1f !important; }
.lead-tabs .active, .lead-tab.active { color: #8f6a1f !important; border-bottom-color: #c9973a !important; }
.page-title, .main-content h1 {
    background: linear-gradient(90deg, #1f2a2c 0%, #1f2a2c 40%, #c9973a 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
#gsInput, .gs-input { border-color: rgba(214, 168, 72, .45) !important; }
#carrierCardBody .card-section-title { border-bottom-color: rgba(214, 168, 72, .25) !important; }
.carrier-card-modal { box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45), 0 0 0 1px rgba(240, 205, 120, .45) !important; }
.quick-card:hover, .home-section:hover, .kpi:hover, .eq-kpi:hover, .rop-kpi:hover {
    box-shadow: 0 0 0 1px rgba(201, 151, 58, .35), 0 12px 30px -14px rgba(201, 151, 58, .45) !important;
}

/* ================================================================= *
 * 3D-логотип FURA з анімацією + легкі анімації по всій FURA          *
 * ================================================================= */
.fura-brand { perspective: 500px; }
.fura-brand-icon {
    position: relative;
    width: 42px !important; height: 42px !important; border-radius: 12px !important;
    transform-style: preserve-3d;
    transform: rotateX(12deg) rotateY(-18deg);
    /* «товщина» золотої плитки — шари тіні дають об'єм */
    box-shadow:
        1px 1px 0 #b8862e, 2px 2px 0 #a8781f, 3px 3px 0 #96691a, 4px 4px 0 #7f5915,
        8px 12px 18px -4px rgba(0, 0, 0, .55), 0 0 22px rgba(240, 205, 120, .35) !important;
    animation: fl-float 6s ease-in-out infinite;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.fura-brand-icon svg { display: block; width: 42px; height: 42px; filter: none !important; }
/* відблиск, що пробігає по золоту */
.fura-brand-icon::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .75) 48%, transparent 62%) -150% 0 / 250% 100% no-repeat;
    animation: fl-shine 5s ease-in-out infinite;
}
.fl-wheel { transform-box: view-box; animation: fl-spin 1.4s linear infinite; }
.fl-truck { animation: fl-bump .7s ease-in-out infinite; }
.fl-speed path { stroke-dasharray: 8 8; animation: fl-dash 1s linear infinite; }
.fl-road { animation: fl-road .8s linear infinite; }
.fura-brand:hover .fura-brand-icon { transform: rotateX(0) rotateY(0) scale(1.08); animation-play-state: paused; }
.fura-brand:hover .fl-wheel { animation-duration: .45s; }
.fura-brand:hover .fl-road { animation-duration: .3s; }
.fura-brand-name {
    background: linear-gradient(100deg, #c9973a 0%, #fff3c4 20%, #e9c46a 40%, #a8781f 60%, #e9c46a 80%, #fff3c4 100%) 0 0 / 250% 100% !important;
    -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important;
    animation: fl-text 8s linear infinite;
    text-shadow: none;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
@keyframes fl-float { 0%, 100% { transform: rotateX(12deg) rotateY(-18deg) translateY(0); } 50% { transform: rotateX(6deg) rotateY(-6deg) translateY(-2px); } }
@keyframes fl-shine { 0%, 55% { background-position: -150% 0; } 85%, 100% { background-position: 150% 0; } }
@keyframes fl-spin { to { transform: rotate(360deg); } }
@keyframes fl-bump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.6px); } }
@keyframes fl-dash { to { stroke-dashoffset: 16; } }
@keyframes fl-road { to { stroke-dashoffset: 12; } }
@keyframes fl-text { to { background-position: -250% 0; } }

/* Меню: пункт трохи «їде» при наведенні, активний золотий переливається */
.fura-nav-item { transition: background .2s, transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s !important; }
.fura-nav-item:hover:not(.active) { transform: translateX(4px); }
.fura-nav-item:hover i, .fura-nav-item:hover svg { transform: scale(1.12); transition: transform .2s; }
.fura-nav-item.active { background-size: 200% 100% !important; animation: gd-flow 6s ease-in-out infinite; }
@keyframes gd-flow { 0%, 100% { background-position: 0 0; } 50% { background-position: 100% 0; } }

/* Золоті кнопки: блиск пробігає при наведенні, легке «натискання» */
.btn-primary::before, .btn-card-edit::before, .ld-btn-main::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .75), transparent);
    transform: skewX(-18deg);
}
.btn-primary:hover::before, .btn-card-edit:hover::before, .ld-btn-main:hover::before { animation: gd-sweep .75s ease; }
.btn-primary:active, .btn-card-edit:active { transform: translateY(1px) scale(.98); }
@keyframes gd-sweep { to { left: 120%; } }

/* Рядки таблиць з'являються каскадом, картки трохи піднімаються при наведенні */
.table-card tbody tr { animation: gd-row .32s cubic-bezier(.2, .8, .2, 1) both; }
.table-card tbody tr:nth-child(2) { animation-delay: .02s; } .table-card tbody tr:nth-child(3) { animation-delay: .04s; }
.table-card tbody tr:nth-child(4) { animation-delay: .06s; } .table-card tbody tr:nth-child(5) { animation-delay: .08s; }
.table-card tbody tr:nth-child(6) { animation-delay: .10s; } .table-card tbody tr:nth-child(7) { animation-delay: .12s; }
.table-card tbody tr:nth-child(8) { animation-delay: .14s; } .table-card tbody tr:nth-child(n+9) { animation-delay: .16s; }
@keyframes gd-row { from { opacity: 0; transform: translateY(6px); } }
.table-card tbody tr { transition: background .15s, box-shadow .15s; }
.table-card tbody tr:hover { box-shadow: inset 3px 0 0 #c9973a; }
#carrierCardBody .card-section, .quick-card, .home-section, .kpi, .eq-kpi, .rop-kpi { transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.quick-card:hover, .home-section:hover, .kpi:hover, .eq-kpi:hover, .rop-kpi:hover { transform: translateY(-3px); }
/* золоте підкреслення активної вкладки «виїжджає» */
.lead-tab.active { animation: gd-tab .35s ease both; }
@keyframes gd-tab { from { box-shadow: inset 0 -3px 0 rgba(201, 151, 58, 0); } to { box-shadow: inset 0 -3px 0 rgba(201, 151, 58, .0); } }

@media (prefers-reduced-motion: reduce) {
    .fura-brand-icon, .fura-brand-icon::after, .fl-wheel, .fl-truck, .fl-speed path, .fl-road, .fura-brand-name,
    .fura-nav-item.active, .table-card tbody tr, .lead-tab.active { animation: none !important; }
}

/* ================================================================= *
 * Логотип Грандар «GD» — 3D, поява, блиск, сяйво, нахил за мишкою    *
 * ================================================================= */
.gd-logo { display: inline-block; position: relative; perspective: 600px; cursor: pointer; line-height: 0; flex-shrink: 0; }
.gd-logo::before {
    content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(240, 205, 120, .55), rgba(233, 196, 106, .18) 60%, transparent);
    filter: blur(8px); animation: gd-glow 4s ease-in-out infinite;
}
.gd-tilt {
    display: block; transform-style: preserve-3d;
    transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -14deg));
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    animation: gd-float 6s ease-in-out infinite;
}
.gd-logo:hover .gd-tilt { animation-play-state: paused; }
.gd-tilt svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 10px 14px rgba(43, 49, 51, .35)); }
.gd-logo:not(.gd-go) .gd-g, .gd-logo:not(.gd-go) .gd-d, .gd-logo:not(.gd-go) .gd-depth { opacity: 0; }
.gd-go .gd-g { animation: gd-in-g 1s cubic-bezier(.2, .9, .25, 1.15) both; transform-box: fill-box; transform-origin: center; }
.gd-go .gd-d { animation: gd-in-d 1s cubic-bezier(.2, .9, .25, 1.15) .12s both; transform-box: fill-box; transform-origin: center; }
.gd-go .gd-depth { animation: gd-fade .6s ease .7s both; }
.gd-shine { animation: gd-shine 5.5s ease-in-out 1.2s infinite; }
.gd-logo.gd-spin .gd-tilt { animation: gd-spin 1s cubic-bezier(.4, 0, .2, 1); }
@keyframes gd-in-g { from { opacity: 0; transform: translateX(-28%) rotate(-12deg) scale(.85); } }
@keyframes gd-in-d { from { opacity: 0; transform: translateX(28%) rotate(10deg) scale(.85); } }
@keyframes gd-fade { from { opacity: 0; } }
@keyframes gd-shine { 0%, 50% { transform: skewX(-20deg) translateX(0); } 80%, 100% { transform: skewX(-20deg) translateX(1100px); } }
@keyframes gd-float {
    0%, 100% { transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -14deg)) translateY(0); }
    50% { transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, 8deg)) translateY(-3px); }
}
@keyframes gd-glow { 0%, 100% { opacity: .55; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes gd-spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .gd-logo::before, .gd-tilt, .gd-g, .gd-d, .gd-depth, .gd-shine { animation: none !important; }
}

/* Головна: привітання з'являється плавно, заголовок — золотий перелив */
.home-hero h1#homeGreeting { animation: gd-hello .7s cubic-bezier(.2, .8, .2, 1) .25s both; }
.home-date { animation: gd-hello .7s cubic-bezier(.2, .8, .2, 1) .4s both; }
@keyframes gd-hello { from { opacity: 0; transform: translateX(-10px); } }
.home-block { animation: gd-row .5s cubic-bezier(.2, .8, .2, 1) both; }
.home-block:nth-of-type(2) { animation-delay: .08s; } .home-block:nth-of-type(3) { animation-delay: .16s; }
.home-block:nth-of-type(4) { animation-delay: .24s; } .home-block:nth-of-type(n+5) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .home-hero h1#homeGreeting, .home-date, .home-block { animation: none !important; } }

.home-company-logo.gd-logo { width: 96px; }

/* ================================================================= *
 * Перехід між сторінками: меню зліва стоїть на місці,                *
 * оновлюється лише робоча частина                                    *
 * ================================================================= */
@view-transition { navigation: auto; }
aside.sidebar { view-transition-name: fura-sidebar; }
#sidebarToggleBtn { view-transition-name: fura-sidebar-btn; }
::view-transition-group(fura-sidebar), ::view-transition-group(fura-sidebar-btn) { animation: none; }
::view-transition-old(fura-sidebar), ::view-transition-old(fura-sidebar-btn) { display: none; }
::view-transition-new(fura-sidebar), ::view-transition-new(fura-sidebar-btn) { animation: none; }
::view-transition-old(root) { animation: gd-vt-out .16s ease both; }
::view-transition-new(root) { animation: gd-vt-in .22s ease both; }
@keyframes gd-vt-out { to { opacity: 0; } }
@keyframes gd-vt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* Поки робоча частина вантажиться — меню зліва вже видно, заставка лише справа */
@media (min-width: 901px) {
    body:not([style*="visible"]) aside.sidebar,
    body:not([style*="visible"]) aside.sidebar *:not([hidden]),
    body:not([style*="visible"]) #sidebarToggleBtn { visibility: visible; }
    body:not([style*="visible"])::before {
        left: 250px;
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .65) 50%, rgba(255, 255, 255, 0) 100%) -60% 0 / 40% 100% no-repeat,
            linear-gradient(#ece6d8, #ece6d8) 32px 96px / 260px 30px no-repeat,
            linear-gradient(#f1ece1, #f1ece1) 32px 150px / calc(100% - 64px) 44px no-repeat,
            linear-gradient(#fff, #fff) 32px 214px / calc(100% - 64px) calc(100% - 250px) no-repeat,
            var(--f-bg, #f6f4ef);
        animation: gd-shimmer 1.3s ease-in-out infinite;
    }
    body.sidebar-collapsed:not([style*="visible"])::before { left: 0; }
    body:not([style*="visible"])::after { left: 250px; width: calc(100% - 250px); }
}
@keyframes gd-shimmer { to { background-position: 160% 0, 32px 96px, 32px 150px, 32px 214px, 0 0; } }
/* Доки FURA не побудувала меню — показуємо графітову заготовку, а не стару HTML-версію меню */
aside.sidebar:not(.fura-sidebar) {
    visibility: visible !important;
    background: linear-gradient(180deg, #485052, #282d2f) !important;
    width: 250px; min-width: 250px; padding: 0 !important; border-right: 1px solid rgba(214, 168, 72, .4);
}
aside.sidebar:not(.fura-sidebar) * { visibility: hidden !important; }
body.sidebar-collapsed aside.sidebar:not(.fura-sidebar) { width: 0; min-width: 0; }
@media (max-width: 900px) { aside.sidebar:not(.fura-sidebar) { visibility: hidden !important; } }

/* Клієнт колеги: контакти приховані */
.lead-locked { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #8a7a5c; background: #f7f1e3; border: 1px dashed #d9c79c; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.lead-lock-ic { color: #b39a6a; font-size: 17px; }
.lead-locked-note { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 10px 14px; border-radius: 12px; background: #fbf5e8; border: 1px solid #efdcb0; color: #6b5420; font-size: 13px; }
.lead-locked-note i { font-size: 18px; color: #b8862e; }

/* Без розмиття «скла» на великих блоках — плавна прокрутка на слабких комп'ютерах (Safari / Iris Pro).
   Розмиття лишається тільки у випадаючих списків і спливаючих вікон. */
.table-card, .trip-detail, .card-section, .card-header-block,
.home-hero, .quick-card, .home-section, .kpi, .eq-kpi, .rep-card, .rop-kpi, .rop-task,
.lead-tabs, .trip-chips, .gd-card, .gd-lead, .gd-faq, .trip-card,
.search-input, .btn-secondary, .lead-select, .fura-topbar, .topbar, .page-header, .filters-panel, .filter-bar,
.cm-panel, .pa-reg, #requestCardBody .card-section, .eq-views, .eq-search input, .eq-filters-toggle, .fh-fab,
.carrier-card-topbar, #carrierCardBody .card-header-block, #carrierCardBody .card-section, #carrierCardBody .cm-coll,
.sidebar.fura-sidebar, .eq-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
body, html { background-attachment: scroll !important; }

/* Кнопка «Копіювати» біля номера телефону в картці перевізника */
#carrierCardBody .phone-line { display: inline-flex; align-items: center; gap: 4px; }
#carrierCardBody .qe-copy.qe-copy-phone { margin-left: 4px; width: 22px; height: 22px; font-size: 13px; vertical-align: middle; }

/* ===== Лічильники в меню (Пошта — непрочитані, Запити — чекають на вас) ===== */
.fura-nav-item { position: relative; }
.fura-nav-badge {
    margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
    background: #e5484d; color: #fff !important; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
    box-shadow: 0 2px 8px rgba(229, 72, 77, .45); font-style: normal;
}
.fura-nav-item.active .fura-nav-badge { background: #b4232a; }
.fura-nav-badge.nb-green { background: #10b981; box-shadow: 0 2px 8px rgba(16, 185, 129, .45); }
.fura-nav-item.active .fura-nav-badge.nb-green { background: #059669; }
.fura-nav-badge.nb-red + .fura-nav-badge.nb-green { margin-left: 4px; }

/* ===== Згорнуте меню: лишаються значки (як у Lardi), стрілка розгортає назад ===== */
@media (min-width: 901px) {
    body.sidebar-collapsed .sidebar.fura-sidebar {
        width: 76px !important; min-width: 76px !important; padding: 22px 10px 14px !important;
        opacity: 1 !important; overflow-x: hidden !important; overflow-y: auto !important;
    }
    body.sidebar-collapsed aside.sidebar:not(.fura-sidebar) { width: 76px; min-width: 76px; }
    body.sidebar-collapsed .fura-brand { justify-content: center; padding: 0; gap: 0; }
    body.sidebar-collapsed .fura-brand-name,
    body.sidebar-collapsed .fura-nav-item > span,
    body.sidebar-collapsed .fura-user-text,
    body.sidebar-collapsed .fura-logout,
    body.sidebar-collapsed .fura-nav-caret { display: none !important; }
    body.sidebar-collapsed .fura-nav-title { font-size: 0 !important; height: 1px; padding: 0 !important; margin: 4px 8px 10px; background: rgba(240, 205, 120, .25); }
    body.sidebar-collapsed .fura-nav-group + .fura-nav-group { margin-top: 12px; }
    body.sidebar-collapsed .fura-nav-item { justify-content: center; padding: 11px 0 !important; gap: 0; }
    body.sidebar-collapsed .fura-nav-item > i, body.sidebar-collapsed .fura-nav-item > svg { font-size: 22px; margin: 0; }
    body.sidebar-collapsed .fura-nav-badge {
        position: absolute; top: 3px; right: 3px; margin: 0; min-width: 18px; height: 17px; padding: 0 5px; font-size: 10.5px; line-height: 17px;
    }
    body.sidebar-collapsed .fura-nav-badge.nb-green { top: auto; bottom: 3px; margin: 0 !important; }
    body.sidebar-collapsed .fura-user { justify-content: center; padding-left: 0; padding-right: 0; }
    body.sidebar-collapsed .sidebar-toggle-btn, body.sidebar-collapsed #sidebarToggleBtn { left: 62px !important; }
    body.sidebar-collapsed:not([style*="visible"])::before { left: 76px; }
}

/* ===== Кнопка «Скинути фільтри» ===== */
.fura-reset-filters {
    display: inline-flex; align-items: center; gap: 5px; flex: none; height: 36px; padding: 0 12px;
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #9ca3af;
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.fura-reset-filters i { font-size: 16px; }
.fura-reset-filters.on { color: #b42318; border-color: #f5c2c0; background: #fff5f5; }
.fura-reset-filters.on:hover { background: #fee4e2; }
.fura-reset-filters:not(.on) { cursor: default; opacity: .75; }
.an-filters .fura-reset-filters, .cm-filters .fura-reset-filters { align-self: flex-end; }

/* ===== Шапка сторінки в один рядок: назва — пошук і фільтри — кнопка ===== */
.top-bar.fura-onebar { flex-wrap: nowrap; gap: 16px; margin-bottom: 12px !important; }
.top-bar.fura-onebar h1 { margin: 0 !important; flex: none; font-size: 26px; line-height: 1.1; }
.top-bar.fura-onebar > .filters-bar { flex: 1 1 auto; min-width: 0; margin: 0 !important; display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.top-bar.fura-onebar > .filters-bar .search-input { flex: 1 1 auto; min-width: 140px; height: 40px; margin: 0; box-sizing: border-box; }
.top-bar.fura-onebar > .filters-bar .lead-select { flex: 0 1 auto; height: 40px; max-width: 190px; padding: 0 10px; }
.top-bar.fura-onebar > .btn { flex: none; white-space: nowrap; }
@media (max-width: 900px) {
    .top-bar.fura-onebar { flex-wrap: wrap; gap: 10px; }
    .top-bar.fura-onebar > .filters-bar { order: 3; flex-basis: 100%; flex-wrap: wrap; }
}
.top-bar.fura-onebar > .filters-bar .search-input { min-width: 200px; }
.top-bar.fura-onebar > .filters-bar .lead-select { max-width: 165px; }
@media (min-width: 901px) and (max-width: 1500px) {
    .fura-onebar .fura-reset-filters span { display: none; }
    .fura-onebar .fura-reset-filters { width: 40px; padding: 0; justify-content: center; }
    .fura-onebar .fura-reset-filters::after { content: "✕"; font-size: 12px; margin-left: -2px; }
}

/* Перевізники й Ліди: інструменти в шапці */
.top-bar.fura-onebar > .carriers-tools { justify-content: flex-end; }
.top-bar.fura-onebar > .fura-cols-bar { margin: 0 !important; padding: 0 !important; flex: none; pointer-events: auto; }
.top-bar.fura-onebar .fura-cols-btn { height: 40px; white-space: nowrap; }
.top-bar.fura-onebar .cm-open { height: 40px; white-space: nowrap; flex: none; }
.top-bar.fura-onebar > .filters-bar .lead-toggle { flex: none; white-space: nowrap; font-size: 13px; }
.top-bar.fura-onebar h1 { white-space: nowrap; }
/* Ліди: фільтрів багато — якщо не вміщаються, переносяться всередині шапки */
.top-bar.fura-onebar > .lead-filters { flex-wrap: wrap; row-gap: 6px; }
.top-bar.fura-onebar > .lead-filters .search-input { flex: 1 1 220px; }
.top-bar.fura-onebar > .lead-filters .lead-select { max-width: 150px; }
@media (min-width: 901px) and (max-width: 1500px) {
    .top-bar.fura-onebar .fura-cols-btn { font-size: 0; width: 40px; padding: 0; justify-content: center; }
    .top-bar.fura-onebar .fura-cols-btn i { font-size: 18px; }
    .top-bar.fura-onebar .fura-cols-btn .fura-cols-count { font-size: 11px; }
}

/* ===== Перемикач «рядками / квадратиками» ===== */
.fura-view { display: inline-flex; flex: none; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; }
.fura-view button { width: 38px; height: 36px; border: 0; background: none; color: #6b7280; font-size: 18px; cursor: pointer; display: grid; place-items: center; }
.fura-view button + button { border-left: 1px solid #e5e7eb; }
.fura-view button.on { background: #fdf3d8; color: #7a5410; }

/* ===== Запити квадратиками (на комп'ютері; на телефоні й так картки) ===== */
@media (min-width: 901px) {
    .table-card.fura-tiles table { display: block; width: 100% !important; min-width: 0 !important; table-layout: auto !important; }
    /* шапка з фільтрами лишається — як смужка зверху */
    .table-card.fura-tiles thead { display: block; position: sticky; top: 0; z-index: 20; background: #fbf6ec; box-shadow: 0 6px 12px -8px rgba(15, 23, 42, .18); }
    .table-card.fura-tiles thead tr { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 12px; }
    .table-card.fura-tiles thead th { display: block; width: auto !important; min-width: 0 !important; padding: 2px 0 !important; border: 0 !important; background: none !important; }
    .table-card.fura-tiles thead th:first-child, .table-card.fura-tiles thead th:last-child { display: none; }
    .table-card.fura-tiles tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; padding: 12px; }
    .table-card.fura-tiles tbody tr { display: flex; flex-direction: column; position: relative; border: 1px solid var(--f-line, #e4e8ef); border-radius: 14px; padding: 12px 14px 10px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); cursor: pointer; }
    .table-card.fura-tiles tbody tr:hover { box-shadow: 0 8px 22px -12px rgba(15, 23, 42, .3); }
    .table-card.fura-tiles tbody td {
        display: block; position: relative !important; width: auto !important; min-width: 0 !important; max-width: none !important;
        padding: 3px 0 3px 104px !important; border: none !important; background: transparent !important; box-shadow: none !important;
        text-align: left !important; white-space: normal !important; height: auto !important; font-size: 13px;
    }
    .table-card.fura-tiles tbody td[data-label]:not([data-label=""])::before {
        content: attr(data-label); position: absolute; left: 0; top: 6px; width: 98px;
        font-size: 10.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--f-muted, #6b7280);
    }
    .table-card.fura-tiles tbody td:not([data-label]), .table-card.fura-tiles tbody td[data-label=""] { padding-left: 0 !important; }
    /* № — у куті; клієнт — великим заголовком */
    .table-card.fura-tiles tbody td:first-child { position: absolute !important; top: 10px; right: 12px; padding: 0 !important; font-size: 12px; color: #9ca3af; }
    .table-card.fura-tiles tbody td:first-child::before { display: none; }
    .table-card.fura-tiles tbody td:nth-child(2) { padding: 0 34px 6px 0 !important; font-size: 15px; font-weight: 700; }
    .table-card.fura-tiles tbody td:nth-child(2)::before { display: none; }
    .table-card.fura-tiles tbody td:last-child { margin-top: auto; padding: 8px 0 0 !important; border-top: 1px solid #f1f5f9 !important; text-align: right !important; }
    .table-card.fura-tiles tbody td:last-child::before { display: none; }
    /* Клієнти: № немає — перша колонка і є назва */
    .table-card.fura-tiles[data-title-col="0"] tbody td:first-child { position: relative !important; top: auto; right: auto; padding: 0 34px 6px 0 !important; font-size: 15px; font-weight: 700; color: inherit; }
    .table-card.fura-tiles[data-title-col="0"] tbody td:nth-child(2) { padding: 3px 0 3px 104px !important; font-size: 13px; font-weight: 400; }
    .table-card.fura-tiles[data-title-col="0"] tbody td:nth-child(2)::before { display: block; }
    .table-card.fura-tiles tbody tr.ff-hidden { display: none !important; }
    /* колір стану — смужкою зліва */
    .table-card.fura-tiles tbody tr.rq-c-fresh { border-left: 4px solid #cbd5e1; }
    .table-card.fura-tiles tbody tr.rq-c-red { border-left: 4px solid #ef4444; }
    .table-card.fura-tiles tbody tr.rq-c-green { border-left: 4px solid #10b981; }
    .table-card.fura-tiles tbody tr.rq-c-gold { border-left: 4px solid #d9a944; }
}
@media (max-width: 900px) { .fura-view { display: none; } }
@media (min-width: 901px) {
    .table-card.fura-tiles[data-title-col="0"] thead th:first-child { display: block; }
    .table-card.fura-tiles tbody td[data-label]:not([data-label=""])::before { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .table-card.fura-tiles thead .fura-col-resize, .table-card.fura-tiles thead [class*="resize"] { display: none !important; }
}

/* ===== Групи меню згортаються («Довідники», «Система» — згорнуті за замовчуванням) ===== */
.fura-grp-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; border-radius: 8px; }
.fura-grp-toggle:hover { color: #f0cd78 !important; }
.fura-grp-caret { font-size: 15px; margin-left: auto; margin-right: 6px; transition: transform .2s ease; opacity: .8; }
.fura-grp-closed .fura-grp-caret { transform: rotate(-90deg); }
.fura-grp-closed > :not(.fura-nav-title) { display: none !important; }
/* меню, згорнуте до значків, показує всі значки */
@media (min-width: 901px) {
    body.sidebar-collapsed .fura-grp-closed > a.fura-nav-item:not([hidden]) { display: flex !important; }
    body.sidebar-collapsed .fura-grp-closed > .fura-nav-branch { display: block !important; }
    body.sidebar-collapsed .fura-grp-caret { display: none; }
}

.card-lardi-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 3px 9px; border-radius: 8px; background: #eef6f4; color: #2f5d55; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.card-lardi-badge:hover { background: #dcefeb; }

/* Картка перевізника: щільна сітка (висоту рядків задає script.js) */
#carrierCardBody .card-grid.cc-masonry { grid-auto-rows: 4px; row-gap: 0 !important; align-items: start; }
#carrierCardBody .card-grid.cc-masonry > * { margin-bottom: 12px !important; }

/* Перевізники: «липка» шапка таблиці не просвічує — рядки під нею не видно */
#tableScrollArea:not(.fura-tiles) thead th { background: #fbf6ec !important; }

/* Останній відкритий перевізник — помітно: золота смужка й тло; щойно змінений — ще й ✏️ */
tr.carrier-last > td { background: #fff7e3 !important; }
tr.carrier-last > td:first-child { box-shadow: inset 5px 0 0 #d9a944 !important; position: relative; }
tr.carrier-last { outline: 2px solid rgba(217, 169, 68, .55) !important; outline-offset: -2px; }
tr.carrier-last > td:first-child::after { content: "👁"; display: block; font-size: 12px; line-height: 1; margin-top: 4px; opacity: .8; }
tr.carrier-edited > td:first-child::after { content: "✏️"; }
tr.carrier-edited > td { background: #fff1cc !important; }
tr.row-flash > td { animation: d-row-flash-gold 2.4s ease-out; }
@keyframes d-row-flash-gold { 0%, 35% { background: #ffe39a; } 100% { background: #fff7e3; } }

/* Позначка «бот перевірив у Lardi» у списку перевізників */
.lardi-chk { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 1.5; vertical-align: middle; white-space: nowrap; cursor: help; }
.lardi-chk-ok { background: #e7f6ee; color: #15803d; }
.lardi-chk-no { background: #f1f5f9; color: #94a3b8; }

.lardi-chk-filter { height: 40px; padding: 0 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font: inherit; font-size: 13px; color: #374151; cursor: pointer; }
.lardi-chk-filter:not([value=""]) { }
.lardi-chk-filter.on { border-color: #86efac; background: #f0fdf4; color: #15803d; font-weight: 600; }

/* Перевізники «квадратиками»: фото + назва зверху, далі поля з підписами */
.table-card.fura-tiles[data-title-col="3"] tbody td:nth-child(2) { position: absolute !important; top: 12px; left: 14px; padding: 0 !important; font-size: 13px; font-weight: 400; }
.table-card.fura-tiles[data-title-col="3"] tbody td:nth-child(2) img, .table-card.fura-tiles[data-title-col="3"] tbody td:nth-child(2) > * { width: 38px !important; height: 38px !important; }
.table-card.fura-tiles[data-title-col="3"] tbody td:nth-child(4) { order: -1; min-height: 44px; padding: 0 34px 8px 50px !important; font-size: 14px; }
.table-card.fura-tiles[data-title-col="3"] tbody td:nth-child(4)::before { display: none !important; }
.table-card.fura-tiles[data-title-col="3"] tbody td:nth-child(4) strong { font-size: 14.5px; }
.table-card.fura-tiles[data-title-col="3"] thead th:nth-child(2) { display: none; }

/* 🌐 Перекладач — кнопка у верхній панелі біля дзвіночка */
.fura-tr-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; margin-left: auto; border: 1px solid var(--f-line, #e4e8ef); border-radius: 10px; background: #fff; font-size: 18px; text-decoration: none; }
.fura-tr-btn + .fura-bell { margin-left: 8px !important; }
.fura-tr-btn:hover, .fura-tr-btn.on { border-color: #d9a944; background: #fdf6e3; }
