/* =========================================================
   MIA SUNRISE APP - MAIN STYLESHEET
   File: assets/css/styles.css

   Purpose:
   - Global design system
   - Sidebar and topbar layout
   - Dashboard cards, tables, buttons, forms
   - Reports, charges, expenses, owners, messages
   - Mobile responsive layout
   - Sidebar online users and footer
========================================================= */


/* =========================================================
   01. ROOT VARIABLES
   Global colors, shadows, border radius, and reusable values.
   Change these variables to re-theme the app quickly.
========================================================= */
@font-face {
    font-family: 'Mia Inter';
    src: url('../fonts/Inter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mia Inter';
    src: url('../fonts/Inter-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mia Inter';
    src: url('../fonts/Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mia Inter';
    src: url('../fonts/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mia Bangla';
    src: url('../fonts/NotoSansBengali-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Mia Bangla';
    src: url('../fonts/NotoSansBengali-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg:#f5f7fb;
    --card:#ffffff;
    --text:#111827;
    --muted:#6b7280;
    --font-sans:'Mia Inter', 'Mia Bangla', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --primary:#1f6feb;
    --primary2:#0ea5e9;

    --success:#059669;
    --danger:#dc2626;

    --border:#e5e7eb;
    --shadow:0 10px 30px rgba(15,23,42,.08);
    --radius:20px;
}


/* =========================
   SVG ICONS
========================= */

/* Default icon */
.icon{
    width:18px;
    height:18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 18px;
    color:currentColor;
}

.icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

/* Sidebar nav alignment */
.nav a{
    display:flex;
    align-items:center;
    gap:12px;
}

.nav a .icon{
    width:18px;
    height:18px;
    flex:0 0 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#cbd5e1;
    margin:0;
    position:static;
    top:auto;
    transform:none;
}

.nav a.active .icon,
.nav a:hover .icon{
    color:#ffffff;
}

/* Header bell icon */
.bell-icon-svg{
    width:20px;
    height:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#92400e;
}

.bell-icon-svg .icon{
    width:20px;
    height:20px;
    flex:0 0 20px;
}
/* =========================================================
   TOPBAR MESSAGE BELL ICON
========================================================= */

.bell-link {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.bell-link:hover {
    background: #fff7ed;
    border-color: #fed7aa;
}

.bell-icon-svg,
.bell-icon-svg .icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.bell-icon-svg svg,
.bell-icon-svg .icon svg {
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
}

.bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    border: 2px solid #ffffff;
}

/* Mobile menu icon */
.menu-toggle .icon{
    width:22px;
    height:22px;
    flex:0 0 22px;
}

/* Small icons inside live users box */
.sidebar-live-users-title,
.sidebar-live-users-sub{
    display:flex;
    align-items:center;
    gap:5px;
}

.sidebar-live-users-title .icon,
.sidebar-live-users-sub .icon{
    width:14px;
    height:14px;
    flex:0 0 14px;
}

/* Card title / notice title icons */
.card h3,
.notice-ticker-label{
    display:flex;
    align-items:center;
    gap:7px;
}

.card h3 .icon,
.notice-ticker-label .icon{
    width:16px;
    height:16px;
    flex:0 0 16px;
}

/* =========================================================
   LANGUAGE DROPDOWN
   Top right language selector for desktop and mobile
========================================================= */

.lang-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 50;
}

.lang-dropdown-toggle {
    min-width: 84px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    transition: 0.18s ease;
}

.lang-dropdown-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.lang-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.lang-arrow {
    font-size: 12px;
    line-height: 1;
    color: #64748b;
    transition: 0.18s ease;
}

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

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 130px;
    padding: 8px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
    display: none;
}

.lang-dropdown.is-open .lang-dropdown-menu {
    display: block;
}

.lang-dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.lang-dropdown-menu a:hover {
    background: #f1f5f9;
    color: #2563eb;
}

.lang-dropdown-menu a.active {
    background: #eef2ff;
    color: #3730a3;
}

.lang-dropdown-menu a.active::after {
    content: "✓";
    font-size: 12px;
    font-weight: 700;
}

/* Remove old language button style conflict if old .lang exists */
.lang {
    display: none;
}

/* =========================================================
   LANGUAGE DROPDOWN RESPONSIVE
========================================================= */

@media (max-width: 960px) {
    .lang-dropdown-toggle {
        min-width: 76px;
        height: 38px;
        padding: 0 12px;
        font-size: 12px;
    }

    .lang-dropdown-menu {
        min-width: 120px;
        top: calc(100% + 8px);
    }

    .lang-dropdown-menu a {
        min-height: 36px;
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .lang-dropdown-toggle {
        min-width: 68px;
        height: 36px;
        padding: 0 10px;
    }

    .lang-arrow {
        font-size: 11px;
    }

    .lang-dropdown-menu {
        right: 0;
        min-width: 112px;
    }
}

/* =========================================================
   02. GLOBAL RESET / BASE
   Basic page reset and default typography.
========================================================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
    background: var(--bg);
    color: var(--text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
    letter-spacing: 0;
}

strong,
b {
    font-weight: 700;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
    letter-spacing: 0;
    color: #0f172a;
}


/* =========================================================
   03. MAIN APP LAYOUT
   Desktop layout: sidebar left, main content right.
========================================================= */
.layout {
    display: flex;
    min-height: 100vh;
}

.main {
    flex: 1;
    position: relative;
    z-index: 1;
}


/* =========================================================
   04. LOGIN PAGE
   Used for login screen layout and login button/logo.
========================================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-top-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.login-top-logo img {
    width: 180px;
    height: auto;
    object-fit: contain;
}

.login-card {
    width: min(100%, 420px);
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 28px;
    padding: 26px;
}

.login-btn {
    width: 100%;
    justify-content: center;
}

.login-card .muted {
    text-align: center;
}


/* =========================================================
   05. SIDEBAR
   Main left navigation, brand logo, menu, footer.
========================================================= */
.sidebar {
    width: 270px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 1200;

    display: flex;
    flex-direction: column;

    padding: 24px 18px;
    color: #ffffff;
    background: linear-gradient(180deg, #0f172a, #111827);
    box-shadow: 0 18px 40px rgba(2,6,23,.28);
}


/* Brand/logo block inside sidebar */
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.brand img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: contain;
    background: #ffffff;
}

.brand h1 {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.brand small {
    color: #cbd5e1;
    font-size: 12.5px;
    line-height: 1.55;
    font-weight: 400;
}


/* Sidebar navigation links */
.nav {
    flex: 1;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    margin: 6px 0;

    border-radius: 14px;
    color: #e5e7eb;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.35;

    position: relative;
    isolation: isolate;
    overflow: hidden;

    transition: color .28s ease, box-shadow .34s ease, transform .34s cubic-bezier(.16, 1, .3, 1);
}

.nav a::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    background:
        radial-gradient(circle at 86% -22%, rgba(255,255,255,.20) 0 34%, transparent 35%),
        radial-gradient(circle at 90% 124%, rgba(255,255,255,.15) 0 38%, transparent 39%),
        linear-gradient(135deg, #ffb48f 0%, #f47694 48%, #e65ca3 100%);
    transition: opacity .34s ease;
}

.nav a:hover:not(.active) {
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(230, 92, 163, .24);
    transform: translateX(3px);
}

.nav a:hover:not(.active)::before {
    opacity: 1;
}

.nav a.active {
    background:
        radial-gradient(circle at 86% -22%, rgba(255,255,255,.22) 0 34%, transparent 35%),
        radial-gradient(circle at 90% 124%, rgba(255,255,255,.16) 0 38%, transparent 39%),
        linear-gradient(135deg, #69c8f6 0%, #32a7ed 48%, #2384e8 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(35, 132, 232, .24);
}


/* =========================================================
   06. SIDEBAR ONLINE USERS BOX
   Shows active logged-in users and visitors today.
========================================================= */
.sidebar-live-users {
    margin-top: 12px;
    margin-bottom: 20px;
    padding: 14px 12px;

    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;

    font-size: 11px;
    line-height: 1.5;
    backdrop-filter: blur(6px);
}

.sidebar-live-users-title {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 8px;
    letter-spacing: .3px;
}

.sidebar-live-users-sub {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.sidebar-live-user-main {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.35;
    margin-bottom: 5px;
}

.sidebar-live-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;

    display: inline-block;
    border-radius: 50%;

    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.18);
}

.sidebar-live-user-main .name,
.sidebar-live-user-item .name {
    color: #ffffff;
    font-weight: 600;
}

.sidebar-live-user-main .flat,
.sidebar-live-user-item .flat {
    color: #93c5fd;
    margin-left: 4px;
}

.sidebar-live-user-item {
    margin-bottom: 6px;
    line-height: 1.4;
    color: #e2e8f0;
}

.sidebar-live-user-item .role {
    display: block;
    font-size: 10px;
    color: #94a3b8;
}

.sidebar-live-user-empty {
    color: #64748b;
    font-size: 11px;
}


/* =========================================================
   07. SIDEBAR FOOTER
   Copyright and WEB IDIOM link.
========================================================= */
.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;

    border-top: 1px solid rgba(255,255,255,.08);

    font-size: 12px;
    line-height: 1.6;
    text-align: left;
    color: rgba(255,255,255,.72);
}

.sidebar-footer-copy {
    color: rgba(255,255,255,.85);
}

.sidebar-footer-apartment {
    color: #ffffff;
    font-weight: 700;
    transition: all .2s ease;
}

.sidebar-footer-apartment:hover {
    color: #93c5fd;
}

.sidebar-footer-powered {
    margin-top: 2px;
    color: rgba(255,255,255,.78);
}

.sidebar-footer-link {
    color: #60a5fa;
    font-weight: 600;
    transition: all .2s ease;
}

.sidebar-footer-link:hover {
    color: #93c5fd;
}


/* =========================================================
   08. TOPBAR
   Sticky top header with page title, role, bell, language.
========================================================= */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 24px;

    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);

    position: sticky;
    top: 0;
    z-index: 1100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}


/* Mobile hamburger button */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 12px;
    border: 1px solid var(--border);

    background: #ffffff;
    color: #0f172a;
    box-shadow: var(--shadow);

    font-size: 20px;
    cursor: pointer;
    flex: 0 0 auto;
}

.menu-toggle:hover {
    background: #f8fafc;
}


/* User role badge */
.pill {
    padding: 8px 12px;
    border-radius: 999px;

    background: #eef2ff;
    color: #3730a3;

    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
}


/* Language buttons */
.lang {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    padding: 7px 12px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #ffffff;
    color: #334155;

    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    box-shadow: 0 4px 12px rgba(15,23,42,.04);
}

.lang a:hover {
    background: #f8fafc;
}


/* Bell notification button */
.bell-link {
    position: relative;

    width: 42px;
    height: 42px;

    border-radius: 12px;
    border: 1px solid var(--border);

    background: #ffffff;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 4px 12px rgba(15,23,42,.04);
}

.bell-icon {
    font-size: 18px;
    line-height: 1;
}

.bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;

    min-width: 20px;
    height: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;

    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;

    box-shadow: 0 4px 10px rgba(239,68,68,.35);
}


/* Sidebar unread message badge */
.menu-badge {
    margin-left: auto;

    min-width: 22px;
    height: 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;

    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
}


/* =========================================================
   FLASH POPUP MESSAGE
========================================================= */
.flash-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 90px 18px 18px;
    background: rgba(15, 23, 42, .32);
    backdrop-filter: blur(6px);
}

.flash-popup-overlay.is-open {
    display: flex;
}

.flash-popup-box {
    position: relative;
    width: min(440px, 100%);
    display: flex;
    gap: 14px;
    padding: 20px 22px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    animation: flashPopupIn .22s ease-out;
}

.flash-popup-success {
    border: 1px solid #bbf7d0;
}

.flash-popup-error {
    border: 1px solid #fecaca;
}

.flash-popup-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.flash-popup-success .flash-popup-icon {
    background: #dcfce7;
    color: #16a34a;
}

.flash-popup-error .flash-popup-icon {
    background: #fee2e2;
    color: #dc2626;
}

.flash-popup-content h3 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.flash-popup-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #475569;
}

.flash-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.flash-popup-close:hover {
    background: #e2e8f0;
}

@keyframes flashPopupIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .flash-popup-overlay {
        align-items: flex-start;
        padding-top: 72px;
    }

    .flash-popup-box {
        border-radius: 20px;
        padding: 18px;
    }

    .flash-popup-content h3 {
        font-size: 16px;
    }

    .flash-popup-content p {
        font-size: 13px;
    }
}



/* =========================================================
   09. PAGE CONTAINER / GRID / CARDS
   General content wrapper, grid utilities, cards.
========================================================= */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

.cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack {
    display: grid;
    gap: 18px;
}

.two {
    grid-template-columns: 1.3fr .7fr;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 20px;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--muted);
}

.metric {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.12;
}

.sub,
.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}


/* =========================================================
   10. DASHBOARD SUMMARY CARD COLORS
   Blue: added funds, Red: expenses, Green: available fund.
========================================================= */
.card-blue {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #7bc8f6 0%, #2f9ded 58%, #2b85df 100%);
}

.card-blue .metric {
    color: #ffffff;
}

.card-blue h3 {
    color: #ffffff;
}

.card-red {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #ffc29a 0%, #f37f9e 58%, #ea6da0 100%);
}

.card-red .metric {
    color: #ffffff;
}

.card-red h3 {
    color: #ffffff;
}

.card-green {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #70dacf 0%, #50ccb3 58%, #49c3a3 100%);
}

.card-green .metric {
    color: #ffffff;
}

.card-green h3 {
    color: #ffffff;
}

.card-blue::before,
.card-red::before,
.card-green::before,
.card-blue::after,
.card-red::after,
.card-green::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    pointer-events: none;
}

.card-blue::before,
.card-red::before,
.card-green::before {
    width: 178px;
    height: 178px;
    right: -52px;
    top: -54px;
}

.card-blue::after,
.card-red::after,
.card-green::after {
    width: 204px;
    height: 204px;
    right: 58px;
    bottom: -112px;
}

.card-blue h3,
.card-red h3,
.card-green h3,
.card-blue .metric,
.card-red .metric,
.card-green .metric,
.card-blue .sub,
.card-red .sub,
.card-green .sub {
    position: relative;
    z-index: 1;
}

.card-blue h3,
.card-red h3,
.card-green h3 {
    margin-bottom: 28px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.28;
}

.card-blue .metric,
.card-red .metric,
.card-green .metric {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 34px;
}

.card-blue .sub,
.card-red .sub,
.card-green .sub {
    color: rgba(255, 255, 255, .92);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}


/* =========================================================
   11. PROGRESS BARS
   General progress bar and owner payment status bars.
========================================================= */
.progress {
    height: 12px;
    border-radius: 999px;
    background: #e5eefc;
    overflow: hidden;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary2));
}


/* Fund overview chart and score cards */
.fund-overview-card {
    padding: 24px;
    overflow: hidden;
}

.fund-overview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.fund-overview-head h3 {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
}

.fund-overview-head p {
    margin: 7px 0 0;
    color: #94a3b8;
    font-size: 12.5px;
    line-height: 1.45;
}

.fund-chart-shell {
    position: relative;
    min-height: 300px;
    padding: 8px 0 10px;
}

.fund-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.fund-score-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    border-radius: 20px;
    padding: 18px;
    color: #111827;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.fund-score-collection {
    --score-color: #2f9ded;
    --score-soft: rgba(47, 157, 237, .14);
    --score-track: rgba(47, 157, 237, .16);
}

.fund-score-expense {
    --score-color: #f37f9e;
    --score-soft: rgba(243, 127, 158, .15);
    --score-track: rgba(243, 127, 158, .18);
}

.fund-score-top,
.fund-score-body {
    position: relative;
    z-index: 1;
}

.fund-score-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.fund-score-top span {
    display: block;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.3;
}

.fund-score-top strong {
    display: block;
    margin-top: 5px;
    color: var(--score-color);
    font-size: 15px;
    line-height: 1.3;
}

.fund-score-icon {
    width: 38px;
    height: 38px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--score-color) !important;
    background: var(--score-soft);
    flex: 0 0 38px;
}

.fund-score-icon .icon {
    width: 18px;
    height: 18px;
}

.fund-score-body {
    display: grid;
    place-items: center;
    margin-top: 10px;
}

.fund-score-gauge {
    width: min(100%, 220px);
    height: 120px;
    overflow: visible;
}

.fund-score-track,
.fund-score-arc {
    fill: none;
    stroke-linecap: round;
    stroke-width: 10;
}

.fund-score-track {
    stroke: var(--score-track);
}

.fund-score-arc {
    stroke: var(--score-color);
    stroke-dasharray: 100;
    transition: stroke-dashoffset .35s ease;
}

.fund-score-value {
    margin-top: -58px;
    text-align: center;
}

.fund-score-value strong {
    display: block;
    color: #111827;
    font-size: 34px;
    line-height: 1;
}

.fund-score-value span {
    display: block;
    margin-top: 6px;
    color: var(--score-color);
    font-size: 12px;
}


/* Owner payment card */
.owner-payment-stats-card {
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
}

.owner-payment-stats-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.owner-payment-stats-total {
    text-align: center;
    margin-bottom: 18px;
}

.owner-payment-stats-number {
    font-size: 52px;
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    letter-spacing: 0;
}

.owner-payment-stats-sub {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
    max-width: 300px;
    margin: 0 auto;
}

.owner-payment-status-row {
    margin-bottom: 16px;
}

.owner-payment-status-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;

    margin-bottom: 7px;
    color: #0f172a;
}

.owner-payment-status-top strong {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
}

.owner-payment-status-top span {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.owner-payment-progress {
    width: 100%;
    height: 12px;

    border-radius: 999px;
    overflow: hidden;

    background: #e9eef8;
    position: relative;
}

.owner-payment-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.payment-progress-paid {
    background: rgba(80, 204, 179, 0.24);
}

.payment-progress-paid span {
    background: linear-gradient(90deg, #70dacf 0%, #50ccb3 58%, #49c3a3 100%);
}

.payment-progress-unpaid {
    background: rgba(243, 127, 158, 0.22);
}

.payment-progress-unpaid span {
    background: linear-gradient(90deg, #ffc29a 0%, #f37f9e 58%, #ea6da0 100%);
}

.owner-payment-progress-note {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

.owner-payment-unpaid-box {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.owner-payment-unpaid-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.owner-payment-unpaid-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.owner-payment-unpaid-item {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.35;

    padding: 6px 10px;
    border-radius: 10px;

    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.owner-payment-unpaid-more {
    margin-top: 2px;
    font-size: 11px;
    color: #7c3aed;
    font-weight: 700;
}

.owner-payment-all-paid {
    font-size: 12px;
    color: #059669;
    font-weight: 700;

    padding: 9px 12px;
    border-radius: 12px;

    background: #ecfdf5;
    border: 1px solid #d1fae5;
}


/* =========================================================
   12. TABLES
   Standard table layout for desktop and mobile cards.
========================================================= */
.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    line-height: 1.45;
    text-align: left;
}

.table th {
    color: #0f172a;
    font-weight: 700;
}

.table td {
    color: #111827;
    font-weight: 500;
}


/* =========================================================
   13. BUTTONS
   General buttons and report page buttons.
========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: none;
    border-radius: 14px;

    background: linear-gradient(90deg, var(--primary), var(--primary2));
    color: #ffffff;

    padding: 10px 14px;

    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.btn.secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid var(--border);
}

.btn.danger {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}


/* Load button */
.btn-load {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.btn-load:hover {
    background: #bae6fd;
    border-color: #38bdf8;
}


/* Reset button */
.btn-reset {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.btn-reset:hover {
    background: #fecaca;
    border-color: #f87171;
}


/* Match filter form button height */
.btn-load,
.btn-reset {
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}


/* Report buttons */
.report-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
}

.report-load-action {
    display: flex;
    justify-content: flex-end;
    align-items: end;
}

.report-load-btn {
    min-width: 150px;
    height: 48px;
    padding: 0 18px;
}

.report-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
}

.report-actions .btn {
    flex: 0 0 auto;
    min-width: 150px;

    padding: 12px 14px;
    border-radius: 12px;

    font-size: 14px;
    font-weight: 600;

    white-space: nowrap;
    transition: all .2s ease;
}

.btn-report {
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #ffffff;
    border: none;
}

.btn-report:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,.30);
}

.btn-csv {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.btn-csv:hover {
    background: #bbf7d0;
}

.btn-pdf {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-pdf:hover {
    background: #fecaca;
    border-color: #f87171;
}

.btn-pdf-download {
    background: linear-gradient(135deg,#dc2626,#ef4444);
    color: #ffffff;
    border: none;
}

.btn-pdf-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,.28);
}

/* =========================
   ACTION ICON BUTTONS
   Used for Edit/Delete table actions
========================= */

.action-icon{
    width:34px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    border:1px solid transparent;
    background:#ffffff;
    transition:all .18s ease;
    text-decoration:none;
    flex: 0 0 auto;
}

.action-icon .icon{
    width:17px;
    height:17px;
    flex:0 0 17px;
}

/* Blue edit icon */
.action-edit{
    color:#2563eb;
    border-color:#bfdbfe;
    background:#eff6ff;
}

.action-edit:hover{
    background:#dbeafe;
    border-color:#93c5fd;
}

/* Red delete icon */
.action-delete{
    color:#dc2626;
    border-color:#fecaca;
    background:#fef2f2;
}

.action-delete:hover{
    background:#fee2e2;
    border-color:#fca5a5;
}
/* Action File View */
.action-view{
    color:#0f766e;
    border-color:#99f6e4;
    background:#f0fdfa;
}
.action-view:hover{
    background:#ccfbf1;
}
/* Message Action View */
.message-attachment-label{
    display:inline-flex;
    align-items:center;
    gap:4px;
    margin-left:8px;
    font-size:12px;
    color:#64748b;
}
.message-attachment-label .icon{
    width:13px;
    height:13px;
    flex:0 0 13px;
}
.action-back{
    color:#475569;
    border-color:#cbd5e1;
    background:#f8fafc;
}
.action-back:hover{
    background:#e2e8f0;
}
/* Reminder Page Action */
.btn-load-pro,
.btn-send-danger{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px; 
}
.btn-load-pro .icon,
.btn-send-danger .icon{
    width:18px;
    height:18px;
    flex:0 0 18px;
}

/* =========================================================
   14. FORMS
   Inputs, selects, textareas, labels, and form grid.
========================================================= */
input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: #111827;
}

label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--muted);
    margin-bottom: 6px;
}

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

form.report-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
}


/* Message form input focus */
.messages-compose-card input,
.messages-compose-card textarea {
    background: #ffffff;
    border: 1px solid #dbe3ee;
}

.messages-compose-card input:focus,
.messages-compose-card textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59,130,246,.10);
}


/* =========================================================
   15. FLASH MESSAGES
   Success/error alert boxes.
========================================================= */
.flash {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
}

.flash.success {
    background: #ecfdf5;
    color: #065f46;
}

.flash.error {
    background: #fef2f2;
    color: #991b1b;
}


/* =========================================================
   16. DASHBOARD HERO / COVER IMAGE
   Main apartment cover banner.
========================================================= */
.hero {
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: flex-end;

    padding: 28px;
    border-radius: 24px;

    color: #ffffff;
}

@media (min-width: 1024px) {
    .hero {
        height: 388px;
    }
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero::before {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, .84) 0%, rgba(15, 23, 42, .62) 48%, rgba(35, 132, 232, .50) 100%),
        linear-gradient(135deg, rgba(105, 200, 246, .18) 0%, rgba(50, 167, 237, .24) 50%, rgba(35, 132, 232, .36) 100%);
}

.hero::after {
    background:
        radial-gradient(ellipse 250px 250px at calc(100% - 170px) 28px, rgba(255, 255, 255, .18) 0 58%, transparent 59%),
        radial-gradient(ellipse 330px 330px at calc(100% - 360px) calc(100% + 118px), rgba(255, 255, 255, .13) 0 58%, transparent 59%);
}

.hero img.cover,
.hero .cover {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: bottom center;

    z-index: 0;
}

.hero .content {
    position: relative;
    z-index: 2;

    max-width: 700px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.hero h2 {
    font-size: 34px;
    margin: 0 0 8px;
    color: #ffffff;
}

.hero p {
    color: #e2e8f0;
    font-size: 14px;
}

.hero .badge,
.hero-badge {
    display: inline-flex;
    align-items: center;

    width: auto !important;
    max-width: max-content;

    white-space: nowrap;

    padding: 6px 14px;
    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;

    color: #ffffff;
    background: rgba(255,255,255,0.15);

    backdrop-filter: blur(6px);
}


/* Cover preview image used in profile/settings */
.cover-thumb {
    width: 100%;
    height: 180px;

    object-fit: cover;

    border-radius: 16px;
    border: 1px solid var(--border);
}


/* =========================================================
   17. BADGES / ACTIVITY TAGS
   Used in recent activity, charges, expenses, messages.
========================================================= */
.badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: #f1f5f9;
}

.activity-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 12px;
    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.activity-tag-icon {
    width: 18px;
    height: 18px;

    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 700;

    background: rgba(255,255,255,.8);
}


/* Collection / income row */
.activity-income {
    background: #f0fdf4;
}

.activity-income td {
    border-color: #dcfce7;
}

.tag-income {
    background: #dcfce7;
    color: #166534;
}

td[data-label="Type"] .tag-income {
    background: transparent;
    border: 1px solid #c7f8d9;
}

td[data-label="Type"] .tag-income .activity-tag-icon {
    background: #c7f8d9;
}


/* Expense row */
.activity-expense {
    background: #fef2f2;
}

.activity-expense td {
    border-color: #fee2e2;
}

.tag-expense {
    background: #fee2e2;
    color: #991b1b;
}

td[data-label="Type"] .tag-expense {
    background: transparent;
    border: 1px solid #fbd5d5;
}

td[data-label="Type"] .tag-expense .activity-tag-icon {
    background: #fbd5d5;
}


/* Manual fund / opening balance row */
.activity-fund {
    background: #f5f3ff;
}

.pending-approval-row {
    background: linear-gradient(90deg, #fffbeb, #fef3c7);
}

.pending-approval-row td {
    border-color: #fde68a;
}

.pending-approval-row .activity-tag {
    background: #faedb8;
    color: #92400e;
    border: 1px solid #fff8dc;
}

.pending-approval-row .activity-tag-icon {
    background: #ffffff;
    color: #92400e;
}

.pending-approval-row td[data-label="Status"] .message-status-chip {
    background: #f6e8b0;
    border: 1px solid #ecc102;
    color: #92400e;
}

.pending-approval-row td[data-label="Receipt"] .action-view {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.pending-approval-row td[data-label="Receipt"] .action-view:hover {
    background: #ffedd5;
    border-color: #fdba74;
    color: #7c2d12;
}

.pending-approval-row td[data-label="Actions"] .action-view {
    background: #ecfdf5;
    border-color: #86efac;
    color: #047857;
}

.pending-approval-row td[data-label="Actions"] .action-view:hover {
    background: #d1fae5;
    border-color: #34d399;
    color: #065f46;
}

.pending-approval-row td[data-label="Actions"] .action-edit {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.pending-approval-row td[data-label="Actions"] .action-edit:hover {
    background: #ffedd5;
    border-color: #fb923c;
    color: #9a3412;
}

.pending-approval-row td[data-label="Actions"] .action-delete {
    background: #fff1f2;
    border-color: #fda4af;
    color: #be123c;
}

.pending-approval-row td[data-label="Actions"] .action-delete:hover {
    background: #ffe4e6;
    border-color: #fb7185;
    color: #9f1239;
}

.tag-fund {
    background: #ede9fe;
    color: #7c3aed;
}

td[data-label="Type"] .tag-fund {
    background: transparent;
    border: 1px solid #e4ddff;
}

td[data-label="Type"] .tag-fund .activity-tag-icon {
    background: #e4ddff;
}

.tag-fund .activity-tag-icon {
    color: #7c3aed;
}

.pending-approval-row .tag-fund .activity-tag-icon,
.pending-approval-row .tag-income .activity-tag-icon {
    background: #ffffff;
    color: #92400e;
}


/* Manager tag */
.tag-manager {
    background: #ede9fe;
    color: #6d28d9;
}


/* =========================================================
   18. DASHBOARD LATEST / REPORT TABLES
   Table alignment and row action layouts.
========================================================= */
.latest-boxes .card,
.report-summary .card {
    padding: 20px;
}

.latest-table td:last-child,
.latest-table th:last-child,
.report-table td:last-child,
.report-table th:last-child {
    text-align: left;
    white-space: nowrap;
}

.latest-table .activity-tag,
.report-table .activity-tag {
    min-width: max-content;
}

.latest-table .muted,
.report-table .muted {
    padding: 16px 0;
}

.row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* =========================================================
   19. CHARGES PAGE
   Service charge page table/form layout.
========================================================= */
.charges-top {
    align-items: start;
}

.charges-mini-table .activity-tag,
.charges-full-table .activity-tag {
    min-width: max-content;
}

.charges-mini-table td:last-child,
.charges-mini-table th:last-child,
.charges-full-table td:last-child,
.charges-full-table th:last-child {
    text-align: left;
}

.charges-full-table .muted,
.charges-mini-table .muted {
    padding: 16px 0;
}


/* =========================================================
   20. EXPENSES PAGE
   Expense page table/form layout.
========================================================= */
.expenses-top {
    align-items: start;
}

.expenses-mini-table .activity-tag,
.expenses-full-table .activity-tag {
    min-width: max-content;
}

.expenses-mini-table td:last-child,
.expenses-mini-table th:last-child,
.expenses-full-table td:last-child,
.expenses-full-table th:last-child {
    text-align: left;
}

.expenses-full-table .muted,
.expenses-mini-table .muted {
    padding: 16px 0;
}

.expenses-mini-table th:last-child,
.expenses-mini-table td:last-child {
    text-align: left;
    white-space: nowrap;
}

.expenses-mini-table td:first-child {
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}


/* =========================================================
   21. FLAT OWNER PAGE
   Owner stats card, progress bars, and user rows.
========================================================= */
.owners-top {
    align-items: start;
}

.owners-stats-card {
    display: grid;
    gap: 18px;
}

.owners-stats-center {
    text-align: center;
    padding: 8px 0 4px;
}

.owners-total-count {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #111827;
}

.owners-stat-row {
    display: grid;
    gap: 10px;
}

.owners-progress {
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
}

.owners-progress-owner {
    background: #dbeafe;
}

.owners-progress-owner span {
    background: linear-gradient(90deg,#2563eb,#38bdf8);
}

.owners-progress-manager {
    background: #ede9fe;
}

.owners-progress-manager span {
    background: linear-gradient(90deg,#7c3aed,#a855f7);
}

.owner-owner-row {
    background: #f8fafc;
}

.owner-manager-row {
    background: #faf5ff;
}

.owner-owner-row td {
    border-color: #e2e8f0;
}

.owner-manager-row td {
    border-color: #ede9fe;
}

.owners-full-table .activity-tag {
    min-width: max-content;
}

.owners-full-table td:last-child,
.owners-full-table th:last-child {
    text-align: left;
}

.owners-full-table .muted {
    padding: 16px 0;
}


/* =========================================================
   22. NOTICE TICKER
   Scrolling notice board on dashboard.
========================================================= */
.notice-ticker-card {
    display: flex;
    align-items: center;
    gap: 14px;

    overflow: hidden;
    padding: 14px 18px;
}

.notice-ticker-label {
    flex: 0 0 auto;

    font-weight: 700;
    color: #1e3a8a;
    white-space: nowrap;
}

.notice-ticker-wrap {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.notice-ticker {
    display: flex;
    align-items: center;
    gap: 30px;

    width: max-content;

    animation: noticeScroll 3s linear infinite;
}

.notice-item {
    white-space: nowrap;
    font-size: 16px;
    color: #535353;
    font-weight: 400;
}

.notice-item:hover {
    color: #2563eb;
}

@keyframes noticeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


/* =========================================================
   23. MESSAGES PAGE
   Compose card, message details, list, badges, unread rows.
========================================================= */
.messages-page {
    display: grid;
    gap: 18px;
}

.messages-compose-card,
.message-detail-card,
.messages-list-card {
    background: linear-gradient(180deg,#ffffff,#fbfdff);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.messages-compose-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0 0 6px;
}

.messages-compose-card .sub {
    margin-bottom: 14px;
}

.messages-compose-card textarea {
    min-height: 160px;
    resize: vertical;
}

.messages-compose-card .btn {
    justify-content: center;
}


/* Message details */
.message-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;

    margin-bottom: 8px;
}

.message-detail-head-left {
    display: grid;
    gap: 8px;
}

.message-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    width: max-content;

    padding: 8px 12px;
    border-radius: 999px;

    background: #eef2ff;
    color: #3730a3;

    font-size: 12px;
    font-weight: 700;
}

.message-detail-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: #0f172a;
}

.message-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;

    color: var(--muted);
    font-size: 13px;
}

.message-detail-body-wrap {
    margin-top: 18px;

    background: linear-gradient(180deg,#f8fbff,#f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 22px;

    padding: 18px;
}

.message-detail-body {
    line-height: 1.9;
    white-space: normal;
    color: #1f2937;
    font-size: 15px;
}


/* Message list */
.messages-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.messages-list-head h3 {
    margin: 0;
}

.messages-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.messages-table tr {
    transition: background .15s ease;
}

.messages-table tbody tr:hover {
    background: #f8fbff;
}

.messages-table td,
.messages-table th {
    vertical-align: middle;
}

.messages-table td:first-child {
    font-weight: 700;
    color: #0f172a;
}

.messages-table td:last-child,
.messages-table th:last-child {
    text-align: left;
}

.messages-table .btn.secondary {
    padding: 8px 12px;
    border-radius: 12px;
}

.messages-table .row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.messages-table .muted {
    padding: 16px 0;
}


/* Message ownership/status styles */
.message-row-own {
    background: #eff6ff;
}

.message-row-other {
    background: #f8fafc;
}

.message-row-own td {
    border-color: #dbeafe;
}

.message-row-other td {
    border-color: #e2e8f0;
}

.message-list-subject {
    font-weight: 700;
    color: #0f172a;
}

.message-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-own {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-shared {
    background: #ede9fe;
    color: #6d28d9;
}

.status-unread {
    background: #ffedd5;
    color: #c2410c;
}

.message-unread {
    background: linear-gradient(90deg,#fff7ed,#ffffff) !important;
    box-shadow: inset 4px 0 0 #f97316;
}

.message-unread td {
    border-color: #fed7aa !important;
}

.message-unread .message-list-subject {
    color: #9a3412;
    font-weight: 700;
}

/* =========================================================
   MESSAGE POPUP LIGHTBOX
   Purpose:
   - Opens message details in a responsive popup modal
   - Used by messages.php and assets/js/message-popup.js
========================================================= */


/* =========================================================
   A) CLICKABLE MESSAGE SUBJECT IN MESSAGE LIST
   Purpose:
   - Makes message subject clickable like a clean text button
========================================================= */

.message-list-subject.message-popup-open {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.message-list-subject.message-popup-open:hover {
    color: #2563eb;
}


/* =========================================================
   B) POPUP OVERLAY
   Purpose:
   - Dark blurred background behind popup
   - Prevents page scroll when popup is open
========================================================= */

.message-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.message-popup-overlay.is-open {
    display: flex;
}

body.message-popup-open {
    overflow: hidden;
}


/* =========================================================
   C) POPUP MAIN BOX
   Purpose:
   - Outer popup shell
   - Light gray background outside message/attachment boxes
========================================================= */

.message-popup-box {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 26px;
    background: #f1f5f9;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 30px 90px rgba(15, 23, 42, .30);
}


/* =========================================================
   D) POPUP SCROLL AREA
   Purpose:
   - Keeps scrollbar inside popup, not browser page
========================================================= */

.message-popup-scroll {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 30px 28px 24px;
    background: #f1f5f9;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.message-popup-scroll::-webkit-scrollbar {
    width: 8px;
}

.message-popup-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.message-popup-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.message-popup-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* =========================================================
   E) TOP RIGHT X CLOSE BUTTON
   Purpose:
   - Floating close button at top-right of popup
========================================================= */

.message-popup-x {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
    transition: .18s ease;
}

.message-popup-x:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}


/* =========================================================
   F) POPUP HEADER AREA
   Purpose:
   - Notice chip, title, posted by/date
   - Edit/Delete buttons aligned far right
========================================================= */

.message-popup-content-template {
    min-width: 0;
}

.message-popup-top-area {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-right: 238px;
}

.message-popup-title-area {
    min-width: 0;
    flex: 1;
    max-width: 100%;
}

.message-popup-title {
    margin: 14px 0 8px;
    padding-right: 8px;
    font-size: 24px;
    line-height: 1.25;
    color: #0f172a;
}

.message-popup-meta {
    margin-bottom: 0;
}


/* =========================================================
   G) HEADER EDIT / DELETE BUTTONS
   Purpose:
   - Moves Edit/Delete buttons to the far right top area
   - Keeps them aligned beside title/meta area
========================================================= */

.message-popup-header-actions {
    position: absolute;
    top: 44px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: right;
}

.message-popup-header-actions .btn {
    width: auto;
    min-height: 42px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}

.message-popup-header-actions .btn .icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}


/* =========================================================
   H) POPUP CONTENT WRAPPER
   Purpose:
   - Holds attachment and message body
========================================================= */

.message-popup-body-wrap {
    margin-top: 18px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}


/* =========================================================
   I) ATTACHMENT BOX
   Purpose:
   - Shows attachment above message text
   - Image preview displays inside white card
========================================================= */

.message-popup-attachment {
    margin-top: 0;
    margin-bottom: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}

.message-popup-attachment-title {
    margin-bottom: 12px;
    font-weight: 700;
    color: #334155;
}

.message-popup-image-wrap {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.message-popup-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 46vh;
    object-fit: contain;
    background: #f8fafc;
}


/* =========================================================
   J) MESSAGE TEXT BOX
   Purpose:
   - White background box only for the actual message
========================================================= */

.message-popup-body {
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 20px;
    padding: 24px;
    color: #1e293b;
    line-height: 1.8;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
    white-space: normal;
}


/* =========================================================
   K) BOTTOM FOOTER CLOSE BUTTON
   Purpose:
   - Optional bottom Close button
========================================================= */

.message-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.message-popup-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.message-popup-close-btn {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}


/* =========================================================
   L) MESSAGE LIST EYE BUTTON
   Purpose:
   - Styles the eye icon button that opens popup
========================================================= */

.messages-table .action-icon.message-popup-open {
    border: 1px solid #99f6e4;
    background: #ecfeff;
    color: #0f766e;
    cursor: pointer;
}

.messages-table .action-icon.message-popup-open:hover {
    background: #ccfbf1;
}


/* =========================================================
   M) TABLET / MOBILE RESPONSIVE POPUP
   Purpose:
   - Popup becomes bottom sheet style
   - Header buttons move below title
========================================================= */

@media (max-width: 960px) {
    .message-popup-overlay {
        align-items: flex-end;
        padding: 12px;
    }

    .message-popup-box {
        width: 100%;
        max-height: 92vh;
        border-radius: 24px;
    }

    .message-popup-scroll {
        max-height: 92vh;
        padding: 22px 16px 16px;
    }

    .message-popup-x {
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
    }

    .message-popup-top-area {
        display: block;
        padding-right: 0;
    }

    .message-popup-title {
        margin-right: 46px;
        font-size: 19px;
    }

    .message-popup-header-actions {
        position: static;
        justify-content: flex-start;
        margin-top: 14px;
        flex-wrap: wrap;
    }

    .message-popup-header-actions .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }

    .message-popup-body {
        padding: 18px;
        border-radius: 18px;
        font-size: 14px;
        line-height: 1.7;
    }

    .message-popup-image {
        max-height: 34vh;
    }

    .message-popup-footer {
        justify-content: stretch;
    }

    .message-popup-footer .btn {
        flex: 1 1 auto;
    }
}


/* =========================================================
   N) SMALL PHONE RESPONSIVE FIXES
   Purpose:
   - Better spacing and smaller text on narrow phones
========================================================= */

@media (max-width: 420px) {
    .message-popup-overlay {
        padding: 8px;
    }

    .message-popup-box {
        max-height: 94vh;
        border-radius: 20px;
    }

    .message-popup-scroll {
        max-height: 94vh;
        padding: 18px 12px 14px;
    }

    .message-popup-title {
        font-size: 17px;
    }

    .message-popup-body {
        padding: 15px;
        font-size: 13.5px;
    }

    .message-popup-attachment {
        padding: 12px;
    }
}

/* =========================================================
   O) MESSAGE POPUP ATTACHMENT FILE BUTTONS
   Open file + Download file
========================================================= */

.message-popup-file-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.message-popup-file-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.message-popup-file-actions .btn .icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.message-popup-file-open {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.message-popup-file-download {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #ffffff;
    border: 1px solid transparent;
    text-decoration: none;
}

.message-popup-file-download:hover {
    filter: brightness(.97);
    transform: translateY(-1px);
}

/* Mobile attachment buttons */
@media (max-width: 520px) {
    .message-popup-file-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .message-popup-file-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   24. EMAIL LOG ACTION BUTTONS
   Buttons used in notification/email logs area.
========================================================= */
.email-logs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.email-logs-actions .btn.secondary {
    padding: 7px 12px;
    min-height: 36px;
    border-radius: 12px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;

    box-shadow: none;
    transition: all .18s ease;
}

.email-logs-actions .btn.secondary:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}


/* =========================================================
   25. TABLET / MOBILE RESPONSIVE
   All layout changes for smaller screens.
========================================================= */
@media (max-width: 960px) {

    /* Layout switches from sidebar + content to off-canvas menu */
    .layout {
        display: block;
    }

    html,
    body {
        overflow-x: hidden;
    }

    .main,
    .container,
    .stack,
    .card,
    .hero,
    .hero .content {
        min-width: 0;
    }

    .container {
        padding: 16px;
    }

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

    .card {
        width: 100%;
    }


    /* Mobile sidebar drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: -290px;

        width: 272px;
        height: 100vh;

        z-index: 2000;

        display: flex;
        flex-direction: column;
        justify-content: flex-start;

        overflow-y: auto;

        padding: 16px 12px 14px;
        border-radius: 0 24px 24px 0;

        transition: left .28s ease;
    }

    body.menu-open .sidebar {
        left: 0;
    }

    body.menu-open::before {
        content: "";
        position: fixed;
        inset: 0;

        background: rgba(15,23,42,.45);
        z-index: 1500;
    }


    /* Mobile brand/logo */
    .brand {
        margin-bottom: 16px;
        gap: 12px;
    }

    .brand img {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    .brand h1 {
        font-size: 17px;
        line-height: 1.15;
    }

    .brand small {
        font-size: 12px;
        line-height: 1.35;
    }


    /* Mobile nav links */
    .nav {
        flex: none !important;
        margin-bottom: 22px;
    }

    .nav a {
        padding: 13px 12px;
        margin: 6px 0;

        gap: 10px;
        border-radius: 12px;

        font-size: 17px;
        line-height: 1.25;
    }

    .nav a.active {
        box-shadow: inset 3px 0 0 #60a5fa;
    }

    .nav a[href="logout.php"] {
        margin-top: 10px;
    }


    /* Mobile online users card */
    .sidebar-live-users {
        margin-top: 12px;
        margin-bottom: 14px;
        padding: 12px 11px;
        border-radius: 13px;
    }

    .sidebar-live-users-title {
        font-size: 11px;
        margin-bottom: 7px;
    }

    .sidebar-live-users-sub {
        font-size: 10px;
        margin-bottom: 7px;
    }

    .sidebar-live-user-main {
        gap: 6px;
        margin-bottom: 5px;
        font-size: 12px;
    }


    /* Mobile sidebar footer */
    .sidebar-footer {
        margin-top: 0;
        padding-top: 12px;

        font-size: 11px;
        line-height: 1.45;
    }

    .sidebar-footer-copy,
    .sidebar-footer-powered {
        font-size: 11px;
    }


    /* Mobile topbar */
    .menu-toggle {
        display: inline-flex;
    }

    .topbar {
        padding: 12px 14px;
        z-index: 1100;
    }

    .topbar .actions {
        gap: 8px;
    }

    .topbar strong {
        font-size: 15px;
        display: block;
        line-height: 1.15;
    }

    .pill {
        padding: 4px 8px;
        font-size: 10px;
    }

    .lang {
        gap: 6px;
    }

    .lang a {
        min-width: 42px;
        padding: 6px 10px;
        border-radius: 10px;
        font-size: 12px;
    }

    .bell-link {
        width: 38px;
        height: 38px;
    }

    .menu-badge {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
    }


    /* Mobile hero */
    .hero {
        padding: 20px;
    }

    .hero h2 {
        font-size: 22px !important;
        line-height: 1.15;
        margin: 10px 0 8px !important;
    }

    .hero .content {
        font-size: 12px;
    }

    .hero .content div {
        max-width: 100% !important;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .hero .badge,
    .hero-badge {
        display: inline-flex;
        align-items: center;

        width: auto !important;
        max-width: max-content;

        white-space: nowrap;

        padding: 5px 12px;
        font-size: 12px;
        border-radius: 999px;
    }


    /* Mobile cards */
    .card-blue,
    .card-red,
    .card-green {
        border-radius: 20px;
    }

    .card-blue .metric,
    .card-red .metric,
    .card-green .metric {
        font-size: clamp(28px, 7vw, 42px);
        line-height: 1.1;
    }

    .card-blue h3,
    .card-red h3,
    .card-green h3 {
        font-size: 15px;
        line-height: 1.3;
    }


    /* Mobile tables become stacked cards */
    .table-wrap {
        overflow: visible;
    }

    .table {
        width: 100%;
        min-width: 100%;

        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .table thead {
        display: none;
    }

    .table tbody {
        display: block;
    }

    .table tbody tr {
        display: block;

        margin: 0 0 12px;
        border-radius: 16px;
        overflow: hidden;

        box-shadow: 0 4px 12px rgba(15,23,42,.05);
    }

    .table tbody tr.activity-income {
        background: #f0fdf4;
    }

    .table tbody tr.activity-expense {
        background: #fef2f2;
    }

    .table tbody tr.activity-income,
    .table tbody tr.activity-expense,
    .table tbody tr.activity-fund,
    .table tbody tr.owner-manager-row,
    .table tbody tr.owner-owner-row {
        border: 1px solid #d9d9d98a;
    }

    .table tbody td {
        display: block;

        width: 100%;
        padding: 10px 12px;

        border: none;

        font-size: 13px;
        line-height: 1.4;

        text-align: left;
        white-space: normal;
    }

    .table tbody td::before {
        display: block;
        content: attr(data-label);

        font-size: 12px;
        font-weight: 700;
        color: #6b7280;

        margin-bottom: 4px;
    }

    .table tbody td + td {
        border-top: 1px solid rgba(148,163,184,.12);
    }

    .table tbody td:nth-child(3) .activity-tag {
        display: inline-flex;
    }

    .table tbody td:nth-child(4) {
        font-weight: 700;
    }


    /* Mobile activity colors applied to td */
    .activity-income,
    .activity-expense {
        background: transparent;
    }

    .activity-income td {
        background: #f0fdf4;
        border-color: #dcfce7;
    }

    .activity-expense td {
        background: #fef2f2;
        border-color: #fee2e2;
    }

    .activity-tag {
        padding: 5px 10px;
        font-size: 12px;
        gap: 6px;
        white-space: nowrap;
    }

    .activity-tag-icon {
        width: 16px;
        height: 16px;
        font-size: 11px;
    }


    /* Mobile report buttons */
    form.report-filter-form {
        grid-template-columns: 1fr;
    }

    .report-load-action {
        justify-content: stretch;
    }

    .report-load-btn {
        width: 100%;
        min-width: 100%;
    }

    .report-actions {
        grid-column: auto;
        margin-top: 2px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .report-actions .btn {
        width: 100%;
        min-width: 100%;
        flex: none;
    }


    /* Mobile charges, expenses, owners */
    .charges-top,
    .expenses-top,
    .owners-top {
        grid-template-columns: 1fr;
    }

    .row-actions {
        justify-content: flex-start;
    }

    .charges-full-table tbody td:last-child .row-actions,
    .expenses-full-table tbody td:last-child .row-actions,
    .messages-table tbody td:last-child .row-actions {
        margin-top: 4px;
    }

    .owners-total-count {
        font-size: 40px;
    }


    /* Mobile notice ticker */
    .notice-ticker-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .notice-ticker-wrap {
        width: 100%;
    }

    .notice-item {
        font-size: 14px;
    }


    /* Mobile messages */
    .messages-compose-card,
    .message-detail-card,
    .messages-list-card {
        border-radius: 20px;
    }

    .message-detail-title {
        font-size: 22px;
    }

    .message-detail-body-wrap {
        padding: 14px;
        border-radius: 16px;
    }

    .message-detail-body {
        font-size: 14px;
        line-height: 1.8;
    }

    .messages-list-head,
    .message-detail-head {
        align-items: flex-start;
    }

    .messages-actions {
        width: 100%;
    }

    .messages-actions .btn.secondary {
        width: 100%;
    }

    .messages-table {
        width: 100%;
        min-width: 100%;

        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .messages-table thead {
        display: none;
    }

    .messages-table tbody {
        display: block;
    }

    .messages-table tbody tr {
        display: block;

        margin: 0 0 12px;
        border-radius: 16px;
        overflow: hidden;

        background: #ffffff;
        border: 1px solid #e5e7eb;
        box-shadow: 0 4px 12px rgba(15,23,42,.05);
    }

    .messages-table tbody td {
        display: block;

        width: 100%;
        padding: 10px 12px;

        border: none;

        font-size: 13px;
        line-height: 1.45;

        text-align: left;
        white-space: normal;
    }

    .messages-table tbody td::before {
        display: block;
        content: attr(data-label);

        font-size: 12px;
        font-weight: 700;
        color: #6b7280;

        margin-bottom: 4px;
    }

    .messages-table tbody td + td {
        border-top: 1px solid rgba(148,163,184,.12);
    }

    .messages-table tbody td:last-child .btn,
    .messages-table tbody td:last-child .row-actions {
        width: 100%;
    }


    /* Mobile email log buttons */
    .email-logs-actions {
        gap: 6px;
    }

    .email-logs-actions .btn.secondary {
        padding: 6px 10px;
        min-height: 32px;
        border-radius: 10px;
        font-size: 12px;
    }


    /* Mobile owner payment card */
    .owner-payment-stats-card {
        padding: 18px;
    }

    .fund-overview-card {
        padding: 18px;
    }

    .fund-overview-head {
        align-items: flex-start;
    }

    .fund-overview-head h3 {
        font-size: 16px;
    }

    .fund-chart-shell {
        min-height: 240px;
    }

    .fund-score-grid {
        grid-template-columns: 1fr;
    }

    .fund-score-card {
        min-height: 172px;
        border-radius: 20px;
    }

    .owner-payment-stats-number {
        font-size: 40px;
    }

    .owner-payment-stats-sub {
        font-size: 12px;
        max-width: 100%;
    }

    .owner-payment-status-top strong {
        font-size: 14px;
    }

    .owner-payment-status-top span {
        font-size: 13px;
    }

    .owner-payment-progress {
        height: 10px;
    }

    .owner-payment-progress-note {
        font-size: 10px;
    }

    .owner-payment-unpaid-title {
        font-size: 12px;
    }

    .owner-payment-unpaid-item {
        font-size: 10px;
    }
}


/* =========================================================
   26. DESKTOP ONLY OVERRIDES
   Keeps sidebar fixed/open on desktop and hides hamburger.
========================================================= */
@media (min-width: 961px) {
    .menu-toggle {
        display: none !important;
    }

    body.menu-open::before {
        display: none;
    }

    .sidebar {
        left: 0 !important;
    }
}

/* =========================================================
   SAFARI ONLY SELECT FIX
   Keeps Chrome/Firefox design untouched
========================================================= */

@supports (-webkit-hyphens: none) and (not (-moz-appearance: none)) {

    select {
        -webkit-appearance: none;
        appearance: none;

        width: 100%;
        height: 48px;
        min-height: 48px;

        padding: 12px 42px 12px 14px;

        border: 1px solid var(--border);
        border-radius: 14px;

        background-color: #ffffff;
        color: var(--text);

        font-family: inherit;
        font-size: 15px;
        font-weight: 400;
        line-height: normal;

        box-shadow: none;

        background-image:
            linear-gradient(45deg, transparent 50%, #64748b 50%),
            linear-gradient(135deg, #64748b 50%, transparent 50%);
        background-position:
            calc(100% - 20px) 50%,
            calc(100% - 14px) 50%;
        background-size:
            6px 6px,
            6px 6px;
        background-repeat: no-repeat;
    }

    select:focus {
        outline: none;
        border-color: #93c5fd;
        box-shadow: 0 0 0 4px rgba(59,130,246,.10);
    }

    input[type="date"],
    input[type="month"],
    input[type="number"] {
        height: 48px;
        min-height: 48px;
        line-height: normal;
    }

    input[type="file"] {
        height: 48px;
        min-height: 48px;
        padding: 10px 14px;
        line-height: normal;
    }
}

/* ===============================
   Receipt Lightbox Preview
================================ */
.receipt-lightbox-overlay{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    background:rgba(15,23,42,.72);
    backdrop-filter:blur(4px);
}

.receipt-lightbox-overlay.is-open{
    display:flex;
}

body.receipt-lightbox-opened{
    overflow:hidden;
}

.receipt-lightbox-box{
    width:min(920px, 96vw);
    height:min(760px, 92vh);
    background:#0f172a;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 24px 80px rgba(0,0,0,.35);
    display:flex;
    flex-direction:column;
}

.receipt-lightbox-head{
    flex:0 0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:12px 14px;
    background:#fff;
    border-bottom:1px solid #e5e7eb;
}

.receipt-lightbox-title{
    font-weight: 700;
    color:#0f172a;
    font-size:15px;
}

.receipt-lightbox-actions{
    display:flex;
    align-items:center;
    gap:8px;
}

.receipt-lightbox-open{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:8px 12px;
    border-radius:10px;
    background:#e0f2fe;
    color:#0369a1;
    font-size:13px;
    font-weight: 700;
    text-decoration:none;
    border:1px solid #7dd3fc;
}

.receipt-lightbox-close{
    width:36px;
    height:36px;
    border:none;
    border-radius:10px;
    background:#fee2e2;
    color:#b91c1c;
    font-size:24px;
    line-height:1;
    font-weight: 700;
    cursor:pointer;
}

.receipt-lightbox-body{
    flex:1 1 auto;
    min-height:0;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:auto;
    background:#0f172a;
    -webkit-overflow-scrolling:touch;
}

.receipt-lightbox-img{
    display:block;
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
    object-fit:contain;
}

.receipt-lightbox-frame{
    width:100%;
    height:100%;
    border:0;
    background:#fff;
}

.receipt-lightbox-download-box{
    background:#fff;
    color:#0f172a;
    padding:22px;
    border-radius:14px;
    text-align:center;
    max-width:420px;
}

.receipt-lightbox-download-box a{
    display:inline-flex;
    margin-top:10px;
    padding:10px 14px;
    background:#2563eb;
    color:#fff;
    border-radius:10px;
    font-weight: 700;
    text-decoration:none;
}

@media (max-width: 768px){
    .receipt-lightbox-overlay{
        padding:8px;
        align-items:center;
    }

    .receipt-lightbox-box{
        width:100%;
        height:92dvh;
        max-height:92dvh;
        border-radius:14px;
    }

    .receipt-lightbox-head{
        padding:10px;
    }

    .receipt-lightbox-title{
        font-size:14px;
    }

    .receipt-lightbox-open{
        min-height:34px;
        padding:7px 10px;
        font-size:12px;
    }

    .receipt-lightbox-close{
        width:34px;
        height:34px;
        font-size:22px;
    }

    .receipt-lightbox-img{
        max-width:100%;
        max-height:100%;
    }
}

@media (max-width: 420px){
    .receipt-lightbox-overlay{
        padding:0;
    }

    .receipt-lightbox-box{
        width:100%;
        height:100dvh;
        max-height:100dvh;
        border-radius:0;
    }

    .receipt-lightbox-head{
        position:sticky;
        top:0;
        z-index:2;
    }
}

/* =========================================================
   DASHBOARD MOBILE COMPACT TABLE CARDS
   Mobile only. Desktop/laptop unchanged.
   Requires dashboard.php wrapper:
   <div class="stack dashboard-page">
========================================================= */
@media (max-width: 960px) {

    .dashboard-page .card {
        padding: 16px;
    }

    .dashboard-page .table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .dashboard-page .table thead {
        display: none;
    }

    .dashboard-page .table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 14px;
        row-gap: 0;
        width: 100%;
        margin: 0 0 10px;
        padding: 14px;
        border-radius: 18px;
        overflow: hidden;
        box-sizing: border-box;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

    .dashboard-page .table tbody tr.activity-income {
        background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
        border: 1px solid #d1fae5;
    }

    .dashboard-page .table tbody tr.activity-expense {
        background: linear-gradient(180deg, #fef2f2, #fff7f7);
        border: 1px solid #fee2e2;
    }

    .dashboard-page .table tbody tr.activity-fund {
        background: linear-gradient(180deg, #f5f3ff, #faf5ff);
        border: 1px solid #e9d5ff;
    }

    .dashboard-page .table tbody tr.pending-approval-row {
        background: linear-gradient(180deg, #fffbeb, #fff7d6);
        border: 1px solid #fde68a;
    }

    .dashboard-page .table tbody td {
        min-width: 0;
        padding: 9px 8px;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box;
        font-size: 12px;
        line-height: 1.35;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .dashboard-page .table tbody td::before {
        display: block;
        content: attr(data-label);
        margin-bottom: 4px;
        color: #64748b;
        font-size: 10.5px;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: .01em;
    }

    .dashboard-page .table tbody td + td {
        border-top: none !important;
    }

    .dashboard-page .card > div:first-child h3,
    .dashboard-page .card h3 {
        font-size: 13px;
        line-height: 1.25;
    }

    .dashboard-page .badge {
        padding: 6px 9px;
        font-size: 11px;
    }

    .dashboard-page .latest-boxes .card {
        padding: 16px;
    }

    .dashboard-page .latest-boxes .card > div:first-child,
    .dashboard-page section.card > div:first-child {
        align-items: flex-start !important;
        gap: 8px;
    }

    .dashboard-page .latest-boxes .card > div:first-child .badge,
    .dashboard-page section.card > div:first-child .badge {
        flex: 0 0 auto;
    }

    /* Tags and buttons */
    .dashboard-page .activity-tag {
        max-width: 100%;
        padding: 6px 10px;
        gap: 5px;
        font-size: 11.5px;
        white-space: nowrap;
    }

    .dashboard-page .activity-tag-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .dashboard-page .message-status-chip {
        padding: 7px 11px;
        font-size: 11px;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    .dashboard-page .table tbody td[data-label="Receipt"] .action-icon,
    .dashboard-page .table tbody td[data-label="Actions"] .action-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .dashboard-page .table tbody td[data-label="Receipt"] .action-icon .icon,
    .dashboard-page .table tbody td[data-label="Actions"] .action-icon .icon {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    /* =====================================================
       GENERAL DASHBOARD MOBILE TABLE LAYOUT
    ===================================================== */

    .dashboard-page .table tbody td[data-label="Date"] {
        grid-column: 1 / 2;
        color: #334155;
        font-weight: 700;
    }

    .dashboard-page .table tbody td[data-label="Details"] {
        grid-column: 1 / -1;
        color: #0f172a;
        font-size: 12px;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    }

    .dashboard-page .table tbody td[data-label="Type"] {
        grid-column: 2 / 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
    }

    .dashboard-page .table tbody td[data-label="Type"]::before {
        display: none !important;
        content: none !important;
        margin: 0 !important;
    }

    .dashboard-page .table tbody td[data-label="Receipt"] {
        grid-column: 1 / 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-page .table tbody td[data-label="Amount"] {
        grid-column: 2 / 3;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        color: #334155;
        font-weight: 700;
        text-align: right;
    }

    .dashboard-page .table tbody td[data-label="Amount"]::before {
        display: none !important;
        content: none !important;
        margin: 0 !important;
    }

    .dashboard-page .table tbody td[data-label="Amount"] .activity-tag {
        width: fit-content;
        margin-left: auto;
    }

    /* =====================================================
       LATEST EXPENSES MOBILE CARD
       Date left, Amount right
    ===================================================== */

    .dashboard-page .latest-boxes .activity-expense td[data-label="Date"] {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
        padding-bottom: 14px !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    }

    .dashboard-page .latest-boxes .activity-expense td[data-label="Amount"] {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding-bottom: 14px !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    }

    .dashboard-page .latest-boxes .activity-expense td[data-label="Details"] {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        border-bottom: none !important;
    }

    /* =====================================================
       RECENT ACTIVITY MOBILE CARD
       Date left, Type tag right
       Amount as tag box
    ===================================================== */

    .dashboard-page section.card:last-of-type .table tbody td[data-label="Date"] {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
        padding-bottom: 14px !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    }

    .dashboard-page section.card:last-of-type .table tbody td[data-label="Type"] {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        padding-bottom: 14px !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    }

    .dashboard-page section.card:last-of-type .table tbody td[data-label="Type"]::before {
        display: none !important;
        content: none !important;
    }

    .dashboard-page section.card:last-of-type .table tbody td[data-label="Details"] {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
        border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    }

    .dashboard-page section.card:last-of-type .table tbody td[data-label="Receipt"] {
        grid-column: 1 / 2 !important;
        grid-row: 3 !important;
        padding-top: 14px !important;
        border-bottom: none !important;
    }

    .dashboard-page section.card:last-of-type .table tbody td[data-label="Amount"] {
        grid-column: 2 / 3 !important;
        grid-row: 3 !important;
        padding-top: 14px !important;
        justify-content: flex-end !important;
        align-items: center !important;
        border-bottom: none !important;
    }

    .dashboard-page section.card:last-of-type .table tbody tr.activity-income td[data-label="Amount"],
    .dashboard-page section.card:last-of-type .table tbody tr.activity-fund td[data-label="Amount"] {
        color: #15803d;
    }

    .dashboard-page section.card:last-of-type .table tbody tr.activity-expense td[data-label="Amount"] {
        color: #b91c1c;
    }

    /* =====================================================
   PENDING FUNDS CARD FINAL MOBILE LAYOUT
   Date + status
   Owner left + Entry Type right
   Month + amount
   Payment Type left + Receipt right
   Actions left alone
===================================================== */

.dashboard-page .table tbody tr.activity-fund {
    grid-template-columns: minmax(96px, .78fr) minmax(0, 1.22fr) !important;
    padding: 14px 14px 12px !important;
}

/* Date left, Status right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Date"] {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    padding-top: 4px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Status"] {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-top: 4px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    text-align: right !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Status"]::before {
    display: none !important;
    content: none !important;
    margin: 0 !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Status"] .message-status-chip {
    width: min(100%, 218px) !important;
    max-width: none !important;
    min-width: 190px !important;
    margin-left: auto !important;
    padding: 10px 14px !important;
    justify-content: center !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* Owner left, Entry Type right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Owner / Source"] {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #0f172a;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Entry Type"] {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #0f172a;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    text-align: left !important;
}

/* Month left, Amount right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Month"] {
    grid-column: 1 / 2 !important;
    grid-row: 3 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Amount"] {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-right: 8px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    text-align: right !important;
    font-size: 12px !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Amount"]::after {
    display: none !important;
    content: none !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Amount"] .activity-tag {
    margin-left: auto !important;
    margin-right: 0 !important;
    white-space: nowrap !important;
}

/* Payment Type left, Receipt right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Payment Type"] {
    grid-column: 1 / 2 !important;
    grid-row: 4 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Receipt"] {
    grid-column: 2 / 3 !important;
    grid-row: 4 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

/* Actions left aligned, alone at bottom */
.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-top: 14px !important;
    padding-right: 8px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    text-align: left !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"]::before {
    align-self: flex-start !important;
    text-align: left !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions {
    display: flex !important;
    width: auto !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions .action-icon:first-child {
    margin-left: 0 !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions .action-icon:last-child {
    margin-right: 0 !important;
}
/* =====================================================
   Remove last separator when Actions column is not available
===================================================== */
@media (max-width: 960px) {

    .dashboard-page .table tbody tr.activity-fund td[data-label="Payment Type"]:nth-last-child(3),
    .dashboard-page .table tbody tr.activity-fund td[data-label="Receipt"]:nth-last-child(2) {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 420px) {

    .dashboard-page .table tbody tr.activity-fund td[data-label="Payment Type"]:nth-last-child(3),
    .dashboard-page .table tbody tr.activity-fund td[data-label="Receipt"]:nth-last-child(2) {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
}

/* =========================================================
   EXTRA COMPACT VIEW FOR SMALL PHONES
========================================================= */
@media (max-width: 420px) {

    .dashboard-page .card {
        padding: 14px;
        border-radius: 18px;
    }

    .dashboard-page .table {
        border-spacing: 0 9px;
    }

    .dashboard-page .table tbody tr {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .dashboard-page .table tbody tr.activity-fund {
        padding: 12px 12px 10px !important;
    }

    .dashboard-page .table tbody td {
        padding: 8px 6px;
        font-size: 11.5px;
    }

    .dashboard-page .table tbody td::before {
        margin-bottom: 3px;
        font-size: 10px;
    }

    .dashboard-page .table tbody td[data-label="Details"] {
        font-size: 11.5px;
    }

    .dashboard-page .activity-tag {
        padding: 5px 8px;
        font-size: 11px;
    }

    .dashboard-page .action-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .dashboard-page .table tbody tr.activity-fund td[data-label="Status"] .message-status-chip {
        min-width: 126px !important;
        max-width: 140px !important;
        padding: 9px 10px !important;
    }

    .dashboard-page .table tbody tr.activity-fund td[data-label="Amount"],
    .dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] {
        padding-right: 6px !important;
    }

    .dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions {
        gap: 7px !important;
    }
    
    /* =====================================================
   PENDING FUNDS CARD FINAL MOBILE LAYOUT
   Date + status
   Owner left + Entry Type right
   Month + amount
   Payment Type left + Receipt right
   Actions left alone
===================================================== */

.dashboard-page .table tbody tr.activity-fund {
    padding: 14px 14px 12px !important;
}

/* Date left, Status right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Date"] {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    padding-top: 4px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Status"] {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-top: 4px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    text-align: right !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Status"]::before {
    display: none !important;
    content: none !important;
    margin: 0 !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Status"] .message-status-chip {
    width: 100%;
    max-width: 150px !important;
    min-width: 132px !important;
    margin-left: auto !important;
    padding: 10px 12px !important;
    justify-content: center !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
}

/* Owner left, Entry Type right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Owner / Source"] {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #0f172a;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Entry Type"] {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #0f172a;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    text-align: left !important;
}

/* Month left, Amount right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Month"] {
    grid-column: 1 / 2 !important;
    grid-row: 3 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Amount"] {
    grid-column: 2 / 3 !important;
    grid-row: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    padding-right: 8px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    text-align: right !important;
    font-size: 12px !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Amount"]::after {
    display: none !important;
    content: none !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Amount"] .activity-tag {
    margin-left: auto !important;
    margin-right: 0 !important;
    white-space: nowrap !important;
}

/* Payment Type left, Receipt right */
.dashboard-page .table tbody tr.activity-fund td[data-label="Payment Type"] {
    grid-column: 1 / 2 !important;
    grid-row: 4 !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Receipt"] {
    grid-column: 2 / 3 !important;
    grid-row: 4 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

/* Actions left aligned, alone at bottom */
.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] {
    grid-column: 1 / -1 !important;
    grid-row: 5 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-top: 14px !important;
    padding-right: 8px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    text-align: left !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"]::before {
    align-self: flex-start !important;
    text-align: left !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions {
    display: flex !important;
    width: auto !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions .action-icon:first-child {
    margin-left: 0 !important;
}

.dashboard-page .table tbody tr.activity-fund td[data-label="Actions"] .row-actions .action-icon:last-child {
    margin-right: 0 !important;
}
}


/* =========================================================
   SERVICE CHARGES MOBILE COMPACT CARD VIEW
   Mobile only. Desktop/laptop unchanged.
   Requires charges.php wrapper:
   <div class="stack charges-page">
========================================================= */
@media (max-width: 960px) {

    .charges-page .card {
        padding: 16px;
    }

    .charges-page .charges-full-table {
        border-spacing: 0 12px;
    }

    .charges-page .charges-full-table thead {
        display: none;
    }

    .charges-page .charges-full-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        margin: 0 0 12px;
        padding: 14px;
        border-radius: 20px;
        overflow: visible;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

    .charges-page .charges-full-table tbody tr.activity-income {
        background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
        border: 1px solid #d1fae5;
    }

    .charges-page .charges-full-table tbody tr.activity-fund {
        background: linear-gradient(180deg, #f5f3ff, #faf5ff);
        border: 1px solid #e9d5ff;
    }

    .charges-page .charges-full-table tbody tr.pending-approval-row {
        grid-template-columns: minmax(96px, .78fr) minmax(0, 1.22fr);
        background: linear-gradient(180deg, #fffbeb, #fff7d6);
        border: 1px solid #fde68a;
    }

    .charges-page .charges-full-table tbody tr.activity-expense {
        background: linear-gradient(180deg, #fef2f2, #fff7f7);
        border: 1px solid #fee2e2;
    }

    .charges-page .charges-full-table tbody td {
        padding: 11px 10px;
        border: none !important;
        background: transparent !important;
        font-size: 12px;
        line-height: 1.35;
        min-width: 0;
    }

    .charges-page .charges-full-table tbody td::before {
        display: block;
        content: attr(data-label);
        font-size: 10.5px;
        line-height: 1.1;
        margin-bottom: 4px;
        color: #64748b;
        font-weight: 700;
        letter-spacing: .01em;
    }

    .charges-page .charges-full-table tbody td + td {
        border-top: none !important;
    }

    /* Month left, Status right */
    .charges-page .charges-full-table tbody td[data-label="Month"] {
        grid-column: 1 / 2;
        grid-row: 1;
        font-weight: 700;
        color: #334155;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
        padding-bottom: 13px;
    }

    .charges-page .charges-full-table tbody td[data-label="Status"] {
        grid-column: 2 / 3;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        text-align: right;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
        padding-bottom: 13px;
    }

    .charges-page .charges-full-table tbody td[data-label="Status"]::before {
        display: none !important;
        content: none !important;
    }

    .charges-page .charges-full-table tbody td[data-label="Status"] .message-status-chip {
        width: min(100%, 218px);
        min-width: 190px;
        max-width: none;
        justify-content: center;
        text-align: center;
        padding: 8px 14px;
        font-size: 11px;
        line-height: 1.15;
        white-space: nowrap;
    }

    /* Type full row */
    .charges-page .charges-full-table tbody td[data-label="Type"] {
        grid-column: 1 / -1;
        grid-row: 2;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
        color: #0f172a;
    }

    /* Source / Owner full row */
    .charges-page .charges-full-table tbody td[data-label="Source / Owner"] {
        grid-column: 1 / -1;
        grid-row: 3;
        font-weight: 700;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
    }

    /* Payment Type full row */
    .charges-page .charges-full-table tbody td[data-label="Payment Type"] {
        grid-column: 1 / -1;
        grid-row: 4;
        font-weight: 700;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
    }

    /* Date left, Amount right */
    .charges-page .charges-full-table tbody td[data-label="Date"] {
        grid-column: 1 / 2;
        grid-row: 5;
        font-weight: 700;
        color: #334155;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .charges-page .charges-full-table tbody td[data-label="Amount"] {
        grid-column: 2 / 3;
        grid-row: 5;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .charges-page .charges-full-table tbody td[data-label="Amount"]::before {
        display: none !important;
        content: none !important;
    }

    .charges-page .charges-full-table tbody td[data-label="Amount"] .activity-tag {
        margin-left: auto;
        white-space: nowrap;
    }

    /* Receipt left, Actions right */
    .charges-page .charges-full-table tbody td[data-label="Receipt"] {
        grid-column: 1 / 2;
        grid-row: 6;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 13px;
        padding-bottom: 13px;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
    }

    .charges-page .charges-full-table tbody td[data-label="Actions"] {
        grid-column: 2 / 3;
        grid-row: 6;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        text-align: right;
        padding-top: 13px;
        padding-bottom: 13px;
        border-bottom: 1px solid rgba(148, 163, 184, .20) !important;
    }

    .charges-page .charges-full-table tbody td[data-label="Actions"]::before {
        align-self: flex-end;
        text-align: right;
    }

    .charges-page .charges-full-table tbody td[data-label="Actions"] .row-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        margin-top: 0;
        width: 100%;
    }

    /* Note full row */
    .charges-page .charges-full-table tbody td[data-label="Note"] {
        grid-column: 1 / -1;
        grid-row: 7;
        color: #0f172a;
        padding-top: 13px;
        padding-bottom: 4px;
        border-bottom: none !important;
    }

    .charges-page .charges-full-table tbody td[data-label="Note"]:empty::after {
        content: "-";
        color: #94a3b8;
    }

    /* Icons */
    .charges-page .charges-full-table tbody td[data-label="Receipt"] .action-icon,
    .charges-page .charges-full-table tbody td[data-label="Actions"] .action-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .charges-page .charges-full-table tbody td[data-label="Receipt"] .action-icon .icon,
    .charges-page .charges-full-table tbody td[data-label="Actions"] .action-icon .icon {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    /* Amount tag */
    .charges-page .charges-full-table .activity-tag {
        padding: 6px 10px;
        font-size: 11.5px;
        gap: 5px;
        max-width: 100%;
    }

    .charges-page .charges-full-table .activity-tag-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    /* Top form buttons mobile spacing */
    .charges-page .btn-load,
    .charges-page .btn-reset {
        min-height: 44px;
    }
}

/* Extra compact view for small phones */
@media (max-width: 420px) {

    .charges-page .card {
        padding: 14px;
        border-radius: 18px;
    }

    .charges-page .charges-full-table {
        border-spacing: 0 10px;
    }

    .charges-page .charges-full-table tbody tr {
        padding: 12px;
        border-radius: 18px;
        grid-template-columns: minmax(96px, .78fr) minmax(0, 1.22fr);
    }

    .charges-page .charges-full-table tbody td {
        padding: 10px 9px;
        font-size: 11.5px;
    }

    .charges-page .charges-full-table tbody td::before {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .charges-page .charges-full-table tbody td[data-label="Status"] .message-status-chip {
        width: min(100%, 210px);
        min-width: 184px;
        padding: 7px 12px;
        font-size: 10.5px;
        white-space: nowrap;
    }

    .charges-page .charges-full-table .activity-tag {
        padding: 5px 8px;
        font-size: 11px;
    }

    .charges-page .charges-full-table .action-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .charges-page .charges-full-table tbody td[data-label="Actions"] .row-actions {
        gap: 7px;
    }
}

/* =========================================================
   EXPENSES MOBILE COMPACT CARD VIEW
   Mobile only. Desktop/laptop unchanged.
   Requires expenses.php wrapper:
   <div class="stack expenses-page">
========================================================= */
@media (max-width: 960px) {

    .expenses-page .card {
        padding: 16px;
    }

    .expenses-page .expenses-mini-table,
    .expenses-page .expenses-full-table {
        border-spacing: 0 12px;
    }

    .expenses-page .expenses-mini-table thead,
    .expenses-page .expenses-full-table thead {
        display: none;
    }

    .expenses-page .expenses-mini-table tbody tr,
    .expenses-page .expenses-full-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0;
        margin: 0 0 12px;
        padding: 14px;
        border-radius: 20px;
        overflow: visible;
        background: linear-gradient(180deg, #fff7f7, #fef2f2);
        border: 1px solid #fecaca;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

    .expenses-page .expenses-mini-table tbody td,
    .expenses-page .expenses-full-table tbody td {
        padding: 11px 10px;
        border: none !important;
        background: transparent !important;
        font-size: 12px;
        line-height: 1.35;
        min-width: 0;
    }

    .expenses-page .expenses-mini-table tbody td::before,
    .expenses-page .expenses-full-table tbody td::before {
        display: block;
        content: attr(data-label);
        font-size: 10.5px;
        line-height: 1.1;
        margin-bottom: 4px;
        color: #64748b;
        font-weight: 700;
        letter-spacing: .01em;
    }

    .expenses-page .expenses-mini-table tbody td + td,
    .expenses-page .expenses-full-table tbody td + td {
        border-top: none !important;
    }

    /* Date left, Amount right */
    .expenses-page .expenses-mini-table tbody td[data-label="Date"],
    .expenses-page .expenses-full-table tbody td[data-label="Date"] {
        grid-column: 1 / 2;
        grid-row: 1;
        font-weight: 700;
        color: #334155;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    .expenses-page .expenses-mini-table tbody td[data-label="Amount"],
    .expenses-page .expenses-full-table tbody td[data-label="Amount"] {
        grid-column: 2 / 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    .expenses-page .expenses-mini-table tbody td[data-label="Amount"]::before,
    .expenses-page .expenses-full-table tbody td[data-label="Amount"]::before {
        display: none !important;
        content: none !important;
        margin: 0 !important;
    }

    .expenses-page .expenses-mini-table tbody td[data-label="Amount"] .activity-tag,
    .expenses-page .expenses-full-table tbody td[data-label="Amount"] .activity-tag {
        margin-left: auto;
        white-space: nowrap;
    }

    /* Mini table: title is last row, no bottom line */
    .expenses-page .expenses-mini-table tbody td[data-label="Title"] {
        grid-column: 1 / -1;
        grid-row: 2;
        color: #0f172a;
        border-bottom: none !important;
        padding-bottom: 4px;
    }

    /* Full listing rows */
    .expenses-page .expenses-full-table tbody td[data-label="Title"] {
        grid-column: 1 / -1;
        grid-row: 2;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Category"] {
        grid-column: 1 / -1;
        grid-row: 3;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    /* Receipt left, Actions right - above note */
    .expenses-page .expenses-full-table tbody td[data-label="Receipt"] {
        grid-column: 1 / 2;
        grid-row: 4;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 13px;
        padding-bottom: 13px;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Actions"] {
        grid-column: 2 / 3;
        grid-row: 4;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        text-align: right;
        padding-top: 13px;
        padding-bottom: 13px;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Actions"]::before {
        align-self: flex-end;
        text-align: right;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Actions"] .row-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        margin-top: 0;
        width: max-content;
        margin-left: auto;
    }

    /* Note at the end, no ending line */
    .expenses-page .expenses-full-table tbody td[data-label="Note"] {
        grid-column: 1 / -1;
        grid-row: 5;
        color: #0f172a;
        border-bottom: none !important;
        padding-bottom: 4px;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Note"]:empty::after {
        content: "-";
        color: #94a3b8;
    }

    /* Receipt + action icon sizes */
    .expenses-page .expenses-full-table tbody td[data-label="Receipt"] .action-icon,
    .expenses-page .expenses-full-table tbody td[data-label="Actions"] .action-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Receipt"] .action-icon .icon,
    .expenses-page .expenses-full-table tbody td[data-label="Actions"] .action-icon .icon {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    /* Amount tag compact */
    .expenses-page .activity-tag {
        padding: 6px 10px;
        font-size: 11.5px;
        gap: 5px;
        max-width: 100%;
    }

    .expenses-page .activity-tag-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .expenses-page .card > div:first-child h3,
    .expenses-page .card h3 {
        font-size: 13px;
        line-height: 1.25;
    }

    .expenses-page .card > div:first-child {
        align-items: flex-start !important;
        gap: 8px;
    }

    .expenses-page .card > div:first-child .badge {
        flex: 0 0 auto;
        padding: 6px 9px;
        font-size: 11px;
    }
}

/* Extra compact view for small phones */
@media (max-width: 420px) {

    .expenses-page .card {
        padding: 14px;
        border-radius: 18px;
    }

    .expenses-page .expenses-mini-table,
    .expenses-page .expenses-full-table {
        border-spacing: 0 10px;
    }

    .expenses-page .expenses-mini-table tbody tr,
    .expenses-page .expenses-full-table tbody tr {
        padding: 12px;
        border-radius: 18px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .expenses-page .expenses-mini-table tbody td,
    .expenses-page .expenses-full-table tbody td {
        padding: 10px 9px;
        font-size: 11.5px;
    }

    .expenses-page .expenses-mini-table tbody td::before,
    .expenses-page .expenses-full-table tbody td::before {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .expenses-page .activity-tag {
        padding: 5px 8px;
        font-size: 11px;
    }

    .expenses-page .action-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .expenses-page .expenses-full-table tbody td[data-label="Actions"] .row-actions {
        gap: 7px;
    }
}
/* =========================================================
   REPORTS MOBILE COMPACT CARD VIEW
   Mobile only. Desktop/laptop unchanged.
   Requires reports.php wrapper:
   <div class="stack reports-page">
========================================================= */
@media (max-width: 960px) {

    .reports-page .card {
        padding: 16px;
    }

    .reports-page .report-table {
        border-spacing: 0 12px;
    }

    .reports-page .report-table thead {
        display: none;
    }

    .reports-page .report-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0;
        margin: 0 0 12px;
        padding: 14px;
        border-radius: 20px;
        overflow: visible;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    }

    .reports-page .report-table tbody tr.activity-income {
        background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
        border: 1px solid #d1fae5;
    }

    .reports-page .report-table tbody tr.activity-fund {
        background: linear-gradient(180deg, #f5f3ff, #faf5ff);
        border: 1px solid #e9d5ff;
    }

    .reports-page .report-table tbody tr.activity-expense {
        background: linear-gradient(180deg, #fff7f7, #fef2f2);
        border: 1px solid #fecaca;
    }

    .reports-page .report-table tbody td {
        padding: 11px 10px;
        border: none !important;
        background: transparent !important;
        font-size: 12px;
        line-height: 1.35;
        min-width: 0;
    }

    .reports-page .report-table tbody td::before {
        display: block;
        content: attr(data-label);
        font-size: 10.5px;
        line-height: 1.1;
        margin-bottom: 4px;
        color: #64748b;
        font-weight: 700;
        letter-spacing: .01em;
    }

    .reports-page .report-table tbody td + td {
        border-top: none !important;
    }

    /* Month left, Amount right for Funds / Collections */
    .reports-page .report-table tbody td[data-label="Month"] {
        grid-column: 1 / 2;
        grid-row: 1;
        font-weight: 700;
        color: #334155;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    .reports-page .report-table tbody td[data-label="Amount"] {
        grid-column: 2 / 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        text-align: right;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    .reports-page .report-table tbody td[data-label="Amount"]::before {
        display: none !important;
        content: none !important;
        margin: 0 !important;
    }

    .reports-page .report-table tbody td[data-label="Amount"] .activity-tag {
        margin-left: auto;
        white-space: nowrap;
    }

    /* Date left, Amount right for Expenses */
    .reports-page .report-table tbody td[data-label="Date"] {
        grid-column: 1 / 2;
        grid-row: 1;
        font-weight: 700;
        color: #334155;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    /* Funds / Collections structure */
    .reports-page .report-table tbody td[data-label="Type"] {
        grid-column: 1 / -1;
        grid-row: 2;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .reports-page .report-table tbody td[data-label="Source / Owner"] {
        grid-column: 1 / -1;
        grid-row: 3;
        color: #0f172a;
        font-weight: 700;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    /* Payment Type left, Receipt right */
    .reports-page .report-table tbody td[data-label="Payment Type"] {
        grid-column: 1 / 2;
        grid-row: 4;
        color: #0f172a;
        font-weight: 700;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    .reports-page .report-table tbody td[data-label="Receipt"] {
        grid-column: 2 / 3;
        grid-row: 4;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        text-align: right;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px;
    }

    .reports-page .report-table tbody td[data-label="Receipt"]::before {
        align-self: flex-end;
        text-align: right;
    }

    /* Collection Date row after Payment Type / Receipt */
    .reports-page .report-table tbody td[data-label="Date"]:not(:first-child) {
        grid-column: 1 / -1;
        grid-row: 5;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .reports-page .report-table tbody td[data-label="Note"] {
        grid-column: 1 / -1;
        grid-row: 6;
        color: #0f172a;
        border-bottom: none !important;
        padding-bottom: 4px;
    }

    .reports-page .report-table tbody td[data-label="Note"]:empty::after {
        content: "-";
        color: #94a3b8;
    }

    /* Expenses report table structure */
    .reports-page .report-table tbody td[data-label="Title"] {
        grid-column: 1 / -1;
        grid-row: 2;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .reports-page .report-table tbody td[data-label="Category"] {
        grid-column: 1 / -1;
        grid-row: 3;
        color: #0f172a;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
    }

    .reports-page .report-table tbody tr.activity-expense td[data-label="Receipt"] {
        grid-column: 1 / 2;
        grid-row: 4;
        align-items: flex-start;
        text-align: left;
    }

    .reports-page .report-table tbody tr.activity-expense td[data-label="Receipt"]::before {
        align-self: flex-start;
        text-align: left;
    }

    .reports-page .report-table tbody tr.activity-expense td[data-label="Note"] {
        grid-column: 1 / -1;
        grid-row: 5;
        border-bottom: none !important;
    }

    /* Compact receipt icons */
    .reports-page .report-table tbody td[data-label="Receipt"] .action-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .reports-page .report-table tbody td[data-label="Receipt"] .action-icon .icon {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    /* Compact amount tags */
    .reports-page .activity-tag {
        padding: 6px 10px;
        font-size: 11.5px;
        gap: 5px;
        max-width: 100%;
    }

    .reports-page .activity-tag-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .reports-page .card h3 {
        font-size: 13px;
        line-height: 1.25;
    }
}

/* =========================================================
   REPORTS MOBILE - EXPENSE RECEIPT FULL LINE FIX
   Mobile only
========================================================= */
@media (max-width: 960px) {

    .reports-page .report-table tbody tr.activity-expense td[data-label="Receipt"] {
        grid-column: 1 / -1 !important;
        grid-row: 4 !important;
        align-items: flex-start !important;
        text-align: left !important;
        border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
        padding-bottom: 13px !important;
    }

    .reports-page .report-table tbody tr.activity-expense td[data-label="Receipt"]::before {
        align-self: flex-start !important;
        text-align: left !important;
    }

    .reports-page .report-table tbody tr.activity-expense td[data-label="Note"] {
        grid-column: 1 / -1 !important;
        grid-row: 5 !important;
        border-bottom: none !important;
        padding-bottom: 4px !important;
    }
}

/* Extra compact view for small phones */
@media (max-width: 420px) {

    .reports-page .card {
        padding: 14px;
        border-radius: 18px;
    }

    .reports-page .report-table {
        border-spacing: 0 10px;
    }

    .reports-page .report-table tbody tr {
        padding: 12px;
        border-radius: 18px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .reports-page .report-table tbody td {
        padding: 10px 9px;
        font-size: 11.5px;
    }

    .reports-page .report-table tbody td::before {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .reports-page .activity-tag {
        padding: 5px 8px;
        font-size: 11px;
    }

    .reports-page .action-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }
}

/* =========================================================
   MOBILE PENDING CARDS - LEFT ALIGN AMOUNT BADGE
   Mobile only. Desktop/laptop unchanged.
========================================================= */
@media (max-width: 960px) {

    .dashboard-page .table tbody tr.activity-fund td[data-label="Amount"],
    .dashboard-page .table tbody tr.pending-approval-row td[data-label="Amount"],
    .charges-page .charges-full-table tbody tr.pending-approval-row td[data-label="Amount"] {
        justify-content: flex-start !important;
        text-align: left !important;
        padding-left: 8px !important;
        padding-right: 0 !important;
    }

    .dashboard-page .table tbody tr.activity-fund td[data-label="Amount"] .activity-tag,
    .dashboard-page .table tbody tr.pending-approval-row td[data-label="Amount"] .activity-tag,
    .charges-page .charges-full-table tbody tr.pending-approval-row td[data-label="Amount"] .activity-tag {
        margin-left: 0 !important;
        margin-right: auto !important;
    }
}
