/* Гостевые страницы (логин, регистрация) */
body.guest {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.guest-container {
    width: 100%;
    max-width: 440px;
    padding: 1rem;
}

.guest-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.guest-card h1 {
    color: #1a1a2e;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.guest-card .subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

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

.form-group input.error {
    border-color: #e74c3c;
}

.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }



/* Профиль */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-container h1 {
    color: #1a1a2e;
    margin-bottom: 2rem;
}

.profile-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.profile-links a {
    color: #667eea;
    text-decoration: none;
}

.profile-links a:hover {
    text-decoration: underline;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}



/* Страница проектов */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 2rem;
}

.btn-create, .btn-back, .btn-edit {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-create {
    background: #667eea;
    color: #fff;
}

.btn-create:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
}

.btn-back {
    background: #6c757d;
    color: #fff;
}

.btn-back:hover {
    background: #5a6268;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
}

.btn-delete:hover {
    background: #c82333;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.project-header h3 {
    font-size: 1.1rem;
    color: #1a1a2e;
}

.project-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-actions .btn-view {
    background: #667eea;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
}

.project-actions .btn-view:hover {
    background: #5a6fd6;
}

/* Статусы */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #cce5ff;
    color: #004085;
}

.status-archived {
    background: #e2e3e5;
    color: #383d41;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Формы */
.form-container {
    max-width: 700px;
    margin: 0 auto;
}

.form-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-card textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.form-card select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}

.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Таблица задач */
.tasks-section {
    margin-top: 2rem;
}

.tasks-section h2 {
    margin-bottom: 1rem;
}

.tasks-table-wrap {
    overflow-x: auto;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tasks-table thead {
    background: #1a1a2e;
    color: #fff;
}

.tasks-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.85rem;
}

.tasks-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.tasks-table tr:hover {
    /* background: #f8f9fa; */
}

.task-desc {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.2rem;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-sm, .btn-delete-sm {
    padding: 0.2rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-edit-sm {
    background: #ffc107;
}

.btn-delete-sm {
    background: #dc3545;
    color: #fff;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.empty-state p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.empty-state a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Алerts */
.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-error p {
    margin: 0;
}

/* Проект детали */
.project-info {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.project-info p {
    margin-bottom: 0.5rem;
}

.project-info a {
    color: #667eea;
    text-decoration: none;
}

.project-info a:hover {
    text-decoration: underline;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* ===== Базовые стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    overflow-x: hidden;
}

/* ===== Обертка админки ===== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== Боковое меню ===== */
.admin-sidebar {
    width: 260px;
    background: #1a1a2e;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand i {
    color: #667eea;
    font-size: 1.8rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.sidebar-nav li a.active {
    background: rgba(102, 126, 234, 0.2);
    color: #fff;
    border-left-color: #667eea;
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

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

.logout-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
    font-size: 1rem;
}

.logout-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.logout-btn i {
    width: 20px;
    text-align: center;
}

/* ===== Основной контент ===== */
.admin-main {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Шапка ===== */
.admin-header {
    background: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    display: none;
    padding: 0.25rem 0.5rem;
}

.sidebar-toggle:hover {
    color: #667eea;
}

.header-left h1 {
    font-size: 1.3rem;
    color: #1a1a2e;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    color: #1a1a2e;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.user-avatar {
    font-size: 2.2rem;
    color: #667eea;
}

/* ===== Контент ===== */
.admin-content {
    flex: 1;
    padding: 2rem;
}

/* ===== Гостевые страницы ===== */
body.guest {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guest-container {
    width: 100%;
    max-width: 440px;
    padding: 1rem;
}

.guest-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.guest-card h1 {
    color: #1a1a2e;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.guest-card .subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

/* ===== Формы ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ===== Кнопки ===== */
.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-create, .btn-back, .btn-edit, .btn-delete {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-create {
    background: #667eea;
    color: #fff;
}

.btn-create:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
}

.btn-back {
    background: #6c757d;
    color: #fff;
}

.btn-back:hover {
    background: #5a6268;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-delete {
    background: #dc3545;
    color: #fff;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-view {
    background: #667eea;
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
}

.btn-view:hover {
    background: #5a6fd6;
}

/* ===== Страница проектов ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.8rem;
    color: #1a1a2e;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.project-header h3 {
    font-size: 1.1rem;
    color: #1a1a2e;
}

.project-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== Статусы ===== */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #cce5ff;
    color: #004085;
}

.status-archived {
    background: #e2e3e5;
    color: #383d41;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #cce5ff;
    color: #004085;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* ===== Таблица задач ===== */
.tasks-section {
    margin-top: 2rem;
}

.tasks-section h2 {
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.tasks-table-wrap {
    overflow-x: auto;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tasks-table thead {
    background: #1a1a2e;
    color: #fff;
}

.tasks-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 0.85rem;
}

.tasks-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.tasks-table tr:hover {
    /* background: #f8f9fa; */
}

.task-desc {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.2rem;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-sm, .btn-delete-sm {
    padding: 0.2rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-edit-sm {
    background: #ffc107;
}

.btn-delete-sm {
    background: #dc3545;
    color: #fff;
}

/* ===== Пустое состояние ===== */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.empty-state p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1rem;
}

.empty-state a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* ===== Алerts ===== */
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-error p {
    margin: 0;
}

/* ===== Проект детали ===== */
.project-info {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.project-info p {
    margin-bottom: 0.5rem;
}

.project-info a {
    color: #667eea;
    text-decoration: none;
}

.project-info a:hover {
    text-decoration: underline;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== Формы в админке ===== */
.form-container {
    max-width: 700px;
    margin: 0 auto;
}

.form-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ===== Профиль ===== */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-container h1 {
    color: #1a1a2e;
    margin-bottom: 2rem;
}

.profile-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.profile-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.profile-links a {
    color: #667eea;
    text-decoration: none;
}

.profile-links a:hover {
    text-decoration: underline;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    .admin-header {
        padding: 0.75rem 1rem;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .header-actions a {
        flex: 1;
        text-align: center;
    }
}


/* ===== Дашборд ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1a1a2e;
}

/* Быстрые действия */
.quick-actions {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.quick-actions h3 {
    color: #1a1a2e;
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.action-card:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
}

.action-card i {
    font-size: 2rem;
}

.action-card span {
    font-weight: 500;
}


/* ===== Формы с двумя колонками ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group input[type="file"] {
    padding: 0.5rem;
    border: 2px dashed #e0e0e0;
    background: #fafafa;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #667eea;
}

.form-group small {
    font-size: 0.8rem;
    color: #888;
}

/* Адаптив для форм */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* ===== Модальное окно для изображений ===== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-close:hover {
    color: #bbb;
}

/* ===== Иконки в таблице ===== */
.task-actions i {
    font-size: 1.1rem;
}

.btn-edit-sm, .btn-delete-sm {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-edit-sm {
    background: #ffc107;
    color: #333;
}

.btn-edit-sm:hover {
    background: #e0a800;
}

.btn-delete-sm {
    background: #dc3545;
    color: #fff;
}

.btn-delete-sm:hover {
    background: #c82333;
}

.file-preview {
    color: #667eea;
    text-decoration: none;
}

.file-preview:hover {
    text-decoration: underline;
}


/* Кнопки для управления пользователями */
.user-actions .btn-view {
    background: #667eea;
    color: #fff;
}

.user-actions .btn-view:hover {
    background: #5a6fd6;
}

.user-actions .btn-edit {
    background: #ffc107;
    color: #333;
}

.user-actions .btn-edit:hover {
    background: #e0a800;
}

.user-actions .btn-activate {
    background: #28a745;
    color: #fff;
}

.user-actions .btn-activate:hover {
    background: #218838;
}

.user-actions .btn-deactivate {
    background: #ffc107;
    color: #333;
}

.user-actions .btn-deactivate:hover {
    background: #e0a800;
}

.user-actions .btn-delete {
    background: #dc3545;
    color: #fff;
}

.user-actions .btn-delete:hover {
    background: #c82333;
}


/* ===== Toggle Switch ===== */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
}

.toggle-wrapper label {
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Скрываем стандартный чекбокс */
.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Стили для переключателя */
.toggle-slider {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    background: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Активное состояние */
.toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Состояние фокуса */
.toggle-input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Состояние disabled */
.toggle-input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Анимация при наведении */
.toggle-wrapper:hover .toggle-slider {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Иконки внутри переключателя */
.toggle-slider .toggle-icons {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #fff;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-slider .toggle-icons .icon-off {
    left: 8px;
}

.toggle-slider .toggle-icons .icon-on {
    right: 8px;
}

.toggle-input:checked + .toggle-slider .toggle-icons .icon-off {
    opacity: 0;
}

.toggle-input:checked + .toggle-slider .toggle-icons .icon-on {
    opacity: 1;
}

/* Маленький размер */
.toggle-sm .toggle-slider {
    width: 40px;
    height: 22px;
}

.toggle-sm .toggle-slider::before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
}

.toggle-sm .toggle-input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* Большой размер */
.toggle-lg .toggle-slider {
    width: 60px;
    height: 32px;
}

.toggle-lg .toggle-slider::before {
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
}

.toggle-lg .toggle-input:checked + .toggle-slider::before {
    transform: translateX(28px);
}

/* Текст статуса рядом с переключателем */
.toggle-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.toggle-status.active {
    color: #28a745;
    background: #d4edda;
}

.toggle-status.inactive {
    color: #dc3545;
    background: #f8d7da;
}

/* Стили для формы с toggle */
.form-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-group-toggle:hover {
    background: #f0f2f5;
    border-color: #667eea;
}

.form-group-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-group-toggle .toggle-label i {
    font-size: 1.2rem;
    color: #667eea;
    width: 24px;
    text-align: center;
}

.form-group-toggle .toggle-label span {
    font-weight: 500;
    color: #333;
}

.form-group-toggle .toggle-label .toggle-description {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
    display: block;
}

.form-group-toggle .toggle-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Адаптив */
@media (max-width: 576px) {
    .form-group-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-group-toggle .toggle-right {
        width: 100%;
        justify-content: space-between;
    }
}


/* ===== Toggle Switch ===== */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.toggle-wrapper label {
    margin: 0;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Скрываем стандартный чекбокс */
.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Стили для переключателя */
.toggle-slider {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    background: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Активное состояние */
.toggle-input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Состояние фокуса */
.toggle-input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Состояние disabled */
.toggle-input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Анимация при наведении */
.toggle-wrapper:hover .toggle-slider {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Текст статуса рядом с переключателем */
.toggle-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.toggle-status.active {
    color: #28a745;
    background: #d4edda;
}

.toggle-status.inactive {
    color: #dc3545;
    background: #f8d7da;
}

/* Стили для формы с toggle */
.form-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-group-toggle:hover {
    background: #f0f2f5;
    border-color: #667eea;
}

.form-group-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-group-toggle .toggle-label i {
    font-size: 1.2rem;
    color: #667eea;
    width: 24px;
    text-align: center;
}

.form-group-toggle .toggle-label span {
    font-weight: 500;
    color: #333;
}

.form-group-toggle .toggle-label .toggle-description {
    font-size: 0.8rem;
    color: #888;
    font-weight: 400;
    display: block;
}

.form-group-toggle .toggle-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Маленький размер */
.toggle-sm .toggle-slider {
    width: 40px;
    height: 22px;
}

.toggle-sm .toggle-slider::before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
}

.toggle-sm .toggle-input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

/* Адаптив */
@media (max-width: 576px) {
    .form-group-toggle {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-group-toggle .toggle-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ===== Стилизованные поля загрузки файлов ===== */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.file-upload-wrapper .file-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.file-upload-wrapper .file-label i {
    font-size: 1.2rem;
    color: #667eea;
}

.file-upload-area {
    position: relative;
    border: 2px dashed #d0d5dd;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    background: #fafbfc;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8edff;
    transform: scale(1.01);
}

.file-upload-area .upload-icon {
    font-size: 2.5rem;
    color: #b0b8c4;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.file-upload-area:hover .upload-icon {
    color: #667eea;
}

.file-upload-area .upload-text {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.file-upload-area .upload-subtext {
    color: #888;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.file-upload-area .upload-formats {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.8rem;
    background: #f0f2f5;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #666;
    font-weight: 500;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Иконки для разных типов файлов */
.file-upload-wrapper.image .upload-icon {
    color: #667eea;
}

.file-upload-wrapper.document .upload-icon {
    color: #dc3545;
}

.file-upload-wrapper.video .upload-icon {
    color: #28a745;
}

.file-upload-wrapper.image:hover .upload-icon {
    color: #5a6fd6;
}

.file-upload-wrapper.document:hover .upload-icon {
    color: #c82333;
}

.file-upload-wrapper.video:hover .upload-icon {
    color: #1e7e34;
}

/* Список выбранных файлов */
.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.file-list .file-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: #e8f0fe;
    color: #1a1a2e;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid #d0d5dd;
}

.file-list .file-badge i {
    font-size: 0.8rem;
    color: #667eea;
}

.file-list .file-badge .file-size {
    color: #888;
    font-size: 0.7rem;
}

.file-list .file-badge .remove-file {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0 0.2rem;
    font-size: 0.8rem;
}

/* Адаптив */
@media (max-width: 576px) {
    .file-upload-area {
        padding: 1.5rem 1rem;
    }
    
    .file-upload-area .upload-icon {
        font-size: 2rem;
    }
}