/* ===== BASE & VARIABLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-gradient: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --bg-gradient: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0f1a3e 100%);
    --bg-cold: #0a0a1a;
    --accent-blue: #667eea;
    --accent-purple: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 220px;
    --header-height: 90px;
    --table-bg: rgba(0, 0, 0, 0.3);
    --row-hover: rgba(255, 255, 255, 0.05);
    --scrollbar-track: rgba(255, 255, 255, 0.03);
    --scrollbar-thumb: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] {
    --primary-gradient: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(102, 126, 234, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(102, 126, 234, 0.15);
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.7);
    --text-muted: rgba(26, 26, 46, 0.5);
    --bg-gradient: linear-gradient(135deg, #f0f4ff 0%, #e8eefc 50%, #dce4f8 100%);
    --bg-cold: #f0f4ff;
    --accent-blue: #667eea;
    --accent-purple: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --done: #444fef;
    --table-bg: rgba(255, 255, 255, 0.5);
    --row-hover: rgba(102, 126, 234, 0.08);
    --scrollbar-track: rgba(102, 126, 234, 0.1);
    --scrollbar-thumb: rgba(102, 126, 234, 0.3);
}

html, body { height: 100vh; overflow: hidden; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    transition: all 0.5s ease;
}

/* ===== VIDEO BACKGROUND ===== */
.video-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; overflow: hidden; transition: all 0.5s ease;
}

.circle {
    position: absolute; border-radius: 50%; filter: blur(80px);
    opacity: 0.7; animation: circleFloat 20s ease-in-out infinite;
    transition: all 0.5s ease;
}

.circle-1 { width: 450px; height: 450px; background: radial-gradient(circle, rgba(245, 158, 11, 0.8) 0%, rgba(245, 158, 11, 0) 70%); top: 5%; left: 10%; animation-delay: 0s; }
.circle-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(239, 68, 68, 0.7) 0%, rgba(239, 68, 68, 0) 70%); top: 55%; left: 65%; animation-delay: -5s; }
.circle-3 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(251, 191, 36, 0.75) 0%, rgba(251, 191, 36, 0) 70%); top: 25%; left: 75%; animation-delay: -10s; }
.circle-4 { width: 480px; height: 480px; background: radial-gradient(circle, rgba(249, 115, 22, 0.7) 0%, rgba(249, 115, 22, 0) 70%); top: 65%; left: 20%; animation-delay: -15s; }
.circle-5 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(239, 68, 68, 0.65) 0%, rgba(239, 68, 68, 0) 70%); top: 15%; left: 45%; animation-delay: -20s; }
.circle-6 { width: 460px; height: 460px; background: radial-gradient(circle, rgba(245, 158, 11, 0.7) 0%, rgba(245, 158, 11, 0) 70%); top: 45%; left: 35%; animation-delay: -25s; }
.circle-7 { width: 380px; height: 380px; background: radial-gradient(circle, rgba(251, 191, 36, 0.65) 0%, rgba(251, 191, 36, 0) 70%); top: 75%; left: 55%; animation-delay: -30s; }
.circle-8 { width: 430px; height: 430px; background: radial-gradient(circle, rgba(249, 115, 22, 0.75) 0%, rgba(249, 115, 22, 0) 70%); top: 0%; left: 80%; animation-delay: -35s; }

@keyframes circleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    25% { transform: translate(80px, -60px) scale(1.15); opacity: 0.85; }
    50% { transform: translate(-60px, 80px) scale(0.9); opacity: 0.6; }
    75% { transform: translate(70px, 40px) scale(1.1); opacity: 0.8; }
}

.particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
.particle {
    position: absolute; width: 4px; height: 4px;
    background: rgba(245, 158, 11, 0.6); border-radius: 50%;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
    animation: particleDrift 18s infinite ease-in-out;
}
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: -3s; }
.particle:nth-child(3) { left: 30%; top: 40%; animation-delay: -6s; }
.particle:nth-child(4) { left: 40%; top: 60%; animation-delay: -9s; }
.particle:nth-child(5) { left: 50%; top: 30%; animation-delay: -12s; }
.particle:nth-child(6) { left: 60%; top: 70%; animation-delay: -15s; }
.particle:nth-child(7) { left: 70%; top: 50%; animation-delay: -18s; }
.particle:nth-child(8) { left: 80%; top: 90%; animation-delay: -21s; }
.particle:nth-child(9) { left: 90%; top: 10%; animation-delay: -24s; }
.particle:nth-child(10) { left: 15%; top: 55%; animation-delay: -27s; }
.particle:nth-child(11) { left: 25%; top: 25%; animation-delay: -30s; }
.particle:nth-child(12) { left: 35%; top: 85%; animation-delay: -33s; }
.particle:nth-child(13) { left: 45%; top: 15%; animation-delay: -36s; }
.particle:nth-child(14) { left: 55%; top: 45%; animation-delay: -39s; }
.particle:nth-child(15) { left: 65%; top: 35%; animation-delay: -42s; }

@keyframes particleDrift {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    50% { transform: translate(40px, -70px); opacity: 0.9; }
}

/* ===== APP CONTAINER ===== */
.app-container { display: flex; height: 100vh; width: 100vw; position: relative; z-index: 1; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width); height: 100vh;
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex; flex-direction: column; padding: 0; flex-shrink: 0;
    transition: all 0.5s ease;
}
.sidebar-header {
    padding: 25px 20px; border-bottom: 1px solid var(--glass-border);
    height: var(--header-height); display: flex; align-items: center;
}
.logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.logo-icon {
    width: 42px; height: 42px; background: var(--primary-gradient);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.sidebar-nav { flex: 1; padding: 20px 15px; overflow-y: auto; }
.nav-section { margin-bottom: 25px; }
.nav-section-title {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted); padding: 0 12px; margin-bottom: 10px;
}
.nav-menu { list-style: none; }
.nav-item { margin-bottom: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    border-radius: 12px; color: var(--text-secondary); text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer;
    position: relative; overflow: hidden;
}
.nav-link::before {
    content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
    background: var(--primary-gradient); transform: scaleY(0); transition: transform 0.3s ease;
}
.nav-link:hover::before { transform: scaleY(1); }
.nav-link:hover, .nav-link.active { background: rgba(102, 126, 234, 0.15); color: var(--text-primary); }
.nav-link.active { background: rgba(102, 126, 234, 0.2); }
.nav-link.active::before { transform: scaleY(1); }
.nav-link i { width: 20px; text-align: center; font-size: 16px; }
.nav-badge {
    margin-left: auto; background: var(--accent-blue); padding: 3px 8px;
    border-radius: 8px; font-size: 11px; font-weight: 600; color: white;
}
.nav-badge.green { background: var(--success); }
.nav-badge.orange { background: var(--warning); }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--glass-border); }
.sidebar-info { font-size: 12px; color: var(--text-muted); text-align: center; }

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ===== TOP HEADER ===== */
.top-header {
    height: var(--header-height); display: flex; align-items: center; justify-content: space-between;
    padding: 0 30px; border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg); backdrop-filter: blur(20px); transition: all 0.5s ease;
}
.header-left { display: flex; align-items: center; gap: 20px; }
.page-title { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; }
.search-bar { position: relative; width: 350px; }
.search-bar input {
    width: 100%; padding: 10px 15px 10px 40px; background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border); border-radius: 10px; color: var(--text-primary);
    font-size: 13px; backdrop-filter: blur(10px); transition: all 0.3s ease;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:focus { outline: none; border-color: var(--accent-blue); background: rgba(102, 126, 234, 0.15); }
.search-bar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
    width: 40px; height: 40px; background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-primary); cursor: pointer; transition: all 0.3s ease; position: relative;
}
.icon-btn:hover { background: rgba(102, 126, 234, 0.2); transform: translateY(-2px); border-color: var(--accent-blue); }
.notification-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px;
    background: var(--danger); border-radius: 50%; font-size: 10px;
    display: flex; align-items: center; justify-content: center; font-weight: 600; padding: 0 5px; color: white;
}
.theme-toggle {
    width: 50px; height: 50px; background: var(--primary-gradient); border: none;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer; transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.theme-toggle:hover { transform: translateY(-2px) rotate(15deg); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5); }
.theme-toggle i { font-size: 18px; transition: all 0.3s ease; }
.profile-btn {
    display: flex; align-items: center; gap: 10px; padding: 8px 15px 8px 8px;
    background: rgba(102, 126, 234, 0.1); border: 1px solid var(--glass-border);
    border-radius: 25px; cursor: pointer; transition: all 0.3s ease;
}
.profile-btn:hover { background: rgba(102, 126, 234, 0.2); border-color: var(--accent-blue); }
.profile-icon {
    width: 32px; height: 32px; background: var(--primary-gradient); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 14px; color: white;
}
.profile-name { font-size: 13px; font-weight: 500; }
.profile-arrow { font-size: 10px; color: var(--text-muted); }

/* ===== CONTENT AREA ===== */
.content-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 20px; gap: 20px; }

/* ===== FILTER SECTION ===== */
.filter-card {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 20px 25px; display: flex; align-items: center; gap: 20px;
    flex-shrink: 0; transition: all 0.5s ease; margin-bottom: 10px;
}
.filter-form { display: flex; align-items: center; gap: 20px; width: 100%; flex-wrap: wrap; }
.filter-row { display: flex; align-items: end; gap: 15px; width: 100%; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 150px; flex: 1; }
.filter-group input[type="text"],
.filter-group input[type="date"] {
    padding: 12px 15px; background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border); border-radius: 10px;
    color: var(--text-primary); font-size: 13px; transition: all 0.3s ease; width: 100%;
}
.filter-group input::placeholder { color: var(--text-muted); }
.filter-group input:focus { outline: none; border-color: var(--accent-blue); background: rgba(102, 126, 234, 0.15); }
.filter-group label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.date-group { min-width: 200px; }
.checkbox-group { min-width: auto; flex: 0; align-self: center;}
.checkbox-label {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 13px; color: var(--text-secondary);
}
.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--accent-blue); cursor: pointer;
}
.buttons-group { display: flex; gap: 10px; min-width: auto; flex: 0; flex-direction: row; }

/* ===== BUTTONS ===== */
.btn-primary {
    padding: 12px 24px; border-radius: 10px; border: none; cursor: pointer;
    font-size: 13px; font-weight: 500; background: var(--primary-gradient);
    color: white; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary {
    padding: 12px 24px; border-radius: 10px; border: 1px solid var(--glass-border);
    cursor: pointer; font-size: 13px; font-weight: 500;
    background: rgba(102, 126, 234, 0.1); color: var(--text-primary);
    transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { background: rgba(102, 126, 234, 0.2); border-color: var(--accent-blue); }
.btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* ===== LOGOUT BUTTON ===== */
.logout-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
    background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px; color: var(--danger); text-decoration: none;
    font-size: 13px; font-weight: 500; transition: all 0.3s ease;
    margin-left: auto;
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.25); transform: translateY(-2px); }
.logout-btn svg { width: 18px; height: 18px; }

/* ===== TABLE CARD ===== */
.table-card {
    flex: 1; background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 16px;
    overflow: hidden; display: flex; flex-direction: column; transition: all 0.5s ease;
}
.table-wrapper { flex: 1; overflow: auto; }

/* ===== REQUEST TABLE ===== */
.request-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.request-table thead {
    position: sticky; top: 0; background: var(--table-bg);
    backdrop-filter: blur(10px); z-index: 10;
}
.request-table th {
    padding: 15px 20px; text-align: left; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border); white-space: nowrap;
}
.request-table th a {
    display: flex; align-items: center; gap: 6px; color: var(--text-muted);
    text-decoration: none; transition: color 0.3s ease;
}
.request-table th a:hover { color: var(--text-primary); }
.sort-icon {
    display: inline-block; width: 14px; height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M7 15l5 5 5-5'/%3E%3Cpath d='M7 9l5-5 5 5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center;
    opacity: 0.4; transition: opacity 0.3s ease;
}
.request-table th a:hover .sort-icon { opacity: 1; }
.request-table td {
    padding: 16px 20px; font-size: 13px; border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: background 0.3s ease; white-space: nowrap;
}
.request-table tbody tr { transition: all 0.3s ease; }
.request-table tbody tr:hover { background: var(--row-hover); }
.request-table tbody tr:last-child td { border-bottom: none; }
.request-table td[data-label]::before {
    content: attr(data-label) ": "; font-weight: 600; color: var(--text-muted);
    display: none; margin-right: 5px;
}

/* ===== BADGES ===== */
.badge-cancelled {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 20px; font-size: 12px; font-weight: 500;
    background: rgba(239, 68, 68, 0.2); color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-cancelled1 {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 20px; font-size: 12px; font-weight: 500;
    background: rgba(71, 68, 239, 0.2); color: #fff;
    border: 1px solid rgba(68, 71, 239, 0.3);
}
.badge-active {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 20px; font-size: 12px; font-weight: 500;
    background: rgba(16, 185, 129, 0.2); color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.cancelled-row { opacity: 0.7; }
.cancelled-row:hover { opacity: 1; }
.cancelled-status { text-align: center; }

/* ===== BITRIX PAGINATION / NAVIGATION ===== */
.pagination-wrapper {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 20px 15px; border-top: 1px solid var(--glass-border);
    background: var(--table-bg); flex-wrap: wrap;
}

/* Контейнер навигации Битрикс */
.pagination-wrapper .nav-pagination,
.pagination-wrapper .navigation {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

/* Ссылки страниц: .nav-page, .page, a */
.pagination-wrapper .nav-page,
.pagination-wrapper .page,
.pagination-wrapper a:not(.nav-arrow):not(.nav-disabled) {
    min-width: 36px; height: 36px; padding: 0 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border); border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary); text-decoration: none;
    transition: all 0.3s ease; font-size: 13px; font-weight: 500;
    line-height: 1;
}

.pagination-wrapper .nav-page:hover,
.pagination-wrapper .page:hover,
.pagination-wrapper a:not(.nav-arrow):not(.nav-disabled):not(.current):hover {
    background: rgba(102, 126, 234, 0.2); border-color: var(--accent-blue); color: var(--text-primary);
    transform: translateY(-2px);
}

/* Активная страница: .current, .selected, .active */
.pagination-wrapper .nav-page.current,
.pagination-wrapper .page.current,
.pagination-wrapper .selected,
.pagination-wrapper .active,
.pagination-wrapper a.current {
    background: var(--primary-gradient); border-color: transparent; color: white;
    font-weight: 600; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Стрелки навигации: .nav-arrow, .next, .prev, .first, .last */
.pagination-wrapper .nav-arrow,
.pagination-wrapper .next,
.pagination-wrapper .prev,
.pagination-wrapper .first,
.pagination-wrapper .last,
.pagination-wrapper a[href*="PAGEN"],
.pagination-wrapper span.nav-arrow {
    min-width: 36px; height: 36px; padding: 0 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border); border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary); text-decoration: none;
    transition: all 0.3s ease; font-size: 14px; cursor: pointer;
}

.pagination-wrapper .nav-arrow:hover,
.pagination-wrapper .next:hover,
.pagination-wrapper .prev:hover,
.pagination-wrapper .first:hover,
.pagination-wrapper .last:hover {
    background: rgba(102, 126, 234, 0.2); border-color: var(--accent-blue); color: var(--text-primary);
    transform: translateY(-2px);
}

/* Отключённые элементы: .disabled, .nav-disabled */
.pagination-wrapper .nav-disabled,
.pagination-wrapper .disabled,
.pagination-wrapper span.disabled,
.pagination-wrapper a.disabled {
    opacity: 0.4; cursor: not-allowed; background: rgba(255,255,255,0.05);
}
.pagination-wrapper .nav-disabled:hover,
.pagination-wrapper .disabled:hover {
    background: rgba(255,255,255,0.05); border-color: var(--glass-border);
    color: var(--text-muted); transform: none;
}

/* Текст "Страница", "показать все" */
.pagination-wrapper .nav-info,
.pagination-wrapper .pages-title,
.pagination-wrapper .show-all {
    font-size: 12px; color: var(--text-muted); margin: 0 10px;
}

/* Убираем стандартные стили Битрикс для чистоты */
.pagination-wrapper .pages { display: none; }
.pagination-wrapper br { display: none; }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px; text-align: center; color: var(--text-muted);
}
.empty-state svg { margin-bottom: 20px; opacity: 0.8; }
.empty-message { font-size: 16px; font-weight: 500; }

/* ===== AUTH PAGE ===== */
.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    z-index: 100; padding: 20px;
}
.auth-background {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-gradient); z-index: -1;
}
.auth-container {
    width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center;
}
.auth-card {
    width: 100%; background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 40px 35px; text-align: center; box-shadow: var(--glass-shadow);
}
.auth-card h2 {
    font-size: 24px; font-weight: 600; margin-bottom: 25px; color: var(--text-primary);
}
.input-group { margin-bottom: 20px; }
.input-group input {
    width: 100%; padding: 14px 18px; background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border); border-radius: 12px;
    color: var(--text-primary); font-size: 15px; transition: all 0.3s ease;
}
.input-group input::placeholder { color: var(--text-muted); }
.input-group input:focus { outline: none; border-color: var(--accent-blue); background: rgba(102, 126, 234, 0.15); }
.input-group input:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== MESSAGES ===== */
.msg {
    margin-top: 20px; padding: 14px 18px; border-radius: 12px;
    display: flex; align-items: flex-start; gap: 12px; font-size: 13px;
    text-align: left; animation: fadeIn 0.3s ease;
}
.msg svg { flex-shrink: 0; margin-top: 2px; }
.msg.error {
    background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fecaca;
}
.msg.locked {
    background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb); opacity: 1.5; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .filter-form { flex-direction: column; align-items: stretch; }
    .filter-row { flex-direction: column; }
    .filter-group { min-width: 100%; }
    .buttons-group { width: 100%; justify-content: center; }
    .logout-btn { margin: 15px auto 0; }
}

@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .logo span, .nav-section-title, .nav-link span, .nav-badge, .sidebar-info { display: none; }
    .nav-link { justify-content: center; padding: 14px; }
    .profile-name, .profile-arrow { display: none; }
    .search-bar { width: 100%; }
    .top-header { padding: 0 15px; flex-wrap: wrap; gap: 15px; }
    .header-left { width: 100%; justify-content: space-between; }
    .header-right { width: 100%; justify-content: flex-end; }
    .content-area { padding: 15px; }
    .filter-card { padding: 15px; }
    .table-card { border-radius: 12px; }
    .request-table { min-width: 700px; }
    .request-table th, .request-table td { padding: 12px 15px; font-size: 12px; }
    .auth-card { padding: 30px 25px; margin: 10px; }
}

@media (max-width: 480px) {
    .request-table { display: block; overflow-x: auto; min-width: 100%; }
    .request-table thead { display: none; }
    .request-table tbody tr {
        display: block; margin-bottom: 15px; padding: 15px;
        background: var(--table-bg); border-radius: 12px;
        border: 1px solid var(--glass-border);
    }
    .request-table td {
        display: flex; justify-content: space-between; padding: 8px 0;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    }
    .request-table td:last-child { border-bottom: none; }
    .request-table td[data-label]::before {
        display: inline; font-weight: 600; color: var(--text-muted);
        font-size: 12px;
    }
    .cancelled-status { justify-content: flex-end; }
    .pagination-wrapper { gap: 4px; padding: 15px 10px; }
    .pagination-wrapper .nav-page,
    .pagination-wrapper .page,
    .pagination-wrapper .nav-arrow,
    .pagination-wrapper a {
        min-width: 32px; height: 32px; font-size: 12px; padding: 0 6px;
    }
    .auth-card { padding: 25px 20px; }
    .auth-card h2 { font-size: 20px; }
}

/* ===== THEME TRANSITION ===== */
.theme-transition * { transition: all 0.5s ease !important; }
.modern-page-title{
    display: none;
}
.modern-page-current {
    background: var(--primary-gradient) !important;
    border: 1px solid transparent !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    cursor: default;
    pointer-events: none; /* Запрещает клик по текущей странице */
    transition: all 0.3s ease;
        min-width: 36px;
    height: 36px;
    padding: 0 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}
.modern-page-current:hover,
.modern-page-current:focus,
.modern-page-current:active {
    background: var(--primary-gradient) !important;
    transform: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
/* ===== TAB SYSTEM ===== */
.content-area { position: relative; }

.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    animation: tabFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tab-content.active {
    display: flex;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Плавное скрытие фильтров/таблиц внутри табов */
.tab-content .glass-card {
    opacity: 1;
    transition: opacity 0.2s ease;
}
.tab-content:not(.active) .glass-card {
    opacity: 0;
    pointer-events: none;
}

/* ===== ЯЧЕЙКИ С КНОПКАМИ ===== */
.problem-cell, .files-cell {
    position: relative;
}

.text-preview, .files-preview {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.files-preview {
    display: flex;
    align-items: center;
    gap: 6px;
}

.files-count {
    background: var(--accent-blue);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.btn-view {
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    color: var(--accent-blue);
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
}

.btn-view i {
    font-size: 10px;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-cold);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.modal-open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
}

/* Текст проблемы в модалке */
.problem-full-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Список файлов в модалке */
.files-full-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.file-item-modal {
    padding: 12px;
    background: var(--table-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
}

.file-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.file-link:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--accent-blue);
    transform: translateX(4px);
}

.file-link i:first-child {
    font-size: 24px;
    color: var(--accent-blue);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.file-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-link i:last-child {
    font-size: 12px;
    color: var(--text-muted);
}

/* Адаптив для модалок */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 100%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .file-link {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .file-link i:last-child {
        display: none;
    }
}

/* ===== СТИЛИ ДЛЯ ВЫПАДАЮЩЕГО СПИСКА (ТАРИФЫ) ===== */
.filter-select {
    width: 100%;
    padding: 12px 40px 12px 15px; /* Отступ справа больше для стрелки */
    background-color: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    
    /* Убираем стандартный вид браузера */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Добавляем кастомную стрелку (SVG) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* При наведении */
.filter-select:hover {
    border-color: rgba(102, 126, 234, 0.5);
    background-color: rgba(102, 126, 234, 0.15);
}

/* При клике (фокус) */
.filter-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: rgba(102, 126, 234, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15); /* Свечение как у инпутов */
}

/* Оформление выпадающего списка (Опций) */
.filter-select option {
    background-color: var(--bg-cold); /* Темный фон списка */
    color: var(--text-primary);
    padding: 10px;
    font-size: 13px;
}

/* ===== ПОДСВЕТКА НОВЫХ ЭЛЕМЕНТОВ (БЕЗ ЛОМКИ СЕТКИ) ===== */

/* 1. Подсветка через border-left (не ломает таблицу) */
tr.is-new-item {
    border-left: 4px solid var(--success) !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, transparent 100%);
    animation: fadeNewRow 4s ease-out forwards;
}

/* 2. Бейдж NEW — это обычный span в HTML, а не ::after */
.badge-new-row {
    
    position: absolute;
    display: inline-block;
    background: var(--success);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: -22px;
    vertical-align: middle;
    animation: badgePulse 0.5s ease-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Анимация исчезновения */
@keyframes fadeNewRow {
    0% { background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, transparent 100%); }
    100% { background: transparent; border-left-color: transparent !important; }
}

@keyframes badgePulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Класс для скрытия после просмотра */
tr.seen-item {
    border-left-color: transparent !important;
    background: transparent !important;
}
tr.seen-item .badge-new-row {
    display: none;
}