/* ========================================
   LikesBLN Dashboard - Modern UI Redesign
   Premium Dark Theme with Neon Accents
   ======================================== */

/* CSS Variables for easy theming */
:root {
    --primary: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --accent: #06B6D4;
    --accent-pink: #EC4899;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --bg-dark: #0A0A0F;
    --bg-card: #12121A;
    --bg-elevated: #1A1A25;
    --border-subtle: rgba(139, 92, 246, 0.1);
    --border-accent: rgba(139, 92, 246, 0.3);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --glow-primary: 0 0 40px rgba(139, 92, 246, 0.4);
    --glow-accent: 0 0 40px rgba(6, 182, 212, 0.3);
}

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(6, 182, 212, 0.1), transparent);
    min-height: 100vh;
    color: var(--text-primary);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Selection */
::selection {
    background: rgba(139, 92, 246, 0.4);
    color: white;
}

/* ========================================
   Animations
   ======================================== */

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

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

@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fadeInScale {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

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

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3),
                    0 0 40px rgba(139, 92, 246, 0.1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.5),
                    0 0 60px rgba(139, 92, 246, 0.2);
    }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(139, 92, 246, 0.3); }
    50% { border-color: rgba(139, 92, 246, 0.6); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Animation Classes */
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fade-in-down { animation: fadeInDown 0.5s ease-out forwards; }
.animate-fade-in-scale { animation: fadeInScale 0.4s ease-out forwards; }
.animate-slide-in-right { animation: slideInRight 0.5s ease-out forwards; }
.animate-slide-in-left { animation: slideInLeft 0.5s ease-out forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }

/* Stagger delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ========================================
   Glass Effects
   ======================================== */

.glass {
    background: rgba(18, 18, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    border-color: var(--border-accent);
    background: rgba(18, 18, 26, 0.9);
}

.glass-strong {
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.glass-light {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================
   Gradient Text & Backgrounds
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #C4B5FD 0%, #A78BFA 50%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #C4B5FD, #A78BFA, #8B5CF6, #06B6D4, #8B5CF6, #A78BFA, #C4B5FD);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

.gradient-text-cyan {
    background: linear-gradient(135deg, #67E8F9 0%, #06B6D4 50%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-pink {
    background: linear-gradient(135deg, #F9A8D4 0%, #EC4899 50%, #DB2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-bg-primary {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(124, 58, 237, 0.1) 100%);
}

.gradient-bg-accent {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(8, 145, 178, 0.1) 100%);
}

/* ========================================
   Cards & Containers
   ======================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(139, 92, 246, 0.15);
}

.card-interactive {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s ease;
}

.card-interactive:hover::before {
    left: 100%;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    transform: translate(30%, -30%);
}

.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px -5px rgba(139, 92, 246, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -5px rgba(139, 92, 246, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px -5px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 4px 20px -5px rgba(239, 68, 68, 0.5);
}

/* Button Loading State */
.btn-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ========================================
   Form Elements
   ======================================== */

.input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.input:hover {
    border-color: var(--border-accent);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.input::placeholder {
    color: var(--text-muted);
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group .input {
    padding-left: 48px;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Checkbox */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Select */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 48px;
}

/* ========================================
   Badges & Tags
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.badge-primary {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(6, 182, 212, 0.15);
    color: #67E8F9;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* ========================================
   Tables
   ======================================== */

.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

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

th {
    padding: 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s ease;
}

tr:hover td {
    background: rgba(139, 92, 246, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 16px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.toast-error {
    background: linear-gradient(135deg, var(--error) 0%, #DC2626 100%);
}

.toast-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
}

.toast-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* ========================================
   Modal
   ======================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    animation: fadeInScale 0.3s ease-out;
}

/* ========================================
   Sidebar Navigation
   ======================================== */

.sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary-light);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ========================================
   Progress Bar
   ======================================== */

.progress {
    height: 8px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ========================================
   Scrollbar
   ======================================== */

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

::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4) 0%, rgba(167, 139, 250, 0.4) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6) 0%, rgba(167, 139, 250, 0.6) 100%);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.4) rgba(139, 92, 246, 0.05);
}

/* ========================================
   Glow Effects
   ======================================== */

.glow {
    box-shadow: var(--glow-primary);
}

.glow-strong {
    box-shadow: 
        0 0 30px rgba(139, 92, 246, 0.4),
        0 0 60px rgba(139, 92, 246, 0.2);
}

.glow-accent {
    box-shadow: var(--glow-accent);
}

.glow-pulse {
    animation: glow 2s ease-in-out infinite;
}

/* ========================================
   Tooltips
   ======================================== */

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--bg-elevated);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Skeleton Loading
   ======================================== */

.skeleton {
    background: linear-gradient(90deg, 
        rgba(139, 92, 246, 0.1) 25%, 
        rgba(139, 92, 246, 0.2) 50%, 
        rgba(139, 92, 246, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ========================================
   Copy Button
   ======================================== */

.copy-btn {
    position: relative;
    transition: all 0.2s ease;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: var(--success) !important;
}

.copy-btn.copied::after {
    content: '✓ Copiado!';
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    animation: fadeInUp 0.2s ease-out;
}

/* ========================================
   QR Code Container
   ======================================== */

.qrcode-container {
    background: white;
    padding: 24px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 
        0 20px 50px -15px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(139, 92, 246, 0.2);
}

.qrcode-container img {
    display: block;
    border-radius: 12px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .glass {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
    
    .stat-card .stat-value {
        font-size: 1.75rem;
    }
}

/* ========================================
   Utilities
   ======================================== */

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-accent);
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

/* Icon Button */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.icon-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-description {
    color: var(--text-secondary);
    max-width: 320px;
    margin: 0 auto;
}
