:root {
    --bg: #edf4ff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-2: #111827;
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --secondary: #0f766e;
    --secondary-dark: #115e59;
    --accent: #f59e0b;
    --danger: #dc2626;
    --success: #059669;
    --text: #0f172a;
    --muted: #64748b;
    --border: rgba(191, 219, 254, 0.8);
    --shadow: 0 20px 45px rgba(37, 99, 235, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background:
        radial-gradient(circle at 0% 0%, rgba(29, 78, 216, 0.18), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(15, 118, 110, 0.14), transparent 26%),
        linear-gradient(180deg, #f6faff 0%, var(--bg) 48%, #eff6ff 100%);
    color: var(--text);
}

.app-shell {
    min-height: 100vh;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
    z-index: 1025;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    padding: 24px 18px;
    background:
        radial-gradient(circle at top, rgba(96, 165, 250, 0.18), transparent 32%),
        linear-gradient(180deg, #091224 0%, #10213b 55%, #0f172a 100%);
    color: #fff;
    overflow-y: auto;
    z-index: 1030;
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.18);
    transition: transform 0.28s ease, width 0.28s ease;
}

.brand-block {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 26px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(96, 165, 250, 0.26));
    font-size: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-close {
    margin-left: auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.42), rgba(15, 118, 110, 0.34));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar-footer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-dropdown {
    margin-bottom: 6px;
}

.sidebar-dropdown-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.sidebar-dropdown-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.sidebar-dropdown.open .sidebar-dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    padding: 6px 0 0 52px;
}

.sidebar-dropdown.open .sidebar-submenu {
    display: grid;
    gap: 6px;
}

.sidebar-submenu-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 12px;
    transition: 0.2s ease;
}

.sidebar-submenu-link:hover,
.sidebar-submenu-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-logout {
    color: rgba(255, 255, 255, 0.82);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(249, 115, 22, 0.14));
}

.sidebar-logout:hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.34), rgba(249, 115, 22, 0.24));
}

.nav-icon-chip {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    font-size: 1rem;
    flex: 0 0 36px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-icon-chip.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.nav-icon-chip.orange { background: linear-gradient(135deg, #fb923c, #f59e0b); }
.nav-icon-chip.violet { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.nav-icon-chip.green { background: linear-gradient(135deg, #10b981, #059669); }
.nav-icon-chip.cyan { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.nav-icon-chip.pink { background: linear-gradient(135deg, #ec4899, #db2777); }
.nav-icon-chip.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.nav-icon-chip.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.nav-icon-chip.teal { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.nav-icon-chip.lime { background: linear-gradient(135deg, #84cc16, #22c55e); }
.nav-icon-chip.slate { background: linear-gradient(135deg, #64748b, #334155); }

.app-main {
    margin-left: 280px;
    transition: margin-left 0.28s ease;
}

.guest-main {
    margin-left: 0;
}

.topbar {
    padding: 22px 24px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-toggle-btn {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #1d4ed8, #0f766e);
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(191, 219, 254, 0.8);
    backdrop-filter: blur(12px);
}

.page-heading {
    font-size: 1.7rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--muted);
}

.stat-card,
.panel-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88)),
        var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.stat-card .icon-wrap {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.14), rgba(15, 118, 110, 0.14));
    color: var(--primary);
    font-size: 1.2rem;
}

.icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.18), rgba(15, 118, 110, 0.16));
    color: var(--primary-dark);
    font-size: 1.4rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -30px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 65%);
}

.table thead th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(191, 219, 254, 0.85);
    font-weight: 700;
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.82), rgba(239, 246, 255, 0.9));
    padding-top: 14px;
    padding-bottom: 14px;
}

.table td,
.table th {
    vertical-align: middle;
    border-color: rgba(219, 234, 254, 0.9);
}

.table tbody tr {
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.table tbody tr:hover {
    background: rgba(239, 246, 255, 0.82);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.06);
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 520px);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 28%),
        rgba(255, 255, 255, 0.96);
}

.demo-credentials {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    color: var(--muted);
}

.mobile-stack {
    display: grid;
    gap: 16px;
}

.big-action {
    min-height: 68px;
    font-size: 1.05rem;
    font-weight: 600;
}

.collection-card {
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
    color: #fff;
    box-shadow: 0 22px 45px rgba(29, 78, 216, 0.22);
}

.filter-row .form-control,
.filter-row .form-select,
.filter-row .btn,
.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    min-height: 52px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.card {
    border-radius: 24px;
}

.badge-soft {
    background: #ecfeff;
    color: var(--primary-dark);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 50%, var(--secondary) 100%);
    border: none;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 45%, var(--secondary-dark) 100%);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-light {
    border-width: 1px;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(236, 253, 245, 0.7));
    border: 1px solid rgba(191, 219, 254, 0.8);
}

.table-search-wrap {
    position: relative;
    flex: 1;
    max-width: 340px;
}

.table-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    z-index: 1;
}

.table-search-input {
    padding-left: 42px;
    min-height: 46px;
}

.record-counter {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.table-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 12px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
    transition: 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(239, 246, 255, 0.95);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.searchable-picker {
    position: relative;
}

.searchable-picker-input {
    padding-right: 42px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.searchable-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(10px);
}

.searchable-picker.open .searchable-picker-dropdown {
    display: grid;
    gap: 8px;
    animation: fadeRise 0.18s ease;
}

.searchable-picker-option {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: var(--text);
    font-weight: 600;
    transition: 0.2s ease;
}

.searchable-picker-option:hover {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.8), rgba(236, 253, 245, 0.8));
    border-color: rgba(96, 165, 250, 0.6);
    transform: translateY(-1px);
}

.shortcut-panel {
    position: relative;
    overflow: hidden;
}

.shortcut-panel::after {
    content: "";
    position: absolute;
    inset: auto -34px -42px auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 65%);
    pointer-events: none;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.shortcut-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 146px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.85);
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.shortcut-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
}

.shortcut-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
}

.shortcut-title {
    font-size: 1rem;
    font-weight: 800;
}

.shortcut-subtitle {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.shortcut-card.blue { background: linear-gradient(180deg, #ffffff, #eef5ff); }
.shortcut-card.blue .shortcut-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.shortcut-card.orange { background: linear-gradient(180deg, #ffffff, #fff7ed); }
.shortcut-card.orange .shortcut-icon { background: linear-gradient(135deg, #fb923c, #f59e0b); }
.shortcut-card.violet { background: linear-gradient(180deg, #ffffff, #f3f0ff); }
.shortcut-card.violet .shortcut-icon { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.shortcut-card.green { background: linear-gradient(180deg, #ffffff, #ecfdf5); }
.shortcut-card.green .shortcut-icon { background: linear-gradient(135deg, #10b981, #059669); }
.shortcut-card.lime { background: linear-gradient(180deg, #ffffff, #f7fee7); }
.shortcut-card.lime .shortcut-icon { background: linear-gradient(135deg, #84cc16, #22c55e); }
.shortcut-card.cyan { background: linear-gradient(180deg, #ffffff, #ecfeff); }
.shortcut-card.cyan .shortcut-icon { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.shortcut-card.pink { background: linear-gradient(180deg, #ffffff, #fdf2f8); }
.shortcut-card.pink .shortcut-icon { background: linear-gradient(135deg, #ec4899, #db2777); }
.shortcut-card.teal { background: linear-gradient(180deg, #ffffff, #f0fdfa); }
.shortcut-card.teal .shortcut-icon { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.area-report-panel,
.area-highlight-panel {
    position: relative;
    overflow: hidden;
}

.area-report-panel::after,
.area-highlight-panel::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -38px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 65%);
    pointer-events: none;
}

.area-graph-list {
    display: grid;
    gap: 16px;
}

.area-graph-item {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(191, 219, 254, 0.85);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.82));
}

.area-graph-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.area-bar-track,
.table-progress-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.95);
    overflow: hidden;
}

.area-bar-fill,
.table-progress-fill {
    height: 100%;
    border-radius: inherit;
}

.area-bar-fill {
    background: linear-gradient(90deg, #2563eb, #14b8a6, #22c55e);
}

.table-progress-fill.success {
    background: linear-gradient(90deg, #10b981, #22c55e);
}

.table-progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.area-graph-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.area-highlight-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(191, 219, 254, 0.85);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.94));
}

.area-percent-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(16, 185, 129, 0.12));
    color: var(--primary-dark);
    font-weight: 800;
}

.area-mini-stat {
    height: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border: 1px solid rgba(219, 234, 254, 0.95);
}

.area-mini-stat span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.area-mini-stat strong {
    color: var(--text);
    font-size: 1rem;
}

.table-progress-wrap {
    display: grid;
    gap: 6px;
    min-width: 150px;
}

.alert {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(209, 250, 229, 0.95));
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(254, 226, 226, 0.95));
    color: #991b1b;
}

.text-bg-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb) !important;
}

.text-bg-success {
    background: linear-gradient(135deg, var(--success), #10b981) !important;
}

.text-bg-warning {
    background: linear-gradient(135deg, #f59e0b, #facc15) !important;
    color: #1f2937 !important;
}

.text-bg-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

.loan-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 26%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9));
}

.loan-hero::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 110px;
    height: 110px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(245, 158, 11, 0.12));
    transform: rotate(18deg);
}

.summary-tile {
    border: 1px solid rgba(191, 219, 254, 0.85);
    border-radius: 20px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.8));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.summary-tile.primary {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.14), rgba(191, 219, 254, 0.72));
}

.summary-tile.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(209, 250, 229, 0.72));
}

.summary-tile.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(254, 243, 199, 0.82));
}

.summary-tile.info {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(224, 242, 254, 0.8));
}

.loan-info-grid {
    display: grid;
    gap: 12px;
}

.loan-info-item {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.loan-info-label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.loan-info-value {
    display: block;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
}

.loan-cluster {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.loan-cluster-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(191, 219, 254, 0.8);
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.loan-cluster-title {
    margin-bottom: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.loan-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.loan-progress {
    margin-top: 20px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.12), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(191, 219, 254, 0.8);
}

.loan-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.loan-progress-label {
    color: var(--muted);
    font-weight: 600;
}

.loan-progress-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.loan-progress-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.loan-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.loan-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.loan-meta-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(191, 219, 254, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.loan-action-bar {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.loan-extend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.2);
}

.loan-action-note {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 600;
}

.report-box {
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.panel-card,
.stat-card,
.collection-card,
.report-box {
    animation: floatIn 0.45s ease;
}

.table-responsive {
    animation: fadeRise 0.35s ease;
}

.report-box-header {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
}

.report-box-body {
    padding: 18px;
}

.metric-card {
    height: 100%;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.8);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.metric-card.warning {
    background: linear-gradient(180deg, #fff7ed, #fffbeb);
}

.metric-card.success {
    background: linear-gradient(180deg, #ecfdf5, #f0fdf4);
}

.metric-card.info {
    background: linear-gradient(180deg, #eff6ff, #f0f9ff);
}

.metric-card.primary {
    background: linear-gradient(180deg, #eef2ff, #eff6ff);
}

.metric-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.metric-value {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
}

.metric-subvalue {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.section-title::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: min(84vw, 310px);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .app-sidebar {
        position: fixed;
    }

    .app-main {
        margin-left: 0;
    }

    .topbar {
        padding-top: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-user {
        width: 100%;
        justify-content: space-between;
    }

    .loan-mini-grid {
        grid-template-columns: 1fr;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search-wrap {
        max-width: none;
    }

    .table-pagination {
        justify-content: flex-start;
    }
}

@media (min-width: 992px) {
    body.sidebar-collapsed .app-sidebar {
        width: 96px;
        padding-inline: 14px;
    }

    body.sidebar-collapsed .brand-block > div:not(.brand-icon):not(.sidebar-close),
    body.sidebar-collapsed .sidebar-nav .nav-link span:last-child {
        display: none;
    }

    body.sidebar-collapsed .sidebar-nav .nav-link {
        justify-content: center;
    }

    body.sidebar-collapsed .app-main {
        margin-left: 96px;
    }

    body.sidebar-collapsed .menu-toggle-btn i::before {
        content: "\f285";
    }
}

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

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