/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;700;900&display=swap');

:root {
    --bg-dark: #0a0a0c;
    --bg-panel: rgba(20, 20, 25, 0.7);
    --bg-card: rgba(30, 30, 35, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-primary: #00f0ff;
    --accent-secondary: #00ff88;
    --text-main: #f0f0f5;
    --text-muted: #8a8a9e;
    --glass-blur: blur(16px);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 255, 136, 0.03), transparent 25%);
    background-attachment: fixed;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 700; letter-spacing: -0.5px; }
a { text-decoration: none; color: var(--accent-primary); transition: var(--transition); }
a:hover { color: var(--text-main); text-shadow: 0 0 8px var(--accent-primary); }

/* Glassmorphism */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition);
}
.glass-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Layout */
.app-container { display: flex; min-height: 100vh; }

.sidebar {
    width: 280px; height: 100vh; position: fixed; left: 0; top: 0;
    padding: 2rem 1.5rem; display: flex; flex-direction: column; z-index: 100;
    border-radius: 0; border-right: 1px solid var(--border-color);
    border-left: none; border-top: none; border-bottom: none;
}
.sidebar-logo {
    font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 900;
    color: var(--text-main); text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 3rem; display: flex; align-items: center; gap: 10px;
}
.sidebar-logo span { color: var(--accent-primary); text-shadow: 0 0 15px rgba(0, 240, 255, 0.5); }

.nav-menu { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.nav-item { border-radius: 12px; transition: var(--transition); }
.nav-link {
    display: flex; align-items: center; gap: 15px; padding: 12px 20px;
    color: var(--text-muted); font-weight: 500; border-radius: 12px;
    position: relative; overflow: hidden;
}
.nav-link i { font-size: 1.2rem; width: 24px; text-align: center; }
.nav-link:hover, .nav-item.active .nav-link { color: var(--text-main); background: rgba(255, 255, 255, 0.05); text-shadow: none; }
.nav-item.active .nav-link { background: linear-gradient(90deg, rgba(0, 240, 255, 0.1) 0%, transparent 100%); border-left: 3px solid var(--accent-primary); }
.nav-item.active .nav-link i { color: var(--accent-primary); text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }

.main-content { flex: 1; margin-left: 280px; padding: 2rem 3rem; min-width: 0; }

/* Header */
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.page-title {
    font-size: 1.8rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    word-wrap: break-word; overflow-wrap: break-word;
}
.user-profile { display: flex; align-items: center; gap: 15px; }
.avatar {
    width: 45px; height: 45px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex; justify-content: center; align-items: center;
    font-weight: 700; color: var(--bg-dark); font-family: 'Outfit', sans-serif;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 12px; font-family: 'Inter', sans-serif;
    font-weight: 600; font-size: 1rem; cursor: pointer; transition: var(--transition); border: none; outline: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #00b3ff);
    color: var(--bg-dark); box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5); color: var(--bg-dark); text-shadow: none; }
.btn-secondary { background: rgba(255, 255, 255, 0.05); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); color: #fff; }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.form-control {
    width: 100%; padding: 12px 15px; background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color); border-radius: 10px;
    color: var(--text-main); font-family: 'Inter', sans-serif; font-size: 1rem; transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1); background: rgba(0, 0, 0, 0.4); }

/* Dashboard Grids */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.kpi-card { display: flex; flex-direction: column; justify-content: center; }
.kpi-title { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.kpi-value { font-size: 2.2rem; font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--text-main); display: flex; align-items: baseline; gap: 5px; }
.kpi-unit { font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.kpi-trend { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; margin-top: 8px; }
.trend-up { color: var(--accent-secondary); }
.trend-down { color: #ff3250; }
.trend-neutral { color: var(--accent-primary); }

/* Content Grid */
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; flex-wrap: wrap; gap: 10px; }
.section-title { font-size: 1.3rem; color: var(--text-main); word-wrap: break-word; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ─── Responsive ─── */
@media (max-width: 992px) {
    .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .sidebar.active { transform: translateX(0); z-index: 200; }

    /* Overlay */
    .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 150; }
    .sidebar-overlay.active { display: block; }

    .main-content { margin-left: 0; padding: 1rem; }
    .top-header { margin-bottom: 1.5rem; }
    .page-title { font-size: 1.3rem; text-align: center; flex: 1; margin: 0 10px; line-height: 1.3; }
    .mobile-toggle { display: block; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; padding: 5px; }
    .avatar { width: 35px; height: 35px; font-size: 0.85rem; }
    .glass-card { padding: 1rem; }
    .glass-panel { border-radius: 14px; }
    .section-title { font-size: 1.1rem; }
    .kpi-value { font-size: 1.8rem; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .btn { padding: 10px 18px; font-size: 0.9rem; }
}

@media (max-width: 420px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .main-content { padding: 0.8rem; }
}

/* Loader */
.loader-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-dark); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s ease; }
.loader { width: 50px; height: 50px; border: 3px solid rgba(0, 240, 255, 0.1); border-radius: 50%; border-top-color: var(--accent-primary); animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Login Page */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1rem; background-image: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.05), transparent 60%); }
.login-card { width: 100%; max-width: 450px; padding: 3rem; }
.login-logo { text-align: center; font-size: 2.5rem; margin-bottom: 2rem; }
.text-center { text-align: center; }

/* Table */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
.data-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.data-table th { text-align: left; padding: 12px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-size: 0.9rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
