: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: linear-gradient(180deg, #f4f6fb 0%, #f8fafc 100%);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--rms-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

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

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

.page-header {
    margin: 10px 0 25px;
}

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

.flex-grow-1 {
    padding-top: 10px;
}

/* ================= DASHBOARD WELCOME (FIX YOU REQUESTED) ================= */
.dashboard-welcome {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid var(--rms-border);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
}

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

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

/* ================= SIDEBAR ================= */
.bg-dark {
    background: #0f172a !important;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.bg-dark h5 {
    font-weight: 700;
    letter-spacing: 0.6px;
    color: #e2e8f0;
}

.nav-link {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    color: #cbd5e1 !important;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
    color: #fff !important;
}

.nav-link.active {
    background: var(--rms-accent);
    color: #fff !important;
}

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

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-body {
    padding: 18px;
}

.card h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

/* ================= DASHBOARD CARDS ================= */
.dashboard-card {
    border-radius: 14px;
    padding: 18px 12px;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--rms-border);
    transition: all 0.25s ease-in-out;
    min-height: 95px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    will-change: transform;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--rms-accent);
}

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

.dashboard-card p {
    font-size: 0.85rem;
    margin: 0;
    font-weight: 500;
    color: var(--rms-dark);
}

/* ================= STAT CARDS ================= */
.stat-card {
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    border: 1px solid var(--rms-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.25s ease-in-out;
    will-change: transform;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.10);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rms-dark);
}

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

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

/* ================= LISTS ================= */
.list-card {
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--rms-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.list-group-item {
    border: none;
    padding: 14px 10px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.list-group-item:hover {
    background: #f9fafb;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* ================= TABLE ================= */
.table {
    margin-bottom: 0;
}

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

.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);
}

/* ================= BUTTONS ================= */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

.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;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.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 ================= */
.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);
}

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

html {
    scroll-behavior: smooth;
}

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

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

    .dashboard-card {
        min-height: 85px;
        padding: 14px 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-icon {
        font-size: 1.6rem;
    }

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

    .nav-link:hover {
        transform: none;
        padding-left: 12px;
    }

    .flex-grow-1 {
        padding-top: 0;
    }
}

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

/* ================= DASHBOARD GRID POLISH ================= */
.row.g-3 > div {
    display: flex;
}

.row.g-3 > div > a {
    width: 100%;
}

/* ================= KPI CARD IMPROVEMENTS ================= */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: rgba(37, 99, 235, 0.08);
    border-bottom-left-radius: 100%;
}

/* subtle color variants for future use */
.stat-success { border-left: 4px solid var(--rms-success); }
.stat-warning { border-left: 4px solid var(--rms-warning); }
.stat-danger  { border-left: 4px solid var(--rms-danger); }
.stat-info    { border-left: 4px solid var(--rms-info); }

/* ================= SECTION SEPARATORS ================= */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--rms-border), transparent);
    margin: 25px 0;
}

/* ================= QUICK ACTIONS ENHANCEMENT ================= */
.dashboard-card {
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(37,99,235,0.06), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover::before {
    opacity: 1;
}

/* ================= ICON BACKGROUND STYLE ================= */
.dashboard-card i,
.stat-icon {
    background: rgba(37, 99, 235, 0.08);
    padding: 10px;
    border-radius: 12px;
}

/* ================= PAGE HEADER ENHANCEMENT ================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header p {
    margin: 0;
    font-size: 0.85rem;
}

/* ================= SOFT CARD GROUP ================= */
.card-group-soft {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.card-group-soft .card {
    flex: 1 1 300px;
}

/* ================= EMPTY STATE ================= */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--rms-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.6;
}

/* ================= HOVER FEEDBACK (SUBTLE) ================= */
a .stat-card:active,
a .dashboard-card:active {
    transform: scale(0.98);
}

/* ================= SCROLLBAR CLEAN ================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ================= FADE-IN ANIMATION ================= */
.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ================= ENHANCED FORM CONTAINER ================= */
.form-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--rms-border);
    background: linear-gradient(145deg, #ffffff, #f9fafb);
    box-shadow: var(--shadow-md);
    padding: 24px;
}

/* ================= FORM SECTION TITLE ================= */
.form-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rms-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================= READONLY FIELDS ================= */
.form-control[readonly] {
    background-color: #f9fafb;
    border-style: dashed;
    color: var(--rms-muted);
    font-weight: 500;
}

/* ================= LABEL STYLING ================= */
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rms-dark);
    margin-bottom: 4px;
}

/* ================= INPUT ENHANCEMENT ================= */
.form-control,
.form-select {
    font-size: 0.9rem;
    padding: 11px 12px;
}

/* smoother focus */
.form-control:focus,
.form-select:focus {
    transform: scale(1.01);
}

/* ================= FILE INPUT ================= */
input[type="file"].form-control {
    padding: 8px;
    font-size: 0.85rem;
    background: #f9fafb;
    cursor: pointer;
}

/* ================= FORM GRID SPACING ================= */
.form-grid {
    row-gap: 18px;
}

/* ================= SUBMIT BUTTON POLISH ================= */
.form-submit {
    min-width: 160px;
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

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

/* ================= DIVIDER ================= */
.form-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--rms-border), transparent);
    margin: 20px 0;
}

/* ================= HELPER TEXT ================= */
.form-text {
    font-size: 0.75rem;
    color: var(--rms-muted);
}

/* ================= ERROR STATES ================= */
.text-danger.small {
    font-size: 0.75rem;
    margin-top: 4px;
}

/* ================= SMOOTH FORM ANIMATION ================= */
.form-card {
    animation: fadeIn 0.3s ease-in-out;
}



/* ================= REPORT PAGE WRAPPER ================= */
.report-container {
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* ================= REPORT HEADERS ================= */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.report-header h4 {
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0;
}

/* ================= KPI GRID IMPROVEMENTS ================= */
.kpi-grid .card {
    height: 100%;
    min-height: 110px;
}

.kpi-grid h6 {
    font-size: 0.82rem;
    color: var(--rms-muted);
    margin-bottom: 6px;
}

.kpi-grid h4 {
    font-size: 1.4rem;
    font-weight: 800;
}

/* ================= CHART CONTAINERS ================= */
canvas {
    width: 100% !important;
    height: auto !important;
}

/* FIX: chart height consistency */
.chart-container {
    position: relative;
    height: 320px;
}

@media (max-width: 768px) {
    .chart-container {
        height: 240px;
    }
}

/* ================= REPORT CARDS ================= */
.report-card {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

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

/* ================= TABLE RESPONSIVENESS ================= */
.table-responsive {
    border-radius: var(--radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* make tables more readable on mobile */
@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
    }

    .table th, .table td {
        white-space: nowrap;
        padding: 10px 8px;
    }
}

/* ================= FILTER BAR ================= */
.report-filters {
    background: #fff;
    border: 1px solid var(--rms-border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.report-filters .form-control,
.report-filters .form-select {
    font-size: 0.85rem;
}

/* stack filters on mobile */
@media (max-width: 768px) {
    .report-filters .row > div {
        margin-bottom: 10px;
    }
}

/* ================= BADGES IN REPORTS ================= */
.report-badge {
    font-size: 0.7rem;
    padding: 5px 9px;
    border-radius: 999px;
}

/* ================= LIST CARDS IN REPORTS ================= */
.report-list-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--rms-border);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: 0.2s ease;
}

.report-list-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

    /* reduce page padding further for reports */
    .page-container {
        padding: 16px 10px 24px;
    }

    /* KPI cards become tighter */
    .kpi-grid .card-body {
        padding: 12px;
    }

    .kpi-grid h4 {
        font-size: 1.2rem;
    }

    /* stack KPI cards properly */
    .row.g-3 > div,
    .row.g-4 > div {
        flex: 1 1 100%;
    }

    /* charts full width spacing fix */
    .chart-container {
        margin-bottom: 20px;
    }

    /* make report headers stack */
    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================= DARK-LIKE DEPTH FOR REPORT SECTIONS ================= */
.report-section {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid var(--rms-border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* ================= CHART LEGEND IMPROVEMENT (CHART.JS) ================= */
.chart-legend {
    font-size: 0.8rem;
    color: var(--rms-muted);
}

/* ================= SCROLL FIX FOR LONG TABLES ================= */
.table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

/* ================= KPI NUMBER EMPHASIS ================= */
.kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rms-dark);
}

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

/* ================= REPORT SECTION SPACING ================= */
.report-section + .report-section {
    margin-top: 18px;
}

/* ================= PRINT FRIENDLY REPORTS ================= */
@media print {
    body {
        background: #fff;
    }

    .bg-dark,
    .nav,
    .btn {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    canvas {
        max-height: 300px !important;
    }
}

/* ================= ACTIVE NAV IMPROVEMENT ================= */
.nav-link.active {
    background: linear-gradient(135deg, var(--rms-accent), #1d4ed8);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    font-weight: 600;
}

/* subtle left indicator */
.nav-link.active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--rms-accent);
    border-radius: 4px;
}

/* make nav items relative for indicator */
.nav-item {
    position: relative;
}

/* ================= SIDEBAR ENHANCEMENT ================= */
.bg-dark {
    backdrop-filter: blur(14px);
}

.bg-dark .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* smoother hover */
.nav-link:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(6px);
}

/* ================= PAGE TRANSITIONS ================= */
.page-container {
    animation: fadeIn 0.3s ease-in-out;
}

/* ================= MOBILE NAV (BOTTOM BAR) ================= */
@media (max-width: 768px) {

    /* hide sidebar */
    .bg-dark {
        display: none !important;
    }

    /* reset content margin */
    .flex-grow-1 {
        margin-left: 0 !important;
    }

    /* bottom nav */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #0f172a;
        border-top: 1px solid rgba(255,255,255,0.08);
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 999;
    }

    .mobile-nav a {
        color: #cbd5e1;
        font-size: 0.7rem;
        text-align: center;
        flex: 1;
        padding: 6px 4px;
        border-radius: 8px;
        transition: 0.2s ease;
    }

    .mobile-nav a i {
        display: block;
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .mobile-nav a.active {
        background: var(--rms-accent);
        color: #fff;
    }

    /* prevent content overlap */
    body {
        padding-bottom: 65px;
    }
}

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

    .btn {
        min-height: 42px;
    }

    .form-control,
    .form-select {
        min-height: 42px;
    }

    .nav-link {
        padding: 12px;
        font-size: 0.95rem;
    }

    .dashboard-card {
        border-radius: 16px;
    }
}

/* ================= CLICK FEEDBACK ================= */
a:active {
    transform: scale(0.97);
}

/* ================= SCROLL IMPROVEMENT ================= */
.bg-dark {
    overflow-y: auto;
    scrollbar-width: thin;
}

/* ================= PROFILE LINK STYLE ================= */
.nav-profile {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ================= SMALL SCREEN HEADER FIX ================= */
@media (max-width: 768px) {

    .dashboard-welcome {
        padding: 10px 12px;
    }

    .page-header {
        align-items: flex-start;
    }
}

/* ================= SMOOTH ICON FEEL ================= */
.nav-link i {
    transition: transform 0.2s ease;
}

.nav-link:hover i {
    transform: scale(1.15);
}

/* ================= CARD TAP FEEDBACK ================= */
.dashboard-card:active {
    transform: scale(0.96);
}


/* ================= GLOBAL FORM LAYOUT STANDARD ================= */
.form-card {
    max-width: 720px;
    margin: 0 auto;
}

/* tighter vertical rhythm */
.form-card .mb-3 {
    margin-bottom: 16px !important;
}

/* ================= LABEL IMPROVEMENT ================= */
.form-label,
label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rms-muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    display: block;
}

/* ================= INPUT GROUP POLISH ================= */
.form-control,
.form-select {
    background: #fff;
    border: 1px solid var(--rms-border);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

/* focus = premium feel */
.form-control:focus,
.form-select:focus {
    border-color: var(--rms-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

/* ================= PLACEHOLDER CLEAN ================= */
::placeholder {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ================= INPUT ICON SUPPORT ================= */
.input-group {
    border-radius: 10px;
    overflow: hidden;
}

.input-group-text {
    background: #f9fafb;
    border: 1px solid var(--rms-border);
    font-size: 0.85rem;
}

/* ================= FORM SECTIONS ================= */
.form-section {
    margin-bottom: 22px;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--rms-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* divider spacing improvement */
.form-divider {
    margin: 18px 0;
}

/* ================= BUTTON AREA ================= */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 140px;
}

/* ================= ERROR STATES ================= */
.form-control.is-invalid {
    border-color: var(--rms-danger);
    background: #fef2f2;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* error text */
.invalid-feedback {
    font-size: 0.75rem;
    color: var(--rms-danger);
    margin-top: 4px;
}

/* ================= SUCCESS STATES ================= */
.form-control.is-valid {
    border-color: var(--rms-success);
}

/* ================= READONLY / AUTO FIELDS ================= */
.form-control[readonly] {
    background: #f8fafc;
    border-style: dashed;
    font-size: 0.85rem;
}

/* ================= CHECKBOX / RADIO ================= */
.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.85rem;
    margin-left: 6px;
}

/* ================= FILE INPUT ================= */
input[type="file"] {
    padding: 8px;
    font-size: 0.85rem;
    background: #f9fafb;
}

/* ================= FORM GRID SYSTEM ================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* full width override */
.form-grid .full-width {
    grid-column: span 2;
}

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

    .form-card {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* ================= FORM HEADER ================= */
.form-header {
    margin-bottom: 18px;
}

.form-header h5 {
    font-weight: 700;
    margin-bottom: 4px;
}

.form-header p {
    font-size: 0.8rem;
    color: var(--rms-muted);
    margin: 0;
}

/* ================= SUBTLE ANIMATION ================= */
.form-card {
    animation: fadeIn 0.25s ease-in-out;
}

/* ================= CONSISTENT CARD LOOK ================= */
.form-card {
    border-radius: 16px;
    border: 1px solid var(--rms-border);
    box-shadow: var(--shadow-md);
}