* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --gold: #fbbf24;
    --purple: #7c3aed;
    --danger: #dc2626;
    --success: #16a34a;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}
/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-title {
    color: #1e293b;
    font-size: 28px;
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    color: #64748b;
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.error-message {
    color: var(--danger);
    text-align: center;
    margin-top: 15px;
    display: none;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.login-info p {
    margin: 5px 0;
    color: #6b7280;
}

.login-info strong {
    color: #374151;
}
/* App Container */
.app-container { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-header h2 { color: var(--gold); font-size: 22px; }
.sidebar-nav { flex: 1; padding: 20px 0; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    cursor: pointer;
}
.nav-item:hover { background: rgba(251,191,36,0.1); color: var(--text-primary); }
.nav-item.active { background: rgba(251,191,36,0.15); color: var(--gold); border-left-color: var(--gold); }
.nav-icon { font-size: 20px; margin-right: 12px; }
.nav-text { font-size: 14px; font-weight: 500; }

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); }

.btn-logout {
    width: 100%;
    padding: 12px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-logout:hover { background: #b91c1c; }

.main-content { flex: 1; margin-left: 260px; padding: 30px; min-height: 100vh; }

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}
.header h1 { color: var(--gold); font-size: 28px; }
.user-info { color: var(--text-secondary); font-size: 14px; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-icon { font-size: 40px; }
.stat-info h3 { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; text-transform: uppercase; }
.stat-value { color: var(--text-primary); font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.stat-label { color: var(--text-secondary); font-size: 12px; }

/* Section */
.section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.section h2 { color: var(--gold); margin-bottom: 20px; font-size: 20px; }
.card { background: var(--bg-dark); padding: 20px; border-radius: 8px; border: 1px solid var(--border); }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-dark); color: var(--gold); font-weight: 600; text-transform: uppercase; font-size: 12px; }
td { color: var(--text-primary); font-size: 14px; }
tr:hover { background: rgba(251,191,36,0.05); }

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.btn-gold { background: var(--gold); color: #0f172a; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Forms */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}
.form-control:focus { outline: none; border-color: var(--gold); }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h2 { color: var(--gold); }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 28px; cursor: pointer; }
.modal-close:hover { color: var(--text-primary); }

/* Utility */
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }
.loading { text-align: center; padding: 40px; color: var(--text-secondary); }
.empty-state { text-align: center; padding: 40px; color: var(--text-secondary); }
.badge { display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--gold); color: #0f172a; }
.badge-danger { background: var(--danger); color: white; }

.local-badge { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.local-badge span { color: var(--gold); font-size: 12px; font-weight: 600; display: block; line-height: 1.4; }
