/* ==========================================================================
   GLOBAL STYLES — Main application stylesheet
   Expense management system UI. Defines the complete visual language:
   custom properties, layout grid, sidebar navigation, header, cards,
   tables, buttons, forms, modals, and responsive behavior.
   ========================================================================== */

:root {
/* ==========================================================================
   CSS CUSTOM PROPERTIES — Design tokens
   Controls colors, spacing, typography, and shadow scales used throughout.
   ========================================================================== */

     /* --- Core brand colors --- */
     --primary: #465fff;
    --primary-dark: #3749e0;
    --primary-light: #6b82f5;
    --primary-bg: #eef2ff;
     /* --- Layout dimensions --- */
     --sidebar-width: 260px;
     --header-height: 72px;

     /* --- Base UI colors and text --- */
     --bg-body: #f0f2f5;
     --bg-card: #ffffff;
     --border: #e8ecf1;
     --text-primary: #1e293b;
     --text-secondary: #64748b;
     --text-muted: #94a3b8;
     /* --- Semantic status colors (foreground + background pairs) --- */
     --success: #10b981;
     --success-bg: #ecfdf5;
     --danger: #ef4444;
     --danger-bg: #fef2f2;
     --warning: #f59e0b;
     --warning-bg: #fffbeb;
     --info: #3b82f6;
     --info-bg: #eff6ff;
     /* --- Extended color palette for banners and badges --- */
     --purple: #8b5cf6;
     --purple-bg: #f5f3ff;
    --cyan: #06b6d4;
    --cyan-bg: #ecfeff;
    --teal: #14b8a6;
    --teal-bg: #f0fdfa;
    --rose: #f43f5e;
    --rose-bg: #fff1f2;
    --pink: #ec4899;
    --pink-bg: #fdf2f8;
    --amber: #f59e0b;
    --amber-bg: #fffbeb;
    --emerald: #10b981;
    --emerald-bg: #ecfdf5;
    --indigo: #6366f1;
    --indigo-bg: #eef2ff;
    --slate: #64748b;
    --slate-bg: #f8fafc;
    --violet: #8b5cf6;
    --violet-bg: #f5f3ff;
     /* --- Border radius and elevation shadows --- */
     --radius: 12px;
     --radius-lg: 16px;
     --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
     --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);
}

/* ==========================================================================
   BASE RESET — Normalize browser defaults
   Universal box-sizing, zero margins/padding, base font stack.
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
.full-width{
	width:100% !important;
}
/* ==========================================================================
   SIDEBAR — Left navigation panel
   Contains: brand logo, navigation menu, user info section.
   Visible on all authenticated pages. Fixed position on desktop, off-canvas on mobile.
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    /* Deep indigo-to-purple gradient background */
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    border-right: none;
    position: fixed;
    top: 0;
    left: 0;
    /* z-index 100: above header (50) and modals (1050 not applicable here) to layer over content */
    z-index: 100;
    overflow-y: scroll;
    scrollbar-width: none;
    padding: 24px 16px;
    transition: transform 0.3s;
    color: #c7d2fe;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 8px;
}
.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    /* Blue-to-purple gradient for the brand icon badge */
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(129,140,248,0.4);
}
.sidebar-brand h4 { font-size: 18px; font-weight: 700; color: #fff; }
.sidebar-brand .close-sidebar { cursor: pointer; color: rgba(255,255,255,0.5); font-size: 18px; margin-left: auto; }
.sidebar-brand .close-sidebar:hover { color: #fff; }

.sidebar-menu-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 16px 12px 8px;
    letter-spacing: 0.5px;
}

.sidebar-nav { list-style: none; padding: 0; }
.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: rgba(199,210,254,0.7);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.15s;
    margin-bottom: 2px;
    gap: 12px;
}
.sidebar-nav li a i { width: 20px; font-size: 18px; text-align: center; opacity: 0.6; }
.sidebar-nav li a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.sidebar-nav li a:hover i { opacity: 1; }
/* Active nav item: gradient highlight with left-edge indicator bar */
.sidebar-nav li a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(129,140,248,0.3), rgba(167,139,250,0.3));
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99,102,241,0.2);
    position: relative;
}
/* Left-side indicator bar: thin gradient stripe positioned absolutely on the active item */
.sidebar-nav li a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: linear-gradient(180deg, #818cf8, #a78bfa);
    border-radius: 0 3px 3px 0;
}
.sidebar-nav li a.active i { opacity: 1; }

.sidebar-user {
    padding: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: rgba(199,210,254,0.7);
}
.sidebar-user a { color: rgba(199,210,254,0.7); }
.sidebar-user a:hover { color: #fff; }

/* ==========================================================================
   MAIN CONTENT — Primary content area
   Offset by sidebar width on desktop. Takes remaining viewport space.
   ========================================================================== */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; min-width: 0; flex: 1; }

/* ==========================================================================
   HEADER / NAVBAR — Top navigation bar
   Sticky bar with breadcrumbs, profile button, and sign-out.
   Fixed to top of content area. Hamburger menu visible on mobile.
   ========================================================================== */
.header-navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    /* z-index 50: below sidebar (100), above page content */
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-left .breadcrumb { margin: 0; background: none; padding: 0; font-size: 13px; }
.header-left .breadcrumb-item a { color: var(--text-muted); }
.header-left .breadcrumb-item.active { color: var(--text-primary); font-weight: 600; }
.header-left .breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

.header-right { display: flex; align-items: center; gap: 16px; }
.btn-signout {
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-signout:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn-profile {
    color: var(--primary);
    border: 1px solid #c7d2fe;
    background: var(--primary-bg);
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-profile:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.header-menu-btn { display: none; background: none; border: none; font-size: 20px; color: var(--text-secondary); cursor: pointer; }

/* ==========================================================================
   CONTENT WRAPPER — Page body container
   Padded area below the header. Holds all page content.
   ========================================================================== */
.content-wrapper { padding: 20px; background: var(--bg-body); min-height: calc(100vh - var(--header-height)); }

/* ==========================================================================
   PAGE TITLE — Page heading row
   Flex row with page name and action buttons. Responsive text scaling.
   ========================================================================== */
.page-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-title { color: var(--text-primary); font-weight: 700; font-size: clamp(18px, 2.4vw, 24px); }

/* ==========================================================================
   PAGE HEADER BANNERS — Gradient hero sections
   Colorful banners at the top of each page. Include icon, title,
   subtitle, and action buttons (Add, CSV, Print). Decorative circles.
   ========================================================================== */
.page-header-banner {
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #fff;
}
/* Decorative circle: large semi-transparent ring in top-right corner */
.page-header-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
/* Decorative circle: smaller circle in bottom-right for depth effect */
.page-header-banner::after {
    content: '';
    position: absolute;
    bottom: -60%;
    right: 5%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.page-header-left { display: flex; align-items: center; gap: 18px; z-index: 1; }
.page-header-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.25s;
}
/* Icon subtle scale-up on banner hover */
.page-header-banner:hover .page-header-icon { transform: scale(1.05); }
.page-header-text h3 { font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.page-header-text p { font-size: 13px; opacity: 0.85; margin: 4px 0 0; }
.page-header-right { display: flex; gap: 10px; z-index: 1; }
/* Banner action buttons: glassmorphism style with backdrop blur */
.page-header-banner .btn-page-add {
    background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.3);
    padding: 9px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
    backdrop-filter: blur(4px); cursor: pointer;
}
.page-header-banner .btn-page-add:hover { background: rgba(255,255,255,0.35); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.page-header-banner .btn-page-csv {
    background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25);
    padding: 9px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
    backdrop-filter: blur(4px); cursor: pointer;
}
.page-header-banner .btn-page-csv:hover { background: rgba(255,255,255,0.3); transform: translateY(-1px); }
.page-header-banner .btn-page-print {
    background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25);
    padding: 9px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
    backdrop-filter: blur(4px); cursor: pointer;
}
.page-header-banner .btn-page-print:hover { background: rgba(255,255,255,0.3); transform: translateY(-1px); }

/* ==========================================================================
   BANNER COLOR THEMES — Gradient presets for page headers
   Each class sets a specific gradient + matching box-shadow.
   Applied alongside .page-header-banner for per-page theming.
   ========================================================================== */
.banner-green { background: linear-gradient(135deg, #059669, #10b981, #34d399); box-shadow: 0 8px 32px rgba(16,185,129,0.3); }
.banner-red { background: linear-gradient(135deg, #dc2626, #ef4444, #f87171); box-shadow: 0 8px 32px rgba(239,68,68,0.3); }
.banner-orange { background: linear-gradient(135deg, #d97706, #f59e0b, #fbbf24); box-shadow: 0 8px 32px rgba(245,158,11,0.3); }
.banner-blue { background: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa); box-shadow: 0 8px 32px rgba(59,130,246,0.3); }
.banner-teal { background: linear-gradient(135deg, #0d9488, #14b8a6, #2dd4bf); box-shadow: 0 8px 32px rgba(20,184,166,0.3); }
.banner-purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6, #a78bfa); box-shadow: 0 8px 32px rgba(139,92,246,0.3); }
.banner-pink { background: linear-gradient(135deg, #db2777, #ec4899, #f472b6); box-shadow: 0 8px 32px rgba(236,72,153,0.3); }
.banner-amber { background: linear-gradient(135deg, #d97706, #f59e0b, #fbbf24); box-shadow: 0 8px 32px rgba(245,158,11,0.3); }
.banner-indigo { background: linear-gradient(135deg, #4f46e5, #6366f1, #818cf8); box-shadow: 0 8px 32px rgba(99,102,241,0.3); }
.banner-slate { background: linear-gradient(135deg, #475569, #64748b, #94a3b8); box-shadow: 0 8px 32px rgba(100,116,139,0.3); }
.banner-violet { background: linear-gradient(135deg, #7c3aed, #8b5cf6, #a78bfa); box-shadow: 0 8px 32px rgba(139,92,246,0.3); }
.banner-cyan { background: linear-gradient(135deg, #0891b2, #06b6d4, #22d3ee); box-shadow: 0 8px 32px rgba(6,182,212,0.3); }
.banner-rose { background: linear-gradient(135deg, #e11d48, #f43f5e, #fb7185); box-shadow: 0 8px 32px rgba(244,63,94,0.3); }
.banner-gradient { background: linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7); box-shadow: 0 8px 32px rgba(99,102,241,0.3); }

@media (max-width: 768px) {
    .page-header-banner { padding: 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
    .page-header-icon { width: 44px; height: 44px; font-size: 20px; }
    .page-header-text h3 { font-size: 18px; }
    .page-header-right { width: 100%; }
    .page-header-banner .btn-page-add,
    .page-header-banner .btn-page-csv,
    .page-header-banner .btn-page-print { flex: 1; justify-content: center; }
}

/* ==========================================================================
   CARDS — Content containers
   Card-custom: general-purpose card with hover elevation effect and
   gradient top border. Used for data containers throughout the app.
   ========================================================================== */
.card-custom {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s;
    position: relative;
}
/* Gradient top border: visible on hover, fades in via opacity transition */
.card-custom::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--purple), var(--cyan));
    opacity: 0;
    transition: opacity 0.25s;
}
/* Hover elevation: card lifts and shows gradient top border */
.card-custom:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-custom:hover::before { opacity: 1; }
.card-custom .card-header {
    background: linear-gradient(135deg, #fafafe, #f8fafc);
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    font-size: clamp(15px, 1.4vw, 18px);
}
/* Gradient underline beneath card header: fades to transparent right */
.card-custom .card-header::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--purple), transparent);
}
.card-custom .card-header h5 { font-size: clamp(15px, 1.4vw, 18px); margin: 0; }
.card-custom .card-body { padding: 24px; }

/* ==========================================================================
   TABLES — Data tables
   Striped rows, gradient headers, responsive padding.
   Used with DataTables plugin for paginated lists.
   ========================================================================== */
.table-custom { margin: 0; border-collapse: collapse; width: 100%; }
/* Table header: subtle gradient background with primary-colored text */
.table-custom thead th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 2px solid var(--primary-bg);
    font-size: clamp(11px, 1vw, 13px);
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    padding: 14px 16px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.table-custom tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: clamp(12px, 1.1vw, 14px);
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
}
.table-custom tbody tr:last-child td { border-bottom: none; }
.table-custom tbody tr:nth-child(even) { background: #fafbfd; }
.table-custom tbody tr { transition: background 0.15s; }
.table-custom tbody tr:hover { background: #f0f4ff; }

/* ==========================================================================
   BUTTONS — Action buttons
   btn-add: primary gradient "add new" button.
   btn-view / btn-edit / btn-delete: small action buttons in table rows.
   btn-report / btn-update-payment: action variants.
   btn-csv / btn-print: export action buttons.
   ========================================================================== */
/* Primary "add" button: blue gradient with elevated shadow */
.btn-add {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(70,95,255,0.3);
}
/* Add button hover: darker gradient with increased shadow and lift */
.btn-add:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(70,95,255,0.4); }

.btn-view { background: var(--info-bg); color: var(--info); border: 1px solid #bfdbfe; padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: all 0.15s; }
.btn-edit { background: var(--warning-bg); color: #b45309; border: 1px solid #fde68a; padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: all 0.15s; }
.btn-delete { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: all 0.15s; }
.btn-report { background: var(--info-bg); color: var(--info); border: 1px solid #bfdbfe; padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: all 0.15s; }
.btn-update-payment { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; transition: all 0.15s; }
.btn-view:hover { background: var(--info); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-edit:hover { background: var(--warning); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(245,158,11,0.3); }
.btn-delete:hover { background: var(--danger); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(239,68,68,0.3); }
.btn-report:hover { background: var(--info); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59,130,246,0.3); }
.btn-update-payment:hover { background: var(--success); color: #fff; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(16,185,129,0.3); }

.btn-csv { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.btn-csv:hover { background: var(--success); color: #fff; }
.btn-print { background: var(--warning-bg); color: #b45309; border: 1px solid #fde68a; padding: 8px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.btn-print:hover { background: var(--warning); color: #fff; }

/* ==========================================================================
   TOTAL / STAT CARDS — Dashboard summary widgets
   total-card: horizontal card with icon, label, and amount. Color-coded
   left border for income/expense/balance.
   ========================================================================== */
.total-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: clamp(18px, 2vw, 22px) clamp(20px, 2vw, 26px);
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    width: 100%;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
/* Left accent bar: color-coded vertical stripe set per variant below */
.total-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 4px 0 0 4px;
}
/* Left accent bar color variants: gradient stripes per card type */
.total-card.total-green::before { background: linear-gradient(180deg, #10b981, #34d399); }
.total-card.total-red::before { background: linear-gradient(180deg, #ef4444, #f87171); }
.total-card.total-blue::before { background: linear-gradient(180deg, #3b82f6, #60a5fa); }
.total-card.total-purple::before { background: linear-gradient(180deg, #8b5cf6, #a78bfa); }
.total-card.total-orange::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
.total-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-circle {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* Stat circle icon badge color variants */
.stat-circle-red { background: linear-gradient(135deg, #ef4444, #f87171); }
.stat-circle-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.stat-circle-green { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-circle-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.stat-text { min-width: 0; }
.stat-label { font-size: clamp(11px, 1vw, 13px); color: var(--text-muted); font-weight: 500; display: block; margin-bottom: 2px; }
.stat-amount { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: var(--text-primary); margin: 0; }
.total-card .icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}
.total-card .amount { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; color: var(--text-primary); }
.total-card .label { font-size: clamp(11px, 1vw, 13px); color: var(--text-muted); margin-bottom: 4px; }

/* ==========================================================================
   STAT MINI CARDS — Dashboard top-row KPI cards
   Compact card with icon, value, label, and optional trend indicator.
   Decorative radial gradient on hover.
   ========================================================================== */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: clamp(18px, 2vw, 22px) clamp(18px, 2vw, 24px);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
/* Decorative radial gradient: subtle accent circle in top-right, fades in on hover */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,70,229,0.06) 0%, transparent 70%);
    transform: translate(30%, -30%);
    transition: opacity 0.25s;
    opacity: 0;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.stat-card:hover::before { opacity: 1; }
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 16px;
    color: #fff;
}
/* Stat card icon color variants: each uses a two-stop gradient */
.stat-card .stat-icon.icon-green { background: linear-gradient(135deg, #10b981, #34d399); }
.stat-card .stat-icon.icon-red { background: linear-gradient(135deg, #ef4444, #f87171); }
.stat-card .stat-icon.icon-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.stat-card .stat-icon.icon-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.stat-card .stat-icon.icon-orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.stat-card .stat-icon.icon-teal { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.stat-card .stat-value { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.stat-card .stat-label { font-size: clamp(11px, 1vw, 13px); color: var(--text-muted); }
.stat-card .stat-change { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; }
/* Trend indicators: up (green) / down (red) pill badges */
.stat-change.up { color: var(--success); background: var(--success-bg); }
.stat-change.down { color: var(--danger); background: var(--danger-bg); }

/* ==========================================================================
   FILTER BAR — Search and filter controls
   Horizontal bar above data tables. Contains dropdowns, date pickers,
   and search input. Gradient top accent line.
   ========================================================================== */
.filter-bar {
    background: linear-gradient(135deg, #fafafe, #f0eef5);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid #e8e7f0;
    position: relative;
}
/* Gradient accent line: colored bar across the top edge of the filter bar */
.filter-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--purple), var(--indigo));
    border-radius: var(--radius) var(--radius) 0 0;
}
.filter-bar .form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

/* ==========================================================================
   STAT COLORS — Text color helpers
   Applied to amount values to indicate positive/negative trends.
   ========================================================================== */
.stat-positive { color: var(--success); font-weight: 600; }
.stat-negative { color: var(--danger); font-weight: 600; }

/* ==========================================================================
   MODALS — Bootstrap modal overrides
   Rounded corners, gradient header, consistent padding.
   btn-save / btn-cancel: primary and secondary footer actions.
   ========================================================================== */
/* Modal drop shadow: elevated layered shadow for overlay appearance */
.modal-content { border-radius: var(--radius-lg); border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
/* Modal header: subtle gradient background for visual distinction */
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 24px; background: linear-gradient(135deg, #fafafe, #f8fafc); }
.modal-title { font-weight: 600; font-size: 16px; color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border); padding: 16px 24px; }
/* Save button: primary gradient with elevated shadow */
.btn-save { background: linear-gradient(135deg, var(--primary), #818cf8); color: #fff; border: none; padding: 9px 28px; border-radius: 10px; font-weight: 500; font-size: 14px; box-shadow: 0 2px 8px rgba(70,95,255,0.3); transition: all 0.15s; }
.btn-save:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; box-shadow: 0 4px 12px rgba(70,95,255,0.4); transform: translateY(-1px); }
.btn-cancel { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); padding: 9px 28px; border-radius: 10px; font-weight: 500; font-size: 14px; transition: all 0.15s; }
.btn-cancel:hover { background: #f8fafc; border-color: #d1d5db; }

/* ==========================================================================
   FORMS — Form controls and labels
   Styled text inputs, selects with custom chevron, focus ring.
   ========================================================================== */
.form-label { font-weight: 500; color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}
/* Custom dropdown chevron: inline SVG arrow replacing native select indicator */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
}
/* Focus ring: primary-colored glow on active form controls */
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(70,95,255,0.1); }

/* ==========================================================================
   SEARCH BOX — Inline search input
   Compact search bar used above tables for quick filtering.
   ========================================================================== */
.search-box { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.search-box .form-control { border-radius: 10px; }

/* ==========================================================================
   DATATABLES — jQuery DataTables plugin overrides
   Pagination buttons, info text, length selector, filter input.
   ========================================================================== */
.dataTables_wrapper .dataTables_paginate { padding-top: 16px; }
/* DataTables pagination: styled page buttons with active/hover states */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 14px;
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_info { font-size: 13px; color: var(--text-muted); padding-top: 12px; }
.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    font-size: 13px;
}

/* ==========================================================================
   BADGES — Status labels
   Color-coded badges for payment status, categories, etc.
   ========================================================================== */
/* Badge color variants: light backgrounds with matching text and border */
.badge { font-weight: 500; font-size: 12px; padding: 4px 10px; border-radius: 6px; }
.badge.bg-success { background: var(--success-bg) !important; color: var(--success) !important; border: 1px solid #a7f3d0; }
.badge.bg-danger { background: var(--danger-bg) !important; color: var(--danger) !important; border: 1px solid #fecaca; }
.badge.bg-warning { background: var(--warning-bg) !important; color: #b45309 !important; border: 1px solid #fde68a; }
.badge.bg-info { background: var(--info-bg) !important; color: var(--info) !important; border: 1px solid #bfdbfe; }
.badge.bg-primary { background: var(--primary-bg) !important; color: var(--primary) !important; border: 1px solid #c7d2fe; }
.badge.bg-purple { background: var(--purple-bg) !important; color: var(--purple) !important; border: 1px solid #ddd6fe; }

/* ==========================================================================
   VIEW MODAL — Expense/income detail popup
   Rich detail view with amount bar, info grid, notes, and actions.
   Includes header, body, footer, and installment sub-section.
   ========================================================================== */
/* View modal: elevated drop shadow for overlay prominence */
.view-modal-content { border-radius: 16px; overflow: hidden; border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.view-modal-header { display: flex; align-items: flex-start; gap: 14px; padding: 24px 24px 0; position: relative; }
/* View modal icon: indigo gradient badge */
.view-modal-icon { width: 48px; height: 48px; background: linear-gradient(135deg, #6366f1, #818cf8); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; flex-shrink: 0; }
/* View modal badge: light purple label for category/status */
.view-modal-badge { display: inline-block; background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #6d28d9; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.5px; }
.view-modal-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 0; }
.view-modal-subtitle { font-size: 13px; color: var(--text-muted); }
.view-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 18px; color: var(--text-muted); cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.view-modal-close:hover { background: #f3f4f6; color: var(--text-primary); }
/* Amount display bar: indigo-to-purple gradient with elevated shadow */
.view-modal-amount-bar { display: flex; justify-content: space-between; align-items: center; margin: 20px 24px; padding: 22px 26px; background: linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7); border-radius: 16px; color: #fff; box-shadow: 0 8px 24px rgba(99,102,241,0.35); }
.view-modal-amount-label { font-size: 11px; font-weight: 600; text-transform: uppercase; opacity: 0.8; margin-bottom: 4px; letter-spacing: 0.8px; }
.view-modal-amount-value { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
/* Date badge: glassmorphism pill with backdrop blur on amount bar */
.view-modal-date-badge { display: inline-block; background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); padding: 7px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; margin-top: 4px; border: 1px solid rgba(255,255,255,0.15); }
.view-modal-body { padding: 0 24px; }
.view-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
/* Info card: light-bordered container with hover glow */
.view-modal-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #e8e7f0; border-radius: 12px; background: #fafafe; transition: box-shadow 0.2s; }
.view-modal-card:hover { box-shadow: 0 2px 12px rgba(99,102,241,0.08); }
/* View modal info card icon: light purple gradient badge */
.view-modal-card-icon { width: 36px; height: 36px; background: linear-gradient(135deg, #ede9fe, #e0e7ff); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #6d28d9; font-size: 14px; flex-shrink: 0; }
.view-modal-card-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: #8b8aa0; margin-bottom: 2px; letter-spacing: 0.5px; }
.view-modal-card-value { font-size: 15px; font-weight: 600; color: var(--text-primary); }
/* Note callout: amber left-bordered box for notes/descriptions */
.view-modal-note { padding: 16px 18px; background: linear-gradient(135deg, #fffbeb, #fef3c7); border-left: 4px solid #f59e0b; border-radius: 0 12px 12px 0; margin-bottom: 4px; }
.view-modal-note-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: #b45309; margin-bottom: 4px; letter-spacing: 0.5px; }
.view-modal-note-value { font-size: 14px; color: #78716c; line-height: 1.5; }
.view-modal-footer { display: flex; gap: 20px; padding: 16px 24px; border-top: 1px solid #f0eef5; margin-top: 16px; }
.view-modal-meta { font-size: 12px; color: #a1a0b3; }
.view-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid #f0eef5; }
.view-modal-actions .btn-cancel { padding: 9px 22px; border: 1px solid #e5e4ed; border-radius: 10px; background: #fff; color: #6b6a80; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.view-modal-actions .btn-cancel:hover { background: #f5f5f7; border-color: #d4d3df; }
/* Edit action button: orange-to-red gradient with shadow */
.view-modal-actions .btn-edit-action { padding: 9px 22px; border: none; border-radius: 10px; background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; box-shadow: 0 2px 8px rgba(249,115,22,0.3); }
.view-modal-actions .btn-edit-action:hover { box-shadow: 0 4px 14px rgba(249,115,22,0.45); transform: translateY(-1px); }

/* ==========================================================================
   INSTALLMENT SECTION — Recurring payment installments
   Inside the view modal. Form fields for installment date, amount,
   and notes. Responsive stacking on mobile.
   ========================================================================== */
.view-installment-section { padding: 0 24px; margin-bottom: 16px; }
.view-installment-title { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--text-primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f0eef5; letter-spacing: 0.5px; }
.view-installment-form { background: #fafafe; border: 1px solid #e8e7f0; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.view-installment-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.view-installment-field { flex: 1; min-width: 140px; }
.view-installment-field label { font-size: 12px; font-weight: 600; color: #8b8aa0; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.3px; }
.view-installment-field .form-control { border-radius: 8px; font-size: 13px; }
/* Installment submit button: indigo-to-purple gradient */
.btn-installment-submit { padding: 9px 24px; border: none; border-radius: 8px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s; box-shadow: 0 2px 8px rgba(79,70,229,0.3); }
.btn-installment-submit:hover { box-shadow: 0 4px 14px rgba(79,70,229,0.45); transform: translateY(-1px); }

@media (max-width: 768px) {
    .view-installment-fields { flex-direction: column; }
    .view-installment-field { min-width: 100%; }
    .btn-installment-submit { width: 100%; justify-content: center; }
}

/* ==========================================================================
   STATEMENT FILTER — Financial statement page controls
   Filter box with date range and type selector, summary cards
   (income/expense/net), and date range badge.
   ========================================================================== */
/* Statement filter container: subtle gradient background with accent border */
.statement-filter-box { background: linear-gradient(135deg, #fafafe, #f0eef5); border: 1px solid #e8e7f0; border-radius: 16px; padding: 24px; margin-bottom: 24px; }
.statement-filter-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
/* Statement filter icon: indigo-to-purple gradient badge */
.statement-filter-icon { width: 44px; height: 44px; background: linear-gradient(135deg, #4f46e5, #7c3aed); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; flex-shrink: 0; }
.statement-filter-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.statement-filter-subtitle { font-size: 12px; color: #8b8aa0; margin-top: 2px; }
.statement-filter-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.statement-filter-field { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 180px; }
.statement-filter-field-icon { width: 36px; height: 36px; background: #fff; border: 1px solid #e8e7f0; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #7c3aed; font-size: 14px; flex-shrink: 0; margin-top: 24px; }
.statement-filter-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: #8b8aa0; margin-bottom: 4px; letter-spacing: 0.5px; display: block; }
.statement-filter-divider { display: flex; align-items: center; padding-bottom: 8px; color: #c4c3d4; font-size: 14px; }
/* Statement filter submit button: indigo-to-purple gradient */
.statement-filter-btn { padding: 10px 28px; border: none; border-radius: 10px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s; box-shadow: 0 4px 12px rgba(79,70,229,0.3); display: flex; align-items: center; height: 42px; }
.statement-filter-btn:hover { box-shadow: 0 6px 20px rgba(79,70,229,0.45); transform: translateY(-1px); }

.statement-summary-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
/* Statement summary card: icon + text layout with hover shadow */
.statement-summary-card { display: flex; align-items: center; gap: 14px; padding: 20px; background: #fff; border: 1px solid #e8e7f0; border-radius: 14px; transition: box-shadow 0.2s; }
.statement-summary-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.statement-summary-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; flex-shrink: 0; }
/* Statement summary icon color variants: income (green), expense (red), net (purple) */
.statement-summary-income .statement-summary-icon { background: linear-gradient(135deg, #16a34a, #22c55e); }
.statement-summary-expense .statement-summary-icon { background: linear-gradient(135deg, #ef4444, #f87171); }
.statement-summary-net .statement-summary-icon { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.statement-summary-label { font-size: 11px; font-weight: 600; text-transform: uppercase; color: #8b8aa0; letter-spacing: 0.5px; }
.statement-summary-value { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-top: 2px; }

/* Date range badge: purple pill showing current filter period */
.statement-date-range { display: inline-flex; align-items: center; gap: 6px; background: #f0eef5; color: #6d28d9; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-bottom: 16px; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS — Mobile-first adaptations
   1200px: Compact filter bar, hide banner subtitle.
   768px:  Off-canvas sidebar, stacked layouts, smaller components.
   576px:  Ultra-compact spacing, single-column grids.
   ========================================================================== */
@media (max-width: 1200px) {
    .filter-bar .col-md-2, .filter-bar .col-lg-2 { flex: 0 0 auto; width: auto; }
    .page-header-text p { display: none; }
}

/* 768px breakpoint: off-canvas sidebar on mobile */
@media (max-width: 768px) {
    /* Sidebar slides off-screen left, shown via .show class toggle */
    .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .header-menu-btn { display: block; }
    .content-wrapper { padding: 14px 10px; }
    .header-navbar { padding: 0 10px; height: auto; min-height: 56px; }
    .header-left .breadcrumb { font-size: 11px; }
    .header-right .btn-profile span, .header-right .btn-signout span { display: none; }
    .header-right .btn-profile, .header-right .btn-signout { padding: 6px 10px; }

    .page-header-banner { padding: 18px 16px; flex-direction: column; align-items: flex-start; gap: 14px; border-radius: 12px; }
    .page-header-icon { width: 42px; height: 42px; font-size: 18px; border-radius: 10px; }
    .page-header-text h3 { font-size: 17px; }
    .page-header-text p { display: none; }
    .page-header-right { width: 100%; display: flex; gap: 8px; }
    .page-header-banner .btn-page-add, .page-header-banner .btn-page-csv, .page-header-banner .btn-page-print { flex: 1; justify-content: center; padding: 8px 12px; font-size: 12px; }

    .filter-bar { padding: 12px; gap: 8px; flex-direction: column; }
    .filter-bar .col-md-2, .filter-bar .col-lg-2 { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
    .filter-bar .d-flex { width: 100%; }
    .filter-bar .btn-primary { width: 100%; justify-content: center; }

    .card-custom { border-radius: 12px; margin-bottom: 16px; }
    .card-custom .card-body { padding: 12px; }
    .card-custom .card-header { padding: 12px; flex-direction: column; gap: 8px; align-items: flex-start; }

    .total-card { min-width: 100%; padding: 14px 16px; border-radius: 12px; }
    .total-card .amount { font-size: 20px; }
    .total-card .icon-box { width: 42px; height: 42px; font-size: 18px; }
    .stat-circle { width: 38px; height: 38px; font-size: 16px; }
    .stat-amount { font-size: 18px; }
    .stat-label { font-size: 11px; }

    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 20px; }
    .stat-card .stat-icon { width: 36px; height: 36px; font-size: 16px; margin-bottom: 10px; }

    .table-responsive { font-size: 12px; border-radius: 10px; }
    .table-custom thead th { padding: 10px 8px; font-size: 10px; }
    .table-custom tbody td { padding: 10px 8px; font-size: 12px; }
    .btn-view, .btn-edit, .btn-delete { padding: 4px 6px; font-size: 10px; }

    .modal-dialog { margin: 8px; }
    .modal-content { border-radius: 12px; }
    .modal-body { padding: 14px; }
    .modal-header { padding: 14px; }
    .modal-footer { padding: 10px 14px; flex-wrap: wrap; gap: 6px; }
    .modal-footer .btn-save, .modal-footer .btn-cancel { flex: 1; min-width: 100px; font-size: 13px; padding: 8px 16px; }

    .view-modal-amount-bar { flex-direction: column; align-items: flex-start; margin: 12px; padding: 14px; border-radius: 12px; }
    .view-modal-amount-value { font-size: 24px; }
    .view-modal-grid { grid-template-columns: 1fr; gap: 8px; }
    .view-modal-card { padding: 12px; }
    .view-modal-footer { flex-direction: column; gap: 6px; }
    .view-modal-header { padding: 14px 14px 0; }
    .view-modal-body { padding: 0 14px; }
    .view-modal-actions { padding: 0 14px 14px; flex-direction: column; gap: 8px; }
    .view-modal-actions .btn-cancel, .view-modal-actions .btn-edit-action { width: 100%; justify-content: center; }
    .view-installment-fields { flex-direction: column; }
    .view-installment-field { min-width: 100%; }

    .statement-filter-fields { flex-direction: column; align-items: stretch; }
    .statement-filter-field { min-width: 100%; }
    .statement-filter-divider { display: none; }
    .statement-filter-btn { width: 100%; justify-content: center; height: auto; padding: 10px; }
    .statement-filter-field-icon { display: none; }
    .statement-filter-box { padding: 16px; border-radius: 12px; }
    .statement-summary-cards { grid-template-columns: 1fr; gap: 10px; }
    .statement-summary-card { padding: 14px; }
    .statement-summary-value { font-size: 20px; }

    .upload-box { padding: 16px; }
    .upload-preview { min-height: 60px; }
    .upload-preview i { font-size: 24px; }

    .profile-avatar { width: 44px; height: 44px; font-size: 18px; }

    .row.g-4 { --bs-gutter-x: 10px; }

    .btn-view, .btn-edit, .btn-delete, .d-flex.gap-2, .btn-group { flex-wrap: wrap; gap: 4px !important; }
}

@media (max-width: 576px) {
    .content-wrapper { padding: 10px 6px; }
    .page-header-banner { padding: 14px 12px; }
    .page-header-icon { width: 36px; height: 36px; font-size: 16px; }
    .page-header-text h3 { font-size: 15px; }

    .filter-bar { padding: 10px 8px; gap: 6px; }

    .total-card { padding: 12px; }
    .total-card .amount { font-size: 18px; }
    .stat-circle { width: 36px; height: 36px; font-size: 14px; border-radius: 10px; }
    .stat-amount { font-size: 16px; }

    .stat-card .stat-value { font-size: 18px; }

    .row.mb-3, .row.mb-4 { --bs-gutter-x: 6px; }
    .row.g-4 { --bs-gutter-x: 6px; --bs-gutter-y: 10px; }

    .statement-filter-box { padding: 12px; border-radius: 10px; }
    .statement-filter-header { margin-bottom: 10px; }
    .statement-filter-title { font-size: 14px; }
    .statement-summary-card { padding: 12px; gap: 10px; }
    .statement-summary-icon { width: 36px; height: 36px; font-size: 14px; }
    .statement-summary-value { font-size: 18px; }

    .btn-page-add, .btn-page-csv, .btn-page-print { padding: 7px 10px; font-size: 11px; }

    .auth-card { padding: 24px; border-radius: 12px; }
    .auth-card h3 { font-size: 18px; }

    .login-card { padding: 24px; border-radius: 12px; }

    canvas { max-width: 100%; height: auto !important; }
    .chart-container { position: relative; width: 100%; }

    .page-title-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-title-row div { display: flex; gap: 6px; width: 100%; }

    .row { --bs-gutter-x: 8px; }
    .col-md-3, .col-md-6, .col-lg-5, .col-lg-7, .col-lg-8, .col-lg-12 { padding-left: 4px; padding-right: 4px; }

    .sidebar-user { padding: 10px 8px; }
    .sidebar-user a { font-size: 12px; }

    .btn-save { width: 100%; padding: 10px; }
}

/* ==========================================================================
   RTL SUPPORT — Right-to-left language adaptations
   Mirrors sidebar, nav items, breadcrumbs, cards, and modals.
   Includes mobile-specific RTL adjustments for off-canvas sidebar.
   ========================================================================== */
[dir="rtl"] .sidebar { border-left: 1px solid var(--border); left: auto; right: 0; }
[dir="rtl"] .main-content { margin-left: 0; margin-right: var(--sidebar-width); }
[dir="rtl"] .sidebar-brand { flex-direction: row-reverse; }
[dir="rtl"] .sidebar-nav li a { flex-direction: row-reverse; }
[dir="rtl"] .sidebar-nav li a i { margin-left: 0; margin-right: auto; }
[dir="rtl"] .sidebar-user a { flex-direction: row-reverse; }
[dir="rtl"] .header-left { flex-direction: row-reverse; }
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .total-card { flex-direction: row-reverse; }
[dir="rtl"] .stat-circle { margin-left: 0; margin-right: 0; }
[dir="rtl"] .stat-text { margin-left: 0; margin-right: 14px; text-align: right; }
[dir="rtl"] .view-modal-header { flex-direction: row-reverse; }
[dir="rtl"] .view-modal-close { left: 16px; right: auto; }
[dir="rtl"] .view-modal-card { flex-direction: row-reverse; }
[dir="rtl"] .view-installment-fields { flex-direction: row-reverse; }
[dir="rtl"] .page-header-left { flex-direction: row-reverse; }
[dir="rtl"] .page-header-right { flex-direction: row-reverse; }
[dir="rtl"] .dropdown-menu { text-align: right; }

/* RTL mobile: sidebar slides from right instead of left */
@media (max-width: 768px) {
    [dir="rtl"] .sidebar { transform: translateX(100%); }
    [dir="rtl"] .sidebar.show { transform: translateX(0); }
    [dir="rtl"] .main-content { margin-right: 0; }
    [dir="rtl"] .header-right .btn-profile, [dir="rtl"] .header-right .btn-signout { flex-direction: row-reverse; }
}


/* ==========================================================================
   ENVATO EXTERNALIZED INLINE STYLES — Auto-generated class overrides
   These classes externalize inline styles from Blade templates for
   Envato theme compliance. Groups below map to specific pages.
   ========================================================================== */
.ext-auth-forgot-password-1 { border-radius:10px;font-size:13px;padding:10px 14px; }

/* ==========================================================================
   AUTH PAGES — Forgot password, reset password, reset link sent
   Split-screen layout with gradient hero panel (left) and form card (right).
   Includes back-to-login link and success confirmation state.
   ========================================================================== */
        /* Purple gradient hero for forgot-password page */
        .auth-left {
            flex: 1; background: linear-gradient(135deg, #4f46e5, #7c3aed, #a855f7);
            display: flex; align-items: center; justify-content: center; padding: 40px;
            position: relative; overflow: hidden; color: #fff;
        }
        /* Decorative circles on auth hero panel: semi-transparent white rings for depth */
        /* Decorative circle on forgot-password hero */
        .auth-left::before { content: ''; position: absolute; top: -30%; right: -10%; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,0.08); }
        .auth-left::after { content: ''; position: absolute; bottom: -20%; left: -5%; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,0.05); }
        .auth-left-content { z-index: 1; text-align: center; max-width: 380px; }
        .auth-left-content h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
        .auth-left-content p { font-size: 15px; opacity: 0.85; line-height: 1.6; }
        .auth-left-icon { font-size: 64px; margin-bottom: 24px; opacity: 0.9; }
        .auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
        .auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
        .auth-card h3 { font-size: 22px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
        .auth-card .subtitle { color: #64748b; font-size: 14px; margin-bottom: 28px; }
        .auth-card .form-label { font-weight: 500; color: #64748b; font-size: 13px; }
        .auth-card .form-control { border-radius: 10px; padding: 10px 14px; border: 1px solid #e8ecf1; font-size: 14px; }
        .auth-card .form-control:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
        /* Reset password button: full-width indigo gradient */
        .btn-reset { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border: none; padding: 11px 28px; border-radius: 10px; font-weight: 600; font-size: 14px; width: 100%; box-shadow: 0 4px 12px rgba(79,70,229,0.3); transition: all 0.15s; }
        .btn-reset:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,70,229,0.4); color: #fff; }
        .back-link { text-align: center; margin-top: 20px; font-size: 13px; }
        .back-link a { color: #4f46e5; text-decoration: none; font-weight: 500; }
        .back-link a:hover { text-decoration: underline; }
        /* Reset link sent page — confirmation card */
        .reset-sent-card { text-align: center; }
        .reset-sent-email { color: #4f46e5; font-weight: 600; }
        .reset-sent-info { font-size: 13px; text-align: left; }
        .reset-sent-fallback { font-size: 12px; text-align: left; word-break: break-all; }
        .reset-sent-btn { display: block; text-decoration: none; text-align: center; }
        @media (max-width: 768px) {
            .auth-left { display: none; }
            .auth-right { padding: 24px 16px; }
        }

.ext-auth-login-1 { position:relative; }

.ext-auth-login-2 { border-radius:10px;font-size:13px; }

.ext-auth-login-3 { font-size:13px; }

/* ==========================================================================
   LOGIN CARD — Standalone login form card
   White card with brand logo, input fields, login button, and language switch.
   ========================================================================== */
        .login-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.06);
            border: 1px solid #e8ecf1;
            width: 100%;
            max-width: 420px;
            padding: 40px;
        }
        /* Brand logo section: centered icon + title above login form */
        .brand { text-align: center; margin-bottom: 28px; }
        .brand .icon { width: 52px; height: 52px; background: var(--primary); border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; margin-bottom: 14px; }
        .brand h3 { font-weight: 700; color: #1e293b; margin-bottom: 4px; }
        .brand p { color: #64748b; font-size: 14px; }
        .btn-login { background: var(--primary); color: #fff; border: none; padding: 11px; border-radius: 10px; font-weight: 600; font-size: 14px; width: 100%; }
        .btn-login:hover { background: var(--primary-dark); color: #fff; }
        .text-link { color: var(--primary); font-weight: 500; }
        .text-link:hover { color: var(--primary-dark); }
        .lang-switch { position: absolute; top: 16px; right: 16px; z-index: 3; }
        [dir="rtl"] .lang-switch { right: auto; left: 16px; }

/* ==========================================================================
   LOGIN PAGE — Split-screen login layout
   Hero panel with gradient background and brand, form side with card.
   Password toggle, language switch. Hero hidden on mobile.
   ========================================================================== */
body.login-page { display: block; min-height: 100vh; }
/* Login split layout: hero panel (left) + form card (right) side by side */
.login-split { display: flex; width: 100%; min-height: 100vh; }
.login-hero {
    flex: 1 1 55%;
    /* Deep indigo-to-purple gradient for login hero panel */
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 55%, #312e81 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 56px;
    position: relative;
    overflow: hidden;
}
/* Decorative circles on login hero: white semi-transparent rings */
.login-hero::before { content: ''; position: absolute; top: -20%; right: -10%; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.login-hero::after { content: ''; position: absolute; bottom: -15%; left: -8%; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,0.06); }
/* Brand logo overlay: z-index 2 to sit above decorative circles */
.login-hero-brand { position: absolute; top: 32px; left: 40px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; z-index: 2; }
.login-hero-brand .hero-logo { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.login-hero-brand .app-logo-login { width: 24px; height: 24px; border-radius: 6px; }
/* Hero content: z-index 1 to layer above decorative circles */
.login-hero-content { z-index: 1; text-align: center; max-width: 440px; }
.login-hero-icon { font-size: 64px; margin-bottom: 24px; opacity: 0.95; }
.login-hero-content h2 { font-size: 30px; font-weight: 700; margin-bottom: 14px; line-height: 1.3; }
.login-hero-content p { font-size: 15px; opacity: 0.88; line-height: 1.7; }
.login-hero-footer { position: absolute; bottom: 20px; font-size: 12px; opacity: 0.6; z-index: 1; }

/* Login form side: centered form card on neutral background */
.login-form-side { flex: 1 1 45%; display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; background: #f0f2f5; }
.login-form-side .login-card { max-width: 400px; width: 100%; }

.login-card .input-group .form-control { border-radius: 10px 0 0 10px; }
/* Password toggle button: right-aligned in input group, seamless border */
.login-card .input-group .toggle-password { border-radius: 0 10px 10px 0; border: 1px solid #e8ecf1; border-left: none; background: #fff; color: #94a3b8; padding: 0 14px; }
.login-card .input-group .toggle-password:hover { color: var(--primary); }

@media (max-width: 768px) {
    .login-hero { display: none; }
    .login-form-side { flex: 1 1 100%; padding: 24px 16px; }
}
[dir="rtl"] .login-hero-brand { left: auto; right: 40px; }

.ext-auth-reset-link-sent-1 { margin-top: 16px; font-size: 13px; }

.ext-auth-reset-link-sent-2 { margin-top: 24px; }

/* ==========================================================================
   AUTH PAGES — Reset link sent confirmation
   Green-themed gradient hero panel with success icon and email highlight.
   ========================================================================== */
        /* Green gradient hero for success confirmation */
        .auth-left {
            flex: 1; background: linear-gradient(135deg, #10b981, #059669, #047857);
            display: flex; align-items: center; justify-content: center; padding: 40px;
            position: relative; overflow: hidden; color: #fff;
        }
        .auth-left::before { content: ''; position: absolute; top: -30%; right: -10%; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,0.08); }
        .auth-left-content { z-index: 1; text-align: center; max-width: 380px; }
        .auth-left-content h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
        .auth-left-content p { font-size: 15px; opacity: 0.85; line-height: 1.6; }
        .auth-left-icon { font-size: 64px; margin-bottom: 24px; }
        .auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
        .auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); text-align: center; }
        /* Success checkmark icon: green circle with centered icon */
        .success-icon { width: 72px; height: 72px; background: #ecfdf5; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 32px; color: #10b981; }
        .auth-card h3 { font-size: 22px; font-weight: 700; color: #1e293b; margin-bottom: 12px; }
        .auth-card p { color: #64748b; font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
        .auth-card .email-highlight { color: #4f46e5; font-weight: 600; }
        /* Back to login button: indigo gradient with icon */
        .btn-back { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border: none; padding: 11px 28px; border-radius: 10px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(79,70,229,0.3); transition: all 0.15s; text-decoration: none; margin-top: 20px; }
        .btn-back:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,70,229,0.4); color: #fff; }
        @media (max-width: 768px) {
            .auth-left { display: none; }
            .auth-right { padding: 24px 16px; }
        }

.ext-auth-reset-password-1 { border-radius:10px;font-size:13px;padding:10px 14px; }

/* ==========================================================================
   EXTENSION STYLES — Page-specific overrides (auto-generated)
   Classes prefixed with ext-* externalize inline styles from Blade templates.
   ========================================================================== */

/* ==========================================================================
   CATEGORIES PAGE — Category management
   Purple gradient theme for header and badges.
   ========================================================================== */
.ext-categories-index-1 { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

.ext-categories-index-2 { background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: #7c3aed; }

.ext-categories-index-3 { padding-top: 20px; }

.ext-categories-index-4 { background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: #7c3aed; }

.ext-categories-index-5 { background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: #7c3aed; }

/* ==========================================================================
   CLIENTS PAGE — Client management
   Blue gradient theme. Status cards with green/orange/red left borders.
   ========================================================================== */
.ext-clients-index-1 { background: linear-gradient(135deg, #2563eb, #60a5fa); }

.ext-clients-index-2 { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }

.ext-clients-index-3 { background: linear-gradient(135deg, #2563eb, #3b82f6, #60a5fa); box-shadow: 0 8px 24px rgba(37,99,235,0.35); }

.ext-clients-index-4 { margin-bottom: 16px; }

.ext-clients-index-5 { border-left: 3px solid #16a34a; }

.ext-clients-index-6 { background: linear-gradient(135deg, #16a34a, #22c55e); }

.ext-clients-index-7 { color: #16a34a; }

.ext-clients-index-8 { border-left: 3px solid #f97316; }

.ext-clients-index-9 { background: linear-gradient(135deg, #f97316, #fb923c); }

.ext-clients-index-10 { color: #f97316; }

.ext-clients-index-11 { border-left: 3px solid #ef4444; }

.ext-clients-index-12 { background: linear-gradient(135deg, #ef4444, #f87171); }

.ext-clients-index-13 { color: #ef4444; }

.ext-clients-index-14 { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }

.ext-clients-index-15 { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }

.ext-clients-index-16 { margin-bottom: 16px; border-left: 3px solid #2563eb; }

.ext-clients-index-17 { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; }

/* ==========================================================================
   DUES PAGE — Dues/overdue management
   Orange gradient theme for overdue tracking.
   ========================================================================== */
.ext-dues-index-1 { background:#9b59b6; }

.ext-dues-index-2 { background: linear-gradient(135deg, #f97316, #fb923c); }

.ext-dues-index-3 { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #ea580c; }

.ext-dues-index-4 { background: linear-gradient(135deg, #ea580c, #f97316, #fb923c); box-shadow: 0 8px 24px rgba(249,115,22,0.35); }

.ext-dues-index-5 { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #ea580c; }

.ext-dues-index-6 { background: linear-gradient(135deg, #fff7ed, #ffedd5); color: #ea580c; }

/* ==========================================================================
   EXPENSES PAGE — Expense management
   Red gradient theme. Summary grid with income/expense/net columns.
   ========================================================================== */
.ext-expenses-index-1 { background:#e74c3c; }

.ext-expenses-index-2 { background: linear-gradient(135deg, #ef4444, #f87171); }

.ext-expenses-index-3 { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }

.ext-expenses-index-4 { background: linear-gradient(135deg, #dc2626, #e11d48, #be123c); box-shadow: 0 8px 24px rgba(220,38,38,0.35); }

.ext-expenses-index-5 { grid-template-columns: 1fr 1fr 1fr; }

.ext-expenses-index-6 { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }

.ext-expenses-index-7 { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }

.ext-expenses-index-8 { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }

.ext-expenses-index-9 { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; }

/* ==========================================================================
   INCOMES PAGE — Income management
   Blue gradient theme for income header.
   ========================================================================== */
.ext-incomes-index-1 { background:#3498db; }

.ext-layouts-header-1 { min-width: 140px; }

/* ==========================================================================
   PAYMENT TYPES PAGE — Payment type management
   Cyan gradient theme for header and badges.
   ========================================================================== */
.ext-payment-types-index-1 { background: linear-gradient(135deg, #0891b2, #22d3ee); }

.ext-payment-types-index-2 { background: linear-gradient(135deg, #ecfeff, #cffafe); color: #0891b2; }

.ext-payment-types-index-3 { padding-top: 20px; }

.ext-payment-types-index-4 { background: linear-gradient(135deg, #ecfeff, #cffafe); color: #0891b2; }

/* ==========================================================================
   PRODUCTS PAGE — Product management
   Green gradient theme. Status cards with green/orange/red indicators.
   ========================================================================== */
.ext-products-index-1 { background: linear-gradient(135deg, #059669, #34d399); }

.ext-products-index-2 { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #059669; }

.ext-products-index-3 { background: linear-gradient(135deg, #059669, #10b981, #34d399); box-shadow: 0 8px 24px rgba(5,150,105,0.35); }

.ext-products-index-4 { font-size:13px; }

.ext-products-index-5 { margin-bottom: 16px; }

.ext-products-index-6 { border-left: 3px solid #16a34a; }

.ext-products-index-7 { background: linear-gradient(135deg, #16a34a, #22c55e); }

.ext-products-index-8 { color: #16a34a; }

.ext-products-index-9 { border-left: 3px solid #f97316; }

.ext-products-index-10 { background: linear-gradient(135deg, #f97316, #fb923c); }

.ext-products-index-11 { color: #f97316; }

.ext-products-index-12 { border-left: 3px solid #ef4444; }

.ext-products-index-13 { background: linear-gradient(135deg, #ef4444, #f87171); }

.ext-products-index-14 { color: #ef4444; }

/* ==========================================================================
   PROFILE / TABS / UPLOAD — User profile and file upload components
   profile-avatar: circular gradient icon for user avatar.
   card-header-custom: tab container header.
   nav-tabs: underlined tab navigation.
   upload-box: dashed-border drag-and-drop zone with preview.
   ========================================================================== */
/* Profile avatar: rounded gradient icon badge */
.profile-avatar {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px; flex-shrink: 0;
}
.card-header-custom {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
/* Tab navigation: underlined style with primary-colored active state */
.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link { color: var(--text-secondary); font-weight: 500; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 18px; }
.nav-tabs .nav-link:hover { border-bottom-color: var(--border); }
.nav-tabs .nav-link.active { color: var(--primary); background: none; border-bottom-color: var(--primary); }
/* Upload drop zone: dashed border with hover highlight */
.upload-box {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafe;
}
/* Upload box hover: highlight border and background */
.upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}
/* Upload preview: centered icon + text, or thumbnail image */
.upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
}
.upload-preview i {
    font-size: 32px;
    color: #94a3b8;
}
.upload-preview span {
    font-size: 13px;
    color: #94a3b8;
}
.upload-preview img {
    max-height: 60px;
    max-width: 100%;
    object-fit: contain;
}
/* Upload box when image is present: solid border, compact padding */
.upload-box.has-image {
    padding: 12px;
    border-style: solid;
    border-color: var(--primary-bg);
    background: #fff;
}
/* Preview box: light primary background for image previews */
.preview-box {
    background: var(--primary-bg) !important;
}
/* ==========================================================================
   CURRENCY GRID — Currency selector grid
   Grid of currency items with flag emoji and code labels.
   ========================================================================== */
/* Currency item: vertically stacked flag + code layout */
#currencyGrid .currency-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    padding: 10px 12px;
}
#currencyGrid .currency-item small {
    font-size: 11px;
}
#currencyGrid .cur-flag {
    font-size: 18px;
    margin-right: 2px;
}

/* ==========================================================================
   STATEMENTS PAGE — Statement list overrides
   ========================================================================== */
.ext-statements-index-1 { display:none; }

.ext-statements-index-2 { font-weight:bold; background:#f8f9fa; }



/* ==========================================================================
   USERS PAGE — User management
   Pink/magenta gradient theme for header and badges.
   ========================================================================== */
.ext-users-index-1 { background: linear-gradient(135deg, #d946ef, #f0abfc); }

.ext-users-index-2 { background: linear-gradient(135deg, #fdf4ff, #fae8ff); color: #a21caf; }

.ext-users-index-3 { background: linear-gradient(135deg, #a21caf, #c026d3, #d946ef); box-shadow: 0 8px 24px rgba(162,28,175,0.35); }

.ext-users-index-4 { font-size: 24px; }

.ext-users-index-5 { background: linear-gradient(135deg, #fdf4ff, #fae8ff); color: #a21caf; }

.ext-users-index-6 { background: linear-gradient(135deg, #fdf4ff, #fae8ff); color: #a21caf; }

.ext-users-index-7 { background:rgba(255,255,255,0.25);padding:6px 16px;border-radius:8px;font-weight:600; }

.ext-users-index-8 { background:rgba(255,255,255,0.25);padding:6px 16px;border-radius:8px;font-weight:600; }

/* ==========================================================================
   DASHBOARD PAGE — Dashboard extension overrides
   Color-coded stat card backgrounds (green, red, amber, blue).
   ========================================================================== */
.ext-dashboard-1 { background:#10b981; }

.ext-dashboard-2 { background:#ef4444; }

.ext-dashboard-3 { background:#f59e0b; }

.ext-dashboard-4 { background:#3b82f6; }

/* ==========================================================================
   WELCOME / HERO LANDING PAGE — Public marketing page
   Full-viewport gradient hero with nav, CTA buttons, feature cards, footer.
   ========================================================================== */
.ext-welcome-1 { max-width:1000px; }

.ext-welcome-2 { font-weight:700;color:#1e293b; }

.ext-welcome-3 { background:#eef2ff;color:#465fff; }

.ext-welcome-4 { background:#ecfdf5;color:#10b981; }

.ext-welcome-5 { background:#fffbeb;color:#f59e0b; }

        /* Full-viewport gradient hero: deep indigo-to-blue for marketing landing page */
        .hero {
            background: linear-gradient(135deg, #465fff 0%, #3749e0 50%, #2536b8 100%);
            color: #fff;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .hero-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 48px;
        }
        .hero-nav .brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 20px; }
        .hero-nav .brand-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
        .hero-nav .nav-links a { color: rgba(255,255,255,0.8); margin-left: 24px; font-weight: 500; font-size: 14px; transition: color 0.2s; }
        .hero-nav .nav-links a:hover { color: #fff; }
        .hero-body { flex: 1; display: flex; align-items: center; padding: 0 48px; max-width: 1200px; margin: 0 auto; width: 100%; }
        .hero-body h1 { font-size: 52px; font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
        .hero-body p { font-size: 18px; opacity: 0.85; margin-bottom: 36px; max-width: 500px; }
        /* Hero CTA buttons: primary (solid white) and outline variants */
        .hero-btns a {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 14px 32px;
            border-radius: 12px;
            font-weight: 600;
            font-size: 15px;
            text-decoration: none;
            transition: all 0.2s;
        }
        .btn-hero-primary { background: #fff; color: var(--primary); }
        .btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); color: var(--primary-dark); }
        .btn-hero-outline { border: 2px solid rgba(255,255,255,0.4); color: #fff; margin-left: 12px; }
        .btn-hero-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }
        .features { background: #f5f7fa; padding: 80px 0; }
        /* Feature card: white card with hover lift effect */
        .feature-card {
            background: #fff;
            border-radius: 16px;
            padding: 32px 28px;
            text-align: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
            border: 1px solid #e8ecf1;
            margin-bottom: 24px;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
        .feature-icon {
            width: 64px;
            height: 64px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            margin: 0 auto 20px;
        }
        .feature-card h5 { font-weight: 600; margin-bottom: 10px; color: #1e293b; }
        .feature-card p { color: #64748b; font-size: 14px; }
        /* Footer: dark background bar below features section */
        .footer { background: #1e293b; color: #94a3b8; padding: 32px 0; text-align: center; font-size: 13px; }


/* ==========================================================================
   LOGO IMAGE SIZING — Brand logo dimensions (Envato compliance)
   Consistent sizing for login and sidebar logo images.
   ========================================================================== */
.app-logo-login { width: 52px; height: 52px; border-radius: 14px; object-fit: contain; }
.app-logo-sidebar { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; }


/* ==========================================================================
   DEMO MODE — Demo environment indicators and restrictions
   Demo banner: amber warning bar at top of pages.
   demo-disabled: makes upload boxes non-interactive in demo mode.
   ========================================================================== */
/* Demo banner: amber gradient warning bar */
.demo-banner { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #fff; padding: 10px 20px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; font-weight: 500; display: flex; align-items: center; box-shadow: 0 4px 12px rgba(245,158,11,0.3); }

/* Demo mode: disabled state for upload boxes */
.demo-disabled { pointer-events: none; opacity: 0.6; }

/* ==========================================================================
   STATEMENT ICON VARIANTS — Color overrides for statement summary icons
   positive (green), negative (red), neutral (purple), net-negative (red gradient).
   ========================================================================== */
.statement-icon-positive { background: linear-gradient(135deg, #16a34a, #22c55e) !important; }
.statement-icon-negative { background: #ef4444 !important; }
.statement-icon-neutral { background: linear-gradient(135deg, #4f46e5, #7c3aed) !important; }
.statement-icon-net-negative { background: linear-gradient(135deg, #ef4444, #f87171) !important; }

/* ==========================================================================
   NOSCRIPT FALLBACK — Styles when JavaScript is disabled
   Alert box and notice text for noscript users.
   ========================================================================== */
.noscript-alert { margin: 20px; }
.noscript-notice { font-size: 13px; }

/* ==========================================================================
   AUTOCOMPLETE — Searchable dropdown for client/product fields
   ========================================================================== */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* z-index 1050: above sidebar (100) and header (50), matches Bootstrap modal level */
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: #f0f4ff; }