* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

/* ========== APP LAYOUT (SIDEBAR) ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu li a.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border-left: 4px solid white;
}

.menu-icon {
    font-size: 1.2rem;
    margin-right: 12px;
}

.menu-text {
    font-size: 0.95rem;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 10px 20px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.user-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    opacity: 0.7;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    padding: 10px 15px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar-btn:hover {
    background: rgba(255,255,255,0.25);
}

.sidebar-btn.logout {
    background: rgba(220, 53, 69, 0.3);
}

.sidebar-btn.logout:hover {
    background: rgba(220, 53, 69, 0.5);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 1.5rem;
    color: #333;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

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

.control-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.input-date {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.input-date:focus {
    border-color: #667eea;
    outline: none;
}

.content-frame {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;
}

/* View Section */
.view-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Legacy container support */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title {
    flex: 1;
    min-width: 300px;
}

.header h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.user-info {
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #666;
}

/* Control Panel */
.control-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-selector label {
    font-weight: 600;
    color: #555;
}

.date-selector input[type="date"],
.period-selector input[type="date"] {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.date-selector input[type="date"]:focus,
.period-selector input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.view-selector {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.view-selector button {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.view-selector button:hover {
    background: #f7fafc;
}

.view-selector button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.refresh-btn {
    padding: 10px 20px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Period Selector */
.period-selector {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: end;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.period-selector > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.period-selector label {
    font-weight: 600;
    color: #555;
}

.period-selector button {
    padding: 10px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.period-selector button:hover {
    background: #5568d3;
}

.period-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.period-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Loading */
.loading {
    background: white;
    border-radius: 12px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error-message {
    background: #fee2e2;
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    color: #991b1b;
}

/* Data Status Warning */
.data-status-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.data-status-warning .warning-icon {
    font-size: 1.5rem;
}

.data-status-warning .warning-text {
    flex: 1;
}

.data-status-warning .retry-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    background: white;
    color: #333;
    transition: all 0.2s;
}

.data-status-warning .retry-btn:hover {
    background: #f0f0f0;
}

.data-status-warning.status-offline {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    color: #92400e;
}

.data-status-warning.status-stale {
    background: #dbeafe;
    border: 2px solid #3b82f6;
    color: #1e40af;
}

.data-status-warning.status-ok {
    background: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    /* Force four cards per row on wide screens */
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
}

.card-content h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 5px;
}

.card-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments for summary cards */
@media (max-width: 1100px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Current activity table white background */
.current-activity-table {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.current-activity-view .workers-table {
    background: white;
}

/* Chart */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chart-container h2 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.3rem;
}

.chart-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

.chart-container canvas {
    max-height: 400px;
}

.chart-wide {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .chart-container canvas {
        max-height: 300px;
    }
}

/* Workers Table */
.workers-table-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.workers-table-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.table-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.search-filter {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.pagination-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sort-select {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
}

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

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

.workers-table thead {
    background: #f7fafc;
}

.workers-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e2e8f0;
}

.workers-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.workers-table tbody tr {
    transition: all 0.2s;
}

.workers-table tbody tr:hover {
    background: #f7fafc;
}

.barcode {
    display: inline-block;
    padding: 4px 10px;
    background: #e2e8f0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.earnings {
    color: #22c55e;
    font-weight: 600;
}

.efficiency-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.efficiency-badge.high {
    background: #dcfce7;
    color: #16a34a;
}

.efficiency-badge.medium {
    background: #fef3c7;
    color: #d97706;
}

.efficiency-badge.low {
    background: #fee2e2;
    color: #dc2626;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

/* Login Modal Specific Styles */
#loginModal {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(5px);
}

#loginModal.show {
    display: flex !important;
}

#loginModal .modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    max-width: 450px;
    border-radius: 20px;
    overflow: hidden;
}

#loginModal h2 {
    color: white;
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 32px;
}

#loginModal > p {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin: 0 0 30px 0;
}

#loginModal .form-group {
    margin-bottom: 20px;
}

#loginModal .form-group label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

#loginModal .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 14px;
    transition: all 0.3s;
}

#loginModal .form-group input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#loginModal small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 6px;
}

#loginModal .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

#loginModal .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#loginModal .btn-primary {
    background: white;
    color: #667eea;
}

#loginModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#loginModal .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#loginModal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

#loginModal .error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    border-left: 3px solid #ff6b6b;
}

#loginModal form {
    padding: 25px;
}

#loginModal .modal-content > p {
    padding: 0 25px;
}

/* Worker Details Modal - wide layout */
.modal-content {
    background-color: #fefefe;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    color: #667eea;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #f7fafc;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.worker-info {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.worker-info p {
    margin: 8px 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 15px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.metric-card .metric-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.metric-card .metric-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.metric-card .metric-value.earnings {
    color: #4ade80;
}

.modal-body h3 {
    margin: 20px 0 15px;
    color: #333;
}

/* Детализация работ - 2 карточки в ряд с крупным текстом */
.work-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.work-type-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    color: #333;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.work-type-card h4 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #667eea;
    font-weight: 600;
}

.work-type-card p {
    margin: 6px 0;
    font-size: 1.05rem;
    color: #444;
    line-height: 1.5;
}

.work-type-card p strong {
    color: #555;
    font-weight: 600;
}

/* Статистика по рядам - одна строка на всю ширину */
.rows-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.row-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #22c55e;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.row-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.row-item-stats {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    align-items: center;
}

.row-item-stat {
    font-size: 0.95rem;
    color: #555;
}

.row-item-stat strong {
    color: #333;
}

.row-item-types {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.detailed-records {
    margin-top: 30px;
    overflow-x: auto;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    min-width: 900px;
}

.details-table thead {
    background: #f7fafc;
}

.details-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.85rem;
}

.details-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.details-table tbody tr:hover {
    background: #f7fafc;
}

.record-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Настройки */
.settings-view {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.settings-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-card h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.settings-description {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.formula-section {
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.formula-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.formula-explanation {
    color: #666;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-left: 4px solid #667eea;
    border-radius: 4px;
}

.formula-explanation code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
}

.coefficient-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.formula-section:last-of-type .coefficient-inputs {
    grid-template-columns: 1fr;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.coefficient-input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.coefficient-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-primary {
    flex: 1;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    flex: 1;
    padding: 15px 30px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
    background: #f8f9ff;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    text-align: center;
}

.settings-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.settings-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.settings-info {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    align-self: start;
}

.settings-info h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.settings-info ul {
    list-style: none;
    padding-left: 0;
}

.settings-info li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    line-height: 1.6;
}

.settings-info li:last-child {
    border-bottom: none;
}

.settings-info strong {
    color: #333;
}

/* Быстрая панель и прокручиваемая область вкладок */
.tab-pane {
    max-height: calc(100vh - 220px); /* header + controls approx */
    overflow-y: auto;
    padding: 12px 0;
}

/* Make sure tables and charts shrink gracefully inside the pane */
.tab-pane table {
    width: 100%;
    border-collapse: collapse;
}
.tab-pane canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .control-panel {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-selector {
        margin-left: 0;
        flex-direction: column;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .table-controls {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .work-breakdown {
        grid-template-columns: 1fr;
    }
    
    .settings-view {
        grid-template-columns: 1fr;
    }
    
    .coefficient-inputs {
        grid-template-columns: 1fr;
    }
    
    .settings-actions {
        flex-direction: column;
    }
}
/* ============================================
   SORTING & PAGINATION STYLES
   ============================================ */

/* Sortable table headers */
.th-sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.th-sortable:hover {
    background: #e8ecf4;
}

.sort-icon {
    margin-left: 6px;
    font-size: 0.85em;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.th-sortable:hover .sort-icon {
    opacity: 0.8;
}

.th-sortable.active .sort-icon {
    opacity: 1;
    color: #667eea;
}

/* Clickable table rows */
.clickable-row {
    cursor: pointer;
    transition: all 0.2s;
}

.clickable-row:hover {
    background: #f0f4ff !important;
    transform: translateX(2px);
}

/* Table controls enhancement */
.table-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.table-controls-left {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
}

.table-controls-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Search input with icon */
.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-wrapper .search-input {
    padding-left: 40px;
    width: 100%;
}

.search-wrapper::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.5;
}

/* Items per page selector */
.items-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.items-per-page select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.items-per-page select:focus {
    outline: none;
    border-color: #667eea;
}

/* Pagination info text */
.pagination-info {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

/* Pagination container */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    flex-wrap: wrap;
}

/* Page buttons */
.btn-page {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: white;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-page:hover:not(:disabled):not(.active) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-page.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

.btn-page:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f1f5f9;
}

/* Navigation arrows */
.btn-page.nav-arrow {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    font-size: 1.1rem;
}

.btn-page.nav-arrow:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Pagination dots */
.page-dots {
    padding: 0 6px;
    color: #94a3b8;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

/* No data cell */
.no-data-cell {
    text-align: center;
    padding: 50px !important;
    color: #94a3b8;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Results summary row */
.results-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #64748b;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Pagination info styled */
.pagination-info {
    font-size: 0.9rem;
    color: #64748b;
    white-space: nowrap;
    background: white;
    padding: 8px 14px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Items per page styled select */
select.items-per-page {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

select.items-per-page:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

select.items-per-page:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Table controls styling */
.pagination-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px 12px;
    border-radius: 10px;
    flex-wrap: wrap;
}

/* Auto refresh label */
.auto-refresh-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #64748b;
    white-space: nowrap;
}

.auto-refresh-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auto-refresh-label input[type="number"] {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Mobile responsive for pagination */
@media (max-width: 768px) {
    .table-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-controls-left,
    .table-controls-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-wrapper {
        max-width: none;
    }
    
    .pagination {
        gap: 6px;
        padding: 15px;
    }
    
    .btn-page {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .table-controls {
        gap: 10px;
    }
    
    .search-filter {
        min-width: 100%;
        max-width: none;
    }
}

/* Login Modal */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

/* NOTE: Main .modal-content styles are defined earlier in the file (line ~686) */
/* This is a duplicate that was overriding. Removed max-width: 400px */

.modal-content h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #eee;
    color: #333;
}

.btn-secondary:hover {
    background: #ddd;
}

.btn-refresh {
    background: #28a745;
    color: white;
}

.btn-refresh:hover {
    background: #218838;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    padding: 12px;
    background: #fadbd8;
    border-radius: 6px;
    font-size: 0.9rem;
}
/* ========== MODAL OVERLAY (NEW) ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-dialog.worker-modal {
    max-width: 95%;
    width: 1200px;
}

.modal-dialog.login-dialog {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    max-width: 450px;
}

.modal-dialog .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-dialog .modal-header h2 {
    margin: 0;
    color: #333;
}

.modal-dialog .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-dialog .modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-dialog .modal-body {
    padding: 25px;
}

.modal-dialog .worker-meta {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-dialog .worker-meta p {
    margin: 5px 0;
}

/* Login dialog form */
.login-dialog h2 {
    text-align: center;
    margin-bottom: 10px;
    color: white !important;
}

.login-dialog > p {
    text-align: center;
    opacity: 0.9;
    margin-bottom: 25px;
}

.login-dialog .form-group {
    margin-bottom: 20px;
}

.login-dialog .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-dialog .form-input {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.95);
    color: #333;
}

.login-dialog .form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.login-dialog .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.login-dialog .btn {
    flex: 1;
}

.login-dialog .btn-primary {
    background: white;
    color: #667eea;
}

.login-dialog .btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

/* ========== Data status banner ========== */
.data-status-banner {
    padding: 12px 20px;
    margin: 0 30px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-status-banner.warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.data-status-banner.error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.data-status-banner.success {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #166534;
}

.btn-retry {
    margin-left: auto;
    padding: 6px 12px;
    background: white;
    border: 1px solid currentColor;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-banner {
    padding: 15px 20px;
    margin: 0 30px 20px;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #991b1b;
}

.no-data {
    padding: 60px 20px;
    text-align: center;
    color: #666;
    font-size: 1.1rem;
}

/* ========== Summary Cards ========== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-card .card-icon {
    font-size: 2rem;
}

.summary-card .card-body {
    display: flex;
    flex-direction: column;
}

.summary-card .card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.summary-card .card-label {
    font-size: 0.9rem;
    color: #666;
}

/* ========== Charts ========== */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.charts-row.single {
    grid-template-columns: 1fr;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.chart-card.wide {
    max-width: 100%;
}

.chart-card h3 {
    margin: 0 0 15px;
    font-size: 1.1rem;
    color: #333;
}

.chart-card canvas {
    max-height: 300px;
}

/* ========== Table Section ========== */
.table-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.table-header h3 {
    margin: 0;
    color: #333;
}

.table-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
}

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

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

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table thead {
    background: #f7fafc;
}

.data-table th {
    font-weight: 600;
    color: #555;
}

.data-table .clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.data-table .clickable-row:hover {
    background: #f0f4f8;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: #666;
    font-size: 0.95rem;
}

/* ========== Top Workers ========== */
.top-workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.top-worker-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s;
}

.top-worker-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.top-worker-card.gold {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
}

.top-worker-card.silver {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px solid #94a3b8;
}

.top-worker-card.bronze {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    border: 2px solid #f97316;
}

.rank-badge {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.gold .rank-badge { background: #f59e0b; }
.silver .rank-badge { background: #64748b; }
.bronze .rank-badge { background: #ea580c; }

.worker-info {
    flex: 1;
}

.worker-info h4 {
    margin: 0 0 8px;
    color: #333;
}

.worker-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #666;
}

.efficiency-display {
    text-align: center;
}

.efficiency-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #22c55e;
}

.efficiency-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
}

/* ========== Activity List ========== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.activity-worker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.activity-time {
    font-size: 0.9rem;
    color: #666;
}

.activity-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #555;
}

/* ========== Settings Section ========== */
.settings-section .settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.settings-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.settings-panel h3 {
    margin: 0 0 5px;
    color: #333;
}

.settings-panel .help-text {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row label {
    color: #555;
}

.setting-input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 100px;
    text-align: right;
}

.setting-input:focus {
    outline: none;
    border-color: #667eea;
}

.threshold-value {
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    color: #666;
}

.settings-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
    .loading-overlay {
        left: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .loading-overlay {
        left: 0;
    }
    .charts-row {
        grid-template-columns: 1fr;
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-controls {
        width: 100%;
    }
}