/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    min-height: 100vh;
}

/* === СТРАНИЦА ВХОДА === */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #4a5568;
    position: relative;
}

.login-box {
    background: white;
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    color: #2563eb;
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #718096;
    font-size: 15px;
}

.error-message {
    background: #fee;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    border-left: 4px solid #fc8181;
}

.success-message {
    background: #f0fff4;
    color: #22543d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    border-left: 4px solid #48bb78;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    background: #2563eb;
    color: white;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* === ПАНЕЛЬ УПРАВЛЕНИЯ === */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

/* Боковая панель */
.sidebar {
    width: 280px;
    background: #2d3748;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

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

.sidebar-header h2 {
    font-size: 24px;
    color: #2563eb;
    font-weight: 700;
}

.sidebar-menu {
    flex: 1;
    padding: 25px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 15px;
    font-size: 15px;
    font-weight: 500;
    margin: 5px 15px;
    border-radius: 8px;
}

.menu-item:hover {
    background: rgba(37, 99, 235, 0.2);
    color: white;
}

.menu-item.active {
    background: #2563eb;
    color: white;
}

.menu-item .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item .icon img {
    width: 100%;
    height: 100%;
    filter: brightness(0) invert(1);
}

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

.menu-item.logout {
    color: #fc8181;
}

.menu-item.logout:hover {
    background: rgba(252, 129, 129, 0.2);
    color: #fc8181;
}

/* Основной контент */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 35px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Верхняя панель */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    background: white;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.top-bar h1 {
    color: #2563eb;
    font-size: 32px;
    font-weight: 700;
}

.user-info {
    color: #718096;
    font-size: 15px;
}

.user-info strong {
    color: #2563eb;
    font-weight: 600;
}

/* Карточки статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border-top: 4px solid var(--card-color, #2563eb);
}

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

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    padding: 15px;
}

.stat-icon img {
    width: 100%;
    height: 100%;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.blue img {
    filter: invert(32%) sepia(92%) saturate(2618%) hue-rotate(210deg) brightness(97%) contrast(92%);
}

.stat-icon.green {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.green img {
    filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(128deg) brightness(94%) contrast(101%);
}

.stat-icon.orange {
    background: #fed7aa;
    color: #ea580c;
}

.stat-icon.orange img {
    filter: invert(43%) sepia(89%) saturate(2527%) hue-rotate(355deg) brightness(99%) contrast(93%);
}

.stat-icon.purple {
    background: #e9d5ff;
    color: #9333ea;
}

.stat-icon.purple img {
    filter: invert(29%) sepia(97%) saturate(5121%) hue-rotate(273deg) brightness(93%) contrast(95%);
}

.stat-content h3 {
    color: #718096;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #2d3748;
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

/* Контент сетка */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.card-header h2 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 700;
}

.card-body {
    padding: 30px;
}

.chart-placeholder {
    background: #f7fafc;
    padding: 80px 30px;
    text-align: center;
    border-radius: 8px;
    color: #718096;
    border: 2px dashed #cbd5e0;
    font-size: 16px;
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-list li {
    display: flex;
    gap: 20px;
    padding: 18px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    transition: all 0.3s ease;
}

.activity-list li:hover {
    background: #edf2f7;
}

.activity-time {
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    min-width: 60px;
}

.activity-text {
    color: #4a5568;
    font-size: 15px;
}

/* === ТАБЛИЦЫ === */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.data-table thead {
    background: #2563eb;
}

.data-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table th:first-child {
    border-radius: 8px 0 0 0;
}

.data-table th:last-child {
    border-radius: 0 8px 0 0;
}

.data-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.data-table tbody tr {
    transition: all 0.3s ease;
    background: white;
}

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

.data-table .amount {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2d3748;
}

.data-table .actions {
    text-align: center;
    white-space: nowrap;
}

/* Иконочные кнопки */
.btn-icon {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    text-decoration: none;
    font-size: 18px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #f7fafc;
    color: #2563eb;
}

.btn-icon:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.1);
}

.btn-icon.btn-danger {
    color: #dc2626;
}

.btn-icon.btn-danger:hover {
    background: #dc2626;
    color: white;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: #2563eb;
    color: white;
}

.role-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: #2563eb;
    color: white;
}

.role-badge.employee {
    background: #6b7280;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #10b981;
    color: white;
}

.status-badge.inactive {
    background: #ef4444;
    color: white;
}

.status-badge.paid {
    background: #10b981;
    color: white;
}

.status-badge.pending {
    background: #f59e0b;
    color: white;
}

/* Кошелек */
.wallet-short {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #718096;
    background: #f7fafc;
    padding: 4px 8px;
    border-radius: 6px;
}

.wallet-badge {
    background: #2563eb;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    color: white;
}

/* Панель действий */
.actions-bar {
    margin-bottom: 25px;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-small:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

/* Формы */
.user-form, .settings-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.form-section {
    margin-top: 35px;
    margin-bottom: 20px;
    padding-top: 25px;
    border-top: 3px solid #e2e8f0;
}

.form-section h3 {
    color: #2563eb;
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 700;
}

.section-description {
    color: #718096;
    font-size: 15px;
}

.form-group select {
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.form-help {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #718096;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

/* Информационные блоки */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.info-label {
    font-size: 13px;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
}

/* Зарплата */
.salary-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.salary-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 5px solid #2563eb;
    transition: all 0.3s ease;
}

.salary-item:hover {
    background: #edf2f7;
}

.salary-icon {
    font-size: 40px;
    width: 60px;
    text-align: center;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.salary-icon img {
    width: 40px;
    height: 40px;
    filter: invert(32%) sepia(92%) saturate(2618%) hue-rotate(210deg) brightness(97%) contrast(92%);
}

.salary-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.salary-label {
    font-size: 13px;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.salary-value {
    font-size: 32px;
    color: #2563eb;
    font-weight: 700;
}

/* Кошелек */
.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wallet-item {
    display: flex;
    gap: 20px;
    padding: 18px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.wallet-label {
    font-weight: 700;
    color: #2d3748;
    min-width: 150px;
}

.wallet-value {
    color: #4a5568;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

/* Мини статистика */
.stats-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card-mini {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
    transition: all 0.3s ease;
}

.stat-card-mini:hover {
    background: #edf2f7;
}

.stat-icon-mini {
    font-size: 32px;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-mini img {
    filter: invert(32%) sepia(92%) saturate(2618%) hue-rotate(210deg) brightness(97%) contrast(92%);
}

.stat-content-mini h4 {
    font-size: 13px;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value-mini {
    font-size: 24px;
    color: #2563eb;
    font-weight: 700;
}

/* Фильтры */
.filters-bar {
    background: white;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.filters-form {
    display: flex;
    gap: 25px;
    align-items: end;
    flex-wrap: wrap;
}

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

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

.filter-group select,
.filter-group input {
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Сообщения */
.text-muted {
    color: #718096;
    font-style: italic;
}

.info-note {
    margin-top: 20px;
    padding: 20px;
    background: #dbeafe;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .login-box {
        padding: 35px 25px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid-mini {
        grid-template-columns: 1fr;
    }
}
