/* =====================================================================
   LandManagement — App Theme (Bootstrap 5 custom admin shell)
   Uses CSS logical properties so the same rules work for LTR & RTL.
   ===================================================================== */

/* =====================================================================
   AdminLTE / BS4 compatibility shims — keep legacy pages looking right
   under Bootstrap 5 without rewriting every view.
   ===================================================================== */
.content-header { padding: .25rem 0 1rem; }
.content-header h1 { font-size: 1.4rem; font-weight: 700; margin: 0; color: #1e293b; }
.content-header .breadcrumb { background: transparent; padding: 0; margin: 0; }
.content > .container-fluid,
.content-header > .container-fluid { padding-inline: 0; }

/* AdminLTE colour helpers used for status badges & buttons */
.bg-blue   { background-color: var(--brand) !important; color: #fff !important; }
.bg-red    { background-color: #dc3545 !important; color: #fff !important; }
.bg-green  { background-color: #16a34a !important; color: #fff !important; }
.bg-yellow { background-color: #f59e0b !important; color: #212529 !important; }
.bg-success-soft { background:#e8f7ee; color:#16a34a; }
/* status pills rendered as <span class="btn-sm bg-green">…</span> */
span.btn-sm { display:inline-block; padding:.25rem .6rem; border-radius:50rem; font-size:.78rem; font-weight:600; line-height:1.2; }

/* AdminLTE cards used on CreateOrEdit / report pages */
.card-custom { border:0.5px solid #dee2e6; border-radius:var(--card-radius); background:#fff; box-shadow:var(--card-shadow); }
.gutter-b { margin-bottom:1.25rem; }

/* legacy search input-group (BS4 input-group-prepend) */
.input-group-prepend { display:flex; }
.input-group-prepend > .btn { border-start-end-radius:0; border-end-end-radius:0; }

/* abp page subheader (CreateOrEdit pages) */
.abp-page-subheader,
.subheader { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.75rem; margin-bottom:1.1rem; }
.abp-page-subheader h1, .subheader h1 { font-size:1.4rem; font-weight:700; margin:0; color:#1e293b; }

/* report tables get the same polish */
.table-transactions thead th { background:#f8fafc; }

:root {
    --brand: #1D9E75;
    --brand-rgb: 29, 158, 117;
    --brand-dark: #178a66;
    --brand-light: #e8f4ef;

    --sidebar-width: 264px;
    --sidebar-width-collapsed: 74px;
    --topbar-height: 60px;

    --sidebar-bg: #ffffff;
    --sidebar-bg-2: #f4f8f6;
    --sidebar-fg: #334155;
    --sidebar-fg-muted: #94a3b8;
    --sidebar-border: #e5e9f2;
    --sidebar-hover-bg: #eef6f3;
    --sidebar-active-bg: rgba(var(--brand-rgb), .14);
    --sidebar-active-fg: var(--brand-dark);
    --sidebar-icon-bg: #f1f5f9;

    --content-bg: #f8f9fa;
    --card-radius: .5rem;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, .08);

    --bs-body-bg: var(--content-bg);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-dark);
}

/* ----- Bootstrap brand overrides ----- */
.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}
.btn-outline-primary {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand);
}
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
a { text-decoration: none; }

body {
    background-color: var(--content-bg);
    font-family: "Cairo", "Segoe UI", "Source Sans Pro", Tahoma, sans-serif;
    font-size: 14px;
}

/* =====================================================================
   Shell layout
   ===================================================================== */
.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    border-inline-end: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width .2s ease, transform .2s ease;
    overflow: hidden;
}

.app-content {
    margin-inline-start: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin .2s ease;
}

.app-main {
    flex: 1 0 auto;
    padding: 1.25rem;
    background-color: var(--content-bg);
}

/* Collapsed (mini) sidebar — desktop */
body.sidebar-collapsed .app-sidebar { width: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .app-content { margin-inline-start: var(--sidebar-width-collapsed); }
body.sidebar-collapsed .app-sidebar .hide-collapsed { display: none !important; }
body.sidebar-collapsed .app-sidebar .nav-link { justify-content: center; }
body.sidebar-collapsed .app-sidebar .nav-link > .nav-text,
body.sidebar-collapsed .app-sidebar .nav-link > .menu-arrow { display: none; }
body.sidebar-collapsed .app-sidebar .nav-link { padding-inline: .5rem; }
body.sidebar-collapsed .app-sidebar .nav-icon-wrap { width: 2.2rem; height: 2.2rem; }
body.sidebar-collapsed .app-sidebar .submenu { display: none !important; }

/* =====================================================================
   Sidebar brand + user
   ===================================================================== */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    height: var(--topbar-height);
    padding-inline: 1rem;
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex: 0 0 auto;
}
.sidebar-brand img { width: 34px; height: 34px; border-radius: 8px; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex: 0 0 auto;
}
.sidebar-user .avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand); display: grid; place-items: center; font-size: 1.1rem;
    flex: 0 0 auto;
}
.sidebar-user .info { overflow: hidden; }
.sidebar-user .info .name { color: #1e293b; font-weight: 600; font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.sidebar-user .info .role { color: var(--sidebar-fg-muted); font-size: .75rem; }

/* =====================================================================
   Sidebar menu
   ===================================================================== */
.sidebar-menu {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .65rem .55rem 1rem;
}
.sidebar-menu .nav { flex-direction: column; gap: 3px; }
.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--sidebar-fg);
    border-radius: .55rem;
    padding: .58rem .75rem;
    font-size: .9rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sidebar-menu .nav-icon-wrap {
    width: 2rem; height: 2rem; border-radius: .45rem;
    background: var(--sidebar-icon-bg);
    display: grid; place-items: center; flex: 0 0 auto;
    transition: background .15s ease, color .15s ease;
}
.sidebar-menu .nav-link .nav-icon { width: 1rem; text-align: center; font-size: .95rem; flex: 0 0 auto; }
.sidebar-menu .nav-link .nav-text { flex: 1 1 auto; line-height: 1.25; }
.sidebar-menu .nav-link .menu-arrow { transition: transform .2s ease; font-size: .7rem; opacity: .55; margin-inline-start: auto; }
.sidebar-menu .nav-link[aria-expanded="true"] .menu-arrow { transform: rotate(90deg); opacity: .85; }
[dir="rtl"] .sidebar-menu .nav-link[aria-expanded="true"] .menu-arrow { transform: rotate(-90deg); }
.sidebar-menu .nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--brand-dark);
    border-color: rgba(var(--brand-rgb), .12);
}
.sidebar-menu .nav-link:hover .nav-icon-wrap { background: var(--brand-light); color: var(--brand-dark); }
.sidebar-menu .nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-fg);
    font-weight: 600;
    border-color: rgba(var(--brand-rgb), .2);
    box-shadow: inset 3px 0 0 var(--brand);
}
[dir="rtl"] .sidebar-menu .nav-link.active { box-shadow: inset -3px 0 0 var(--brand); }
.sidebar-menu .nav-link.active .nav-icon-wrap { background: var(--brand-light); color: var(--brand-dark); }
.sidebar-menu .nav-item-parent { margin-top: .15rem; }
.sidebar-menu .nav-item-parent.is-open > .nav-link { color: var(--brand-dark); }
.sidebar-menu .submenu { list-style: none; padding-inline-start: .35rem; margin: 3px 0 6px; border-inline-start: 2px solid #e8edf2; margin-inline-start: 1.35rem; }
.sidebar-menu .submenu .nav-link {
    font-size: .84rem;
    padding: .42rem .65rem;
    color: var(--sidebar-fg-muted);
    gap: .5rem;
}
.sidebar-menu .submenu .nav-link .nav-icon-wrap { width: 1.5rem; height: 1.5rem; background: transparent; }
.sidebar-menu .submenu .nav-link .nav-icon { font-size: .72rem; }
.sidebar-menu .submenu .nav-link:hover,
.sidebar-menu .submenu .nav-link.active {
    color: var(--brand-dark);
    background: var(--sidebar-hover-bg);
    box-shadow: none;
    border-color: transparent;
}
.sidebar-menu .submenu .nav-link.active { box-shadow: none; font-weight: 600; }

/* thin scrollbar */
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .12); border-radius: 3px; }

/* =====================================================================
   Topbar
   ===================================================================== */
.app-topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e5e9f2;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-inline: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.app-topbar .sidebar-toggle {
    border: 0; background: transparent; color: #475569; font-size: 1.15rem;
    width: 40px; height: 40px; border-radius: .5rem;
}
.app-topbar .sidebar-toggle:hover { background: #f1f5f9; }
.app-topbar .topbar-spacer { flex: 1 1 auto; }
.app-topbar .nav-link { color: #475569; }
.app-topbar .nav-link:hover { color: var(--brand); }
.app-topbar .user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand-light); color: var(--brand);
    display: grid; place-items: center;
}

/* =====================================================================
   Footer
   ===================================================================== */
.app-footer {
    flex: 0 0 auto;
    padding: .85rem 1.25rem;
    background: #fff;
    border-top: 1px solid #e5e9f2;
    color: #64748b;
    font-size: .85rem;
}

/* =====================================================================
   Page header
   ===================================================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.1rem;
}
.page-header h1 { font-size: 1.4rem; font-weight: 700; margin: 0; color: #1e293b; }
.page-header .page-subtitle { color: #64748b; font-size: .85rem; margin: 0; }

/* =====================================================================
   Cards
   ===================================================================== */
.card {
    border: 0.5px solid #dee2e6;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #eef1f7;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    padding: 10px 16px;
}

/* =====================================================================
   KPI / stat cards
   ===================================================================== */
.stat-card {
    position: relative;
    border: 0.5px solid #dee2e6;
    border-radius: var(--card-radius);
    background: #fff;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
    transition: box-shadow .15s ease;
    height: 100%;
    overflow: hidden;
}
.stat-card:hover { box-shadow: 0 1px 6px rgba(0, 0, 0, .08); }
.stat-card .stat-icon {
    width: 46px; height: 46px; border-radius: 10px;
    display: grid; place-items: center; font-size: 1.25rem;
    flex: 0 0 auto;
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: #1e293b; }
.stat-card .stat-label { color: #64748b; font-size: .82rem; margin-top: .15rem; }
.stat-card .stat-trend { font-size: .78rem; font-weight: 600; }
/* flat tinted icon tiles (no gradients) */
.stat-card.accent-primary .stat-icon { background: var(--brand-light); color: var(--brand-dark); }
.stat-card.accent-success .stat-icon { background: #e1f5ee; color: #0f6e56; }
.stat-card.accent-warning .stat-icon { background: #faeeda; color: #854f0b; }
.stat-card.accent-danger  .stat-icon { background: #fcebeb; color: #a32d2d; }
.stat-card.accent-info    .stat-icon { background: #e6f7ff; color: #0b5c82; }
.stat-card.accent-purple  .stat-icon { background: #efe7fb; color: #6b30c2; }

.analytics-kpi-row .stat-card { padding: .85rem 1rem; }
.analytics-kpi-row .stat-value { font-size: 1.25rem; }

/* Financial tracking tabs */
.fin-track-tabs .nav-link { font-size: .9rem; font-weight: 600; color: #64748b; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .65rem 1rem; }
.fin-track-tabs .nav-link.active { color: var(--brand-dark); border-bottom-color: var(--brand-dark); background: transparent; }
.fin-track-kpi-group .section-label { font-size: .72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .35px; margin-bottom: .5rem; }

/* Dashboard */
.dashboard-chart-wrap { position: relative; height: 280px; }
.dashboard-kpi-section { margin-bottom: .35rem; }
.dashboard-kpi-section .section-label {
    font-size: .75rem; font-weight: 600; color: #64748b;
    text-transform: uppercase; letter-spacing: .4px; margin-bottom: .5rem;
}
.stat-card .stat-sub { font-size: .78rem; color: #94a3b8; margin-top: .15rem; }
.period-filter-pills .btn { font-size: 12px; }

/* Status badge stacks in tables */
.status-stack { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.status-stack .badge { font-size: 10.5px; font-weight: 600; white-space: nowrap; padding: .3em .55em; }

/* View-screen mini KPI grid */
.view-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.view-kpi-tile {
    background: #fff; border: 0.5px solid #dee2e6; border-radius: var(--card-radius);
    padding: .85rem 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.view-kpi-tile .vk-label { font-size: .72rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-bottom: .2rem; }
.view-kpi-tile .vk-value { font-size: 1.25rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.view-kpi-tile .vk-sub { font-size: .75rem; color: #94a3b8; margin-top: .15rem; }
.view-kpi-tile.accent-success { border-color: #cdeede; background: #f8fdfb; }
.view-kpi-tile.accent-warning { border-color: #f2e1c4; background: #fffdf8; }
.view-kpi-tile.accent-danger  { border-color: #f5d5d5; background: #fffafa; }
.view-kpi-tile.accent-primary { border-color: var(--brand-light); background: #f8fcfa; }

/* Age duration (mixed Arabic + numbers in RTL tables) */
.age-duration {
    direction: rtl;
    unicode-bidi: isolate;
    white-space: nowrap;
}
.age-duration .age-unit {
    display: inline-block;
    unicode-bidi: isolate;
}
.age-duration .age-num {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    font-variant-numeric: tabular-nums;
}
.age-duration .age-word {
    unicode-bidi: isolate;
}
.age-duration .age-sep {
    unicode-bidi: isolate;
}

/* Installment schedule rows */
.installment-row-late td { background: #fef8f8 !important; }
.installment-row-paid td { background: #f6fdf9 !important; }

/* Upcoming sidebar */
.upcoming-card .card-header { background: #fff8ee; border-bottom: 1px solid #f2e1c4; }

/* =====================================================================
   Tables (DataTables + plain)
   ===================================================================== */
.table { --bs-table-hover-bg: #f6f9ff; }
/* reference flat table system */
.table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    font-weight: 600;
}
.table td { font-size: 13px; vertical-align: middle; }
table.dataTable thead th,
.dataTables_wrapper table thead th {
    background: #f8f9fa;
    color: #475569;
    font-weight: 600;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 1px solid #e5e9f2 !important;
}
table.dataTable tbody td,
.dataTables_wrapper table tbody td { vertical-align: middle; font-size: 13px !important; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select { border-radius: .5rem; }
div.dataTables_wrapper div.dataTables_paginate .page-item.active .page-link {
    background: var(--brand); border-color: var(--brand);
}

/* Filter bar card */
.filter-bar .form-label { font-size: .78rem; font-weight: 600; color: #64748b; margin-bottom: .2rem; }

/* =====================================================================
   Select2 (bootstrap-5 theme height alignment)
   ===================================================================== */
.select2-container--bootstrap-5 .select2-selection { min-height: calc(1.5em + .75rem + 2px); }

/* =====================================================================
   Misc helpers
   ===================================================================== */
.badge.rounded-pill { padding-inline: .65em; }
.cursor-pointer { cursor: pointer; }

/* =====================================================================
   Flat design system (mirrors reference landmanagement.css)
   ===================================================================== */
/* global uppercase form labels */
.form-label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}
/* subtle badge palette */
.badge { font-weight: 500; }
.bg-success-subtle   { background-color: #e1f5ee !important; }
.text-success-emphasis { color: #0f6e56 !important; }
.bg-danger-subtle    { background-color: #fcebeb !important; }
.text-danger-emphasis  { color: #a32d2d !important; }
.bg-warning-subtle   { background-color: #faeeda !important; }
.text-warning-emphasis { color: #854f0b !important; }
.bg-primary-subtle   { background-color: var(--brand-light) !important; }
.text-primary-emphasis { color: var(--brand-dark) !important; }
.bg-info-subtle      { background-color: #e6f7ff !important; }
.text-info-emphasis    { color: #0b5c82 !important; }
.bg-secondary-subtle { background-color: #f1f3f5 !important; }
.text-secondary-emphasis { color: #495057 !important; }
.border-primary-subtle { border-color: var(--brand-light) !important; }
.border-success-subtle { border-color: #cdeede !important; }
.border-warning-subtle { border-color: #f2e1c4 !important; }
.border-danger-subtle  { border-color: #f5d5d5 !important; }
.border-info-subtle    { border-color: #cdeafb !important; }
/* extra-small button */
.btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 4px; line-height: 1.5; }
/* progress bars in tables */
.progress-thin { height: 5px; border-radius: 3px; }
.progress-thin .progress-bar { border-radius: 3px; }
/* agent avatar initials */
.agent-avatar {
    width: 28px; height: 28px; font-size: 10px; font-weight: 600;
    flex: 0 0 auto;
}
/* Telegram broadcast split layout */
.broadcast-panel { min-height: 420px; }
.broadcast-contact-list {
    border: 1px solid #dee2e6;
    border-radius: var(--card-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
    background: #fff;
}
.broadcast-contact-list .list-header {
    padding: .75rem;
    border-bottom: 1px solid #eef1f7;
    background: #f8f9fa;
    flex: 0 0 auto;
}
.broadcast-contact-list .list-body {
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: 480px;
}
.broadcast-contact-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    margin: 0;
}
.broadcast-contact-item:hover { background: #f8f9fa; }
.broadcast-contact-item .contact-name {
    flex: 1 1 auto;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.broadcast-composer {
    border: 1px solid #dee2e6;
    border-radius: var(--card-radius);
    background: #fff;
    padding: 1rem;
    height: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}
.broadcast-composer textarea { flex: 1 1 auto; min-height: 200px; resize: vertical; }
/* flat KPI tile */
.kpi-card { background: #f8f9fa; border-radius: 8px; padding: 12px 14px; }
.kpi-card .kpi-label { font-size: 11px; color: #888; margin-bottom: 4px; }
.kpi-card .kpi-value { font-size: 16px; font-weight: 600; }
/* content header (reference) */
.content-header { margin-bottom: 1.1rem; }
.content-header .page-title,
.page-title { font-size: 16px; font-weight: 600; margin: 0; color: #1e293b; }

/* =====================================================================
   Responsive — off-canvas sidebar on small screens
   ===================================================================== */
.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
    z-index: 1035; display: none;
}
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    [dir="rtl"] .app-sidebar { transform: translateX(100%); }
    .app-content { margin-inline-start: 0 !important; }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; }
    /* never mini-collapse on mobile */
    body.sidebar-collapsed .app-sidebar { width: var(--sidebar-width); }
}

/* =====================================================================
   Login page
   ===================================================================== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f4fbf8 0%, #e8f4ef 50%, #dff0ea 100%);
}
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}
.login-box { width: 100%; max-width: 400px; }
.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    color: var(--brand-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
}
.login-logo img { width: 42px; height: 42px; border-radius: 10px; }
.login-brand-bar { height: 4px; background: var(--brand); border-radius: 14px 14px 0 0; }
.login-box .card { border: 0; box-shadow: 0 12px 40px rgba(29, 158, 117, .12); border-radius: 14px; overflow: hidden; }
.login-brand-title { color: var(--brand); font-weight: 700; font-size: 1.35rem; }
.btn-lm {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-lm:hover, .btn-lm:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}
.login-box .card-footer { border-top: 1px solid #eef1f7; padding: .65rem 1rem; }
.login-box .card-header { border-bottom: 1px solid #eef1f7; padding: .65rem 1rem; }

/* =====================================================================
   Forms — sectioned, modern
   ===================================================================== */
.form-section {
    background: #fff;
    border: 1px solid #e8ecf4;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.1rem;
    overflow: hidden;
}
.form-section > .form-section-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #eef1f7;
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}
.form-section > .form-section-head .sec-icon {
    width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
    display: grid; place-items: center;
    background: var(--brand-light); color: var(--brand-dark);
    font-size: .9rem;
}
.form-section > .form-section-body { padding: 1.1rem; }

.app-form .form-label { font-weight: 600; font-size: .82rem; color: #475569; margin-bottom: .25rem; }
.app-form .form-control, .app-form .form-select { border-radius: .5rem; }
.app-form .form-control:focus, .app-form .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .15);
}
.app-form .field { margin-bottom: .9rem; }
.app-form .field.required .form-label::after { content: " *"; color: #dc3545; }
.app-form .form-control[disabled], .app-form .form-control:disabled { background: #f1f5f9; }

/* sticky action bar at bottom of forms */
.form-actions-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e5e9f2;
    padding: .8rem 1.1rem;
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    border-radius: 0 0 var(--card-radius) var(--card-radius);
    z-index: 5;
}

/* =====================================================================
   Detail / View screens
   ===================================================================== */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .25rem 1.5rem; }
.info-row { display: flex; flex-direction: column; padding: .55rem 0; border-bottom: 1px dashed #eef1f7; }
.info-row .info-label { font-size: .76rem; color: #94a3b8; font-weight: 600; }
.info-row .info-value { font-size: .95rem; color: #1e293b; font-weight: 600; }
.detail-hero {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .9rem 1.1rem; border-radius: var(--card-radius);
    background: #fff; color: #1e293b;
    border: 0.5px solid #dee2e6; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 1.1rem;
}
.detail-hero .hero-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-light); color: var(--brand-dark); display: grid; place-items: center; font-size: 1.35rem; }
.detail-hero h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.detail-hero .hero-sub { color: #64748b; font-size: .85rem; }
.detail-hero .hero-spacer { flex: 1 1 auto; }

/* =====================================================================
   Modals — polished
   ===================================================================== */
.modal-content { border: 0; border-radius: .65rem; overflow: hidden; box-shadow: 0 12px 40px rgba(16,24,40,.16); }
.modal-header { background: #f8f9fa; border-bottom: 1px solid #eef1f7; }
.modal-header .modal-title { font-weight: 600; font-size: 1rem; color: #1e293b; }
.modal-footer { background: #f8f9fa; }

/* =====================================================================
   Reports — toolbar + tables
   ===================================================================== */
.report-toolbar {
    display: flex; flex-wrap: wrap; align-items: end; gap: .75rem;
    padding: 1rem 1.1rem; background: #fff; border: 1px solid #e8ecf4;
    border-radius: var(--card-radius); box-shadow: var(--card-shadow); margin-bottom: 1.1rem;
}
.report-toolbar .form-label { font-size: .76rem; font-weight: 600; color: #64748b; margin-bottom: .2rem; }
.report-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.report-table thead th { background: #f8fafc; color: #475569; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.report-table tfoot { font-weight: 700; background: #f1f5f9; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.report-summary .sum-box { background: #fff; border: 1px solid #e8ecf4; border-radius: var(--card-radius); padding: .85rem 1rem; box-shadow: var(--card-shadow); text-align: center; }
.report-summary .sum-box .sum-label { font-size: .76rem; color: #94a3b8; }
.report-summary .sum-box .sum-value { font-size: 1.15rem; font-weight: 700; color: #1e293b; }

/* empty state */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: #94a3b8; }
.empty-state i { font-size: 2.2rem; margin-bottom: .5rem; opacity: .5; }

/* ----- existing report pages polish (applies to legacy decompiled report markup) ----- */

/* filter card */
.register-form .row { align-items: flex-end; }
.register-form .btn { margin-top: 0 !important; }
.register-form .form-control, .register-form .select2, .register-form select { border-radius: .5rem; }
.register-form label.form-label { font-size: .8rem; font-weight: 600; color: #64748b; }
/* group the action buttons row visually */
.register-form .row:last-child { gap: .25rem 0; }

/* report content card title row */
#div_reportDetails .card-title .h3,
#div_reportSaleDetails .card-title .h3,
#div_reportWalletDetails .h3,
#printedSection .h3 { color: var(--brand-dark); font-weight: 700; }

/* report data tables (Lands use .jqTable, Agents use #exportTable/.jqTable) */
.jqTable, #exportTable {
    font-size: .88rem; width: 100%;
    border: 1px solid #e5e9f2; border-radius: .6rem; border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.jqTable thead th, #exportTable thead th,
#printedSection table thead th {
    background: #f8f9fa !important; color: #475569 !important;
    font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .3px;
    border-bottom: 1px solid #e5e9f2 !important;
    padding: .6rem .5rem;
}
.jqTable tbody td, #exportTable tbody td { padding: .5rem; vertical-align: middle; }
.jqTable tbody tr:nth-child(even), #exportTable tbody tr:nth-child(even) { background: #f8fafc; }
.jqTable tbody tr:hover, #exportTable tbody tr:hover { background: #f1f6ff; }
.jqTable tfoot, #exportTable tfoot { font-weight: 700; background: #f1f5f9; }
.jqTable tfoot td, #exportTable tfoot td { border-top: 2px solid #dbe3f3 !important; }
/* neutralise broken decompiled inline cell borders (border:10pxsolid…) on ALL report tables */
.jqTable td[style], .jqTable th[style],
#exportTable td[style], #exportTable th[style] { border: 0 !important; }

/* the small header info table in wallet/sale reports → make it read like a panel */
#printedSection > .row:first-child table { border: 1px solid #e5e9f2; border-radius: .6rem; overflow: hidden; }
#printedSection > .row:first-child table td,
#printedSection > .row:first-child table th { border: 1px solid #eef1f7; padding: .45rem .6rem; }

/* =====================================================================
   Print
   ===================================================================== */
@media print {
    .app-sidebar, .app-topbar, .app-footer, .no-print { display: none !important; }
    .app-content { margin: 0 !important; }
    .app-main { padding: 0 !important; }
    body { background: #fff; }
}
