/* staffStyle.css - Стили для страницы управления персоналом */

/* ===== СТАТИСТИКА ===== */
.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.stats-container h1 {
    margin: 0;
    font-size: 24px;
    color: #413e66;
}

.compact-stats {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #e1e5e9;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.compact-stats span {
    color: #1bb1dc;
    font-weight: 700;
}

/* ===== ФИЛЬТРЫ ===== */
.filter-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
    border: 1px solid #e1e5e9;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #b0bec5;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: #fff;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.search-wrapper {
    display: flex;
    gap: 10px;
}

.search-wrapper input {
    flex: 1;
}

.search-wrapper button {
    padding: 8px 20px;
    background: #1bb1dc;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.search-wrapper button:hover {
    background: #0a98c0;
}

.clear-btn {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.clear-btn:hover {
    background: #c82333;
}

/* ===== КАРТОЧКИ ===== */
.card {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
    color: white;
}

.card-body {
    padding: 25px;
}

/* ===== ТАБЛИЦЫ ===== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #0c5460;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.2s;
}

.table tbody tr:hover {
    background-color: #f0f8ff;
}

/* ===== БЕЙДЖИ ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-danger { background: #dc3545; color: white; }
.badge-warning { background: #ffc107; color: #212529; }
.badge-info { background: #17a2b8; color: white; }
.badge-success { background: #28a745; color: white; }
.badge-primary { background: #007bff; color: white; }
.badge-secondary { background: #6c757d; color: white; }

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.role-superadmin { background: #dc3545; color: white; }
.role-admin { background: #007bff; color: white; }
.role-kitchen { background: #17a2b8; color: white; }
.role-waiter { background: #28a745; color: white; }
.role-universal { background: #6c757d; color: white; }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }

/* ===== КНОПКИ ===== */
.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 0 2px;
    transition: all 0.2s;
}

.btn-sm:hover {
    transform: scale(1.05);
}

.btn-primary { background: #007bff; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-warning { background: #ffc107; color: #212529; }
.btn-success { background: #28a745; color: white; }
.btn-secondary { background: #6c757d; color: white; }

.actions-cell {
    white-space: nowrap;
}

.permissions-icons i {
    margin: 0 2px;
    font-size: 14px;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2, 
.modal-content h3 {
    padding: 20px 25px;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    margin-top: -5px;
}

.close:hover { color: #ddd; }

/* ===== ФОРМЫ ===== */
.form-section {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.form-section h4 {
    margin-bottom: 16px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover {
    background: #f8f9fa;
    border-color: #1bb1dc;
}

.radio-label input {
    margin-right: 10px;
    width: auto;
    margin-bottom: 8px;
}

.role-description {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    margin-left: 25px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

.form-actions {
    padding: 20px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.text-muted {
    color: #6c757d;
    font-size: 12px;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10001;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.show {
    display: block;
}

.notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: progressBar 3000ms linear forwards;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

.notification-success { background-color: #4CAF50; }
.notification-error { background-color: #f44336; }
.notification-info { background-color: #2196F3; }

/* ===== ЗАГРУЗКА ===== */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.spinner-border {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1bb1dc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== БЛОК ПОЛЬЗОВАТЕЛЯ ===== */
#userHeaderBlock {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #1bb1dc;
}

#userAvatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #1bb1dc 0%, #0a98c0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

#userName {
    font-size: 14px;
    font-weight: 600;
    color: #413e66;
}

#userRole {
    font-size: 12px;
    color: #1bb1dc;
}

.logout-btn {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: #dc3545;
    color: white;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .stats-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    #userHeaderBlock {
        top: 10px;
        right: 10px;
        padding: 5px 15px;
    }
    
    #userName {
        font-size: 12px;
    }
}

/* ===== КРАСИВЫЕ КНОПКИ ДЕЙСТВИЙ ===== */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action i {
    font-size: 13px;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-edit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-permissions {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-activate {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-deactivate {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.btn-delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

@media (max-width: 768px) {
    .btn-text { display: none; }
    .btn-action { padding: 6px 10px; }
    .btn-action i { margin: 0; }
}
/* Добавьте в конец файла staffStyle.css */
.section-spacing {
    margin-top: 120px !important;
    padding: 20px;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.compact-stats {
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #e1e5e9;
    font-size: 14px;
    font-weight: 600;
}

.compact-stats span {
    color: #1bb1dc;
    font-weight: 700;
    font-size: 18px;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-edit { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-permissions { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); color: white; }
.btn-activate { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); color: white; }
.btn-deactivate { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); color: #212529; }
.btn-delete { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); color: white; }

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h2, .modal-content h3 {
    margin: -20px -20px 20px -20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

.form-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.form-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #b0bec5;
    border-radius: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 10px 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-success { background: #28a745; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-warning { background: #ffc107; color: #212529; }
.btn-primary { background: #007bff; color: white; }

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    z-index: 10001;
    display: none;
}

.notification.show { display: block; }
.notification-success { background: #28a745; }
.notification-error { background: #dc3545; }
.notification-info { background: #17a2b8; }

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.spinner-border {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1bb1dc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.text-center { text-align: center; }
.text-muted { color: #6c757d; font-size: 12px; }

.access-section {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 15px;
}

.access-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.access-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
    padding: 8px;
    background: #e9ecef;
    border-radius: 6px;
}

.permissions-icons i {
    margin: 0 2px;
    font-size: 14px;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.role-superadmin { background: #dc3545; color: white; }
.role-admin { background: #007bff; color: white; }
.role-kitchen { background: #17a2b8; color: white; }
.role-waiter { background: #28a745; color: white; }
.role-universal { background: #6c757d; color: white; }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-danger { background: #dc3545; color: white; }
.badge-primary { background: #007bff; color: white; }
.badge-info { background: #17a2b8; color: white; }
.badge-success { background: #28a745; color: white; }
.badge-warning { background: #ffc107; color: #212529; }
.badge-secondary { background: #6c757d; color: white; }

.filter-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
    border: 1px solid #e1e5e9;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.search-wrapper {
    display: flex;
    gap: 10px;
}

.search-wrapper button {
    padding: 8px 20px;
    background: #1bb1dc;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.clear-btn {
    padding: 8px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 10px 29px 0 rgba(68, 88, 144, 0.1);
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
    color: white;
}

.card-body {
    padding: 25px;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #0c5460;
    color: white;
    padding: 12px;
    text-align: left;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f0f8ff;
}

@media (max-width: 768px) {
    .filter-row { flex-direction: column; }
    .action-buttons .btn-text { display: none; }
    .btn-action { padding: 6px 10px; }
    .stats-container { flex-direction: column; align-items: flex-start; }
}

/* ===== ОБЩИЕ ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 20px; }
.mb-4 { margin-bottom: 20px; }
.row { display: flex; flex-wrap: wrap; }
.col-12 { width: 100%; }