/* ──────────────────────────────────────────
   SCOPED CSS FOR RMD DASHBOARD — RESPONSIVE
   Breakpoints: 1440 / 1280 / 1024 / 768 / 640 / 480 / 380
   ────────────────────────────────────────── */

.rmd-wrapper {
    font-family: 'Inter', sans-serif;
    margin-bottom: 32px;
    min-width: 0;
}

/* ── Welcome Section ── */
.rmd-welcome {
    margin-bottom: 22px;
}

    .rmd-welcome h1 {
        font-size: 22px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }

.rmd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
}

.rmd-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .rmd-meta-item svg {
        color: #9ca3af;
        flex-shrink: 0;
    }

.rmd-meta-sep {
    color: #d1d5db;
}

/* ── Section Header ── */
.rmd-section-header {
    margin-bottom: 14px;
}

    .rmd-section-header h2 {
        font-size: 16px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 4px 0;
    }

    .rmd-section-header p {
        font-size: 12px;
        color: #6b7280;
        margin: 0;
    }

/* ── Budget Cards ── */
.rmd-budget-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.rmd-budget-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 4px solid transparent;
    min-width: 0;
}

.rmd-accent-green {
    border-left-color: #22C55E;
}

.rmd-accent-blue {
    border-left-color: #3B82F6;
}

.rmd-accent-orange {
    border-left-color: #F97316;
}

.rmd-accent-gray {
    border-left-color: #9CA3AF;
}

.rmd-budget-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.rmd-budget-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    line-height: 1.3;
}

.rmd-budget-amount {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}

.rmd-budget-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rmd-icon-green {
    background-color: #DCFCE7;
    color: #16A34A;
}

.rmd-icon-blue {
    background-color: #DBEAFE;
    color: #2563EB;
}

.rmd-icon-orange {
    background-color: #FFEDD5;
    color: #EA580C;
}

.rmd-icon-gray {
    background-color: #F3F4F6;
    color: #6B7280;
}

.rmd-budget-mid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rmd-budget-sub {
    font-size: 12px;
    color: #6b7280;
}

/* ── Tags ── */
.rmd-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.rmd-tag-green {
    background-color: #DCFCE7;
    color: #15803D;
}

.rmd-tag-blue {
    background-color: #DBEAFE;
    color: #1D4ED8;
}

.rmd-tag-orange {
    background-color: #FFEDD5;
    color: #C2410C;
}

.rmd-tag-gray {
    background-color: #F3F4F6;
    color: #4B5563;
}

/* ── Progress Bar ── */
.rmd-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rmd-progress-track {
    flex: 1;
    min-width: 0;
    height: 6px;
    background-color: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.rmd-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.rmd-fill-green {
    background-color: #22C55E;
}

.rmd-fill-blue {
    background-color: #3B82F6;
}

.rmd-fill-orange {
    background-color: #F97316;
}

.rmd-fill-gray {
    background-color: #9CA3AF;
}

.rmd-progress-text {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    min-width: 32px;
    text-align: right;
    flex-shrink: 0;
}

/* ── Alert Banner ── */
.rmd-alert {
    background-color: #FFFBEB;
    border: 1px solid #FDE68A;
    border-left: 4px solid #F59E0B;
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.rmd-alert-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.rmd-alert-icon {
    width: 40px;
    height: 40px;
    background-color: #FEF3C7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D97706;
    flex-shrink: 0;
}

.rmd-alert-text {
    min-width: 0;
}

.rmd-alert-title {
    font-size: 14px;
    font-weight: 700;
    color: #B45309;
    margin-bottom: 2px;
}

.rmd-alert-desc {
    font-size: 12px;
    color: #92400E;
    line-height: 1.5;
}

.rmd-alert-btn {
    background-color: #2563EB;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

    .rmd-alert-btn:hover {
        background-color: #1D4ED8;
    }

/* ── CSR Workflow Summary ── */
.rmd-csr-section {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 22px;
}

.rmd-csr-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
}

.rmd-csr-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.rmd-csr-card {
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 96px;
    min-width: 0;
}

.rmd-csr-green {
    background-color: #DCFCE7;
}

.rmd-csr-blue {
    background-color: #DBEAFE;
}

.rmd-csr-peach {
    background-color: #FFEDD5;
}

.rmd-csr-pink {
    background-color: #FCE7F3;
}

.rmd-csr-red {
    background-color: #FEE2E2;
}

.rmd-csr-yellow {
    background-color: #FEF3C7;
}

.rmd-csr-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.rmd-csr-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.rmd-csr-icon {
    color: #6B7280;
    flex-shrink: 0;
}

.rmd-csr-green .rmd-csr-icon {
    color: #16A34A;
}

.rmd-csr-blue .rmd-csr-icon {
    color: #2563EB;
}

.rmd-csr-peach .rmd-csr-icon {
    color: #EA580C;
}

.rmd-csr-pink .rmd-csr-icon {
    color: #DB2777;
}

.rmd-csr-red .rmd-csr-icon {
    color: #DC2626;
}

.rmd-csr-yellow .rmd-csr-icon {
    color: #CA8A04;
}

.rmd-csr-number {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-top: 2px;
}

.rmd-csr-sub {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

/* ── Charts Section ── */
.rmd-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.rmd-chart-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 22px;
    min-width: 0;
}

.rmd-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

    .rmd-chart-head h3 {
        font-size: 15px;
        font-weight: 700;
        color: #111827;
        margin: 0 0 4px 0;
    }

    .rmd-chart-head p {
        font-size: 12px;
        color: #6b7280;
        margin: 0;
    }

.rmd-chart-legend {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #4b5563;
    flex-wrap: wrap;
}

    .rmd-chart-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
    }

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.legend-blue {
    background-color: #3B82F6;
}

.legend-green {
    background-color: #22C55E;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-teal {
    background-color: #10B981;
}

.dot-yellow {
    background-color: #F59E0B;
}

.dot-red {
    background-color: #EF4444;
}

.dot-gray {
    background-color: #9CA3AF;
}

.dot-coral {
    background-color: #FCA5A5;
}

.dot-purple {
    background-color: #C4B5FD;
}

.dot-amber {
    background-color: #F59E0B;
}

.dot-blue {
    background-color: #3B82F6;
}

.rmd-chart-canvas {
    position: relative;
    height: 260px;
    width: 100%;
}

/* ── RM Approval Status ── */
.rmd-approval-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.rmd-approval-chart {
    position: relative;
    height: 220px;
    min-width: 0;
}

.rmd-approval-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.rmd-approval-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.rmd-approval-total {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin: 2px 0;
}

.rmd-approval-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.rmd-approval-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #374151;
    gap: 8px;
}

    .rmd-approval-row strong {
        font-weight: 700;
        color: #111827;
    }

    .rmd-approval-row span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

/* ── RMD Due Status ── */
.rmd-due-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.rmd-due-chart {
    position: relative;
    height: 220px;
    min-width: 0;
}

.rmd-due-tooltip {
    position: absolute;
    top: 38%;
    left: 38%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    text-align: left;
    min-width: 90px;
    z-index: 5;
}

.rmd-due-tooltip-title {
    font-size: 11px;
    color: #F87171;
    font-weight: 600;
}

.rmd-due-tooltip-text {
    font-size: 13px;
    color: #111827;
    font-weight: 700;
    margin: 2px 0 6px;
}

.rmd-due-tooltip-btn {
    background-color: #3B82F6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.rmd-due-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.rmd-due-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #374151;
    gap: 8px;
}

    .rmd-due-row span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .rmd-due-row strong {
        font-weight: 700;
        color: #111827;
        white-space: nowrap;
    }

    .rmd-due-row em {
        font-style: normal;
        color: #6b7280;
        font-weight: 500;
        font-size: 12px;
        margin-left: 2px;
    }

    .rmd-due-row small {
        color: #9ca3af;
        font-size: 10px;
        margin-left: 2px;
    }

/* ── Red Alert Variant ── */
.rmd-alert-danger {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 4px solid #EF4444;
    margin-top: 18px;
}

.rmd-alert-icon-red {
    background-color: #FEE2E2;
    color: #DC2626;
}

.rmd-text-red {
    color: #B91C1C;
}

.rmd-text-red-soft {
    color: #DC2626;
}

.rmd-btn-red {
    background-color: #DC2626;
}

    .rmd-btn-red:hover {
        background-color: #B91C1C;
    }

/* ── Generic Section Card ── */
.rmd-section-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 22px;
    margin-top: 18px;
    min-width: 0;
}

.rmd-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 14px 0;
}

.rmd-section-sub {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    margin-left: 4px;
}

.rmd-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

    .rmd-section-head .rmd-section-title {
        margin: 0;
    }

.rmd-link-all {
    font-size: 12px;
    font-weight: 600;
    color: #2563EB;
    text-decoration: none;
    white-space: nowrap;
}

    .rmd-link-all:hover {
        text-decoration: underline;
    }

/* ── Pills ── */
.rmd-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.rmd-pill-red {
    background-color: #FEE2E2;
    color: #B91C1C;
}

.rmd-pill-amber {
    background-color: #FEF3C7;
    color: #B45309;
}

.rmd-pill-green {
    background-color: #DCFCE7;
    color: #15803D;
}

.rmd-pill-blue {
    background-color: #DBEAFE;
    color: #1D4ED8;
}

/* ── Quick Actions ── */
.rmd-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.rmd-quick-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rmd-quick-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rmd-quick-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    min-width: 0;
}

.rmd-quick-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.rmd-quick-link {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #2563EB;
    text-decoration: none;
}

    .rmd-quick-link:hover {
        color: #1D4ED8;
    }

/* ── Table ── */
.rmd-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rmd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 800px;
}

    .rmd-table thead th {
        text-align: left;
        padding: 12px 14px;
        background-color: #F9FAFB;
        font-size: 12px;
        font-weight: 600;
        color: #6B7280;
        border-bottom: 1px solid #e5e7eb;
        white-space: nowrap;
    }

    .rmd-table tbody td {
        padding: 14px;
        color: #374151;
        border-bottom: 1px solid #f3f4f6;
        vertical-align: middle;
    }

    .rmd-table tbody tr:last-child td {
        border-bottom: none;
    }

    .rmd-table tbody tr:hover {
        background-color: #FAFAFA;
    }

    .rmd-th-check,
    .rmd-table tbody td:first-child {
        width: 36px;
    }

    .rmd-table input[type="checkbox"] {
        width: 14px;
        height: 14px;
        accent-color: #2563EB;
        cursor: pointer;
    }

.rmd-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.15s;
}

    .rmd-icon-btn:hover {
        background-color: #EFF6FF;
    }

/* ── Two-Column Grid (Recent Activity + System Updates) ── */
.rmd-twocol-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 18px;
}

    .rmd-twocol-grid .rmd-section-card {
        margin-top: 0;
    }

/* ── Activity List ── */
.rmd-activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

    .rmd-activity-list li {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        position: relative;
    }

        .rmd-activity-list li:not(:last-child)::before {
            content: '';
            position: absolute;
            left: 6px;
            top: 18px;
            bottom: -18px;
            width: 1.5px;
            background-color: #D1FAE5;
            z-index: 0;
        }

.rmd-activity-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background-color: #6EE7B7;
    border: 2px solid #ECFDF5;
    margin-top: 3px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.rmd-activity-body {
    flex: 1;
    padding-top: 1px;
    min-width: 0;
}

.rmd-activity-text {
    font-size: 13px;
    color: #1F2937;
    line-height: 1.5;
    font-weight: 500;
    word-break: break-word;
}

    .rmd-activity-text strong {
        font-weight: 500;
        color: #1F2937;
    }

.rmd-activity-muted {
    color: #9CA3AF;
    font-weight: 500;
}

.rmd-activity-time {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 3px;
}

/* ── Updates List ── */
.rmd-updates-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .rmd-updates-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background-color: #F9FAFB;
        border-radius: 8px;
    }

.rmd-update-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rmd-update-body {
    flex: 1;
    min-width: 0;
}

.rmd-update-text {
    font-size: 13px;
    color: #1F2937;
    font-weight: 500;
    word-break: break-word;
}

.rmd-update-time {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 2px;
}

.rmd-update-end {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════ */

/* ── Large desktop (≤1440px) ── */
@media (max-width: 1440px) {
    .rmd-csr-grid {
        gap: 12px;
    }

    .rmd-budget-amount {
        font-size: 18px;
    }
}

/* ── Mid desktop / laptop (≤1280px) ── */
@media (max-width: 1280px) {
    .rmd-budget-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rmd-csr-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rmd-charts-grid {
        grid-template-columns: 1fr;
    }

    .rmd-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rmd-twocol-grid {
        grid-template-columns: 1fr;
    }

    .rmd-chart-canvas {
        height: 240px;
    }
}

/* ── Tablet landscape (≤1024px) ── */
@media (max-width: 1024px) {
    .rmd-welcome h1 {
        font-size: 20px;
    }

    .rmd-csr-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rmd-section-card,
    .rmd-csr-section,
    .rmd-chart-card {
        padding: 18px 18px;
    }

    .rmd-approval-body,
    .rmd-due-body {
        gap: 16px;
    }
}

/* ── Tablet portrait (≤768px) ── */
@media (max-width: 768px) {
    .rmd-wrapper {
        margin-bottom: 24px;
    }

    .rmd-welcome h1 {
        font-size: 18px;
    }

    .rmd-meta {
        font-size: 12px;
        gap: 8px;
    }

    .rmd-meta-sep {
        display: none;
    }

    .rmd-meta-item {
        background-color: #f9fafb;
        padding: 4px 10px;
        border-radius: 12px;
    }

    .rmd-alert {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }

    .rmd-alert-content {
        align-items: flex-start;
    }

    .rmd-alert-btn {
        width: 100%;
    }

    .rmd-csr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rmd-csr-card {
        padding: 12px 14px;
        min-height: 86px;
    }

    .rmd-csr-number {
        font-size: 20px;
    }

    .rmd-budget-amount {
        font-size: 18px;
    }

    .rmd-approval-body,
    .rmd-due-body {
        grid-template-columns: 1fr;
    }

    .rmd-approval-chart,
    .rmd-due-chart {
        height: 200px;
    }

    .rmd-due-tooltip {
        position: static;
        transform: none;
        margin: 0 auto 12px;
        max-width: 180px;
    }

    .rmd-chart-canvas {
        height: 220px;
    }

    .rmd-section-card,
    .rmd-csr-section,
    .rmd-chart-card {
        padding: 16px;
    }

    .rmd-section-head {
        flex-wrap: wrap;
    }

    .rmd-section-sub {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* ── Mobile landscape (≤640px) ── */
@media (max-width: 640px) {
    .rmd-quick-grid {
        grid-template-columns: 1fr;
    }

    .rmd-welcome h1 {
        font-size: 17px;
    }

    .rmd-budget-grid {
        gap: 12px;
    }

    .rmd-csr-grid {
        gap: 10px;
    }

    /* ── Mobile Horizontal Scroll Table (DataTables Style) ── */
    .rmd-table-wrap {
        width: 100%;
        overflow-x: auto; /* Triggers horizontal scroll */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        border: 1px solid #e5e7eb; /* Optional: adds a border around the scrollable area */
        border-radius: 8px;
    }

    .rmd-table {
        min-width: 900px; /* Forces the table to stay wide, triggering the scrollbar */
        width: 100%;
        border-collapse: collapse;
    }

        /* Ensure table cells don't wrap and look squished on mobile */
        .rmd-table th,
        .rmd-table td {
            white-space: nowrap;
            padding: 12px 16px;
        }

            /* Ensure the checkbox column stays tight */
            .rmd-th-check,
            .rmd-table td:first-child {
                width: 40px;
                min-width: 40px;
                text-align: center;
            }
}
/* ── Mobile portrait (≤480px) ── */
@media (max-width: 480px) {
    .rmd-budget-grid {
        grid-template-columns: 1fr;
    }

    .rmd-csr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rmd-csr-card {
        padding: 10px 12px;
        min-height: 80px;
    }

    .rmd-csr-number {
        font-size: 18px;
    }

    .rmd-csr-label,
    .rmd-quick-title {
        font-size: 12px;
    }

    .rmd-budget-card {
        padding: 14px 16px;
    }

    .rmd-budget-amount {
        font-size: 17px;
    }

    .rmd-section-title,
    .rmd-csr-title {
        font-size: 14px;
    }

    .rmd-alert-icon {
        width: 36px;
        height: 36px;
    }

    .rmd-alert-title {
        font-size: 13px;
    }

    .rmd-alert-desc {
        font-size: 11px;
    }

    .rmd-chart-canvas,
    .rmd-approval-chart,
    .rmd-due-chart {
        height: 200px;
    }
}

/* ── Small mobile (≤380px) ── */
@media (max-width: 380px) {
    .rmd-csr-grid {
        grid-template-columns: 1fr;
    }

    .rmd-section-card,
    .rmd-csr-section,
    .rmd-chart-card {
        padding: 14px;
    }

    .rmd-alert-content {
        flex-direction: column;
        align-items: flex-start;
    }
}
