:root {
    /* ================= CORE PALETTE ================= */
    --rms-bg: #f4f6fb;
    --rms-surface: #ffffff;
    --rms-dark: #111827;
    --rms-muted: #6b7280;

    --rms-primary: #1f2937;
    --rms-accent: #2563eb;

    --rms-success: #16a34a;
    --rms-warning: #f59e0b;
    --rms-danger: #dc2626;
    --rms-info: #0ea5e9;

    --rms-border: #e5e7eb;

    /* ================= SHADOWS ================= */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 30px rgba(0,0,0,0.12);

    /* ================= RADIUS ================= */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ================= GLOBAL RESET ================= */
* {
    box-sizing: border-box;
}

body {
    background: var(--rms-bg);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--rms-dark);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

/* ================= LAYOUT SYSTEM ================= */
.main-content {
    min-height: 100vh;
}

.page-container {
    padding: 90px 16px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h4 {
    font-weight: 700;
    color: var(--rms-dark);
    margin: 0;
}

/* ================= NAVBAR ================= */
.navbar {
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ================= SURFACES ================= */
.card {
    border-radius: var(--radius-md);
    border: 1px solid var(--rms-border);
    background: var(--rms-surface);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ================= DASHBOARD CARDS ================= */
.dashboard-card {
    border-radius: var(--radius-md);
    background: var(--rms-surface);
    padding: 18px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid var(--rms-border);
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--rms-accent);
}

.dashboard-card i {
    font-size: 1.9rem;
    color: var(--rms-accent);
    margin-bottom: 8px;
}

/* ================= STATISTICS ================= */
.stat-card {
    border-radius: var(--radius-md);
    background: var(--rms-surface);
    padding: 16px;
    border: 1px solid var(--rms-border);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--rms-muted);
}

.stat-icon {
    font-size: 1.4rem;
    color: var(--rms-accent);
}

/* ================= LIST / TABLE CARDS ================= */
.list-card {
    background: var(--rms-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--rms-border);
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--rms-muted);
}

.table td {
    vertical-align: middle;
}

/* ================= FORMS ================= */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--rms-border);
    padding: 10px 12px;
    transition: 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--rms-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ================= BUTTON SYSTEM ================= */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: 0.2s ease-in-out;
}

.btn-primary {
    background: var(--rms-accent);
    border: none;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-dark {
    background: var(--rms-primary);
    border: none;
}

.btn-dark:hover {
    background: #000;
}

/* ================= BADGES ================= */
.badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.badge-success { background: var(--rms-success); }
.badge-warning { background: var(--rms-warning); }
.badge-danger  { background: var(--rms-danger); }
.badge-info    { background: var(--rms-info); }

/* ================= ALERTS ================= */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* ================= AUTH PAGES ================= */
.auth-container {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--rms-border);
    box-shadow: var(--shadow-md);
    background: var(--rms-surface);
}

.auth-icon {
    font-size: 3rem;
    color: var(--rms-accent);
}

/* ================= FOOTER ================= */
.footer {
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* ================= UTILITIES ================= */
.text-muted {
    color: var(--rms-muted) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

/* ================= MOBILE FIRST OPTIMIZATION ================= */
@media (max-width: 768px) {

    .page-container {
        padding: 80px 12px 30px;
    }

    .dashboard-card {
        padding: 14px;
    }

    .dashboard-card i {
        font-size: 1.5rem;
    }

    .auth-card {
        margin: 10px;
    }

    .page-header h4 {
        font-size: 1.1rem;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* ================= LARGE SCREEN ENHANCEMENTS ================= */
@media (min-width: 1200px) {
    .page-container {
        padding: 100px 40px 60px;
    }
}