/* ============================================
   ECHO DISTRIBUTION - ADMIN DESIGN SYSTEM
   Современный, органичный, профессиональный
   ============================================ */

/* === ЦВЕТОВАЯ ПАЛИТРА === */
:root {
    --primary: #D10060;
    --primary-dark: #B8004D;
    --primary-light: rgba(209, 0, 96, 0.1);
    --secondary: #C0006B;
    --accent: #F472B6;
    
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-tertiary: #1a1a1a;
    --bg-elevated: #1e1e1e;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-strong: rgba(255, 255, 255, 0.25);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* === БАЗОВЫЕ СТИЛИ === */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-tertiary);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm);
    border: 2px solid var(--bg-tertiary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
}

/* === LAYOUT === */
.admin-layout {
    min-height: 100vh;
    background: var(--bg-primary);
}

.app-layout .admin-content {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

/* === ЗАГОЛОВКИ СТРАНИЦ === */
.app-layout .page-header {
    padding: 0;
    margin-bottom: 22px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* .page-header::before removed */

.app-layout .page-title {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(26px, 2vw, 31px);
    font-weight: 680;
    letter-spacing: -.025em;
    line-height: 1.12;
}

.page-subtitle {
    color: var(--text-tertiary);
    font-size: 1rem;
    font-weight: 400;
}

/* === КАРТОЧКИ === */
.app-layout .card {
    padding: 20px;
    background: var(--surface-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: none;
    transition: background-color 180ms ease, border-color 180ms ease;
    position: relative;
    overflow: hidden;
}

.app-layout .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(209, 0, 96, 0.05), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-layout .card:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }

.app-layout .card:hover::after { opacity: 0; }

/* === СТАТИСТИЧЕСКИЕ КАРТОЧКИ === */
.app-layout .stat-card {
    min-height: 0;
    padding: 18px;
    background: var(--surface-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: background-color 180ms ease, border-color 180ms ease;
}

/* .stat-card::before removed */

.app-layout .stat-card:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }

.app-layout .stat-icon { display: none; }

.app-layout .stat-value { margin: 0 0 5px; color: var(--text-primary); font-size: clamp(25px, 2.2vw, 33px); font-weight: 680; letter-spacing: -.035em; line-height: 1.05; }

.app-layout .stat-label { color: var(--text-secondary); font-size: 12px; font-weight: 540; text-transform: none; letter-spacing: 0; }

/* === ТАБЛИЦЫ === */
.table-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: linear-gradient(135deg, 
        rgba(209, 0, 96, 0.12) 0%, 
        rgba(192, 0, 107, 0.08) 100%);
    border-bottom: 2px solid rgba(209, 0, 96, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, 
        rgba(209, 0, 96, 0.08) 0%, 
        rgba(209, 0, 96, 0.02) 100%);
    transform: scale(1.005);
}

.table tbody td {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* === КНОПКИ === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(209, 0, 96, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(209, 0, 96, 0.6);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.btn-accent {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(192, 0, 107, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.0625rem;
}

/* === БЕЙДЖИ === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.badge-green {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.badge-yellow {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.badge-red {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.badge-blue {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* === ФОРМЫ === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    letter-spacing: 0.025em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    background: var(--bg-tertiary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(209, 0, 96, 0.15);
}

select,
.form-select {
    background: var(--bg-elevated) !important;
    cursor: pointer;
}

select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 12px;
}

/* === СЕТКИ === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

@media (min-width: 1536px) {
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

@media (min-width: 1280px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1536px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === ФИЛЬТРЫ === */
.filter-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar > * {
    flex: 1;
    min-width: 220px;
}

/* === МОДАЛЬНЫЕ ОКНА === */
.modal-backdrop {
    backdrop-filter: blur(16px);
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === УВЕДОМЛЕНИЯ === */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: 20px;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

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

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--success);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: var(--error);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--warning);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--info);
    color: #93c5fd;
}

/* === ПАГИНАЦИЯ === */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.pagination-btn {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(209, 0, 96, 0.4);
}

/* === УТИЛИТЫ === */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
    margin: 24px 0;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}/* Полноэкранные статистические карточки */
.stat-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-value {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    margin: 16px 0 !important;
}

.metric-label {
    font-size: 0.9375rem !important;
    opacity: 0.8;
}

/* Адаптивная сетка для статистики */
@media (min-width: 1536px) {
    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (min-width: 1280px) and (max-width: 1535px) {
    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
/* === NOTIFICATION BELL FIX === */
#notificationsBellBtn {
    overflow: visible !important;
}

#notificationsBellBtn .notification-dot {
    z-index: 10;
}
.badge-violet {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* === BELL ICON FIX === */
#notificationsBellBtn {
    overflow: visible !important;
    position: relative;
    color: #a1a1aa;
}
#notificationsBellBtn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}
#notificationsBellBtn svg,
#notificationsBellBtn i {
    width: 20px;
    height: 20px;
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit;
}
#notificationsBellBtn .notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 10;
    width: 10px;
    height: 10px;
}
.topbar .btn.btn-ghost.btn-icon {
    overflow: visible;
    color: #a1a1aa;
}
.topbar .btn.btn-ghost.btn-icon:hover {
    color: #ffffff;
}

/* === BELL + BTN-ICON VISIBILITY FIX === */
.btn.btn-ghost.btn-icon::before {
    display: none !important;
}
.btn.btn-ghost.btn-icon {
    overflow: visible !important;
    color: #a1a1aa !important;
    position: relative;
}
.btn.btn-ghost.btn-icon:hover {
    color: #ffffff !important;
}
.btn.btn-ghost.btn-icon svg {
    position: relative;
    z-index: 2;
}
