/* assets/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --bg-base: #030303;
    --bg-surface: #0a0a0a;
    --panel-bg: rgba(12, 12, 12, 0.6);
    --border-subtle: rgba(255, 20, 20, 0.15);
    --border-glow: rgba(255, 20, 20, 0.4);
    --primary-red: #ff1111;
    --glow-red: #ff0000;
    --dark-red: #660000;
    --text-main: #ffffff;
    --text-muted: #888888;
    --glass-blur: blur(16px);
    --transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
.bg-animation {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(180, 0, 0, 0.25) 0%, transparent 60%);
    z-index: -2;
    animation: pulseBg 10s infinite alternate linear;
    pointer-events: none;
}
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
}

@keyframes pulseBg {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 0, 0, 0.02);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
    opacity: 0.3;
}

/* Typography Utility */
.logo-text { font-size: 2.8rem; font-weight: 900; letter-spacing: -1.5px; text-transform: uppercase; }
.red-text { 
    color: var(--primary-red); 
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.4); 
}
.subtitle { color: var(--text-muted); font-size: 0.95rem; letter-spacing: 2px; text-transform: uppercase; margin-top: 5px; font-weight: 500;}
h2 { font-weight: 700; font-size: 1.8rem; letter-spacing: -0.5px;}
h3 { font-weight: 700; font-size: 1.4rem; }

/* Login Page Layout */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.login-box {
    padding: 4rem 3rem;
    width: 100%;
    max-width: 460px;
    text-align: center;
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px;
}
.logo-area { margin-bottom: 3rem; animation: float 6s ease-in-out infinite; }

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

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

/* Form Styles */
.input-group { margin-bottom: 1.8rem; text-align: left; }
.input-group label { 
    display: block; margin-bottom: 0.8rem; color: var(--text-muted); 
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; 
}
.input-group input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    outline: none;
    transition: var(--transition);
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
}
.input-group input:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.2), inset 0 0 10px rgba(255, 0, 0, 0.1);
    background: #000;
}

/* Buttons */
.btn {
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.primary-btn {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
    border: 1px solid rgba(255, 50, 50, 0.5);
    z-index: 1;
}
.primary-btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s; z-index: -1;
}
.primary-btn:hover::before { left: 100%; }
.primary-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.6);
}
.primary-btn:active { transform: translateY(0) scale(0.98); }

.secondary-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}
.secondary-btn:hover { 
    background: rgba(255, 255, 255, 0.05); 
    border-color: white;
}

/* Alerts */
.alert { padding: 15px; border-radius: 12px; margin-bottom: 25px; font-weight: 600; font-size: 0.95rem; text-align: center;}
.alert.error { background: rgba(255,0,0,0.05); border: 1px solid var(--primary-red); color: var(--primary-red); box-shadow: 0 0 15px rgba(255,0,0,0.2);}

/* Dashboard Wrapper */
.dashboard-wrapper { display: flex; height: 100vh; overflow: hidden; padding: 1.5rem; gap: 1.5rem;}

/* Sidebar */
.sidebar {
    width: 280px;
    padding: 2.5rem 1.5rem;
    display: flex; flex-direction: column;
    height: 100%;
}
.sidebar .logo-area { margin-bottom: 3rem; }
.nav-links { list-style: none; flex: 1; }
.nav-links li { margin-bottom: 0.5rem; }
.nav-links a {
    text-decoration: none; color: var(--text-muted);
    display: flex; align-items: center; padding: 16px 20px; border-radius: 12px;
    transition: var(--transition);
    font-weight: 600; font-size: 1rem;
}
.nav-links li.active a, .nav-links a:hover {
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.1), transparent);
    color: white;
    border-left: 4px solid var(--primary-red);
    box-shadow: inset 20px 0 20px -20px rgba(255,0,0,0.5);
}

.tab-content { display: none; flex-direction: column; gap: 1.5rem; width: 100%; }
.tab-content.active { display: flex; }

/* Main Content */
.content-area { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1.5rem; }
.top-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem 2.5rem;
}
.top-bar .btn { width: auto; }

/* Stats grid */
.stats-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.5rem; 
}
.stat-card { 
    padding: 2rem 2.5rem; 
    display: flex; flex-direction: column; justify-content: center;
}
.stat-title { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; font-weight: 700; letter-spacing: 1.5px;}
.stat-card h3 { font-size: 3rem; color: var(--text-main); margin-top: 0.5rem; font-weight: 300; font-family: 'JetBrains Mono', monospace;}
#statTotal { color: var(--primary-red); text-shadow: 0 0 20px rgba(255,0,0,0.5); }

/* Table area */
.table-container { padding: 1rem 2rem; overflow-x: auto; flex: 1; margin-bottom: 1.5rem;}
.premium-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.premium-table th {
    padding: 20px; text-align: left; 
    color: var(--text-muted); font-weight: 700; font-size: 0.75rem; text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 2px;
}
.premium-table td { 
    padding: 20px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.03); 
    font-size: 0.95rem;
    vertical-align: middle;
}
.premium-table tr { transition: var(--transition); }
.premium-table tr:hover td { background: rgba(255, 0, 0, 0.03); border-color: rgba(255,0,0,0.1);}

/* Badges */
.badge { padding: 6px 14px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.badge.active { background: rgba(0, 255, 0, 0.05); color: #00ff55; border: 1px solid rgba(0,255,85,0.3); box-shadow: 0 0 10px rgba(0,255,85,0.1); }
.badge.expired { background: rgba(255, 0, 0, 0.05); color: var(--primary-red); border: 1px solid rgba(255,0,0,0.3); box-shadow: 0 0 10px rgba(255,0,0,0.1);}

/* Code blocks (License keys) */
code.license-key {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0,0,0,0.5);
    padding: 6px 10px;
    border-radius: 6px;
    color: #ff4d4d;
    border: 1px solid rgba(255,0,0,0.2);
    font-size: 0.9rem;
}

/* Icon actions */
.action-btn { 
    background: transparent; 
    border: 1px solid rgba(255,255,255,0.1); 
    color: var(--text-muted); 
    cursor: pointer; 
    width: 36px; height: 36px; border-radius: 8px;
    display: inline-flex; justify-content: center; align-items: center;
    transition: var(--transition); margin-right: 8px;
}
.action-btn:hover { background: rgba(255,255,255,0.1); color: white; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.5);}
.action-btn.delete:hover { background: rgba(255,0,0,0.1); border-color: var(--primary-red); color: var(--primary-red); box-shadow: 0 5px 15px rgba(255,0,0,0.2);}
.action-btn svg { width: 18px; height: 18px; }

/* Entry Animations */
.entry-anim { animation: elegantFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
@keyframes elegantFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Styling */
.hidden { display: none !important; opacity: 0; pointer-events: none;}
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.9); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s forwards;
}
.modal-content {
    padding: 3rem; width: 100%; max-width: 500px;
    animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-glow);
    box-shadow: 0 0 50px rgba(255,0,0,0.15), inset 0 0 20px rgba(255,0,0,0.05);
    border-radius: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-content h2 { margin-bottom: 2.5rem; text-align: center; color: white; }
.modal-actions { display: flex; gap: 15px; margin-top: 2.5rem; }

/* Toast Messages */
.toast-container { position: fixed; bottom: 40px; right: 40px; z-index: 9999; display: flex; flex-direction: column; gap: 15px; }
.toast {
    background: rgba(10,10,10,0.9); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--primary-red);
    padding: 20px 25px; border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    color: white; font-weight: 600; font-size: 0.95rem;
    display: flex; align-items: center; gap: 12px;
}
.toast-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,0,0,0.1); }
.toast.success { border-left-color: #00ff55; }
.toast.success .toast-icon { color: #00ff55; background: rgba(0,255,85,0.1);}
.toast.error .toast-icon { color: var(--primary-red); background: rgba(255,0,0,0.1);}

@keyframes slideInRight {
    from { transform: translateX(120%) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,0,0,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,0,0,0.6); }

