/* =========================
   GLOBAL RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f4f7fb;
    color: #333;
}

/* =========================
   COLOR VARIABLES
========================= */
:root {
    --primary: #0a2a66;
    --secondary: #1e88e5;
    --light: #ffffff;
    --gray: #f1f3f6;
    --dark-text: #333;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
}

/* =========================
   HEADER
========================= */
.header {
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 {
    font-size: 22px;
}

.header .user {
    font-size: 14px;
}

/* =========================
   SIDEBAR
========================= */
.sidebar {
    width: 230px;
    height: 100vh;
    position: fixed;
    background: var(--primary);
    padding-top: 20px;
}

.sidebar a {
    display: block;
    color: #ddd;
    padding: 12px 20px;
    text-decoration: none;
    transition: 0.3s;
}

.sidebar a:hover {
    background: var(--secondary);
    color: white;
}

/* =========================
   MAIN CONTENT
========================= */
.main {
    margin-left: 230px;
    padding: 20px;
}

/* =========================
   CARDS
========================= */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 10px;
}

/* =========================
   BUTTONS
========================= */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* =========================
   FORMS
========================= */
.form-group {
    margin-bottom: 15px;
}

label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

input:focus, select:focus {
    border-color: var(--secondary);
    outline: none;
}

/* =========================
   TABLES (ERP STYLE)
========================= */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--primary);
    color: white;
}

.table th, .table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.table tbody tr:hover {
    background: #f9fbff;
}

/* =========================
   ALERTS
========================= */
.alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

/* =========================
   DASHBOARD GRID
========================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-box {
    padding: 20px;
    border-radius: 10px;
    color: white;
}

.stat-primary { background: var(--secondary); }
.stat-success { background: var(--success); }
.stat-warning { background: var(--warning); color: black; }
.stat-danger { background: var(--danger); }

/* =========================
   LOGIN PAGE
========================= */
.login-box {
    width: 350px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* =========================
   UTILITIES
========================= */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* =========================
   RESPONSIVE
========================= */
@media(max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main {
        margin-left: 0;
    }
}