/* =========================================================
   Pixel Pulse / MultiPay Pro - Modern Clean FinTech Theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Light Theme (Clean Crisp White & Soft Blue) */
    --bg-body: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #f8fafc;
    --border-color: #e2e8f0;
    --border-color-subtle: #f1f5f9;

    /* Accents */
    --brand-primary: #4f46e5;
    --brand-blue: #3b82f6;
    --brand-green: #10b981;
    --brand-red: #ef4444;

    --sidebar-width: 250px;
    --navbar-height: 68px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] {
    --bg-body: #090d16;
    --bg-surface: #0f172a;
    --bg-surface-elevated: #1e293b;
    --bg-sidebar: #070b14;
    --bg-sidebar-hover: #172033;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --border-color-subtle: #172033;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    font-size: 0.875rem;
}

.font-mono {
    font-family: var(--font-mono) !important;
}

/* Sidebar Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #0d1527;
    color: #94a3b8;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
}

.sidebar-brand {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.sidebar-brand .brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.sidebar-brand .brand-badge {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 500;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.sidebar-heading {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 0.75rem 0.75rem 0.25rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.nav-link-custom i.nav-icon {
    width: 20px;
    font-size: 1rem;
    margin-right: 0.7rem;
    text-align: center;
}

.nav-link-custom:hover {
    color: #ffffff;
    background-color: #17233d;
}

.nav-link-custom.active {
    color: #ffffff;
    background: #3b82f6;
    font-weight: 600;
}

/* Vibrant Payment Pills in Sidebar */
.nav-link-custom.active-payment-received {
    color: #ffffff !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    font-weight: 600;
}

.nav-link-custom.active-payment-given {
    color: #ffffff !important;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    font-weight: 600;
}

.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Navbar */
.app-navbar {
    height: var(--navbar-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

/* Business Selector Pill in Navbar */
.business-dropdown-btn {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .business-dropdown-btn {
    background-color: #064e3b;
    border-color: #059669;
    color: #a7f3d0;
}

.business-dropdown-btn:hover {
    background-color: #dcfce7;
}

/* Search Bar */
.nav-search-bar {
    position: relative;
    width: 360px;
}

.nav-search-bar input {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.45rem 1rem 0.45rem 2.2rem;
    font-size: 0.825rem;
    color: var(--text-main);
    width: 100%;
}

.nav-search-bar input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: var(--bg-surface);
}

.nav-search-bar .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
}

.app-content {
    flex: 1;
    padding: 1.5rem;
}

/* Cards & Filters */
.card-custom {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
}

.card-custom-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-custom-body {
    padding: 1.25rem;
}

/* Clean Form Controls */
.form-control-custom, .form-select-custom {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.825rem;
    color: var(--text-main);
}

.form-control-custom:focus, .form-select-custom:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* Filter Box as seen in user screenshot */
.filter-box-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.filter-box-card label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    display: block;
}

/* Tables styling */
.table-custom {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background-color: var(--bg-body) !important;
    color: #64748b;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table-custom tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color-subtle);
    font-size: 0.835rem;
}

.table-custom tbody tr:hover td {
    background-color: rgba(59, 130, 246, 0.02);
}

/* Category Pill Tag */
.badge-category {
    background-color: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    padding: 3px 8px;
    font-weight: 500;
    font-size: 0.75rem;
}

[data-bs-theme="dark"] .badge-category {
    background-color: #1e293b;
    color: #cbd5e1;
}

/* Method Pill Tag */
.badge-method {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-radius: 6px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 600;
}

[data-bs-theme="dark"] .badge-method {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* Total Stat Pill (Like red/green badge in screenshot) */
.total-stat-pill {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.total-stat-pill-red {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.total-stat-pill-green {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Action Delete Button */
.btn-action-delete {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #fecaca;
    background-color: #ffffff;
    color: #ef4444;
    transition: all 0.15s ease;
}

.btn-action-delete:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Modals */
.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

/* Specific MultiPay Pro Page Styles */
.page-title-red {
    color: #e11d48;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-title-green {
    color: #059669;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 2px;
}

.btn-export-excel {
    background-color: #ffffff;
    color: #10b981;
    border: 1px solid #10b981;
    font-weight: 600;
    font-size: 0.825rem;
    border-radius: 8px;
    padding: 0.45rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-export-excel:hover {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #059669;
}

.btn-record-expense {
    background-color: #dc2626;
    color: #ffffff;
    border: 1px solid #dc2626;
    font-weight: 600;
    font-size: 0.825rem;
    border-radius: 8px;
    padding: 0.45rem 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-record-expense:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.btn-receive-payment {
    background-color: #10b981;
    color: #ffffff;
    border: 1px solid #10b981;
    font-weight: 600;
    font-size: 0.825rem;
    border-radius: 8px;
    padding: 0.45rem 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-receive-payment:hover {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
}

.btn-filter-submit {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.825rem;
    padding: 0.45rem 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-filter-submit:hover {
    background-color: #4338ca;
    border-color: #4338ca;
    color: #ffffff;
}

.btn-filter-reset {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.825rem;
    padding: 0.45rem 1rem;
}

.btn-filter-reset:hover {
    background-color: #f8fafc;
    color: #334155;
}

.total-badge-red {
    background-color: #dc2626;
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.925rem;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    display: inline-block;
}

.total-badge-green {
    background-color: #10b981;
    color: #ffffff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.925rem;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    display: inline-block;
}

.badge-business-light {
    background-color: #f1f5f9;
    color: #334155;
    border-radius: 6px;
    padding: 3px 10px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0 !important;
    }
}
