/* ═══════════════════════════════════════════
   ChocoPlus Admin Panel — Premium Styles
   ═══════════════════════════════════════════ */

/* Scrollbar */
.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 10px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.5); }

/* Glass Effects */
.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-glass {
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* Stat Cards */
.stat-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--card-accent, #8b5cf6), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover {
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Navigation */
.nav-btn.active {
    background: rgba(139,92,246,0.15) !important;
    color: white !important;
    border-left: 3px solid #8b5cf6;
}
.nav-btn.active i {
    color: #a78bfa !important;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.data-table thead th {
    background: rgba(15,23,42,0.8);
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 1;
}
.data-table tbody tr {
    transition: background 0.15s;
}
.data-table tbody tr:hover {
    background: rgba(139,92,246,0.05);
}
.data-table tbody td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #e2e8f0;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-active { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-permanent { background: rgba(139,92,246,0.15); color: #a78bfa; }
.badge-expired { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-info { background: rgba(6,182,212,0.15); color: #06b6d4; }

/* Inputs */
.input-glass {
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: white;
    outline: none;
    transition: all 0.2s;
    width: 100%;
}
.input-glass:focus {
    border-color: rgba(139,92,246,0.5);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.input-glass::placeholder { color: #475569; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(139,92,246,0.3);
    transform: translateY(-1px);
}
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid rgba(239,68,68,0.2);
    cursor: pointer;
}
.btn-danger:hover {
    background: rgba(239,68,68,0.25);
}

/* Toast */
.toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease-out;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
}
.toast-success { background: rgba(16,185,129,0.15); color: #10b981; border-color: rgba(16,185,129,0.2); }
.toast-error { background: rgba(239,68,68,0.15); color: #ef4444; border-color: rgba(239,68,68,0.2); }
.toast-info { background: rgba(6,182,212,0.15); color: #06b6d4; border-color: rgba(6,182,212,0.2); }
.toast-warning { background: rgba(245,158,11,0.15); color: #f59e0b; border-color: rgba(245,158,11,0.2); }

@keyframes toastIn {
    0% { transform: translateX(100px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100px); opacity: 0; }
}

/* Code viewer */
.code-viewer {
    background: rgba(5,8,16,0.9);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    color: #e2e8f0;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Progress bars */
.progress-bar {
    height: 6px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* Skeleton loader */
.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.03) 0%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.03) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-content {
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    animation: fadeUp 0.3s ease;
}
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

/* File explorer */
.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
}
.file-item:hover {
    background: rgba(255,255,255,0.05);
}

/* Chart container */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
    }
    #sidebar.open { left: 0; }
    .sidebar-text { display: inline; }
}
