
:root {
    --primary: #c6a15b;
    --primary-dark: #b08a46;
    --primary-light: #f5efe3;
    --secondary: #e8e0d0;
    --success: #c6a15b;
    --success-light: #e8f0e0;
    --warning: #e0a56b;
    --warning-light: #fef0e2;
    --danger: #c6a15b;
    --danger-light: #fde8e5;
    --info: #6b9ac9;
    --info-light: #e3eff9;
    --dark: #4a3b2c;
    --gray: #a89a8a;
    --light: #fefcf8;
    --white: #ffffff;
    --beige: #faf7f0;
    --beige-dark: #e8e0d0;
    --border: #e8e0d0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--beige) 0%, var(--light) 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.5;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ============================================
   СТРАНИЦА АВТОРИЗАЦИИ
   ============================================ */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #faf7f0 0%, #e8dfcf 100%);
}

.login-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 440px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray);
    font-size: 0.875rem;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.875rem;
}

.login-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--white);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.1);
}

.login-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.login-info p {
    font-size: 0.75rem;
    color: var(--gray);
}

.login-info ul {
    list-style: none;
    margin-top: 0.5rem;
}

.login-info li {
    font-size: 0.7rem;
    color: var(--gray);
    margin: 0.25rem 0;
}

/* ============================================
   КНОПКИ
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(198, 161, 91, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(198, 161, 91, 0.4);
}

.btn-success {
    background: #c97b6b;
    color: white;
}

.btn-success:hover {
    background: #c97b6b;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d49155;
    transform: translateY(-2px);
}

.btn-danger {
    background: #c97b6b;
    color: white;
}

.btn-danger:hover {
    background: #b86252;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #d4c5a9;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   АЛЕРТЫ
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: var(--success-light);
    color: #c97b6b;
    border-left: 4px solid #c97b6b;
}

.alert-error {
    background: var(--danger-light);
    color: #8b4a3e;
    border-left: 4px solid #c97b6b;
}

.alert-close {
    float: right;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.6;
}

.alert-close:hover {
    opacity: 1;
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    width: 100%;
    animation: progress 3s linear forwards;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================
   ГЛАВНОЕ ПРИЛОЖЕНИЕ
   ============================================ */
.app-container {
    min-height: 100vh;
    background: var(--light);
}

.app-header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.user-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
}

.user-role {
    font-size: 0.75rem;
    padding: 0.25rem 0.875rem;
    background: var(--primary-light);
    border-radius: 50px;
    color: var(--primary-dark);
    font-weight: 500;
}

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   ПАНЕЛЬ БЕЗ СМЕНЫ 
   ============================================ */
.no-shift-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.no-shift-panel .card {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   КАРТОЧКА НАЧАЛА СМЕНЫ 
   ============================================ */
.start-shift-card {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 40px 30px;
    background: white;
    border: 1px solid #e8e0d0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.start-shift-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    text-align: center;
}


.start-shift-card h3 {
    display: block !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #4a3b2c !important;
    margin-bottom: 12px !important;
}

.start-shift-card p {
    display: block !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #a89a8a !important;
    margin-bottom: 30px !important;
}

.btn-start-shift {
    background: #c6a15b;
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-start-shift:hover {
    background: #b08a46;
    transform: translateY(-2px);
}

.btn-start-shift:active {
    transform: translateY(0);
}

/* ============================================
   ИНФОРМАЦИЯ О СМЕНЕ
   ============================================ */
.shift-info-bar {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--beige) 100%);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border: 1px solid var(--border);
}

.shift-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.shift-badge {
    padding: 0.25rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
}

.shift-badge.active {
    background: var(--primary);
}

/* ============================================
   СЕТКА ДАШБОРДА
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   КАРТОЧКИ
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
}

/* Глобальный стиль для заголовков карточек */
.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

/* ============================================
   ЗАДАЧИ
   ============================================ */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.task-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.task-item.completed {
    background: var(--success-light);
    border-color: #c97b6b;
}

.task-item.completed span {
    text-decoration: line-through;
    color: var(--gray);
}

.task-checkbox {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: var(--primary);
    margin: 0;
    flex-shrink: 0;
}

.task-item span {
    flex: 1;
    font-size: 0.9rem;
    color: var(--dark);
}

/* Пустое состояние для задач */
.tasks-card .empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    font-size: 0.875rem;
}

/* ============================================
   ФОРМЫ
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.guest-selector select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--white);
}

/* ============================================
   СОБЫТИЯ
   ============================================ */
.events-list {
    max-height: 500px;
    overflow-y: auto;
}

.event-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--light);
    border-radius: var(--radius);
    border-left: 4px solid var(--border);
    transition: all 0.2s;
}

.event-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.event-item.priority {
    background: var(--warning-light);
    border-left-color: var(--warning);
}

.event-item.inherited {
    background: var(--info-light);
    border-left-color: var(--info);
}

.event-item.completed-event {
    background: var(--success-light);
    border-left-color: #c97b6b;
}

.event-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.event-type {
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.7rem;
}

.type-complaint {
    background: var(--danger-light);
    color: #8b4a3e;
}

.type-claim {
    background: var(--warning-light);
    color: #9b6a3e;
}

.type-question {
    background: var(--info-light);
    color: #3a5c7a;
}

.type-assignment {
    background: var(--success-light);
    color: #c97b6b;
}

.event-room {
    background: var(--white);
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.7rem;
}

.event-time {
    color: var(--gray);
    font-size: 0.7rem;
}

.event-description {
    margin-top: 0.5rem;
    color: var(--dark);
    font-size: 0.875rem;
    line-height: 1.4;
}

.event-guest {
    font-size: 0.7rem;
    color: var(--primary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}

.event-from {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.event-status {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.event-status.pending {
    color: var(--warning);
}

.event-status.completed {
    color: #8b9d6e;
}

.event-resolution {
    background: var(--white);
    border-left: 3px solid #8b9d6e;
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    color: #4a5c35;
}

.btn-complete-event {
    margin-top: 0.75rem;
}

/* ============================================
   ТАБЛИЦЫ
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

.data-table tr:hover td {
    background: var(--primary-light);
}

.table-responsive {
    overflow-x: auto;
}

/* ============================================
   БЕЙДЖИ
   ============================================ */
.badge, .role-it, .role-admin, .role-manager {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.role-it {
    background: #e8e0d0;
    color: #8b7a60;
}

.role-admin {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.role-manager {
    background: var(--info-light);
    color: #3a5c7a;
}

/* ============================================
   СТАТУСЫ
   ============================================ */
.status-active {
    color: #8b9d6e;
    font-weight: 600;
}

.status-inactive {
    color: #c97b6b;
}

.status-pending {
    color: var(--warning);
    font-weight: 500;
}

.status-completed {
    color: #8b9d6e;
    font-weight: 500;
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--danger);
}

/* ============================================
   АДМИН ПАНЕЛЬ
   ============================================ */
.admin-grid {
    display: grid;
    gap: 1.5rem;
}

/* ============================================
   СТАТИСТИКА
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-grid-small {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .stats-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card,
.stat-card-small {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.stat-card:hover,
.stat-card-small:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ============================================
   ПУСТЫЕ СОСТОЯНИЯ
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

/* ============================================
   УТИЛИТЫ
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        display: none;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ============================================
   ПАРОЛИ (IT-ПАНЕЛЬ)
   ============================================ */
.password-cell {
    font-family: monospace;
    cursor: pointer;
    background: var(--light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all 0.2s;
}

.password-cell:hover {
    background: var(--primary-light);
}

.password-value {
    font-family: monospace;
    font-size: 1rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: var(--radius-sm);
    word-break: break-all;
}

/* ============================================
   ФИЛЬТРЫ
   ============================================ */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    background: var(--white);
    transition: all 0.2s;
    font-size: 0.875rem;
}

.filter-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================
   ПРОГРЕСС-БАРЫ
   ============================================ */
.progress-bar {
    background: var(--border);
    border-radius: 50px;
    overflow: hidden;
    height: 8px;
}

.progress-fill {
    background: var(--primary);
    height: 100%;
    border-radius: 50px;
    transition: width 0.3s;
}

/* ============================================
   ВКЛАДКИ
   ============================================ */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.2s;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
.btn-logout {
    background: #c97b6b;
    color: white;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #b86252;
    transform: translateY(-1px);
} 