* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #f4f7fb;
    background: #0f172a;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border: 1px solid #334155;
    border-radius: 16px;
    background: #1e293b;
    box-shadow: 0 20px 50px rgb(0 0 0 / 30%);
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

.login-card p {
    margin: 0 0 28px;
    color: #94a3b8;
}

label {
    display: block;
    margin-bottom: 18px;
    font-weight: 600;
}

input {
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #f8fafc;
    background: #0f172a;
    font-size: 16px;
}

input:focus {
    outline: 2px solid #38bdf8;
    border-color: transparent;
}

button {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 8px;
    background: #0ea5e9;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.message {
    min-height: 24px;
    margin-top: 16px;
    text-align: center;
}

.message.error {
    color: #fca5a5;
}

/* Admin page */

/* Верхняя панель */

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 32px;
    border-bottom: 1px solid #334155;
    background: #1e293b;
}

.topbar strong {
    font-size: 22px;
}

.topbar > div {
    display: flex;
    align-items: center;
    gap: 18px;
}

#current-user {
    color: #94a3b8;
    font-weight: 600;
}

.topbar button {
    width: auto;
    padding: 10px 18px;
    background: #dc2626;
}


/* Панель администратора */

.dashboard {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0;
}

.dashboard > h1 {
    margin: 0 0 12px;
    font-size: 36px;
}

.dashboard > p {
    margin: 0 0 36px;
    color: #94a3b8;
    font-size: 17px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.dashboard-card {
    min-height: 180px;
    padding: 24px;
    border: 1px solid #334155;
    border-radius: 14px;
    background: #1e293b;
    box-shadow: 0 16px 35px rgb(0 0 0 / 20%);
}

.dashboard-card h2 {
    margin: 0 0 12px;
}

.dashboard-card p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.6;
}


/* Адаптация под небольшие экраны */

@media (max-width: 800px) {
    .topbar {
        padding: 16px 20px;
    }

    .dashboard {
        width: min(100% - 32px, 1200px);
        padding: 32px 0;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}


/* Client Dashboard */

/* Клиентский кабинет */

.dashboard-heading,
.panel-heading,
.modal-heading,
.equipment-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-heading {
    margin-bottom: 32px;
}

.dashboard-heading h1,
.panel-heading h2,
.modal-heading h2 {
    margin: 0;
}

.dashboard-heading p,
.modal-heading p {
    margin: 8px 0 0;
    color: #94a3b8;
}

.primary-button,
.secondary-button,
.modal-close {
    width: auto;
}

.primary-button {
    padding: 13px 22px;
}

.secondary-button {
    padding: 9px 16px;
    border: 1px solid #475569;
    background: #334155;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.summary-card {
    padding: 24px;
    border: 1px solid #334155;
    border-radius: 14px;
    background: #1e293b;
}

.summary-card span {
    display: block;
    color: #94a3b8;
}

.summary-card strong {
    display: block;
    margin-top: 12px;
    font-size: 36px;
}

.data-panel {
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid #334155;
    border-radius: 14px;
    background: #1e293b;
}

.panel-heading {
    margin-bottom: 22px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #334155;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #94a3b8;
    font-size: 13px;
    text-transform: uppercase;
}

.empty-state {
    margin: 20px 0 0;
    color: #64748b;
    text-align: center;
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    color: #fef3c7;
    background: #92400e;
}

.status-processing {
    color: #dbeafe;
    background: #1d4ed8;
}

.status-approved,
.status-active {
    color: #dcfce7;
    background: #166534;
}

.status-rejected,
.status-disabled,
.status-cancelled {
    color: #fee2e2;
    background: #991b1b;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.equipment-card {
    padding: 20px;
    border: 1px solid #334155;
    border-radius: 12px;
    background: #0f172a;
}

.equipment-card dl {
    margin: 18px 0 0;
}

.equipment-card dl div {
    margin-bottom: 12px;
}

.equipment-card dt {
    color: #64748b;
    font-size: 12px;
}

.equipment-card dd {
    margin: 4px 0 0;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 72%);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: 28px;
    border: 1px solid #475569;
    border-radius: 16px;
    background: #1e293b;
    box-shadow: 0 24px 70px rgb(0 0 0 / 50%);
}

.modal-close {
    padding: 4px 10px;
    background: transparent;
    font-size: 28px;
}

.modal-dialog form {
    margin-top: 24px;
}

.modal-dialog label {
    margin: 18px 0 8px;
}

.modal-open {
    overflow: hidden;
}

.message.success {
    color: #86efac;
}

@media (max-width: 800px) {
    .dashboard-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-grid,
    .equipment-grid {
        grid-template-columns: 1fr;
    }
}


/* Панель администратора */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

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

.action-button {
    width: auto;
    padding: 7px 11px;
    font-size: 13px;
}

.approve-button {
    background: #15803d;
}

.reject-button {
    background: #b91c1c;
}

.action-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

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

@media (max-width: 600px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}


/* Журнал действий администратора */

.audit-list {
    display: grid;
    gap: 10px;
}

.audit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #0f172a;
}

.audit-item strong {
    margin-right: 6px;
}

.audit-item span,
.audit-item time {
    color: #94a3b8;
}

.audit-item time {
    white-space: nowrap;
    font-size: 13px;
}

@media (max-width: 600px) {
    .audit-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Результат отправки заявки */

.request-result-dialog {
    text-align: center;
}

.request-result-dialog h2 {
    margin: 18px 0 10px;
}

.request-result-dialog p {
    color: #94a3b8;
    line-height: 1.5;
}

.request-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto;
    border: 4px solid #334155;
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: request-spinner-rotation 0.8s linear infinite;
}

.request-result-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    color: white;
    font-size: 34px;
    font-weight: 700;
}

.request-result-icon.success {
    background: #16a34a;
}

.request-result-icon.error {
    background: #dc2626;
}

.request-result-id {
    padding: 10px;
    border-radius: 8px;
    color: #e2e8f0 !important;
    background: #0f172a;
    font-weight: 700;
}

.request-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.request-result-actions button {
    width: auto;
}

@keyframes request-spinner-rotation {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 500px) {
    .request-result-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .request-result-actions button {
        width: 100%;
    }
}

/* Карточка статистики Users */

.overview-card {
    min-height: 220px;
    overflow: hidden;
}

.overview-title {
    color: #e2e8f0 !important;
    font-size: 18px;
    font-weight: 700;
}

.overview-value {
    margin-top: 8px !important;
    font-size: 48px !important;
    line-height: 1;
    letter-spacing: -2px;
}

.overview-change {
    margin: 10px 0 4px;
    color: #86efac;
    font-size: 14px;
    font-weight: 600;
}

.overview-chart {
    width: 100%;
    height: 82px;
    margin-top: 4px;
}

.overview-chart svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#users-chart-line {
    stroke: #60a5fa;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 5px rgb(96 165 250 / 55%));
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}

/* Верхний ряд административной панели */

.admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* Карточка терминалов */

.terminals-overview-card {
    position: relative;
}

.terminal-status-list {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.terminal-status-list p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #94a3b8;
    font-size: 15px;
}

.terminal-status-list strong {
    color: #f8fafc;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.terminal-dot-online {
    background: #3b82f6;
    box-shadow: 0 0 8px rgb(59 130 246 / 75%);
}

.terminal-dot-offline {
    background: #ef4444;
    box-shadow: 0 0 8px rgb(239 68 68 / 65%);
}

.terminal-description,
.requests-card-description {
    margin: auto 0 0;
    padding-top: 24px;
    color: #64748b;
    font-size: 13px;
}


/* Базовая карточка заявок */

.requests-overview-values {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
}

.requests-overview-values strong {
    font-size: 38px;
    line-height: 1;
}

.requests-overview-values span {
    color: #94a3b8;
}

.requests-divider {
    margin: 0 4px;
    font-size: 24px;
}

@media (max-width: 1000px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}


/* Исправление верхнего ряда статистики */

.admin-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stats > .overview-card {
    width: auto;
    min-width: 0;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.overview-chart {
    width: 100%;
    min-width: 0;
    margin-top: auto;
}

@media (max-width: 1000px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* График заявок */

#requests-chart-line {
    stroke: #60a5fa;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(
        0 0 5px rgb(96 165 250 / 55%)
    );
}

/* Двойной блок после очереди заявок */

.dashboard-split {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(0, 1.4fr);
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-split-panel {
    min-width: 0;
    margin-bottom: 0;
}

.chart-panel-heading {
    align-items: flex-start;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    color: #94a3b8;
    font-size: 12px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    border-radius: 50%;
}

.chart-legend-dot.successful {
    background: #3b82f6;
}

.chart-legend-dot.waiting {
    background: #ef4444;
}


/* Столбчатая диаграмма */

.activation-status-chart {
    min-height: 230px;
    display: grid;
    grid-template-columns: repeat(6, minmax(45px, 1fr));
    align-items: end;
    gap: 14px;
    padding: 20px 10px 0;
    overflow-x: auto;
    border-bottom: 1px solid #334155;
}

.activation-chart-group {
    min-width: 45px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
}

.activation-chart-bars {
    height: 185px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 7px;
}

.activation-chart-column {
    height: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
}

.activation-chart-value {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.activation-chart-bar {
    width: 18px;
    min-height: 2px;
    border-radius: 6px 6px 2px 2px;
    transition: height 0.25s ease;
}

.activation-chart-bar.successful {
    background: #3b82f6;
    box-shadow: 0 0 8px rgb(59 130 246 / 35%);
}

.activation-chart-bar.waiting {
    background: #ef4444;
    box-shadow: 0 0 8px rgb(239 68 68 / 30%);
}

.activation-chart-label {
    color: #64748b;
    font-size: 11px;
}


/* Поток действий */

.dashboard-split .audit-list {
    max-height: 280px;
    overflow-y: auto;
}

.dashboard-split .audit-item {
    position: relative;
    padding-left: 28px;
}

.dashboard-split .audit-item::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

@media (max-width: 950px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

/* ==================================================
   HEADER АДМИНИСТРАТОРА
   ================================================== */

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    min-height: 86px;
    display: grid;
    grid-template-columns:
        minmax(260px, 360px)
        minmax(320px, 720px)
        auto;
    align-items: center;
    gap: 28px;

    padding: 12px 36px;

    background: #1e293b;
    border-bottom: 1px solid #334155;
    box-shadow: 0 8px 24px rgb(2 6 23 / 18%);
}


/* Логотип */

.admin-brand {
    width: fit-content;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.admin-brand-logo {
    display: block;
    width: 310px;
    max-width: 100%;
    height: 58px;
    object-fit: contain;
    object-position: left center;
}


/* Глобальный поиск */

.admin-global-search {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 16px;

    background: #111c2f;
    border: 1px solid #3b4a60;
    border-radius: 10px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.admin-global-search:focus-within {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgb(96 165 250 / 14%);
}

.admin-global-search svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;

    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-global-search input {
    width: 100%;
    min-width: 0;

    color: #f8fafc;
    background: transparent;
    border: 0;
    outline: 0;

    font: inherit;
    font-size: 14px;
}

.admin-global-search input::placeholder {
    color: #718096;
}


/* Правая часть Header */

.admin-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.admin-header-dropdown {
    position: relative;
}

.admin-icon-button,
.admin-profile-button {
    border: 0;
    color: #e2e8f0;
    background: transparent;
    cursor: pointer;
}

.admin-icon-button {
    position: relative;

    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;

    border-radius: 10px;
}

.admin-icon-button:hover,
.admin-profile-button:hover {
    background: #2b3a50;
}

.admin-icon-button svg {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Счетчик уведомлений */

.notifications-badge {
    position: absolute;
    top: 3px;
    right: 2px;

    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;

    padding: 0 5px;

    color: #ffffff;
    background: #ef4444;
    border: 2px solid #1e293b;
    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
}


/* Кнопка профиля */

.admin-profile-button {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 12px;
    border-radius: 10px;

    font-size: 15px;
    font-weight: 700;
}

.admin-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;

    color: #ffffff;
    background: #3b82f6;
    border-radius: 50%;

    font-size: 13px;
    font-weight: 800;
}

.admin-profile-arrow {
    width: 16px;
    height: 16px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.2s ease;
}

.admin-profile-button[aria-expanded="true"]
.admin-profile-arrow {
    transform: rotate(180deg);
}


/* Выпадающие меню */

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 120;

    background: #1e293b;
    border: 1px solid #3b4a60;
    border-radius: 12px;

    box-shadow: 0 18px 45px rgb(2 6 23 / 45%);
    overflow: hidden;
}

.header-dropdown-menu[hidden] {
    display: none;
}


/* Уведомления */

.notifications-menu {
    width: min(390px, calc(100vw - 32px));
}

.notifications-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    padding: 16px 18px;
    border-bottom: 1px solid #334155;
}

.notifications-header strong {
    color: #f8fafc;
}

.notifications-header span {
    color: #94a3b8;
    font-size: 12px;
}

.notifications-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    width: 100%;
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 12px;

    padding: 14px 18px;

    color: #e2e8f0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #2d3b50;

    text-align: left;
    cursor: pointer;
}

.notification-item:hover {
    background: #26364c;
}

.notification-item-dot {
    width: 9px;
    height: 9px;
    margin-top: 6px;

    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px rgb(239 68 68 / 55%);
}

.notification-item-content {
    min-width: 0;
}

.notification-item-content strong {
    display: block;
    margin-bottom: 4px;

    color: #f8fafc;
    font-size: 13px;
}

.notification-item-content span {
    display: block;

    color: #94a3b8;
    font-size: 12px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notifications-empty {
    margin: 0;
    padding: 22px 18px;

    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}


/* Меню профиля */

.profile-menu {
    width: 170px;
    padding: 6px;
}

.profile-menu-item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;

    padding: 0 12px;

    color: #e2e8f0;
    background: transparent;
    border: 0;
    border-radius: 8px;

    font: inherit;
    font-size: 14px;
    text-decoration: none;
    text-align: left;

    cursor: pointer;
}

.profile-menu-item:hover {
    background: #2b3a50;
}

.profile-logout {
    color: #f87171;
}


/* Подсветка заявки из уведомления */

.admin-request-highlight {
    animation: request-highlight 2.2s ease;
}

@keyframes request-highlight {
    0%,
    100% {
        background: transparent;
    }

    30% {
        background: rgb(59 130 246 / 22%);
    }
}


/* Адаптивность */

@media (max-width: 1100px) {
    .admin-topbar {
        grid-template-columns:
            minmax(210px, 270px)
            minmax(260px, 1fr)
            auto;

        gap: 18px;
        padding-inline: 22px;
    }

    .admin-brand-logo {
        width: 250px;
    }
}

@media (max-width: 780px) {
    .admin-topbar {
        position: relative;
        grid-template-columns: 1fr auto;
        gap: 12px;

        padding: 12px 16px;
    }

    .admin-brand-logo {
        width: 220px;
        height: 50px;
    }

    .admin-global-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .admin-profile-button > span:not(.admin-avatar) {
        display: none;
    }
}

/* ==================================================
   КОРРЕКТИРОВКА HEADER
   ================================================== */

.admin-topbar {
    min-height: 96px;

    grid-template-columns:
        minmax(310px, 390px)
        minmax(360px, 760px)
        auto;

    align-items: center;
    gap: 28px;

    padding: 12px 38px;
}


/* Логотип */

.admin-brand {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;
}

.admin-brand-logo {
    display: block;

    width: clamp(280px, 20vw, 360px);
    height: auto;
    max-height: 72px;

    object-fit: contain;
    object-position: left center;
}


/* Поле поиска */

.admin-global-search {
    width: 100%;
    height: 50px;

    align-self: center;
    margin: 0;

    display: flex;
    align-items: center;

    font-family: inherit;
}

.admin-global-search input {
    height: 100%;
    display: block;

    padding: 0;

    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: normal;
}

.admin-global-search input::placeholder {
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
}


/* Планшеты */

@media (max-width: 1100px) {
    .admin-topbar {
        grid-template-columns:
            minmax(250px, 310px)
            minmax(280px, 1fr)
            auto;

        gap: 18px;
        padding-inline: 22px;
    }

    .admin-brand-logo {
        width: clamp(240px, 25vw, 300px);
        max-height: 64px;
    }
}


/* Телефоны */

@media (max-width: 780px) {
    .admin-topbar {
        grid-template-columns: 1fr auto;
        min-height: auto;

        gap: 12px;
        padding: 12px 16px;
    }

    .admin-brand-logo {
        width: clamp(210px, 60vw, 280px);
        max-height: 60px;
    }

    .admin-global-search {
        grid-column: 1 / -1;
        grid-row: 2;

        height: 46px;
    }

    .admin-global-search input,
    .admin-global-search input::placeholder {
        font-size: 14px;
    }
}

/* Чередование строк в таблицах администратора */

#admin-requests-body tr:nth-child(odd),
#admin-equipment-body tr:nth-child(odd),
#admin-users-body tr:nth-child(odd) {
    background: #172235;
}

#admin-requests-body tr:nth-child(even),
#admin-equipment-body tr:nth-child(even),
#admin-users-body tr:nth-child(even) {
    background: #1c293d;
}


/* Подсветка строки при наведении */

#admin-requests-body tr:hover,
#admin-equipment-body tr:hover,
#admin-users-body tr:hover {
    background: #263852;
}


/* Плавное изменение оттенка */

#admin-requests-body tr,
#admin-equipment-body tr,
#admin-users-body tr {
    transition: background-color 0.15s ease;
}

#admin-requests-body td,
#admin-equipment-body td,
#admin-users-body td {
    border-bottom: 1px solid rgb(148 163 184 / 10%);
}

/* Кабинеты клиентов в Header */

.client-cabinets-button {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 0 14px;

    color: #e2e8f0;
    background: transparent;
    border: 1px solid #3b4a60;
    border-radius: 10px;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.client-cabinets-button:hover {
    background: #2b3a50;
}

.client-cabinets-button > svg:first-child {
    width: 20px;
    height: 20px;
}

.client-cabinets-button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.client-cabinets-arrow {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.client-cabinets-button[aria-expanded="true"]
.client-cabinets-arrow {
    transform: rotate(180deg);
}

.client-cabinets-menu {
    width: 310px;
    padding: 10px;
}

.client-cabinets-search {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 0 12px;
    margin-bottom: 8px;

    background: #111c2f;
    border: 1px solid #3b4a60;
    border-radius: 8px;
}

.client-cabinets-search svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
}

.client-cabinets-search input {
    width: 100%;

    color: #f8fafc;
    background: transparent;
    border: 0;
    outline: 0;

    font: inherit;
    font-size: 13px;
}

.client-cabinets-list {
    max-height: 320px;
    overflow-y: auto;
}

.client-cabinet-item {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 8px 11px;

    color: #e2e8f0;
    background: transparent;
    border: 0;
    border-radius: 8px;

    font: inherit;
    text-align: left;

    cursor: pointer;
}

.client-cabinet-item:hover {
    background: #2b3a50;
}

.client-cabinet-item small {
    color: #94a3b8;
}

@media (max-width: 900px) {
    .client-cabinets-button > span {
        display: none;
    }

    .client-cabinets-button {
        width: 46px;
        justify-content: center;
        padding: 0;
    }

    .client-cabinets-arrow {
        display: none;
    }
}

/* ==================================================
   ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ В HEADER
   ================================================== */

.admin-profile-name {
    max-width: 140px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-profile-arrow {
    width: 15px;
    height: 15px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.2s ease;
}

.admin-profile-button[aria-expanded="true"]
.admin-profile-arrow {
    transform: rotate(180deg);
}

.admin-profile-menu {
    width: 220px;
    padding: 8px;
}

.profile-menu-info {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 10px 12px;
}

.profile-menu-role {
    color: #94a3b8;

    font-size: 12px;
    font-weight: 500;
}

.profile-menu-username {
    color: #f8fafc;

    font-size: 14px;
    font-weight: 600;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-menu-divider {
    height: 1px;

    margin: 4px 0;

    background: rgb(148 163 184 / 14%);
}

.profile-menu-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;

    color: #fca5a5;
}

.profile-menu-logout:hover {
    color: #fecaca;
    background: rgb(239 68 68 / 12%);
}

.profile-menu-logout svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Позиционирование меню профиля */

.admin-header-dropdown {
    position: relative;
}

.admin-profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1000;

    width: 220px;
}

.admin-profile-menu[hidden] {
    display: none;
}

/* ==================================================
   КОМПАКТНЫЙ HEADER ПОЛЬЗОВАТЕЛЯ
   ================================================== */

.client-topbar {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 10px 38px;

    background: #1e2b3e;
    border-bottom: 1px solid #34445b;
}

.client-brand {
    min-width: 0;

    display: flex;
    align-items: center;

    text-decoration: none;
}

.client-brand-logo {
    display: block;

    width: clamp(240px, 22vw, 340px);
    height: auto;
    max-height: 64px;

    object-fit: contain;
    object-position: left center;
}

.client-profile-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.client-profile-button {
    min-height: 46px;
}


/* Планшеты */

@media (max-width: 900px) {
    .client-topbar {
        padding-inline: 22px;
    }

    .client-brand-logo {
        width: clamp(210px, 30vw, 280px);
        max-height: 58px;
    }
}


/* Телефоны */

@media (max-width: 600px) {
    .client-topbar {
        min-height: 70px;
        gap: 12px;

        padding: 9px 14px;
    }

    .client-brand-logo {
        width: clamp(170px, 48vw, 230px);
        max-height: 50px;
    }

    .client-profile-button {
        padding-inline: 8px;
    }

    .client-profile-button .admin-profile-name {
        display: none;
    }
}

.client-profile-dropdown {
    position: relative;
}

.client-profile-dropdown .admin-profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1000;

    width: 220px;
}

.client-profile-dropdown .admin-profile-menu[hidden] {
    display: none;
}

/* ==================================================
   СВОДКА ПОЛЬЗОВАТЕЛЬСКОГО КАБИНЕТА
   ================================================== */

.client-overview {
    width: min(100%, 920px);

    margin: 32px auto;
    padding: 0 24px;
}

.client-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


/* Карточка */

.client-overview-card {
    min-height: 225px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;

    padding: 22px;

    background:
        linear-gradient(
            145deg,
            #263347,
            #1b2738
        );

    border: 1px solid rgb(148 163 184 / 16%);
    border-radius: 15px;

    box-shadow:
        0 12px 28px rgb(0 0 0 / 18%);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.client-overview-card:hover {
    transform: translateY(-3px);

    border-color: rgb(96 165 250 / 42%);

    box-shadow:
        0 16px 34px rgb(0 0 0 / 24%);
}


/* Верхняя часть карточки */

.client-overview-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}


/* Иконка */

.client-overview-icon {
    width: 90px;
    height: 90px;

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

    color: #a8b7d3;
}

.client-overview-icon svg {
    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 2.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    filter:
        drop-shadow(
            0 5px 10px rgb(0 0 0 / 25%)
        );
}


/* Счетчик */

.client-overview-ratio {
    display: flex;
    align-items: baseline;
    gap: 4px;

    color: #cbd5e1;

    font-size: 23px;
    font-weight: 500;
    line-height: 1;
}

.client-overview-ratio strong {
    color: #f8fafc;

    font-size: 29px;
    font-weight: 700;
}


/* Текст карточки */

.client-overview-card-content h2 {
    margin: 0 0 7px;

    color: #f8fafc;

    font-size: 22px;
    font-weight: 650;
}

.client-overview-card-content p {
    margin: 0 0 5px;

    color: #aab7cb;

    font-size: 14px;
}

.client-overview-card-content small {
    color: #7f91aa;

    font-size: 13px;
}


/* Кнопка активации */

.client-overview-activate {
    min-width: 360px;
    min-height: 54px;

    display: block;

    margin: 26px auto 0;
    padding: 0 30px;

    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    border: 1px solid rgb(147 197 253 / 36%);
    border-radius: 11px;

    box-shadow:
        0 10px 24px rgb(37 99 235 / 26%);

    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.025em;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.client-overview-activate:hover {
    transform: translateY(-2px);

    filter: brightness(1.08);

    box-shadow:
        0 14px 30px rgb(37 99 235 / 34%);
}

.client-overview-activate:active {
    transform: translateY(0);
}


/* Планшеты */

@media (max-width: 760px) {
    .client-overview {
        margin-top: 24px;
        padding-inline: 18px;
    }

    .client-overview-card {
        min-height: 205px;
    }

    .client-overview-icon {
        width: 76px;
        height: 76px;
    }
}


/* Телефоны */

@media (max-width: 600px) {
    .client-overview-grid {
        grid-template-columns: 1fr;
    }

    .client-overview-card {
        min-height: 190px;
    }

    .client-overview-activate {
        width: 100%;
        min-width: 0;

        font-size: 14px;
    }
}

/* Изображение антенн Starlink */

.client-overview-antennas {
    width: 120px;
    height: 100px;

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

    overflow: visible;
}

.client-overview-icon-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    user-select: none;
    pointer-events: none;
}

@media (min-width: 761px) {
    .client-overview-antennas {
        width: 140px;
        height: 110px;
    }
}

/* ==================================================
   ГОРИЗОНТАЛЬНЫЙ СПИСОК STARLINK
   ================================================== */

.equipment-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* Отдельная строка оборудования */

.equipment-card.equipment-row {
    width: 100%;
    min-height: auto;

    display: block;

    padding: 18px 20px;

    background: #172235;

    border: 1px solid #34445b;
    border-radius: 12px;

    box-shadow:
        0 5px 14px rgb(0 0 0 / 14%);

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.equipment-card.equipment-row:hover {
    transform: translateY(-1px);

    background: #1b2940;
    border-color: #49607e;
}


/* Верхняя строка */

.equipment-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 10px;
}

.equipment-row-kit {
    display: flex;
    align-items: baseline;
    gap: 7px;

    color: #a8b5ca;
    font-size: 14px;
}

.equipment-row-kit strong {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 700;
}


/* Информация */

.equipment-row-information {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.equipment-row-information p {
    display: flex;
    align-items: baseline;
    gap: 6px;

    margin: 0;

    color: #99a8bf;
    font-size: 14px;
}

.equipment-row-information strong {
    color: #dce5f2;
    font-weight: 500;
}


/* Онлайн / офлайн */

.equipment-connection-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    flex: 0 0 auto;

    font-size: 14px;
    font-weight: 650;
}

.equipment-connection-dot {
    width: 10px;
    height: 10px;

    flex: 0 0 auto;

    border-radius: 50%;
}


/* Онлайн */

.equipment-connection-online {
    color: #70db96;
}

.equipment-connection-online
.equipment-connection-dot {
    background: #32c466;

    box-shadow:
        0 0 0 4px rgb(50 196 102 / 12%),
        0 0 10px rgb(50 196 102 / 42%);
}


/* Офлайн */

.equipment-connection-offline {
    color: #ff8080;
}

.equipment-connection-offline
.equipment-connection-dot {
    background: #ef5350;

    box-shadow:
        0 0 0 4px rgb(239 83 80 / 12%),
        0 0 10px rgb(239 83 80 / 38%);
}


/* Чередование тона строк */

.equipment-row:nth-child(even) {
    background: #1a2639;
}


/* Мобильная версия */

@media (max-width: 600px) {
    .equipment-card.equipment-row {
        padding: 16px;
    }

    .equipment-row-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .equipment-row-kit {
        flex-direction: column;
        gap: 2px;
    }

    .equipment-row-information p {
        flex-wrap: wrap;
    }
}

/* ==================================================
   УПРАВЛЕНИЕ STARLINK
   ================================================== */

.starlink-management-table th:last-child,
.starlink-management-table td:last-child {
    width: 330px;
}

.starlink-state-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.starlink-state-option {
    position: relative;

    display: inline-flex;

    cursor: pointer;
}

.starlink-state-radio {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
    pointer-events: none;
}

.starlink-state-control {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 13px;

    color: #9eabc0;
    background: #172235;

    border: 1px solid #394961;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 650;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.starlink-state-dot {
    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #738198;
}


/* Включен */

.starlink-state-online
.starlink-state-radio:checked
+
.starlink-state-control {
    color: #d9ffe5;
    background: rgb(22 126 67 / 28%);

    border-color: #21864b;

    box-shadow:
        0 0 0 3px rgb(34 197 94 / 10%);
}

.starlink-state-online
.starlink-state-radio:checked
+
.starlink-state-control
.starlink-state-dot {
    background: #31d46a;

    box-shadow:
        0 0 9px rgb(49 212 106 / 55%);
}


/* Выключен */

.starlink-state-offline
.starlink-state-radio:checked
+
.starlink-state-control {
    color: #ffe0e0;
    background: rgb(185 28 28 / 25%);

    border-color: #b83232;

    box-shadow:
        0 0 0 3px rgb(239 68 68 / 9%);
}

.starlink-state-offline
.starlink-state-radio:checked
+
.starlink-state-control
.starlink-state-dot {
    background: #ef5350;

    box-shadow:
        0 0 9px rgb(239 83 80 / 52%);
}


/* Фокус с клавиатуры */

.starlink-state-radio:focus-visible
+
.starlink-state-control {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}


/* Заблокированное состояние */

.starlink-state-radio:disabled
+
.starlink-state-control {
    cursor: wait;
    opacity: 0.65;
}


/* Чередование строк */

.starlink-management-table tbody tr:nth-child(odd) {
    background: rgb(15 27 46 / 44%);
}

.starlink-management-table tbody tr:nth-child(even) {
    background: rgb(31 45 65 / 58%);
}


@media (max-width: 760px) {
    .starlink-state-group {
        align-items: stretch;
        flex-direction: column;
    }

    .starlink-state-control {
        justify-content: center;
    }
}

/* Новое уведомление */

.notification-item-new
.notification-item-dot {
    background: #ef4444;

    box-shadow:
        0 0 8px rgb(239 68 68 / 55%);
}


/* Уже просмотренное уведомление */

.notification-item-read {
    opacity: 0.72;
}

.notification-item-read
.notification-item-dot {
    background: #64748b;
    box-shadow: none;
}

/* ==================================================
   ИТОГОВЫЕ ПОКАЗАТЕЛИ В КАРТОЧКАХ
   ================================================== */

.client-overview-total {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;

    min-width: 70px;
}

.client-overview-total strong {
    color: #f8fafc;

    font-size: 46px;
    font-weight: 750;
    line-height: 1;

    text-shadow:
        0 4px 12px rgb(0 0 0 / 20%);
}


/* Список показателей */

.client-overview-stat-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.client-overview-stat-list p {
    display: flex;
    align-items: baseline;
    gap: 6px;

    margin: 0;

    color: #a7b4c8;

    font-size: 15px;
    line-height: 1.35;
}

.client-overview-stat-list strong {
    color: #f1f5f9;

    font-size: 16px;
    font-weight: 700;
}


/* Цветовые акценты */

.client-overview-stat-online strong,
.client-overview-stat-approved strong {
    color: #58d987;
}

.client-overview-stat-offline strong {
    color: #ff7272;
}

.client-overview-stat-pending strong {
    color: #f5ad55;
}


@media (max-width: 600px) {
    .client-overview-total strong {
        font-size: 38px;
    }
}

.client-overview-stat-rejected strong {
    color: #ff7272;
}

.client-overview-stat-cancelled strong {
    color: #94a3b8;
}