/* ============================================
   ВОСВОД — Премиальные стили админки
   ============================================ */

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-body-gradient);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    transition: background 0.4s var(--ease-out), color 0.3s ease;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* === Декоративный фон с волнами === */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(0, 168, 204, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(10, 77, 140, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes waveMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-25px) translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 168, 204, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 168, 204, 0.5); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fadeInUp { animation: fadeInUp 0.6s var(--ease-out) backwards; }
.animate-fadeIn { animation: fadeIn 0.5s ease backwards; }
.animate-slideInRight { animation: slideInRight 0.5s var(--ease-out) backwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   ADMIN WRAPPER
   ============================================ */
.admin-wrapper {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* ============================================
   SIDEBAR (премиум)
   ============================================ */
.sidebar {
    width: 270px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.sidebar-brand {
    padding: 24px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 22px;
    right: 22px;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.3;
    border-radius: 2px;
}

.sidebar-brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s var(--ease-spring);
    background: transparent;
}

.sidebar-brand-icon img {
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
    display: block;
}

.sidebar-brand:hover .sidebar-brand-icon {
    transform: rotate(-5deg) scale(1.05);
}

.sidebar-brand-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    pointer-events: none;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-brand-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-brand-subtitle {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.sidebar-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 14px 14px 8px;
    margin-top: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 3px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.2s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s var(--ease-out);
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--bg-active);
    color: var(--vosvod-primary);
    font-weight: 600;
}

.sidebar-link.active::before {
    height: 60%;
}

[data-theme="dark"] .sidebar-link.active {
    color: var(--vosvod-accent-light);
}

.sidebar-link-icon {
    width: 22px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-spring);
}

.sidebar-link:hover .sidebar-link-icon {
    transform: scale(1.15);
}

.sidebar-link.danger { color: var(--vosvod-danger); }
.sidebar-link.danger:hover { background: rgba(214, 64, 69, 0.08); }

.sidebar-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    background: var(--gradient-soft);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 270px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* ============================================
   TOPBAR (премиум)
   ============================================ */
.topbar {
    height: 70px;
    min-height: 70px;
    background: var(--bg-topbar);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 28px;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* === Переключатель темы (премиум) === */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-spring);
    font-size: 18px;
    position: relative;
    overflow: hidden;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px) rotate(15deg);
    border-color: var(--vosvod-accent);
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover::before {
    opacity: 0.1;
}

.theme-toggle > * {
    position: relative;
    z-index: 1;
}

/* === Профиль в topbar === */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 6px;
    border-radius: 14px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s var(--ease-out);
}

.topbar-user:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--vosvod-accent);
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-hero);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(10, 77, 140, 0.25);
    position: relative;
}

.topbar-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    pointer-events: none;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 13px;
}

.topbar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-area {
    flex: 1;
    padding: 28px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

/* ============================================
   HERO WELCOME (премиум)
   ============================================ */
.hero-welcome {
    background: var(--gradient-hero);
    border-radius: 20px;
    padding: 36px 40px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 20px 40px rgba(10, 77, 140, 0.25);
    animation: fadeInUp 0.6s var(--ease-out);
}

.hero-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-welcome::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C150,100 350,20 600,60 C850,100 1050,20 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    animation: waveMove 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    max-width: 500px;
}

.hero-icon {
    font-size: 80px;
    opacity: 0.9;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
    animation: float 4s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-stats {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   STAT CARDS (премиум)
   ============================================ */
.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 22px;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--gradient-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    transition: transform 0.3s var(--ease-spring);
}

.stat-card:hover .stat-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-card-icon.primary {
    background: linear-gradient(135deg, rgba(10, 77, 140, 0.12), rgba(10, 77, 140, 0.05));
    color: var(--vosvod-primary);
}
.stat-card-icon.accent {
    background: linear-gradient(135deg, rgba(0, 168, 204, 0.12), rgba(0, 168, 204, 0.05));
    color: var(--vosvod-accent);
}
.stat-card-icon.success {
    background: linear-gradient(135deg, rgba(42, 157, 143, 0.12), rgba(42, 157, 143, 0.05));
    color: var(--vosvod-success);
}
.stat-card-icon.warning {
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.12), rgba(244, 162, 97, 0.05));
    color: var(--vosvod-warning);
}

.stat-card-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.stat-card-trend.up {
    background: rgba(42, 157, 143, 0.1);
    color: var(--vosvod-success);
}

.stat-card-trend.down {
    background: rgba(214, 64, 69, 0.1);
    color: var(--vosvod-danger);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-progress {
    margin-top: 14px;
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
}

.stat-card-progress-bar {
    height: 100%;
    background: var(--card-accent, var(--gradient-primary));
    border-radius: 2px;
    transition: width 1s var(--ease-out);
}

/* ============================================
   CARDS (премиум)
   ============================================ */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-out);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gradient-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
}

.card-body {
    padding: 24px;
}

/* ============================================
   TIMELINE (премиум)
   ============================================ */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--vosvod-accent), var(--vosvod-primary), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
    animation: fadeInUp 0.5s var(--ease-out) backwards;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--vosvod-accent);
    box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.1);
}

.timeline-item.success::before {
    border-color: var(--vosvod-success);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

.timeline-item.danger::before {
    border-color: var(--vosvod-danger);
    box-shadow: 0 0 0 3px rgba(214, 64, 69, 0.1);
}

.timeline-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-hover);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s var(--ease-out);
    border: 1px solid transparent;
}

.quick-action:hover {
    background: var(--bg-card);
    border-color: var(--vosvod-accent);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-spring);
}

.quick-action:hover .quick-action-icon {
    transform: scale(1.1);
}

.quick-action-text {
    flex: 1;
}

.quick-action-title {
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 2px;
}

.quick-action-desc {
    font-size: 11.5px;
    color: var(--text-muted);
}

.quick-action-arrow {
    color: var(--text-muted);
    transition: transform 0.25s var(--ease-out);
}

.quick-action:hover .quick-action-arrow {
    transform: translateX(4px);
    color: var(--vosvod-accent);
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 11px 15px;
    font-size: 14px;
    transition: all 0.25s var(--ease-out);
}

.form-control:focus, .form-select:focus {
    background: var(--bg-card);
    border-color: var(--vosvod-accent);
    box-shadow: 0 0 0 4px rgba(0, 168, 204, 0.1);
    color: var(--text-primary);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 7px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.25s var(--ease-out);
    border: 1.5px solid transparent;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(10, 77, 140, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 77, 140, 0.35);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--vosvod-accent);
    color: var(--vosvod-primary);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    color: var(--vosvod-accent-light);
}

/* ============================================
   TABLES
   ============================================ */
.table {
    color: var(--text-primary);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-color);
}

.table thead th {
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
}

.table td {
    vertical-align: middle;
    padding: 14px 16px;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    font-size: 14px;
    animation: fadeInUp 0.4s var(--ease-out);
}

.alert-success {
    background: rgba(42, 157, 143, 0.08);
    border-color: rgba(42, 157, 143, 0.2);
    color: var(--vosvod-success);
}

.alert-danger {
    background: rgba(214, 64, 69, 0.08);
    border-color: rgba(214, 64, 69, 0.2);
    color: var(--vosvod-danger);
}

.alert-warning {
    background: rgba(244, 162, 97, 0.08);
    border-color: rgba(244, 162, 97, 0.2);
    color: #B8742C;
}

[data-theme="dark"] .alert-warning {
    color: var(--vosvod-warning);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.badge.bg-success {
    background: rgba(42, 157, 143, 0.15) !important;
    color: var(--vosvod-success);
}

.badge.bg-danger {
    background: rgba(214, 64, 69, 0.15) !important;
    color: var(--vosvod-danger);
}

.badge.bg-secondary {
    background: var(--bg-hover) !important;
    color: var(--text-secondary);
}

/* ============================================
   AUTH PAGES (премиум)
   ============================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-body-gradient);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 700px;
    height: 700px;
    background: var(--gradient-hero);
    border-radius: 50%;
    opacity: 0.12;
    filter: blur(100px);
    animation: float 10s ease-in-out infinite;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--gradient-accent);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(100px);
    animation: float 12s ease-in-out infinite reverse;
}

.auth-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    padding: 44px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s var(--ease-out);
}

[data-theme="dark"] .auth-card {
    background: rgba(26, 35, 50, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 32px;
}

.auth-brand-icon {
    width: 54px;
    height: 54px;
    padding: 5px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: transparent;
    animation: pulseGlow 3s ease-in-out infinite;
}

.auth-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-brand-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
}

.auth-brand-text {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.auth-brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.auth-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--vosvod-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

[data-theme="dark"] .auth-footer a {
    color: var(--vosvod-accent-light);
}

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

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 28px;
    animation: fadeInUp 0.5s var(--ease-out);
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin: 0 0 6px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   ТЁМНАЯ ТЕМА — ИСПРАВЛЕНИЯ ДЛЯ ТАБЛИЦ И ФОРМ
   ============================================ */

/* === Таблицы в тёмной теме === */
[data-theme="dark"] .table {
    color: var(--text-primary);
}

[data-theme="dark"] .table thead th {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

[data-theme="dark"] .table tbody td {
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .table tbody tr:hover {
    background: var(--bg-hover);
}

/* === Disabled инпуты в тёмной теме === */
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-control[readonly],
[data-theme="dark"] .form-select:disabled,
[data-theme="dark"] .form-select[readonly] {
    background-color: var(--bg-hover);
    color: var(--text-secondary);
    border-color: var(--border-color);
    opacity: 0.7;
}

/* === Карточки в тёмной теме === */
[data-theme="dark"] .card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-header {
    background: transparent;
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

/* === Формы в тёмной теме === */
[data-theme="dark"] .form-label {
    color: var(--text-primary);
}

[data-theme="dark"] .form-text,
[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

/* === Ссылки в тёмной теме === */
[data-theme="dark"] a {
    color: var(--vosvod-accent-light);
}

[data-theme="dark"] a:hover {
    color: var(--vosvod-accent);
}

/* === Код в тёмной теме === */
[data-theme="dark"] code {
    color: var(--vosvod-accent-light);
    background: var(--bg-hover);
}

/* === Alerts в тёмной теме === */
[data-theme="dark"] .alert {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .alert-success {
    background: rgba(42, 157, 143, 0.15);
    border-color: rgba(42, 157, 143, 0.3);
    color: var(--vosvod-success);
}

[data-theme="dark"] .alert-danger {
    background: rgba(214, 64, 69, 0.15);
    border-color: rgba(214, 64, 69, 0.3);
    color: var(--vosvod-danger);
}

[data-theme="dark"] .alert-warning {
    background: rgba(244, 162, 97, 0.15);
    border-color: rgba(244, 162, 97, 0.3);
    color: var(--vosvod-warning);
}

[data-theme="dark"] .alert-info {
    background: rgba(0, 168, 204, 0.15);
    border-color: rgba(0, 168, 204, 0.3);
    color: var(--vosvod-accent-light);
}

/* === Badges в тёмной теме === */
[data-theme="dark"] .badge {
    color: var(--text-primary);
}

[data-theme="dark"] .badge.bg-success {
    background: rgba(42, 157, 143, 0.2) !important;
    color: var(--vosvod-success);
}

[data-theme="dark"] .badge.bg-danger {
    background: rgba(214, 64, 69, 0.2) !important;
    color: var(--vosvod-danger);
}

[data-theme="dark"] .badge.bg-warning {
    background: rgba(244, 162, 97, 0.2) !important;
    color: var(--vosvod-warning);
}

[data-theme="dark"] .badge.bg-primary {
    background: rgba(10, 77, 140, 0.3) !important;
    color: var(--vosvod-accent-light);
}

[data-theme="dark"] .badge.bg-secondary {
    background: var(--bg-hover) !important;
    color: var(--text-secondary);
}

/* === Buttons в тёмной теме === */
[data-theme="dark"] .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--vosvod-accent);
    color: var(--vosvod-accent-light);
}

/* === Quick actions в тёмной теме === */
[data-theme="dark"] .quick-action {
    background: var(--bg-hover);
    color: var(--text-primary);
}

[data-theme="dark"] .quick-action:hover {
    background: var(--bg-card);
    border-color: var(--vosvod-accent);
}

[data-theme="dark"] .quick-action-desc {
    color: var(--text-muted);
}

/* === Текст внутри карточек в тёмной теме === */
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-body p,
[data-theme="dark"] .card-body div,
[data-theme="dark"] .card-body strong,
[data-theme="dark"] .card-body span {
    color: var(--text-primary);
}

[data-theme="dark"] .card-body small,
[data-theme="dark"] .card-body .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .card-body .form-control:disabled,
[data-theme="dark"] .card-body .form-control[readonly] {
    background-color: var(--bg-hover);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .input-group-text {
    background-color: var(--bg-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* === Общие правила для текста в тёмной теме === */
[data-theme="dark"] body,
[data-theme="dark"] .content-area {
    color: var(--text-primary);
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
    color: var(--text-primary);
}

[data-theme="dark"] label {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .topbar-user-info {
        display: none;
    }
    .hero-icon {
        display: none;
    }
    .hero-welcome {
        padding: 28px;
    }
    .hero-title {
        font-size: 22px;
    }
}