@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
    --admin-font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

[x-cloak] {
    display: none !important;
}

body {
    background: #f3f5f7;
    color: #263238;
    font-family: var(--admin-font-family);
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    background: #17212b;
    color: #dbe4ec;
    min-height: 100vh;
    padding: 24px 18px;
}

.admin-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 24px;
    padding-bottom: 18px;
}

.admin-brand small {
    color: #8fb3c8;
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.admin-brand strong {
    color: #ffffff;
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.admin-nav a,
.admin-nav span {
    border-radius: 10px;
    color: #b9c7d3;
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 11px 14px;
    text-decoration: none;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: #22b8a7;
    color: #102027;
}

.admin-nav span {
    color: #6f8190;
}

.admin-topbar {
    background: #ffffff;
    border-bottom: 1px solid #e4e9ee;
    padding: 18px 28px;
}

.admin-content {
    padding: 28px;
}

.admin-card {
    background: #ffffff;
    border: 1px solid #e4e9ee;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(23, 33, 43, 0.08);
    padding: 24px;
}

.admin-command-card {
    background:
        radial-gradient(circle at top right, rgba(124, 231, 219, 0.26), transparent 34%),
        linear-gradient(135deg, #1e3a46 0%, #25606f 52%, #2b7a7b 100%);
    border-color: rgba(15, 118, 110, 0.2);
    box-shadow: 0 24px 54px rgba(23, 33, 43, 0.18);
    color: #edf4f8;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.admin-command-card::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent),
        linear-gradient(180deg, rgba(34, 184, 167, 0.16), transparent);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.admin-command-card > * {
    position: relative;
    z-index: 1;
}

.admin-command-card:hover {
    border-color: rgba(124, 231, 219, 0.48);
    box-shadow:
        0 34px 78px rgba(23, 33, 43, 0.28),
        0 0 0 1px rgba(124, 231, 219, 0.12);
    transform: translateY(-4px) scale(1.005);
}

.admin-command-card .admin-kicker {
    color: #7ce7db;
}

.admin-command-card h2,
.admin-command-card .fw-semibold,
.admin-command-card .form-label {
    color: #ffffff;
}

.admin-command-card .admin-muted,
.admin-command-card .text-muted,
.admin-command-card .small.text-uppercase.text-muted {
    color: rgba(237, 244, 248, 0.74) !important;
}

.admin-command-card .form-control {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(222, 236, 245, 0.18);
    color: #ffffff;
}

.admin-command-card .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23edf4f8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    border-color: rgba(222, 236, 245, 0.18);
    color: #ffffff;
}

.admin-command-card .form-control:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(124, 231, 219, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(124, 231, 219, 0.14);
    color: #ffffff;
}

.admin-command-card .form-select:focus {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(124, 231, 219, 0.65);
    box-shadow: 0 0 0 0.2rem rgba(124, 231, 219, 0.14);
    color: #ffffff;
}

.admin-command-card .form-control::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.admin-command-card .form-select option {
    color: #17212b;
}

.admin-dashboard-select {
    position: relative;
}

.admin-dashboard-select-button {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
    padding: 0.375rem 0.75rem;
    text-align: left;
    width: 100%;
}

.admin-dashboard-select-button.is-open {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(124, 231, 219, 0.46);
    box-shadow: 0 0 0 0.2rem rgba(124, 231, 219, 0.14);
    color: #ffffff;
}

.admin-dashboard-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-dashboard-select-chevron {
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.admin-dashboard-select-button.is-open .admin-dashboard-select-chevron {
    transform: rotate(180deg);
}

.admin-date-basis-panel {
    background: #17323b;
    backdrop-filter: blur(10px);
    border-color: rgba(124, 231, 219, 0.22);
    box-shadow: 0 18px 40px rgba(7, 18, 26, 0.38);
    overflow: hidden;
    padding: 12px;
    position: absolute;
    width: 100%;
    z-index: 50;
}

.admin-date-basis-options {
    display: grid;
    gap: 8px;
}

.admin-date-basis-option {
    align-items: center;
    background: #22444f;
    border: 1px solid rgba(222, 236, 245, 0.16);
    border-radius: 12px;
    color: #edf4f8;
    display: flex;
    font: inherit;
    justify-content: space-between;
    min-height: 40px;
    padding: 8px 12px;
    text-align: left;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    width: 100%;
}

.admin-date-basis-option:hover {
    background: #28515e;
    border-color: rgba(124, 231, 219, 0.34);
    transform: translateY(-1px);
}

.admin-date-basis-option.is-active {
    background: rgba(34, 184, 167, 0.24);
    border-color: rgba(124, 231, 219, 0.5);
    color: #ffffff;
}

.admin-command-card .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(222, 236, 245, 0.2);
    color: #edf4f8;
}

.admin-command-card .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(222, 236, 245, 0.28);
    color: #ffffff;
}

.admin-command-card .rounded-4.border.bg-light,
.admin-command-card .rounded-4.border.bg-light.p-3,
.admin-command-card .rounded-4.border.bg-light.p-3.mt-3 {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(222, 236, 245, 0.14) !important;
    color: #edf4f8;
}

.admin-command-card .admin-selector {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(222, 236, 245, 0.12);
}

.admin-command-card .admin-selector .form-text,
.admin-command-card .admin-selector-empty {
    color: rgba(237, 244, 248, 0.68);
}

.admin-command-card .admin-selector-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(222, 236, 245, 0.12);
    color: #edf4f8;
}

.admin-command-card .admin-selector-item:hover {
    border-color: rgba(124, 231, 219, 0.3);
}

.admin-command-card .admin-selector-item strong {
    color: #ffffff;
}

.admin-command-card .admin-dashboard-select:focus-within .admin-dashboard-select-button,
.admin-command-card .admin-dashboard-select-button:focus-visible,
.admin-command-card .admin-dashboard-filter-button.is-open,
.admin-command-card .admin-selector:focus-within,
.admin-command-card .admin-period-card:focus-within,
.admin-command-card .admin-period-card.is-open,
.admin-command-card .admin-dashboard-filter-button:focus-visible,
.admin-command-card .admin-priority-filter-panel:focus-within {
    border-color: rgba(124, 231, 219, 0.65) !important;
    box-shadow: 0 0 0 0.2rem rgba(124, 231, 219, 0.14);
}

.admin-period-card {
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.admin-period-card-current {
    background: linear-gradient(135deg, rgba(34, 184, 167, 0.42), rgba(15, 118, 110, 0.2)) !important;
    border-color: rgba(124, 231, 219, 0.8) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 12px 26px rgba(7, 18, 26, 0.22);
    transform: translateY(-1px);
}

.admin-period-card-current .small,
.admin-period-card-current .fw-semibold {
    color: #ffffff !important;
}

.admin-period-card-muted {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(222, 236, 245, 0.08) !important;
    opacity: 0.58;
}

.admin-period-card-muted .fw-semibold,
.admin-period-card-muted .small {
    color: rgba(237, 244, 248, 0.72) !important;
}

.admin-command-card .admin-period-card-muted {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(222, 236, 245, 0.16) !important;
    opacity: 1;
}

.admin-command-card .admin-period-card-muted .fw-semibold,
.admin-command-card .admin-period-card-muted .small,
.admin-command-card .admin-period-card-muted .text-muted,
.admin-command-card .admin-period-card-muted .form-label {
    color: #ffffff !important;
}

.admin-command-card .admin-period-card-muted .form-label {
    opacity: 0.86;
}

.admin-command-card .admin-period-card-muted .admin-icon-button {
    border-color: rgba(222, 236, 245, 0.24);
    color: #edf4f8;
}

.admin-command-card .admin-period-card-muted .admin-icon-button:hover {
    border-color: rgba(124, 231, 219, 0.38);
    color: #ffffff;
}

.admin-priority-filter-panel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(222, 236, 245, 0.14);
    border-radius: 18px;
    padding: 16px;
}

.admin-dashboard-filter-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-dashboard-filter-button {
    align-items: center;
    display: flex;
    font-size: 0.98rem;
    gap: 10px;
    justify-content: center;
    min-height: 48px;
    padding: 10px 14px;
    text-align: center;
    width: 100%;
}

.admin-dashboard-filter-button > span:first-child {
    white-space: nowrap;
}

.admin-dashboard-filter-button.is-open {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.admin-dashboard-filter-button .badge {
    flex: 0 0 auto;
}

@media (max-width: 1199.98px) {
    .admin-dashboard-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

@media (max-width: 575.98px) {
    .admin-dashboard-filter-grid {
        grid-template-columns: 1fr;
    }
}

.admin-priority-filter-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-priority-option {
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(222, 236, 245, 0.12);
    border-radius: 12px;
    color: #edf4f8;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.admin-priority-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(124, 231, 219, 0.34);
    transform: translateY(-1px);
}

.admin-priority-option input {
    accent-color: #22b8a7;
    flex: 0 0 auto;
    margin: 0;
}

.admin-priority-option span {
    color: inherit;
    font-size: 14px;
    line-height: 1.35;
}

.admin-card-link {
    color: inherit;
    display: block;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-card-link:hover {
    border-color: #bfd6df;
    box-shadow: 0 16px 36px rgba(23, 33, 43, 0.12);
    color: inherit;
    transform: translateY(-1px);
}

.admin-stat-card {
    height: 100%;
    min-height: 160px;
}

.admin-stat-value {
    color: #17212b;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.admin-stat-label {
    color: #52606d;
    font-size: 14px;
    margin-top: 10px;
}

.admin-progress {
    background: #e9eef2;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.admin-progress-bar {
    background: linear-gradient(90deg, #22b8a7 0%, #168c80 100%);
    border-radius: 999px;
    height: 100%;
}

.admin-list-row {
    align-items: center;
    border-bottom: 1px solid #edf1f4;
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
}

.admin-list-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-user-card {
    border: 1px solid #e4e9ee;
    border-radius: 16px;
    padding: 18px;
}

.admin-user-list {
    display: grid;
    gap: 16px;
}

.admin-sentinel {
    height: 1px;
}

.admin-section-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.admin-table th {
    color: #52606d;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-muted {
    color: #6b7785;
}

.admin-selector {
    border: 1px solid #d9e1e7;
    border-radius: 16px;
    padding: 16px;
}

.password-wrapper {
    position: relative;
}

.password-input {
    padding-right: 52px;
}

.toggle-password {
    align-items: center;
    background: transparent;
    border: 0;
    color: #52606d;
    cursor: pointer;
    display: inline-flex;
    height: 100%;
    justify-content: center;
    padding: 0 14px;
    position: absolute;
    right: 0;
    top: 0;
}

.toggle-password:hover {
    color: #17212b;
}

.admin-selector-results,
.admin-selector-selected {
    display: grid;
    gap: 10px;
    max-height: 260px;
    overflow: auto;
}

.admin-selector-item {
    align-items: center;
    border: 1px solid #e4e9ee;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 12px;
}

.admin-selector-empty {
    color: #6b7785;
    font-size: 14px;
    padding: 10px 0;
}

.admin-stat-placeholder {
    min-height: 160px;
}

.admin-statistics-block h2 {
    letter-spacing: -0.03em;
}

.admin-statistics-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-statistics-head .admin-muted {
    flex: 1 1 320px;
    font-size: 18px;
    line-height: 1.5;
}

.admin-statistics-kpi h2 {
    font-size: clamp(3.5rem, 6vw, 4.75rem);
    font-weight: 700;
    line-height: 0.95;
}

.admin-stat-target-card {
    min-width: 0;
}

.admin-stat-criteria-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.admin-stat-kpi-column {
    min-height: 100%;
}

.admin-stat-criteria-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-stat-criteria-button {
    justify-content: center;
    white-space: nowrap;
}

.admin-indicator-corner {
    background: linear-gradient(135deg, #e7fbf7 0%, #d5f3ee 100%);
    border: 1px solid #b7e6dd;
    border-radius: 0 18px 18px 18px;
    color: #0f766e;
    display: inline-block;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    max-width: 100%;
    padding: 10px 14px;
    text-transform: uppercase;
}

.admin-drawer-panel {
    padding: 24px;
}

.admin-drawer-rows {
    display: grid;
    gap: 10px;
}

.admin-drawer-grid {
    align-items: center;
    column-gap: 14px;
    display: grid;
    grid-template-columns: 0.75fr 1.45fr 1fr 1.35fr 1fr 1.1fr 1fr;
}

.admin-drawer-grid-head {
    border-bottom: 1px solid #e4e9ee;
    color: #52606d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding: 0 8px 12px;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 2;
}

.admin-drawer-row {
    background: #ffffff;
    border: 1px solid #e4e9ee;
    border-radius: 14px;
    padding: 14px 12px;
}

.admin-stat-drawer-backdrop {
    background: rgba(15, 23, 35, 0.36);
    inset: 0;
    position: fixed;
    z-index: 1040;
}

.admin-stat-drawer {
    background: #f7f9fb;
    border-left: 1px solid #dce4ea;
    box-shadow: -18px 0 48px rgba(17, 25, 34, 0.18);
    height: 100vh;
    max-width: 960px;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.24s ease;
    width: min(92vw, 960px);
    z-index: 1050;
}

.admin-stat-drawer.is-open {
    transform: translateX(0);
}

.admin-stat-drawer-header {
    align-items: flex-start;
    background: #ffffff;
    border-bottom: 1px solid #e4e9ee;
    display: flex;
    justify-content: space-between;
    padding: 24px;
}

.admin-stat-drawer-body {
    height: calc(100vh - 98px);
    overflow-y: auto;
}

body.admin-drawer-open {
    overflow: hidden;
}

.admin-drawer-load-more {
    min-height: 52px;
}

.admin-chart-card {
    padding: 18px;
}

.admin-chart-frame {
    position: relative;
    width: 100%;
}

.admin-chart-frame-sm {
    height: 220px;
}

.admin-chart-frame-md {
    height: 260px;
}

.admin-chart-frame-lg {
    height: 340px;
}

.admin-chart-card canvas {
    height: 100% !important;
    width: 100% !important;
}

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

    .admin-stat-criteria-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-drawer-grid,
    .admin-drawer-grid-head {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.admin-kicker {
    color: #168c80;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.admin-auth-page {
    align-items: center;
    background: linear-gradient(135deg, #17212b 0%, #1d3640 54%, #0f766e 100%);
    display: flex;
    min-height: 100vh;
    padding: 24px;
}

.admin-auth-card {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
    margin: 0 auto;
    max-width: 440px;
    padding: 34px;
    width: 100%;
}

.admin-pagination-wrap {
    display: flex;
    justify-content: center;
}

.admin-pagination-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
}

.admin-pagination-summary {
    color: #6b7785;
    font-size: 14px;
}

.admin-pagination {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-pagination .page-item {
    list-style: none;
}

.admin-pagination .page-link {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d9e1e7;
    border-radius: 10px;
    color: #52606d;
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    justify-content: center;
    line-height: 1;
    min-height: 40px;
    min-width: 40px;
    padding: 0 14px;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.admin-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    border-color: #22b8a7;
    color: #168c80;
}

.admin-pagination .page-item.active .page-link {
    background: #22b8a7;
    border-color: #22b8a7;
    color: #102027;
}

.admin-pagination .page-item.disabled .page-link {
    background: #f7f9fb;
    color: #9aa8b5;
}

@media (max-width: 575.98px) {
    .admin-sidebar {
        min-height: auto;
    }

    .admin-priority-filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-criteria-grid {
        grid-template-columns: 1fr;
    }

    .admin-pagination-footer {
        justify-content: center;
    }

    .admin-content,
    .admin-topbar {
        padding: 18px;
    }
}

.admin-statistics-export-overlay {
    align-items: center;
    background: rgba(10, 18, 26, 0.48);
    backdrop-filter: blur(3px);
    display: flex;
    height: 100vh;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    width: 100vw;
    z-index: 1060;
}

.admin-statistics-export-dialog {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(214, 228, 234, 0.96);
    border-radius: 24px;
    box-shadow: 0 22px 56px rgba(15, 23, 35, 0.22);
    max-width: 340px;
    padding: 28px 26px;
    text-align: center;
    width: calc(100vw - 32px);
}

.admin-statistics-export-spinner {
    animation: admin-statistics-export-spin 0.9s linear infinite;
    border: 4px solid rgba(15, 118, 110, 0.16);
    border-radius: 999px;
    border-top-color: #0f766e;
    height: 58px;
    margin: 0 auto 18px;
    width: 58px;
}

.admin-statistics-export-title {
    color: #17212b;
    font-size: 20px;
    font-weight: 700;
}

.admin-statistics-export-copy {
    color: #5f6f82;
    font-size: 14px;
    margin-top: 8px;
}

body.admin-export-loading {
    overflow: hidden;
}

@keyframes admin-statistics-export-spin {
    to {
        transform: rotate(360deg);
    }
}
