/* ====== БАЗА / ФОН ====== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100vw;              /* фикс по ширине окна */
    max-width: 100vw;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #F5F7FA;
    color: #111827;
    overflow-x: hidden !important;  /* железно вырубаем горизонтальный скролл страницы */
}

/* ---- Транспорт: фильтр ---- */

.filter-card {
    margin-top: 8px;
    padding: 18px 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
}

/* ряд с датами / машиной / кнопкой */
.transport-filter-row {
    display: flex;
    flex-wrap: wrap;           /* ← главное: позволяем переноситься на новую строку */
    gap: 16px;
    align-items: flex-end;
}

/* каждая группа (С, По, Машина) */
.transport-filter-row .filter-group {
    flex: 1 1 180px;           /* тянется, но может сжаться */
    min-width: 160px;          /* меньше этого не даём ужиматься */
}

/* кнопка */
.transport-filter-actions {
    display: flex;
    flex: 0 0 180px;           /* фиксированный столбец с кнопкой */
    align-items: flex-end;
    justify-content: flex-end;
}

/* инпуты во всю ширину своей колонки */
.transport-filter-row .field-input {
    width: 100%;
}

/* поле подписей */
.field-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

/* на узких экранах всё падает столбиком вниз, как ты и хочешь */
@media (max-width: 900px) {
    .transport-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .transport-filter-row .filter-group {
        flex: 1 1 auto;
        min-width: 0;
    }

    .transport-filter-actions {
        flex: 1 1 auto;
        justify-content: center;
        width: 100%;
    }

    .transport-filter-actions .btn-primary {
        width: 100%;
        max-width: 260px;
        margin: 4px auto 0;
    }
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #F5F7FA; /* светлый фон как у Ozon */
    color: #111827; /* тёмный цвет текста */
    overflow-x: hidden; /* чтобы страница не была шире экрана */
}

/* Оболочка приложения */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====== TOPBAR ====== */

.topbar {
    height: 56px;
    padding: 0 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    max-width: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    min-width: 0;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.logo-main {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo-separator {
    opacity: 0.5;
}

.logo-sub {
    opacity: 0.8;
    white-space: nowrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
}

.chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.chip-ghost {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
}

.chip-outline {
    background: rgba(15, 23, 42, 0.3);
    border-color: rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
}

/* ====== MAIN LAYOUT ====== */

.main {
    flex: 1 1 auto;
    padding: 24px;
    background-color: #F5F7FA; /* светлый фон как у Ozon */
    color: #111827; /* тёмный цвет текста */
}

.main-inner {
    max-width: 1230px;
    margin: 0 auto 40px;
    width: 100%;
}

/* ====== CARD / SECTION ====== */

.section-card {
    background: rgba(248, 250, 252, 0.98);
    border-radius: 24px;
    padding: 24px 28px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.45),
        0 0 0 1px rgba(148, 163, 184, 0.25);
    margin-bottom: 20px;
    backdrop-filter: blur(18px);
    max-width: 100%;
}

/* Заголовок */

.card-header {
    margin-bottom: 18px;
}

.main-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: #020617;
}

.main-subtitle {
    font-size: 13px;
    color: #6b7280;
}

/* ====== ФИЛЬТР ПО ДАТЕ ====== */

.filter-card {
    margin-top: 8px;
    padding: 18px 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) repeat(2, minmax(0, 1.2fr)) auto;
    gap: 16px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.filter-caption {
    font-size: 12px;
    color: #6b7280;
    max-width: 520px;
}

.field-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.field-input {
    margin-top: 4px;
    width: 90%;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 0 14px;
    text-align: center;
    font-size: 13px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2),
                0 0 0 6px rgba(37, 99, 235, 0.08);
}

.filter-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ====== BUTTONS ====== */

.btn {
    border-radius: 12px; /* ← теперь как у Ozon */
    padding: 0 18px;
    height: 44px;

    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-primary {
    color: #ffffff;
    background: #2563eb; /* насыщенный синий */
    border-color: #1d4ed8;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(29, 78, 216, 0.4);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(29, 78, 216, 0.5);
}

.btn-ghost {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #111827;
}

.btn-ghost:hover {
    background: #e5e7eb;
}

/* ====== OZON / WB SECTION ====== */

.section-header {
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #020617;
}

.section-caption {
    font-size: 12px;
    color: #6b7280;
}

/* ====== TABS ====== */

.tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    margin-bottom: 14px;

    width: 100%;
    max-width: 100%;
    overflow-x: auto;             /* если вкладки не влезли — скролл внутри */
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    position: relative;
    padding: 6px 18px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
}

.tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.tab-btn-secondary {
    font-weight: 500;
}

/* Панели вкладок */

.tabs-content {
    margin-top: 6px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ====== PANELS / METRICS ====== */

.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.panel-note {
    font-size: 12px;
    color: #9ca3af;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.metric-card {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.metric-label {
    font-size: 11px;
    color: #6b7280;
}

.metric-value {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.metric-value-main {
    color: #16a34a;
}

.cell-neg {
    color: #ff4d4f;       /* красный */
    font-weight: 600;
}

/* положительные значения */
.cell-pos {
    color: #0d8f44;       /* зелёный Ozon style */
    font-weight: 600;
}

.metric-caption {
    margin-top: 2px;
    font-size: 11px;
    color: #9ca3af;
}

/* ====== Супер-плашки итогов транспорта ====== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.summary-card {
    position: relative;
    padding: 16px 18px;
    border-radius: 22px;
    color: #ffffff;
    overflow: hidden;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.22),
        0 0 0 1px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    backdrop-filter: blur(18px);
}

.summary-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    opacity: 0.25;
    background: radial-gradient(circle, rgba(255,255,255,0.9), transparent 70%);
}

.summary-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.summary-value {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.summary-sub {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.9;
}

/* Цвета под референсы */

.summary-card-blue {
    background: linear-gradient(145deg, #1d4ed8, #60a5fa);
}

.summary-card-purple {
    background: linear-gradient(145deg, #7c3aed, #ec4899);
}

.summary-card-orange {
    background: linear-gradient(145deg, #f97316, #facc15);
}

.summary-card-green {
    background: linear-gradient(145deg, #16a34a, #22c55e);
}

/* Адаптив */

@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary-card {
        min-height: 96px;
    }
}

/* ====== TABLES ====== */

.table-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: #ffffff;

    overflow-x: auto;          /* ← только здесь разрешаем горизонтальный скролл */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.sortable-table {
    width: max-content;        /* таблица тянется внутрь wrapper-а */
    min-width: 800px;          /* можно под себя подправить */
    border-collapse: collapse;
    font-size: 12px;
}

.sortable-table thead {
    background: #f3f4f6;
}

.sortable-table th,
.sortable-table td {
    padding: 7px 10px;
    text-align: left;
    white-space: nowrap;
}

.sortable-table th {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    position: relative;
}

.sortable-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.sortable-table tbody tr:hover {
    background: #eef2ff;
}

.cell-main {
    font-weight: 600;
    color: #16a34a;
}

.cell-neg {
    color: #b91c1c;
}

/* стрелочка сортировки */

th.sort-asc::after,
th.sort-desc::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #6b7280;
    border-bottom: 1.5px solid #6b7280;
    transform: translateY(-50%) rotate(45deg);
}

th.sort-desc::after {
    transform: translateY(-50%) rotate(-135deg);
}

.table-note {
    padding: 6px 10px 8px;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
}

/* ======================
   Верхняя навигация-пилюли
   ====================== */

.top-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 4px 16px;
    margin-bottom: 4px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.top-nav::-webkit-scrollbar {
    display: none; /* чтобы на iOS/маке не торчал скроллбар */
}

.top-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;

    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);

    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;
    transition: all 0.15s ease-out;
}

.top-nav-item .top-nav-icon {
    width: 20px;
    height: 20px;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    background: rgba(148, 163, 184, 0.16);
    color: #0f172a;
}

.top-nav-item .top-nav-label {
    letter-spacing: 0.01em;
}

.top-nav-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

/* активная вкладка */
.top-nav-item-active {
    display: inline-flex;     /* важно */
    align-items: center;
    justify-content: center;

    background: #111827;
    color: #f9fafb;
    border-color: #111827;
}

.top-nav-item-active .top-nav-icon {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
}

/* мобильная подстройка */
@media (max-width: 768px) {
    .top-nav {
        padding-top: 4px;
        padding-bottom: 12px;
        margin-bottom: 0;
    }

    .top-nav-item {
        padding: 8px 12px;
        font-size: 12px;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.09);
    }
}

.top-nav-item-active {
    background: #111827;
    color: #f9fafb;
}

.top-nav-item-active svg {
    color: #2563eb;
}

/* ---- Транспорт: фильтр (десктоп) ---- */

.transport-filter-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.transport-filter-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: nowrap;
}

.transport-filter-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    min-width: 140px;
}

/* поля на всю ширину ячейки */
.transport-filter-row .field-input {
    width: 90%;
}


/* ====== MOBILE / SMALL SCREENS ====== */

@media (max-width: 900px) {

    .topbar {
        padding: 20px;
        flex-wrap: wrap;
        height: auto;
        row-gap: 10px;
        overflow-x: hidden;
    }

    .topbar-right {
        margin-left: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 4px;
    }

    .chip {
        font-size: 10px;
        padding: 3px 8px;
        max-width: 100%;
    }

    .main {
        padding: 16px 8px 24px;
    }

    .main-inner {
        max-width: 100%;
        margin: 0 auto 32px;
        padding: 0 8px;
    }

  

    .main-title {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 6px;
        word-break: break-word;
    }

    /* --- Фильтр по дате на мобиле --- */



    .filter-grid {
        display: flex;
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-label {
        font-size: 14px;
    }

    .field-label {
        display: block;
        margin-bottom: 6px;
        text-align: center;
    }


    .filter-actions {
        margin-top: 4px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .filter-actions .btn {
        width: 100%;
        max-width: 260px;
    }

    .btn {
        text-align: center;
        min-width: 0;
        padding-left: 18px;
        padding-right: 18px;
    }

    .btn-ghost {
        padding-left: 24px;
        padding-right: 24px;
    }

    /* Метрики и таблица */

    .metrics-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .metrics-row .metric-card {
        width: 100%;
    }

    .tabs {
        padding: 4px 2px;
    }

    .table-wrapper {
        border-radius: 16px;
    }
}

/* более «озоновские» карточки */
.section-card {
    border-radius: 24px;
    background: #f9fafb;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(148, 163, 184, 0.16);
    padding: 18px 16px 22px;
   
}

/* внутренняя плашка фильтра – как белая карта внутри */
.filter-card {
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
}





.field-input:focus {
    background: #ffffff;
}

   

    .filter-card {
        border-radius: 24px;
        padding: 18px 14px 20px;

    }

    .filter-actions .btn-primary {
        height: 46px;
        font-size: 15px;
    }
/* Итоги периода — 3 карточки в ряд */
.metrics-row-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

/* Цветовые модификаторы карточек */
.metric-card-trend,
.metric-card-positive,
.metric-card-negative {
    background: #f7f9fc;      /* мягкий светло-серый фон */
    border: 1px solid #e5e7eb;
}
.metric-subinfo {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Список товаров внутри карточек */
.metric-list {
    margin: 8px 0 0;
    padding-left: 18px;
    list-style: disc;
}

.metric-list-item {
    margin-bottom: 4px;
}

.metric-list-main {
    font-size: 12px;              /* уменьшенный шрифт */
    font-weight: 500;
    color: #111827;
}

.metric-list-sub {
    font-size: 11px;              /* ещё чуть мельче */
    color: #6b7280;
}

/* Чипы "хорошие/плохие показатели" */
.quality-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.quality-chip-good {
    background: #00a038;
    color: #ffffff;
}

.quality-chip-bad {
    background: rgb(240, 4, 4);
    color: #ffffff;
}

.panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-xs {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
}

.auth-card {
    max-width: 900px;
    margin: 0 auto;
}

.auth-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    align-items: stretch;
}

.auth-cta-main {
    flex: 1 1 260px;
}

.auth-tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    text-decoration: none;
}

.auth-tg-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-tg-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.auth-qr-card {
    flex: 0 0 220px;
    border-radius: 12px;
    padding: 16px;
    background: var(--bg-elevated, #18191f);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-qr-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.auth-qr-image img {
    width: 170px;
    height: 170px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

.auth-qr-caption {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
}

/* Заголовок + бейдж в одну строку */
.metric-card .metric-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.good-item, 
.bad-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;           /* чтобы не слипалось */
    padding: 4px 0;
    white-space: nowrap; /* чтобы всё было в строке */
}


.good-item span,
.bad-item span {
    flex-shrink: 0;
}
/* Чтобы бейдж не сжимался и не переносился странно */
.quality-chip {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ===== Левый сайдбар ===== */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-layout {
    flex: 1;
    display: flex;
    align-items: stretch;
}

/* Сжимаем main, чтобы он шёл справа от меню */
.main {
    flex: 1;
}

/* Узкая колонка слева */
.sidebar {
    width: 72px;
    background: #f4f6fb;
    border-right: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 6px;
}

/* Отодвигаем logout вниз */
.sidebar-spacer {
    flex: 1;
}

.sidebar-item {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
    text-decoration: none;
}

.sidebar-item:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.sidebar-item.active {
    border-color: #2563eb;
    background: #e0edff;
}

.sidebar-item-ghost {
    background: transparent;
    box-shadow: none;
    border-color: rgba(148, 163, 184, 0.4);
}

.sidebar-item-ghost:hover {
    background: rgba(148, 163, 184, 0.08);
}

/* Иконка внутри кнопки */
.sidebar-icon {
    font-size: 18px;
    line-height: 1;
}

/* Кнопка logout как форма */
.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout-form button {
    border: none;
    padding: 0;
    background: none;
}


/* мобильная мелкая подстройка */
@media (max-width: 768px) {
    .top-nav {
        margin-top: 4px;
        padding-top: 8px;
    }

    .top-nav-item {
        padding: 8px 12px;
        font-size: 12px;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.09);
    }
}

/* на мобилке QR падает под кнопку */
@media (max-width: 640px) {
    .auth-qr-card {
        flex: 1 1 100%;
    }

    
}

/* ====== График по дням ====== */

.chart-card {
    margin-top: 12px;
    padding: 16px 18px 20px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #020617;
}

.chart-caption {
    font-size: 12px;
    color: #6b7280;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chart-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    color: #111827;
}

.chart-pill::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.chart-pill-blue::before {
    background: #3b82f6;
}

.chart-pill-orange::before {
    background: #f97316;
}

.chart-card-inner {
    position: relative;
    height: 260px;
}

.chart-canvas-wrapper {
    position: absolute;
    inset: 0;
}

#dailyChart {
    width: 100% !important;
    height: 100% !important;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #9ca3af;
}

/* Мобилка */

@media (max-width: 700px) {
    .chart-card-inner {
        height: 220px;
    }

    .chart-card {
        padding: 14px 12px 18px;
    }

    .chart-card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ===== Итоги транспорта: плашки сверху, график снизу ===== */

.metrics-row.metrics-row-summary {
    display: flex;
    flex-direction: column;   /* столбиком, а не в ряд */
    align-items: stretch;
    gap: 16px;
}

/* на всякий случай растягиваем детей на всю ширину */
.metrics-row.metrics-row-summary > * {
    width: 100%;
}

/* плашки – широкая сетка, чтобы на десктопе выглядели жирно */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* адаптив — на планшете 2 в ряд, на мобиле 1 */
@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Растянуть транспортную таблицу на всю ширину карточки */
/* Десктоп: растянуть таблицу на всю ширину карточки */
@media (min-width: 1024px) {
    #statsTable {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
    }
}



/* ──────────────────────────────
   GAZZACHAS MAGIC NAV (СТАБИЛЬНОЕ)
   ────────────────────────────── */

.gzc-navigation {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 auto 32px;
}

.gzc-navigation ul {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 12px 28px;
    border-radius: 999px;
    height: 72px;
    list-style: none;
    gap: 22px;
    box-shadow:
        0 20px 40px rgba(15, 23, 42, 0.10),
        0 0 0 1px rgba(148, 163, 184, 0.25);
}

.gzc-navigation .nav-item {
    width: 72px;
    height: 72px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* кружок под иконкой */

.gzc-navigation .nav-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    z-index: 1;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    box-shadow:
        0 18px 40px rgba(37, 99, 235, 0.45),
        0 0 0 8px rgba(129, 140, 248, 0.25);
    transition: 0.3s ease;
}

/* ссылка с иконкой */

.gzc-navigation .nav-item a {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1f2937;
    font-size: 24px;
    text-decoration: none;
    transition: 0.25s ease;
}

.gzc-navigation .nav-item a i {
    transition: 0.25s ease;
}

/* активная кнопка */

.gzc-navigation .nav-item.active .nav-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gzc-navigation .nav-item.active a {
    color: #ffffff;
    transform: translateY(-2px);
}

.gzc-navigation .nav-item.active a i {
    transform: scale(1.1);
}

/* hover */

.gzc-navigation .nav-item:hover a {
    opacity: 0.75;
}

/* мобилка, если нужно чуть меньше */

@media (max-width: 600px) {
    .gzc-navigation ul {
        height: 64px;
        padding: 10px 22px;
        gap: 18px;
    }

    .gzc-navigation .nav-item {
        width: 64px;
        height: 64px;
    }

    .gzc-navigation .nav-indicator,
    .gzc-navigation .nav-item a {
        width: 46px;
        height: 46px;
    }

    .gzc-navigation .nav-item a {
        font-size: 22px;
    }
}
/* ===== Дашборд: три карточки "Итоги периода" в одну строку ===== */

.dashboard-page .metrics-row.metrics-row-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-page .metrics-row.metrics-row-summary > * {
    width: auto; /* переопределяем width:100% из общих стилей */
}
/* ===== На мобильных — обратно в столбик ===== */
@media (max-width: 768px) {
    .dashboard-page .metrics-row.metrics-row-summary {
        grid-template-columns: 1fr; /* одна колонка */
    }
}