/* ============================================
   ZCORE PANEL - PROFESSIONAL DARK SYSTEM V2
   ============================================ */

:root {
    /* Core Base - Deep dark galaxy backdrop */
    --bg-body: #05050a;
    --bg-sidebar: rgba(10, 10, 15, 0.7);
    --bg-card: rgba(18, 18, 25, 0.6);
    --bg-hover: rgba(40, 40, 50, 0.6);

    /* Typography / Text */
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;

    /* Brand Accents - Vibrant / Neon feels */
    --primary: #5c6ac4;
    --primary-hover: #7b8de6;
    --primary-dim: rgba(92, 106, 196, 0.2);

    --accent: #00d2ff;
    --accent-hover: #48e5ff;

    --danger: #fd3a69;
    --warning: #fb8c00;

    /* Borders & Glass Dividers */
    --border: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);

    /* Metrics */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --header-height: 70px;
    --sidebar-width: 280px;
    --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Body Style */
body {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(92, 106, 196, 0.07), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 210, 255, 0.07), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }

a { text-decoration: none; color: inherit; transition: color var(--transition-base); }
ul { list-style: none; margin: 0; padding: 0; }

/* Grid Systems */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform var(--transition-base);
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.active { transform: translateX(0); }
}

.sidebar-header {
    height: var(--header-height);
    display: flex; align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 800; font-size: 1.25rem;
    color: var(--text-primary);
    gap: 0.75rem;
    letter-spacing: 0.5px;
}
.sidebar-header i { color: var(--accent); text-shadow: 0 0 10px rgba(0,210,255,0.4); }

.sidebar-menu { flex: 1; padding: 1.5rem 1rem; overflow-y: auto; }
.sidebar-item {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-weight: 500; font-size: 0.95rem;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}
.sidebar-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
    border: 1px solid var(--border-subtle);
}
.sidebar-item.active {
    background: linear-gradient(90deg, var(--primary-dim), transparent);
    color: var(--primary-hover);
    border-left: 3px solid var(--primary);
}
.sidebar-icon { width: 1.25rem; text-align: center; }
.sidebar-section-title {
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-base);
}
@media (max-width: 1024px) { .main-content { margin-left: 0; } }

.top-nav {
    height: var(--header-height);
    background-color: rgba(5, 5, 10, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; position: sticky; top: 0; z-index: 40;
}
.page-title { font-size: 1.25rem; font-weight: 700; background: linear-gradient(to right, #fff, #a0aec0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.menu-toggle {
    display: none; background: transparent; border: none;
    color: var(--text-primary); font-size: 1.5rem;
    cursor: pointer; margin-right: 1rem;
}
@media (max-width: 1024px) { .menu-toggle { display: block; } }

.container { padding: 2rem; flex: 1; max-width: 1600px; width: 100%; margin: 0 auto; }

/* Cards & Stats */
.card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); border-color: rgba(255, 255, 255, 0.15); }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.01); }
.card-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }

.stat-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(20, 20, 30, 0.4));
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem; position: relative; display: flex; flex-direction: column; gap: 0.75rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 12px 32px rgba(92, 106, 196, 0.2); }
.stat-icon {
    width: 48px; height: 48px; border-radius: var(--radius-md);
    background: var(--primary-dim); border: 1px solid rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-hover); font-size: 1.5rem; margin-bottom: 0.5rem;
    box-shadow: 0 0 15px rgba(92, 106, 196, 0.3);
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.stat-label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

.stat-change { font-size: 0.85rem; margin-top: auto; display: flex; align-items: center; gap: 0.25rem; font-weight: 500; }
.stat-change.positive { color: var(--accent); }
.stat-change.negative { color: var(--danger); }
.stat-change.warning { color: var(--warning); }

/* Buttons & Badges */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.65rem 1.25rem; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.875rem; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none; gap: 0.5rem; letter-spacing: 0.2px; text-transform: uppercase;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.75rem; border-radius: 6px; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white; box-shadow: 0 4px 15px rgba(92, 106, 196, 0.4);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-hover), #8a9ced); box-shadow: 0 6px 20px rgba(92, 106, 196, 0.6); }

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05); color: var(--text-primary);
    border: 1px solid var(--border-subtle); backdrop-filter: blur(4px);
}
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,0.2); }

.btn-danger { background: linear-gradient(135deg, #e11d48, #be123c); color: white; box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3); }
.btn-danger:hover { box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5); filter: brightness(1.1); }

.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }

.badge {
    display: inline-flex; padding: 0.35rem 0.75rem; border-radius: 99px;
    font-size: 0.7rem; font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0.5px;
    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.05);
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(52, 211, 153, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(96, 165, 250, 0.3); }

/* Tables */
.table-wrapper { overflow-x: auto; scrollbar-color: var(--border) transparent; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.table th {
    text-align: left; padding: 0.75rem 1rem; background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border); color: var(--text-secondary); font-weight: 600;
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px;
}
.table td {
    padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary);
    transition: background 0.2s;
}
.table tr:hover td { background-color: rgba(255, 255, 255, 0.02); }
.table tr:last-child td { border-bottom: none; }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.6rem; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.form-control {
    width: 100%; padding: 0.8rem 1rem;
    background-color: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-primary); font-family: inherit; font-size: 0.95rem; transition: all 0.3s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); background-color: rgba(0,0,0,0.4); }

/* Alerts */
.alert { padding: 1rem 1.5rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; display: flex; align-items: flex-start; gap: 0.75rem; backdrop-filter: blur(8px); border: 1px solid transparent; }
.alert-success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #34d399; }
.alert-danger { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Helper Utilities */
.mb-lg { margin-bottom: 2rem; }
.mt-lg { margin-top: 2rem; }
.mb-md { margin-bottom: 1rem; }
.mt-md { margin-top: 1rem; }
.mb-sm { margin-bottom: 0.5rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; align-items: center; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Search Box custom */
.filter-bar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: 1rem 1.5rem; }
.filter-item { flex: 1; min-width: 200px; }
.filter-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; appearance: none; }

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

/* Landing Page Specifics */
.landing-hero {
    min-height: 85vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 2rem; position: relative; overflow: hidden;
}
.landing-hero::before { content: ''; position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; }
.hero-title { font-size: 4.5rem; font-weight: 800; margin-bottom: 1.5rem; background: linear-gradient(to right, #ffffff, #a0aec0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; position: relative; z-index: 1; line-height: 1.1; letter-spacing: -1.5px; }
.hero-subtitle { font-size: 1.35rem; color: var(--text-secondary); max-width: 650px; margin-bottom: 3rem; position: relative; z-index: 1; font-weight: 400; }
.hero-buttons { display: flex; gap: 1.5rem; position: relative; z-index: 1; }
.hero-btn { padding: 1.15rem 2.5rem; border-radius: 99px; font-weight: 700; transform: scale(1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); letter-spacing: 0.5px; font-size: 1rem; }
.hero-btn:hover { transform: scale(1.05); }
@media (max-width: 768px) { .hero-title { font-size: 3rem; } .hero-buttons { flex-direction: column; } }

/* Animations */
.fade-in { animation: fadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }