* {
    box-sizing: border-box;
}

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

/* Header */

.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;

    height: 64px;

    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

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

    padding: 0 24px;

    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-button {
    width: 40px;
    height: 40px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;

    border: none;
    background: transparent;
    border-radius: 8px;

    cursor: pointer;
}

.menu-button:hover {
    background: #f1f3f5;
}

.menu-button span {
    width: 20px;
    height: 2px;

    background: #202124;
    border-radius: 2px;
}

.page-title {
    margin: 0;

    font-size: 20px;
    font-weight: 600;
}

.login-button {
    display: inline-block;
    box-sizing: border-box;
    padding: 9px 18px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.login-button:hover {
    background: #f5f6f8;
}

/* Header user */

.header-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-user-name {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.header-user form {
    margin: 0;
}

.header-user .login-button {
    font-family: inherit;
}

/* Sidebar */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: 260px;

    background: #ffffff;
    border-right: 1px solid #e5e7eb;

    transform: translateX(-100%);
    transition: transform 0.2s ease;

    z-index: 200;

    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    height: 64px;

    display: flex;
    align-items: center;

    padding: 0 24px;

    border-bottom: 1px solid #e5e7eb;

    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 16px 12px;
}

.sidebar-link {
    display: block;

    padding: 11px 12px;

    border-radius: 8px;

    color: #202124;
    text-decoration: none;

    font-size: 14px;
}

.sidebar-link:hover {
    background: #f1f3f5;
}

.sidebar-divider {
    height: 1px;

    margin: 12px 0;

    background: #e5e7eb;
}

.sidebar-link.active {
    background: #f1f3f5;
    font-weight: 600;
}

/* Overlay */

.sidebar-overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.25);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;

    z-index: 150;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}


/* Main content */

.main-content {
    padding: 24px 24px 24px;
}

/* Directories */

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    margin: 0 0 6px;

    font-size: 24px;
    font-weight: 600;
}

.page-header p {
    margin: 0;

    color: #6b7280;
    font-size: 14px;
}


.directory-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    overflow: hidden;
}


.directory-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    padding: 20px 20px 16px;

    border-bottom: 1px solid #e5e7eb;
}


.directory-selector {
    display: flex;
    flex-direction: column;

    gap: 6px;
}

.directory-selector label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.directory-selector select {
    min-width: 240px;

    padding: 9px 36px 9px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-size: 14px;

    cursor: pointer;

    outline: none;
}

.directory-selector select:focus {
    border-color: #9ca3af;
}


.primary-button {
    padding: 9px 16px;

    border: none;
    border-radius: 8px;

    background: #202124;
    color: #ffffff;

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

    cursor: pointer;
}

.primary-button:hover {
    background: #34363a;
}


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


.directory-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}


.directory-table th {
    padding: 12px 20px;

    background: #f9fafb;

    color: #6b7280;

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

    text-align: left;

    border-bottom: 1px solid #e5e7eb;
}


.directory-table td {
    padding: 14px 20px;

    border-bottom: 1px solid #f0f1f3;

    color: #202124;
}


.directory-table tbody tr {
    transition: background 0.15s ease;
}

.directory-table tbody tr:hover {
    background: #f9fafb;
}


.directory-table tbody tr:last-child td {
    border-bottom: none;
}


.directory-table th:first-child,
.directory-table td:first-child {
    width: 80px;

    color: #6b7280;
}

.directory-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.directory-row:hover {
    background: #f9fafb;
}


.empty-state {
    padding: 32px 20px !important;

    text-align: center;

    color: #9ca3af !important;
}

/* Drawer */

.drawer {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: 520px;
    max-width: 90vw;

    background: #ffffff;
    border-left: 1px solid #e5e7eb;

    transform: translateX(100%);
    transition: transform 0.25s ease;

    z-index: 300;

    display: flex;
    flex-direction: column;
}

.drawer.open {
    transform: translateX(0);
}


.drawer-header {
    height: 64px;

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

    padding: 0 20px;

    border-bottom: 1px solid #e5e7eb;

    flex-shrink: 0;
}

.drawer-header h2 {
    margin: 0;

    font-size: 18px;
    font-weight: 600;
}


.drawer-close {
    width: 36px;
    height: 36px;

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

    border: none;
    border-radius: 8px;

    background: transparent;
    color: #6b7280;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}

.drawer-close:hover {
    background: #f1f3f5;
    color: #202124;
}


.drawer-content {
    flex: 1;

    padding: 20px;

    overflow-y: auto;
}


/* Drawer overlay */

.drawer-overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.2);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;

    z-index: 250;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Drawer form */

.drawer-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

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

    outline: none;

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.12);
}

.drawer-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

.danger-button {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #dc2626;
    border-radius: 8px;
    background: #ffffff;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.danger-button:hover {
    background: #fef2f2;
}

/* Report */

.report-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.report-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e5e7eb;
}

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

.report-filter label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.report-filter select {
    min-width: 160px;
    padding: 9px 36px 9px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-size: 14px;

    cursor: pointer;
    outline: none;
}

.report-filter select:focus {
    border-color: #9ca3af;
}


/* Область таблицы */

.report-table-wrapper {
    height: calc(100vh - 270px);
    overflow: auto;
}


/* Таблица */

.report-table {
    width: max-content;
    min-width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}

.report-table th {
    position: sticky;
    top: 0;
    z-index: 2;

    padding: 12px 20px;

    background: #f9fafb;

    color: #6b7280;

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

    text-align: left;

    border-bottom: 1px solid #e5e7eb;

    white-space: nowrap;
}

.report-table td {
    padding: 14px 20px;

    border-bottom: 1px solid #f0f1f3;

    color: #202124;

    white-space: nowrap;
}

.report-table tbody tr:hover {
    background: #f9fafb;
}


/* Числовые колонки */

.report-table .number {
    text-align: right;
}


/* Итоги */

.report-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.report-table tfoot td {
    padding: 14px 20px;

    background: #ffffff;

    font-weight: 600;

    border-top: 1px solid #e5e7eb;
    border-bottom: none;

    white-space: nowrap;
}

/* =========================================================
   Analytical reports
   ========================================================= */

.analytics-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}


/* =========================================================
   Toolbar
   ========================================================= */

.analytics-toolbar {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

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

.analytics-filter > label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}


/* =========================================================
   Selects
   ========================================================= */

.analytics-filter select {
    min-width: 160px;
    padding: 9px 36px 9px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-size: 14px;
    line-height: 20px;

    cursor: pointer;
    outline: none;
}

.analytics-filter select:focus {
    border-color: #9ca3af;
}


/* =========================================================
   Period filter
   ========================================================= */

.analytics-period-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-period-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-period-group > span {
    color: #6b7280;
    font-size: 14px;
}

.analytics-period-group select {
    min-width: auto;
}

.analytics-period-group select:first-of-type {
    width: 90px;
}

.analytics-period-group select:last-of-type {
    width: 130px;
}

.analytics-period-separator {
    color: #9ca3af;
    font-size: 16px;
}

/* =========================================================
   Table wrapper
   ========================================================= */

.analytics-table-wrapper {
    height: calc(100vh - 270px);
    overflow: auto;
}


/* =========================================================
   Table
   ========================================================= */

.analytics-table {
    width: max-content;
    min-width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}


/* =========================================================
   Table header
   ========================================================= */

.analytics-table th {
    position: sticky;
    top: 0;
    z-index: 3;

    padding: 12px 20px;

    background: #f9fafb;
    color: #6b7280;

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

    text-align: left;

    border-bottom: 1px solid #e5e7eb;

    white-space: nowrap;
}


/* Fixed identifying columns */

.analytics-table th.analytics-fixed-column {
    z-index: 4;
}


/* =========================================================
   Table cells
   ========================================================= */

.analytics-table td {
    padding: 14px 20px;

    color: #202124;

    border-bottom: 1px solid #f0f1f3;

    white-space: nowrap;
}

.analytics-table tbody tr:hover {
    background: #f9fafb;
}


/* =========================================================
   Fixed columns
   ========================================================= */

.analytics-table .analytics-fixed-column {
    position: sticky;
    left: 0;
    z-index: 2;

    background: #ffffff;
}

.analytics-table tbody tr:hover .analytics-fixed-column {
    background: #f9fafb;
}

.analytics-table .analytics-fixed-column:last-of-type {
    border-right: 3px solid #e5e7ebaf;
}


/* =========================================================
   Period cells
   ========================================================= */

.analytics-period-cell {
    min-width: 140px;
    text-align: right;
    vertical-align: top;
}

.analytics-value {
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    min-height: 22px;
    font-variant-numeric: tabular-nums;
}

.analytics-delta {
    margin-top: 2px;
    font-size: 12px;
    line-height: 16px;
    min-height: 16px;
    font-variant-numeric: tabular-nums;
}


/* =========================================================
   Delta colors
   ========================================================= */

.analytics-delta.positive {
    color: #16a34a;
}

.analytics-delta.negative {
    color: #dc2626;
}


/* =========================================================
   Numbers
   ========================================================= */

.analytics-table .number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}


/* =========================================================
   Footer
   ========================================================= */

.analytics-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 3;
}

.analytics-table tfoot td {
    padding: 14px 20px;

    background: #f1efef;

    font-weight: 600;

    border-top: 1px solid #e5e7eb;
    border-bottom: none;

    white-space: nowrap;
}

.analytics-table tfoot .analytics-value {
    font-size: 15px;
    font-weight: 600;
}

.analytics-table tfoot .analytics-delta {
    font-size: 12px;
    font-weight: 600;
}


/* =========================================================
   Empty state
   ========================================================= */

.analytics-empty {
    padding: 40px 20px;

    color: #6b7280;

    text-align: center;
}


/* =========================================================
   Loading state
   ========================================================= */

.analytics-loading {
    padding: 40px 20px;

    color: #6b7280;

    text-align: center;
}

/* =========================================================
Employee report
========================================================= */

.employee-report-page {
    padding-bottom: 40px;
}

/* =========================================================
Header
========================================================= */

.employee-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 24px;
}

.employee-report-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.employee-report-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #202124;
}

.employee-report-subtitle {
    font-size: 14px;
    color: #6b7280;
}

/* =========================================================
Filters
========================================================= */

.employee-report-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

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

.employee-report-filter > label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.employee-report-filter select {
    min-width: 180px;
    padding: 9px 36px 9px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-size: 14px;
    line-height: 20px;

    cursor: pointer;
    outline: none;
}

.employee-report-filter select:focus {
    border-color: #9ca3af;
}

/* =========================================================
Period
========================================================= */

.employee-report-period {
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-report-period select {
    min-width: auto;
}

.employee-report-period select.month {
    width: 110px;
}

.employee-report-period select.year {
    width: 90px;
}

.employee-report-period-separator {
    color: #9ca3af;
    font-size: 16px;
}

/* =========================================================
Employee info
========================================================= */

.employee-report-info {
    margin-bottom: 24px;
}

.employee-report-name {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
}

.employee-report-position {
    margin-top: 3px;
    font-size: 14px;
    color: #6b7280;
}

/* =========================================================
Overview
========================================================= */

.employee-report-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;

    margin-bottom: 32px;
}


/* =========================================================
KPI grid
========================================================= */

.employee-report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.employee-report-kpi-card {
    min-width: 0;

    padding: 16px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.employee-report-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.employee-report-kpi-value {
    margin-top: 6px;

    font-size: 20px;
    line-height: 26px;
    font-weight: 600;

    color: #202124;
    font-variant-numeric: tabular-nums;
}

.employee-report-kpi-secondary {
    margin-top: 4px;

    font-size: 12px;
    line-height: 16px;

    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}


/* =========================================================
Chart
========================================================= */

.employee-report-chart-card {
    min-width: 0;

    padding: 16px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.employee-report-chart-title {
    margin-bottom: 12px;

    font-size: 14px;
    line-height: 20px;
    font-weight: 600;

    color: #202124;
}

.employee-report-chart {
    position: relative;
    width: 100%;
    height: 260px;
}

.employee-report-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* =========================================================
Report sections
========================================================= */

.employee-report-section {
    margin-bottom: 32px;
}

.employee-report-section-title {
    margin-bottom: 12px;

    font-size: 16px;
    line-height: 22px;
    font-weight: 600;

    color: #202124;
}

/* =========================================================
Tables
========================================================= */

.employee-report-table-wrapper {
    overflow-x: auto;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.employee-report-table {
    width: 100%;
    border-collapse: collapse;

    font-size: 14px;
}

.employee-report-table th {
    padding: 12px 20px;

    background: #f9fafb;
    color: #6b7280;

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

    text-align: left;
    white-space: nowrap;

    border-bottom: 1px solid #e5e7eb;
}

.employee-report-table td {
    padding: 14px 20px;

    color: #202124;
    white-space: nowrap;

    border-bottom: 1px solid #f0f1f3;
}

.employee-report-table tbody tr:hover {
    background: #f9fafb;
}

.employee-report-table tbody tr:last-child td {
    border-bottom: none;
}

.employee-report-table .number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
Table totals
========================================================= */

.employee-report-table tfoot td {
    padding: 14px 20px;

    background: #f1efef;

    font-weight: 600;

    border-top: 1px solid #e5e7eb;
    border-bottom: none;

    white-space: nowrap;
}

.employee-report-table tfoot .number {
    font-variant-numeric: tabular-nums;
}

/* =========================================================
Unallocated time
========================================================= */

.employee-report-unallocated {
    display: flex;
    gap: 48px;

    padding: 20px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.employee-report-unallocated-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.employee-report-unallocated-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.employee-report-unallocated-value {
    font-size: 20px;
    font-weight: 600;
    color: #202124;

    font-variant-numeric: tabular-nums;
}

/* =========================================================
Empty / loading
========================================================= */

.employee-report-empty,
.employee-report-loading {
    padding: 40px 20px;

    color: #6b7280;
    text-align: center;
}

.employee-report-unallocated {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.employee-report-unallocated-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.employee-report-unallocated-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (max-width: 1100px) {
    .employee-report-overview {
        grid-template-columns: 1fr;
    }

    .employee-report-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .employee-report-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .employee-report-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-summary-column {
    background: #eeeeee !important;
    font-weight: 700 !important;
}

.analytics-summary-column .analytics-value {
    font-weight: 700 !important;
}

.analytics-summary-start {
    border-left: 2px solid #999 !important;
}

.analytics-sortable {
    cursor: pointer;
    user-select: none;
}

.analytics-sortable:hover {
    background-color: #eeeeee;
}

.margin-sortable {
    cursor: pointer;
    user-select: none;
}

.margin-sortable:hover {
    background-color: #eeeeee;
}

.salary-sortable {
    cursor: pointer;
    user-select: none;
}

.salary-sortable:hover {
    background-color: #eeeeee;
}

/* =========================================================
Client report
========================================================= */

.client-report-page {
    padding-bottom: 40px;
}


/* =========================================================
Header
========================================================= */

.client-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 24px;
}

.client-report-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-report-title h1 {
    margin: 0;

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

    color: #202124;
}

.client-report-subtitle {
    font-size: 14px;
    color: #6b7280;
}


/* =========================================================
Filters
========================================================= */

.client-report-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

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

.client-report-filter > label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.client-report-filter select {
    min-width: 180px;

    padding: 9px 36px 9px 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

    font-size: 14px;
    line-height: 20px;

    cursor: pointer;
    outline: none;
}

.client-report-filter select:focus {
    border-color: #9ca3af;
}


/* =========================================================
Period
========================================================= */

.client-report-period {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-report-period select {
    min-width: auto;
}

.client-report-period select.month {
    width: 110px;
}

.client-report-period select.year {
    width: 90px;
}

.client-report-period-separator {
    color: #9ca3af;
    font-size: 16px;
}


/* =========================================================
Client info
========================================================= */

.client-report-info {
    margin-bottom: 24px;
}

.client-report-name {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
}

.client-report-project-manager {
    margin-top: 3px;

    font-size: 14px;
    color: #6b7280;
}


/* =========================================================
Overview
========================================================= */

.client-report-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;

    margin-bottom: 32px;
}


/* =========================================================
KPI grid
========================================================= */

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

.client-report-kpi-card {
    min-width: 0;

    padding: 16px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.client-report-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.client-report-kpi-value {
    margin-top: 6px;

    font-size: 20px;
    line-height: 26px;
    font-weight: 600;

    color: #202124;

    font-variant-numeric: tabular-nums;
}

.client-report-kpi-subvalue {
    margin-top: 6px;
    color: var(--text-secondary, #6b7280);
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================================
Chart
========================================================= */

.client-report-chart-card {
    min-width: 0;

    padding: 16px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.client-report-chart-title {
    margin-bottom: 12px;

    font-size: 14px;
    line-height: 20px;
    font-weight: 600;

    color: #202124;
}

.client-report-chart {
    position: relative;

    width: 100%;
    height: 260px;
}

.client-report-chart canvas {
    width: 100% !important;
    height: 100% !important;
}


/* =========================================================
Report sections
========================================================= */

.client-report-section {
    margin-bottom: 32px;
}

.client-report-section-title {
    margin-bottom: 12px;

    font-size: 16px;
    line-height: 22px;
    font-weight: 600;

    color: #202124;
}


/* =========================================================
Tables
========================================================= */

.client-report-table-wrapper {
    overflow-x: auto;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.client-report-table {
    width: 100%;
    border-collapse: collapse;

    font-size: 14px;
}

.client-report-table th {
    padding: 12px 20px;

    background: #f9fafb;
    color: #6b7280;

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

    text-align: left;
    white-space: nowrap;

    border-bottom: 1px solid #e5e7eb;
}

.client-report-table td {
    padding: 14px 20px;

    color: #202124;
    white-space: nowrap;

    border-bottom: 1px solid #f0f1f3;
}

.client-report-table tbody tr:hover {
    background: #f9fafb;
}

.client-report-table tbody tr:last-child td {
    border-bottom: none;
}

.client-report-table .number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}


/* =========================================================
Table totals
========================================================= */

.client-report-table tbody tr:last-child td {
    border-bottom: none;
}

.client-report-table .total-row td {
    padding: 14px 20px;

    background: #f1efef;

    font-weight: 600;

    border-top: 1px solid #e5e7eb;
    border-bottom: none;

    white-space: nowrap;
}

.client-report-table .total-row .number {
    font-variant-numeric: tabular-nums;
}


/* =========================================================
Empty / loading
========================================================= */

.client-report-empty,
.client-report-loading {
    padding: 40px 20px;

    color: #6b7280;
    text-align: center;
}


/* =========================================================
Responsive
========================================================= */

@media (max-width: 1100px) {

    .client-report-overview {
        grid-template-columns: 1fr;
    }

    .client-report-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 800px) {

    .client-report-header {
        flex-direction: column;
        align-items: stretch;
    }

    .client-report-filters {
        flex-wrap: wrap;
    }

    .client-report-overview {
        grid-template-columns: 1fr;
    }

    .client-report-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 520px) {

    .client-report-kpi-grid {
        grid-template-columns: 1fr;
    }

    .client-report-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .client-report-filter select {
        width: 100%;
    }

    .client-report-period {
        width: 100%;
    }

    .client-report-period select.month,
    .client-report-period select.year {
        width: 100%;
    }

}

/* =========================================================
About page
========================================================= */
/* Страница «О системе» */

.about-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.release {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.release:hover {
    border-color: var(--accent-color, #3A86FF);
}

.release summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #2B2D42);
    transition: background-color 0.2s ease;
}

.release summary::-webkit-details-marker {
    display: none;
}

.release summary::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
    color: #8a8fa3;
    margin-left: 16px;
}

.release[open] summary::after {
    content: "−";
}

.release summary:hover {
    background-color: var(--hover-bg, #f8f9fc);
}

.release summary:focus-visible {
    outline: 2px solid var(--accent-color, #3A86FF);
    outline-offset: -3px;
}

.release-date {
    color: #8a8fa3;
    font-size: 14px;
    font-weight: 400;
    margin-left: 8px;
    white-space: nowrap;
}

.release-content {
    padding: 4px 24px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.release-content h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 14px;
    color: var(--text-color, #2B2D42);
}

.release-content ul {
    margin: 0;
    padding-left: 20px;
}

.release-content li {
    padding-left: 4px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-color, #2B2D42);
}

.release-content li:last-child {
    margin-bottom: 0;
}

/* Адаптация для мобильных устройств */

@media (max-width: 600px) {
    .release summary {
        padding: 16px;
        font-size: 15px;
    }

    .release-date {
        display: block;
        margin: 5px 0 0;
        font-size: 13px;
    }

    .release-content {
        padding: 4px 16px 20px;
    }
}

/* =========================
   Login page
   ========================= */

.login-page {
    min-height: calc(100vh - 112px);

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

    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;

    padding: 36px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.login-header {
    margin-bottom: 28px;
}

.login-header h2 {
    margin: 0 0 8px;

    font-size: 25px;
    font-weight: 600;
    letter-spacing: -0.5px;

    color: #202124;
}

.login-header p {
    margin: 0;

    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Form */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.login-field input {
    width: 100%;
    height: 44px;

    padding: 0 13px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;
    color: #202124;

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

    outline: none;

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

.login-field input::placeholder {
    color: #9ca3af;
}

.login-field input:hover {
    border-color: #9ca3af;
}

.login-field input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.12);
}

/* Submit button */

.login-submit {
    width: 100%;
    min-height: 44px;

    margin-top: 4px;
    padding: 11px 16px;

    border: none;
    border-radius: 8px;

    background: #202124;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition: background 0.15s ease;
}

.login-submit:hover {
    background: #34363a;
}

.login-submit:active {
    background: #111214;
}

.login-submit:focus-visible {
    outline: 3px solid rgba(32, 33, 36, 0.2);
    outline-offset: 3px;
}

/* Error */

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;

    border: 1px solid #fecaca;
    border-radius: 8px;

    background: #fef2f2;
    color: #b91c1c;

    font-size: 13px;
    line-height: 1.5;
}

/* Footer */

.login-footer {
    margin-top: 28px;
    padding-top: 20px;

    border-top: 1px solid #f0f1f3;

    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

/* Mobile */

@media (max-width: 480px) {
    .login-page {
        min-height: calc(100vh - 64px);
        padding: 24px 16px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 12px;
    }

    .login-header h2 {
        font-size: 23px;
    }
}