:root {
    --sidebar-width: 16rem;
    --sidebar-collapsed-width: 4.5rem;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --glass-bg: rgba(255,255,255,0.7);
    --glass-border: rgba(255,255,255,0.2);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    --card-hover-shadow: 0 8px 30px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.04);
    --sidebar-gradient: linear-gradient(160deg, #1E3A8A 0%, #1E40AF 25%, #1E90FF 55%, #0EA5E9 100%);
    --sidebar-gradient-dark: linear-gradient(160deg, #0F172A 0%, #1E293B 50%, #0C4A6E 100%);
    --sidebar-accent: #F97316;
    --sidebar-accent-glow: rgba(249, 115, 22, 0.4);
    --btn-glow-primary: rgba(22, 163, 74, 0.4);
    --btn-glow-danger: rgba(220, 38, 38, 0.4);
    --btn-glow-gold: rgba(245, 158, 11, 0.4);
    --btn-glow-orange: rgba(249, 115, 22, 0.4);
    --btn-glow-dodger: rgba(30, 144, 255, 0.4);
}
.dark {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255,255,255,0.05);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.2);
    --card-hover-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.2);
}

* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
.dark ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

body { font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.sidebar {
    background: var(--sidebar-gradient);
    transition: transform 0.35s var(--transition-smooth), width 0.35s var(--transition-smooth);
    will-change: transform;
}
.dark .sidebar { background: var(--sidebar-gradient-dark); }
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}
.sidebar nav a {
    transition: all 0.2s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.sidebar nav a::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #F97316, #FB923C);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform 0.25s var(--transition-smooth);
}
.sidebar nav a.active::before { transform: scaleY(1); }
.sidebar nav a.active {
    background: rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.sidebar nav a:hover { transform: translateX(4px); }
.sidebar nav a:hover::before { transform: scaleY(0.6); }

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-nav-label,
.sidebar.collapsed .sidebar-badge,
.sidebar.collapsed .sidebar-profile-info,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .sidebar-fav-header,
.sidebar.collapsed .sidebar-recent-text { display: none; }
.sidebar.collapsed .sidebar-nav-icon { margin: 0; text-align: center; width: auto; }
.sidebar.collapsed nav a { justify-content: center; padding: 0.75rem 0; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0.75rem; }
.sidebar.collapsed .sidebar-profile { justify-content: center; padding: 0.5rem; }
.sidebar.collapsed .sidebar-profile .flex { justify-content: center; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar.collapsed + #main-content { margin-left: var(--sidebar-collapsed-width); }
@media (max-width: 1023px) {
    .sidebar.collapsed { transform: translateX(-100%); width: var(--sidebar-width); }
    .sidebar.collapsed.open { transform: translateX(0); }
    .sidebar.collapsed .sidebar-logo-text,
    .sidebar.collapsed .sidebar-section-title,
    .sidebar.collapsed .sidebar-nav-label,
    .sidebar.collapsed .sidebar-badge { display: block; }
    .sidebar.collapsed nav a { justify-content: flex-start; padding: 0.625rem 1rem; }
    .sidebar.collapsed .sidebar-nav-icon { margin-right: 0.75rem; }
}

.sidebar-search { transition: all 0.2s var(--transition-smooth); }
.sidebar-search:focus { background: rgba(255,255,255,0.15); box-shadow: 0 0 0 2px rgba(249,115,22,0.3); }

.sidebar-fav-btn { opacity: 0; transition: all 0.2s var(--transition-smooth); }
.sidebar nav a:hover .sidebar-fav-btn { opacity: 0.5; }
.sidebar nav a:hover .sidebar-fav-btn:hover { opacity: 1; transform: scale(1.2); }
.sidebar-fav-btn.is-favorite { opacity: 1; color: #FBBF24; }
.sidebar-fav-btn.is-favorite i { font-weight: 900; }

.sidebar-drag-handle { cursor: grab; color: rgba(255,255,255,0.15); }
.sidebar-drag-handle:active { cursor: grabbing; }
.sidebar-fav-item.dragging { opacity: 0.4; }
.sidebar-fav-item.drag-over { border-top: 2px solid #F97316; }

.sidebar-recent-item { font-size: 0.75rem; padding: 0.3rem 0.75rem; border-radius: 0.5rem; background: rgba(255,255,255,0.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; transition: all 0.2s var(--transition-smooth); }
.sidebar-recent-item:hover { background: rgba(255,255,255,0.12); }

.sidebar, #main-content { transition: all 0.35s var(--transition-smooth); }

.sidebar-profile {
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    backdrop-filter: blur(4px);
}

@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    #main-content { margin-left: 0 !important; }
}

.bg-gradient-premium {
    background: linear-gradient(135deg, #0f3d20 0%, #166534 30%, #22c55e 60%, #4ade80 100%);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}
.bg-orange-animated {
    background: linear-gradient(135deg, #f97316, #ea580c, #c2410c, #ea580c, #f97316);
    background-size: 400% 400%;
    animation: gradientShift 6s ease infinite;
}
.bg-dodger-animated {
    background: linear-gradient(135deg, #1E90FF, #0066cc, #1e3a8a, #0066cc, #1E90FF);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}
.bg-fire-dodger {
    background: linear-gradient(135deg, #f97316, #ea580c, #1E90FF, #0066cc);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.orb-orange {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(249,115,22,0.25), transparent 70%);
    animation: orbFloatOrange 8s ease-in-out infinite;
}
.orb-dodger {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(30,144,255,0.25), transparent 70%);
    animation: orbFloatDodger 10s ease-in-out infinite;
}
@keyframes orbFloatOrange {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    33% { transform: translate(30px, -40px) scale(1.1); opacity: 0.8; }
    66% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.5; }
}
@keyframes orbFloatDodger {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    33% { transform: translate(-30px, -30px) scale(1.15); opacity: 0.7; }
    66% { transform: translate(20px, 40px) scale(0.85); opacity: 0.4; }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 1.25rem;
    transition: all 0.3s var(--transition-smooth);
}
.glass-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}
.dark .glass-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.35); }

.stat-card {
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--card-hover-shadow);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.04);
    border-radius: 0 1.25rem 0 3rem;
    transition: all 0.4s var(--transition-smooth);
}
.stat-card:hover::after { width: 120px; height: 120px; }
.stat-card .stat-icon {
    transition: all 0.4s var(--transition-bounce);
}
.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(-5deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.25s var(--transition-smooth);
    outline: none;
    border: 2px solid transparent;
    transform: translateY(0);
    letter-spacing: 0.01em;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.5;
}
.btn:focus-visible { @apply ring-2 ring-offset-2 ring-primary-500; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn i, .btn svg { transition: transform 0.3s var(--transition-bounce); }

.btn-primary {
    background: #16a34a; color: white;
    border-color: #15803d;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}
.btn-primary:hover {
    background: #15803d;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.35);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }

.btn-secondary {
    background: #f3f4f6; color: #374151;
    border-color: #d1d5db;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.dark .btn-secondary { background: #374151; color: #e5e7eb; border-color: #4b5563; }
.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.dark .btn-secondary:hover { background: #4b5563; }
.btn-secondary:active { transform: translateY(0) scale(0.97); }

.btn-danger {
    background: #dc2626; color: white;
    border-color: #b91c1c;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}
.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}
.btn-danger:active { transform: translateY(0) scale(0.97); }

.btn-success {
    background: #059669; color: white;
    border-color: #047857;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.btn-success:hover {
    background: #047857;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.35);
}
.btn-success:active { transform: translateY(0) scale(0.97); }

.btn-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706); color: white;
    border-color: #d97706;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}
.btn-gold:active { transform: translateY(0) scale(0.97); }

.btn-info {
    background: #2563eb; color: white;
    border-color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-info:hover {
    background: #1d4ed8;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}
.btn-info:active { transform: translateY(0) scale(0.97); }

.btn-orange {
    background: linear-gradient(135deg, #f97316, #ea580c); color: white;
    border-color: #ea580c;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}
.btn-orange:hover {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.45);
}
.btn-orange:active { transform: translateY(0) scale(0.97); }

.btn-dodger {
    background: #1E90FF; color: white;
    border-color: #0066cc;
    box-shadow: 0 4px 14px rgba(30, 144, 255, 0.25);
}
.btn-dodger:hover {
    background: #0066cc;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(30, 144, 255, 0.4);
}
.btn-dodger:active { transform: translateY(0) scale(0.97); }

.btn-outline-primary { background: transparent; color: #16a34a; border: 2px solid #16a34a; }
.btn-outline-primary:hover { background: #16a34a; color: white; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3); }
.btn-outline-danger { background: transparent; color: #dc2626; border: 2px solid #dc2626; }
.btn-outline-danger:hover { background: #dc2626; color: white; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3); }
.btn-outline-orange { background: transparent; color: #f97316; border: 2px solid #f97316; }
.btn-outline-orange:hover { background: #f97316; color: white; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3); }
.btn-outline-dodger { background: transparent; color: #1E90FF; border: 2px solid #1E90FF; }
.btn-outline-dodger:hover { background: #1E90FF; color: white; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30, 144, 255, 0.3); }

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.75rem; border-radius: 0.625rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; border-radius: 0.875rem; }

.btn:hover i, .btn:hover svg { transform: scale(1.2) rotate(-5deg); }
.btn-danger:hover i { animation: btnIconShake 0.5s ease; }
.btn-gold:hover i { animation: btnIconSpin 0.6s ease; }
.btn-orange:hover i { animation: btnIconShake 0.5s ease; }

.btn::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    width: 0; height: 0;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: none;
}
.btn:active::after { animation: btnRipple 0.5s ease-out; }

.btn-primary, .btn-danger, .btn-gold, .btn-success, .btn-orange, .btn-dodger {
    animation: btnIdleGlow 3s ease-in-out infinite;
}

@keyframes btnRipple {
    from { width: 0; height: 0; opacity: 0.5; }
    to { width: 300px; height: 300px; opacity: 0; }
}
@keyframes btnIdleGlow {
    0%, 100% { box-shadow: 0 4px 14px var(--btn-glow-primary); }
    50% { box-shadow: 0 4px 20px var(--btn-glow-primary), 0 0 30px var(--btn-glow-primary); }
}
@keyframes btnIconShake {
    0%, 100% { transform: scale(1.2) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-12deg); }
    75% { transform: scale(1.2) rotate(12deg); }
}
@keyframes btnIconSpin {
    0% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1.2) rotate(360deg); }
}

.data-table { width: 100%; font-size: 0.875rem; }
.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dark .data-table th {
    color: #9ca3af;
    background: #1f2937;
    border-bottom-color: #374151;
}
.data-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #f3f4f6; }
.dark .data-table td { border-bottom-color: #374151; }
.data-table tbody tr { transition: all 0.15s ease; }
.data-table tbody tr:hover { background: #f9fafb; }
.dark .data-table tbody tr:hover { background: rgba(31, 41, 55, 0.5); }

.table-wrap { overflow-x: auto; border-radius: 0.75rem; border: 1px solid #e5e7eb; }
.dark .table-wrap { border-color: #374151; }

.form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid #d1d5db;
    background: white;
    color: #111827;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}
.dark .form-input { background: #1f2937; color: #f3f4f6; border-color: #4b5563; }
.form-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
}
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; color: #374151; margin-bottom: 0.375rem; }
.dark .form-label { color: #d1d5db; }
.form-select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.modal-content {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.35s var(--transition-bounce);
}
.dark .modal-content { background: #1f2937; }

.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.875rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    animation: toastIn 0.4s var(--transition-bounce), toastOut 0.3s ease 3.7s forwards;
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid rgba(255,255,255,0.25);
}
.toast-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast-error { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.toast-info { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #1a1a1a; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(120px) scale(0.8); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(80px) scale(0.9); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.15); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes bounceIn { 0% { transform: scale(0); } 50% { transform: scale(1.15); } 70% { transform: scale(0.95); } 100% { transform: scale(1); } }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
.dark .skeleton { background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%); background-size: 200px 100%; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.badge-success { background: #dcfce7; color: #166534; }
.dark .badge-success { background: rgba(22, 163, 74, 0.15); color: #4ade80; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.dark .badge-danger { background: rgba(220, 38, 38, 0.15); color: #f87171; }
.badge-warning { background: #fef3c7; color: #92400e; }
.dark .badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-info { background: #dbeafe; color: #1e40af; }
.dark .badge-info { background: rgba(37, 99, 235, 0.15); color: #60a5fa; }
.badge:hover { transform: scale(1.05); }

.progress-bar { height: 0.5rem; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.dark .progress-bar { background: #374151; }
.progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.8s var(--transition-bounce);
    position: relative;
    overflow: hidden;
}
.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2s infinite;
}

.gradient-text { background: linear-gradient(135deg, #16a34a, #22c55e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-orange { background: linear-gradient(135deg, #f97316, #ea580c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-dodger { background: linear-gradient(135deg, #1E90FF, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-fire { background: linear-gradient(135deg, #f97316, #ea580c, #c2410c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-ocean { background: linear-gradient(135deg, #1E90FF, #0066cc, #1e3a8a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-gold { background: linear-gradient(135deg, #f59e0b, #d97706); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gradient-rainbow { background: linear-gradient(135deg, #f97316, #ea580c, #1E90FF, #0066cc, #22c55e); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; background-size: 300% 300%; animation: gradientShift 4s ease infinite; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    cursor: pointer;
}
.gallery-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px -8px rgba(0,0,0,0.3);
}
.gallery-item img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item .overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.gallery-item:hover .overlay { transform: translateY(0); }

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    animation: slideUp 0.4s var(--transition-bounce);
}
.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0.75rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: -40px; right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}
.lightbox-close:hover { transform: scale(1.2); }

.hover-card { transition: all 0.3s var(--transition-smooth); }
.hover-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px -8px rgba(0,0,0,0.12); }
.dark .hover-card:hover { box-shadow: 0 12px 30px -8px rgba(0,0,0,0.3); }

.notif-item { transition: all 0.2s ease; }
.notif-item:hover { background: #f9fafb; transform: translateX(2px); }
.dark .notif-item:hover { background: rgba(31, 41, 55, 0.5); }

.page-enter { animation: fadeIn 0.3s ease, slideUp 0.4s var(--transition-smooth); }

.counter { display: inline-block; }

.spinner { animation: spin 1s linear infinite; width: 1.25rem; height: 1.25rem; }
.spinner-lg { width: 2rem; height: 2rem; }

.stats-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.chart-container { position: relative; height: 250px; }

.empty-state { text-align: center; padding: 2rem; color: #9ca3af; }
.empty-state i { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }
.empty-state p { font-size: 0.875rem; }

.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 200px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s var(--transition-smooth);
    z-index: 100;
}
.dark .dropdown-menu { background: #1f2937; border-color: #374151; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: #374151;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.dark .dropdown-menu a { color: #d1d5db; }
.dropdown-menu a:hover { background: #f3f4f6; }
.dark .dropdown-menu a:hover { background: #374151; }
.dropdown-menu a:first-child { border-radius: 0.75rem 0.75rem 0 0; }
.dropdown-menu a:last-child { border-radius: 0 0 0.75rem 0.75rem; }
.dropdown-divider { height: 1px; background: #e5e7eb; margin: 0.25rem 0; }
.dark .dropdown-divider { background: #374151; }

.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: #9ca3af; }
.breadcrumb a { color: #6b7280; transition: color 0.15s ease; }
.breadcrumb a:hover { color: #16a34a; }
.breadcrumb span { color: #374151; font-weight: 500; }
.dark .breadcrumb span { color: #e5e7eb; }

.stat-card:hover .fa-users { animation: float 1.5s ease-in-out infinite; }
.stat-card:hover .fa-money-bill-wave { animation: wiggle 0.6s ease; }
.stat-card:hover .fa-coins { animation: bounceIn 0.5s ease; }
.stat-card:hover .fa-calendar-check { animation: pulse 1s ease infinite; }
.stat-card:hover .fa-images { animation: bounceIn 0.6s ease; color: #f97316; }
.stat-card:hover .fa-trophy { animation: bounceIn 0.6s ease; color: #f59e0b; }
.stat-card:hover .fa-hand-holding-heart { animation: pulse 1s ease infinite; color: #16a34a; }

.portal-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid #e5e7eb;
    transition: all 0.3s var(--transition-smooth);
}
.dark .portal-card { background: #1f2937; border-color: #374151; }
.portal-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.dark .portal-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease infinite;
}

.loading-bar {
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a, #15803d, #16a34a, #22c55e);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 2px;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #9ca3af;
    font-size: 0.8125rem;
}
.divider-text::before, .divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db);
}
.dark .divider-text::before, .dark .divider-text::after {
    background: linear-gradient(to right, transparent, #374151);
}
.divider-text::after { background: linear-gradient(to left, transparent, #d1d5db); }
.dark .divider-text::after { background: linear-gradient(to left, transparent, #374151); }

@keyframes bellRing {
    0%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(8deg); }
    20%, 40% { transform: rotate(-8deg); }
}
.notif-bell:hover { animation: bellRing 0.6s ease; }

.podcast-card {
    @apply bg-white dark:bg-gray-800 rounded-2xl overflow-hidden shadow-sm border border-gray-100 dark:border-gray-700 transition-all duration-300;
}
.podcast-card:hover {
    @apply shadow-lg -translate-y-1 border-primary-200 dark:border-primary-800;
}
.podcast-card .card-thumb {
    @apply relative aspect-video bg-gradient-to-br from-gray-200 to-gray-300 dark:from-gray-700 dark:to-gray-600 overflow-hidden;
}
.podcast-card .card-thumb img {
    @apply w-full h-full object-cover transition-transform duration-500;
}
.podcast-card:hover .card-thumb img {
    @apply scale-105;
}
.podcast-card .card-play-overlay {
    @apply absolute inset-0 flex items-center justify-center bg-black/30 opacity-0 transition-opacity duration-300;
}
.podcast-card:hover .card-play-overlay {
    @apply opacity-100;
}
.podcast-card .card-play-btn {
    @apply w-14 h-14 rounded-full bg-white/90 flex items-center justify-center text-primary-600 text-xl shadow-lg transform transition-all duration-300;
}
.podcast-card:hover .card-play-btn {
    @apply scale-110;
}
.podcast-card .card-body {
    @apply p-4;
}
.podcast-card .card-title {
    @apply font-semibold text-sm truncate;
}
.podcast-card .card-meta {
    @apply text-xs text-gray-400 mt-1 flex items-center gap-3;
}
.podcast-featured-card {
    @apply relative rounded-2xl overflow-hidden shadow-xl;
}
.podcast-featured-card .featured-bg {
    @apply absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent z-10;
}
.podcast-featured-card .featured-content {
    @apply relative z-20 p-6 md:p-10 flex flex-col justify-end min-h-[300px];
}
.podcast-featured-card .featured-badge {
    @apply inline-flex items-center gap-1 px-3 py-1 rounded-full text-[10px] font-semibold uppercase tracking-wider mb-3;
}

.podcast-player-wrapper {
    @apply fixed bottom-0 left-0 right-0 z-50 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 shadow-2xl transform transition-transform duration-300;
}
.podcast-player-wrapper.hidden-player {
    @apply translate-y-full;
}
.podcast-player-wrapper .player-progress {
    @apply absolute top-0 left-0 right-0 h-1 bg-gray-200 dark:bg-gray-700 cursor-pointer;
}
.podcast-player-wrapper .player-progress .progress-fill {
    @apply h-full bg-gradient-to-r from-primary-500 to-primary-400 relative;
}
.podcast-player-wrapper .player-progress .progress-fill::after {
    content: '';
    @apply absolute right-0 top-1/2 -translate-y-1/2 w-3 h-3 rounded-full bg-primary-500 shadow-md opacity-0 transition-opacity;
}
.podcast-player-wrapper .player-progress:hover .progress-fill::after {
    @apply opacity-100;
}

.audio-visualizer {
    @apply flex items-end gap-[2px] h-8;
}
.audio-visualizer .bar {
    @apply w-[3px] rounded-full bg-primary-400;
    animation: visualizerWave 1s ease-in-out infinite;
}
.audio-visualizer .bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.audio-visualizer .bar:nth-child(2) { height: 55%; animation-delay: 0.1s; }
.audio-visualizer .bar:nth-child(3) { height: 80%; animation-delay: 0.2s; }
.audio-visualizer .bar:nth-child(4) { height: 45%; animation-delay: 0.3s; }
.audio-visualizer .bar:nth-child(5) { height: 65%; animation-delay: 0.4s; }
.audio-visualizer .bar:nth-child(6) { height: 35%; animation-delay: 0.5s; }
.audio-visualizer .bar:nth-child(7) { height: 75%; animation-delay: 0.6s; }
.audio-visualizer .bar:nth-child(8) { height: 50%; animation-delay: 0.7s; }

@keyframes visualizerWave {
    0%, 100% { transform: scaleY(0.6); }
    50% { transform: scaleY(1); }
}

.live-indicator {
    @apply inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[10px] font-bold uppercase;
}
.live-indicator.active {
    @apply bg-red-500 text-white;
}
.live-indicator .live-dot {
    @apply w-1.5 h-1.5 rounded-full bg-white;
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.upload-zone {
    @apply border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-2xl p-8 text-center transition-all duration-300 cursor-pointer;
}
.upload-zone:hover, .upload-zone.drag-over {
    @apply border-primary-400 bg-primary-50/50 dark:bg-primary-900/10;
}
.upload-zone .upload-icon {
    @apply text-4xl text-gray-300 dark:text-gray-600 mb-3 transition-colors;
}
.upload-zone:hover .upload-icon {
    @apply text-primary-400;
}

.podcast-grid {
    @apply grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4;
}

.storage-bar {
    @apply h-3 rounded-full bg-gray-200 dark:bg-gray-700 overflow-hidden;
}
.storage-bar .storage-fill {
    @apply h-full rounded-full transition-all duration-500;
}

.step-indicator {
    @apply flex items-center justify-center mb-8;
}
.step-indicator .step {
    @apply flex items-center;
}
.step-indicator .step .step-number {
    @apply w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all duration-300;
}
.step-indicator .step .step-number.active {
    @apply bg-primary-500 text-white shadow-lg shadow-primary-500/30;
}
.step-indicator .step .step-number.completed {
    @apply bg-green-500 text-white;
}
.step-indicator .step .step-number.pending {
    @apply bg-gray-200 dark:bg-gray-700 text-gray-400;
}
.step-indicator .step .step-label {
    @apply text-xs ml-2;
}
.step-indicator .step-connector {
    @apply w-8 h-[2px] mx-2;
}

.podcast-hero {
    @apply relative rounded-2xl overflow-hidden mb-6;
}
.podcast-hero .hero-bg {
    @apply absolute inset-0 bg-gradient-to-r from-black/70 via-black/50 to-transparent z-10;
}
.podcast-hero .hero-content {
    @apply relative z-20 p-6 md:p-10;
}

.quality-selector {
    @apply absolute bottom-12 right-2 bg-white dark:bg-gray-800 rounded-xl shadow-xl border border-gray-200 dark:border-gray-700 p-1 hidden;
}
.quality-selector.open { @apply block; }
.quality-selector button {
    @apply block w-full text-left px-3 py-1.5 text-xs rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors;
}
.quality-selector button.active {
    @apply bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 font-medium;
}

.featured-slider {
    @apply relative overflow-hidden rounded-2xl;
}
.featured-slider .slider-track {
    @apply flex transition-transform duration-500 ease-out;
}
.featured-slider .slider-track .slide {
    @apply min-w-full;
}
.featured-slider .slider-nav {
    @apply absolute bottom-4 right-4 z-20 flex gap-2;
}
.featured-slider .slider-nav button {
    @apply w-8 h-8 rounded-full bg-white/20 backdrop-blur-sm text-white flex items-center justify-center text-xs hover:bg-white/40 transition-all;
}

.waveform-placeholder {
    @apply w-full h-24 rounded-xl bg-gradient-to-r from-primary-500/10 via-primary-500/5 to-primary-500/10 overflow-hidden relative;
}
.waveform-placeholder .waveform-bars {
    @apply flex items-end justify-between h-full px-1 gap-[1px];
}
.waveform-placeholder .waveform-bars .wf-bar {
    @apply w-[3px] bg-primary-400/30 rounded-full;
    animation: wfPulse 2s ease-in-out infinite;
}
@keyframes wfPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

* { box-sizing: border-box; }
img, video, iframe, embed, object { max-width: 100%; height: auto; }
table { width: 100%; overflow-x: auto; display: block; }
@media (max-width: 768px) {
    table, .data-table { font-size: 0.75rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table th, .data-table td { padding: 0.5rem; white-space: nowrap; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .modal-content { max-width: 95vw; margin: 0.5rem; }
    .btn { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }
    .form-input { font-size: 16px; }
    .breadcrumb { font-size: 0.6875rem; flex-wrap: wrap; }
    [data-responsive-hide] { display: none !important; }
    .flex-wrap-responsive { flex-wrap: wrap; }
    .gap-responsive { gap: 0.5rem; }
    .grid-cols-responsive { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .btn { width: 100%; justify-content: center; }
    .btn-group-responsive { flex-direction: column; width: 100%; }
    .btn-group-responsive .btn { width: 100%; }
    .hide-mobile { display: none !important; }
    .text-responsive { font-size: 0.75rem; }
    .p-responsive { padding: 0.75rem; }
    .m-responsive { margin: 0.5rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1400px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .container-wide { max-width: 1400px; margin: 0 auto; }
}
@media (min-width: 1920px) {
    .stats-grid { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
    body { font-size: 1rem; }
}
