/* css/app.css */
:root {
    --primary: #D4AF37; /* Lospot Gold */
    --primary-dark: #b8962b;
    --dark: #0f1115;
    --darker: #08090b;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --red: #ef4444;
    --green: #10b981;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --purple: #8b5cf6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--darker);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.03), transparent 25%);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

.view-container {
    display: none;
    height: 100%;
    width: 100%;
}
.view-container.active { display: flex; }

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

/* Typography & Utils */
h1, h2, h3, h4 { color: #fff; font-weight: 600; }
a { color: var(--text); text-decoration: none; }
.text-link { color: var(--primary); font-size: 0.9rem; transition: 0.2s; }
.text-link:hover { color: var(--primary-dark); text-decoration: underline; }
.text-muted { color: var(--text-muted); }
.text-red { color: var(--red)!important; }
.mt-4 { margin-top: 1.5rem; }

/* Buttons */
button { font-family: 'Inter', sans-serif; cursor: pointer; transition: 0.2s; }
.btn-primary {
    background: var(--primary); color: #000; border: none;
    padding: 10px 20px; border-radius: 8px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary.loading { opacity: 0.7; pointer-events: none; }
.btn-ghost {
    background: transparent; color: var(--text); border: 1px solid var(--panel-border);
    padding: 8px 16px; border-radius: 8px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); }
.btn-icon { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; }
.btn-icon:hover { color: #fff; }

/* Inputs */
.input-group { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.input-wrapper { position: relative; }
.input-wrapper i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-wrapper input { padding-left: 40px; }
input, select {
    width: 100%; background: rgba(0,0,0,0.2); border: 1px solid var(--panel-border);
    color: #fff; padding: 12px; border-radius: 8px; font-family: 'Inter'; outline: none; transition: 0.2s;
}
input:focus, select:focus { border-color: var(--primary); background: rgba(0,0,0,0.4); }
.flex-row { display: flex; gap: 15px; }
.flex-row > * { flex: 1; }

/* Badges */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.bg-primary { background: var(--primary); color:#000; }
.bg-purple { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.3); }
.bg-blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.bg-green { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.bg-red { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.bg-orange { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Login Box */
#login-view { align-items: center; justify-content: center; background: radial-gradient(circle at top, var(--dark), var(--darker)); }
.login-box { width: 100%; max-width: 400px; padding: 40px; }
.login-box .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 25px; text-align: center; }
.brand-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; color: var(--primary); font-size: 1.5rem; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }

/* Dashboard Layout */
.sidebar { width: 280px; height: calc(100vh - 40px); margin: 20px; display: flex; flex-direction: column; padding: 20px 0; }
.sidebar .brand-logo { justify-content: flex-start; padding: 0 20px 20px 20px; border-bottom: 1px solid var(--panel-border); font-size: 1.2rem; }
.user-profile { padding: 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--panel-border); }
.avatar { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; }
.main-nav { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.main-nav ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.nav-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin: 10px 0 5px 10px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 8px; font-weight: 500; font-size: 0.95rem; transition: 0.2s; }
.nav-link i { width: 20px; text-align: center; font-size: 1.1rem; }
.nav-link:hover { background: rgba(255,255,255,0.05); }
.nav-link.active { background: var(--primary); color: #000; }

.main-content { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding: 20px 20px 20px 0; }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 0 20px 0; border-bottom: 1px solid var(--panel-border); }
.top-bar .breadcrumb { font-size: 1.3rem; font-weight: 600; }
.clock { font-size: 0.85rem; color: var(--text-muted); }
#mobile-toggle { display: none; }

.content-scroll { flex: 1; overflow-y: auto; padding-top: 20px; padding-bottom: 40px; }
.page-section { display: none; animation: fadeIn 0.3s ease; }
.page-section.active { display: block; }

/* Grid Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.stat-card { padding: 25px; display: flex; align-items: center; gap: 20px; }
.stat-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.stat-details h3 { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; margin-bottom: 5px; }
.stat-details .value { font-size: 2rem; font-weight: 700; color: #fff; display: flex; align-items: baseline; gap: 5px; }

/* Tables & Lists */
.flex-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.table-container { overflow-x: auto; padding: 1px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 15px 20px; border-bottom: 1px solid var(--panel-border); font-size: 0.85rem; color: var(--text-muted); font-weight: 500; background: rgba(0,0,0,0.1); }
.data-table td { padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.site-card { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.site-header { display: flex; justify-content: space-between; align-items: flex-start; }

.welcome-banner { padding: 40px; position: relative; overflow: hidden; }
.gradient-bg { background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(0,0,0,0) 100%); border: 1px solid var(--primary-dark); }
.welcome-banner h2 { font-size: 2rem; margin-bottom: 10px; color: var(--primary); }
.welcome-banner p { font-size: 1.1rem; color: rgba(255,255,255,0.8); max-width: 600px; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal { width: 100%; max-width: 500px; animation: slideUp 0.3s ease; }
.modal-header { padding: 20px; border-bottom: 1px solid var(--panel-border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--panel-border); }

/* Toasts */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 12px 20px; border-radius: 8px; color: #fff; font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); animation: slideInX 0.3s ease; }
.toast.fade-out { opacity: 0; transform: translateX(20px); transition: 0.3s; }
.toast-success { background: #065f46; border-left: 4px solid #10b981; }
.toast-error { background: #7f1d1d; border-left: 4px solid #ef4444; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInX { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

@media (max-width: 768px) {
    .sidebar { position: fixed; left: -300px; z-index: 100; background: var(--darker); height: 100vh; margin: 0; border: none; transition: 0.3s; }
    .sidebar.open { left: 0; border-right: 1px solid var(--panel-border); }
    .main-content { padding: 20px; }
    #mobile-toggle { display: block; }
    .flex-row { flex-direction: column; gap: 0; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
