/* ================= RESET / BASE ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #2d3436;
    line-height: 1.5;
}

a { text-decoration: none; color: #2563eb; }

/* ================= LAYOUT ================= */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background: #1e293b;
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar h2 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    padding: 0 15px;
}

.sidebar a {
    display: block;
    color: #cbd5e1;
    padding: 12px 20px;
    transition: .2s;
}

.sidebar a:hover, .sidebar a.active {
    background: #334155;
    color: #fff;
    border-left: 4px solid #2563eb;
}

.main-content {
    flex: 1;
    padding: 25px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* ================= LOGIN ================= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b, #2563eb);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 22px;
    color: #1e293b;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: .2s;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }

.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-secondary { background: #64748b; color: #fff; }
.btn-secondary:hover { background: #475569; }

.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ================= ALERTS ================= */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }

/* ================= CARDS / DASHBOARD ================= */
.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.card .card-title {
    font-size: 13px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.card .card-value {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
}

.card .card-sub {
    font-size: 13px;
    color: #16a34a;
    margin-top: 4px;
}

.card.border-warning { border-left: 4px solid #eab308; }
.card.border-success { border-left: 4px solid #16a34a; }
.card.border-info    { border-left: 4px solid #2563eb; }
.card.border-danger  { border-left: 4px solid #dc2626; }

/* ================= TABLES ================= */
.table-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }

table th, table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

table th { background: #f1f5f9; font-weight: 600; color: #475569; }

/* ================= BADGES ================= */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #e2e8f0; color: #475569; }

/* ================= MISC ================= */
.text-muted { color: #94a3b8; font-size: 13px; }
.mt-3 { margin-top: 15px; }
.mb-3 { margin-bottom: 15px; }
.d-flex { display: flex; gap: 10px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar { width: 100%; }
}
