/* public_html/assets/css/style.css */

/* --- Color Palette --- */
:root {
    --primary-color: #003d37; /* Dark Teal */
    --primary-hover-color: #002e2a; /* Darker shade for primary hover */

    --secondary-color: #009888; /* Teal - Your specified secondary color */
    --secondary-hover-color: #007a6d; /* Darker shade for secondary hover */

    --background-light: #f4f7f6;
    --text-dark: #333;
    --text-light: #fff; /* For text on dark backgrounds */

    --sidebar-bg: var(--primary-color);
    --sidebar-hover-bg: var(--primary-hover-color);
    --bs-primary-rgb: 1, 97, 87;
}

/* --- General Body and Layout --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}
  .login-container {
            width: 100%;
            
            padding: 40px;
            background-color: #fff; /* White background for the card */
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
            text-align: center;
        }
        .login-container h3 {
            margin-bottom: 30px;
            color: var(--primary-color); /* Use primary color for heading */
            font-weight: 600;
            font-size: 2rem; /* Make heading slightly larger */
        }
        .form-control {
            padding: 12px 15px;
            font-size: 1rem;
            border-radius: 6px;
            border: 1px solid #ced4da;
            margin-bottom: 15px;
        }
        button#chargeFeeBtn{padding: 12px 15px;}
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(0, 61, 55, 0.25); /* Primary color focus */
        }
        /* Generic button styling - ensuring consistent look */
        .btn { /* Base button styles moved to style.css, but ensuring consistency */
            padding: 12px 20px; /* Slightly more padding for buttons */
            font-size: 1.1rem;
            border-radius: 6px;
            transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
            font-weight: 500;
        }
        .btn-primary { /* Overriding Bootstrap default for consistency */
            background-color: var(--primary-color);
            border-color: var(--primary-color);
            color: var(--text-light);
        }
        .btn-primary:hover {
            background-color: var(--primary-hover-color);
            border-color: var(--primary-hover-color);
            color: var(--text-light);
        }
        .btn-login { /* Specific class for the login button */
            background-color: var(--primary-color); /* Use primary color */
            border-color: var(--primary-color);
            width: 100%;
            padding: 14px;
            font-size: 1.15rem;
            font-weight: 600;
        }
        .btn-login:hover {
            background-color: var(--primary-hover-color);
            border-color: var(--primary-hover-color);
        }
        .alert {
            margin-bottom: 20px;
            border-radius: 6px;
        }
/* =====================================================
   SIDEBAR — Modern dark-teal nav
   ===================================================== */
.sidebar {
    background: linear-gradient(180deg, #003d37 0%, #002e2a 100%);
    color: var(--text-light);
    width: 260px;
    min-width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;              /* scroll only the menu area */
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.25);
}
.sidebar.collapsed { transform: translateX(-100%); }

/* ── Brand header ── */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.sidebar h3 {
    margin: 0;
    flex-grow: 1;
}
.sidebar h3 a {
    color: #fff !important;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.sidebar h3 a:hover { color: rgba(255,255,255,0.85) !important; }

.sidebar-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    flex-shrink: 0;
}
.sidebar-close-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* ── Scrollable menu area ── */
#sidebarMenu {
    flex: 1 1 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
#sidebarMenu::-webkit-scrollbar { width: 4px; }
#sidebarMenu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ── Search box ── */
.sidebar-search-wrap {
    position: relative;
    padding: 10px 14px 6px;
    flex-shrink: 0;
}
.sidebar-search-wrap input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    padding: 7px 12px 7px 32px;
    font-size: 0.82rem;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
    box-sizing: border-box;
}
.sidebar-search-wrap input::placeholder { color: rgba(255,255,255,0.35); }
.sidebar-search-wrap input:focus {
    background: rgba(255,255,255,0.14);
    border-color: var(--secondary-color);
}
.sidebar-search-wrap .search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-35%);
    color: rgba(255,255,255,0.35);
    font-size: 0.75rem;
    pointer-events: none;
}

/* ── Section labels (Bootstrap collapse triggers) ── */
.sidebar .nav-section {
    -webkit-appearance: none;
    appearance: none;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-align: left;
    /* Typography */
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    /* Spacing */
    padding: 18px 18px 5px;
    margin: 0;
    cursor: pointer;
    user-select: none;
    transition: color 0.18s;
}
.sidebar .nav-section + .nav-section,
.nav-group + .sidebar .nav-section { margin-top: 4px; }
.sidebar .nav-section:hover { color: rgba(255,255,255,0.75); }
.sidebar .nav-section:focus { outline: none; box-shadow: none !important; }
.sidebar .nav-section .nav-chevron {
    font-size: 0.55rem;
    opacity: 0.5;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}
.sidebar button.nav-section[aria-expanded="false"] .nav-chevron {
    transform: rotate(-90deg);
}

/* ── Nav group (the collapsible ul) ── */
.nav-group {
    list-style: none;
    padding: 2px 0;
    margin: 0;
}
.nav-group li { margin: 1px 10px; }
.nav-group li a {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 400;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
    border-left: 3px solid transparent;
    line-height: 1.4;
}
.nav-group li a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.75;
    flex-shrink: 0;
}
.nav-group li a:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
    border-left-color: rgba(255,255,255,0.2);
}
.nav-group li a.active {
    background: rgba(0,152,136,0.22);
    color: #fff;
    font-weight: 500;
    border-left-color: var(--secondary-color);
}
.nav-group li a.active i { opacity: 1; }

/* Force groups visible while searching */
#sidebarMenu.is-searching .nav-group {
    display: block !important;
}

/* ── No-results notice ── */
.sidebar-no-results {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    text-align: center;
    padding: 8px 14px;
    display: none;
}

/* --- Main Content Area --- */
.main-content {
    margin-left: 260px; /* matches sidebar width */
    padding: 30px;
    flex-grow: 1;
    width: calc(100% - 260px); /* Account for sidebar width */
    background-color: var(--background-light);
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out; /* Smooth transition */
}
/* Shift main content when sidebar is hidden */
.main-content.shifted {
    margin-left: 0 !important; /* Remove left margin */
    width: 100% !important;   /* Take full width */
}

/* --- Hamburger Menu Button --- */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1001; /* Above sidebar */
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
}
.hamburger-menu:hover {
    background: var(--primary-hover-color);
}

/* --- Overlay for Sidebar --- */
.overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999; /* Below sidebar, but above main content */
    cursor: pointer;
}
/* Show overlay when sidebar is visible */
.sidebar.visible ~ .overlay { /* When sidebar has the 'visible' class */
    display: block;
}
/* --- End Overlay --- */

    .table-container {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 0 20px rgba(0,0,0,0.1);
        }
        
        .custom-checkbox {
            width: 18px;
            height: 18px;
        }
        
        .quantity-input {
            width: 80px;
            text-align: center;
        }
        
        .price-column {
            font-family: 'Courier New', monospace;
            font-weight: 600;
        }
        
        .book-title {
            font-weight: 500;
        }
        
        .table > :not(caption) > * > * {
            padding: 1rem 0.75rem;
        }
        button.accordion-button:not(.collapsed) {
    background: #059788;
    color: #fff;
}
        button.accordion-button.collapsed {
    background: #fff;
    color: var(--primary-color);
}
.btn-success {
    background-color: #059788;
    border-color: #059788;
    color: var(--text-light);
}
/* --- Cards and Forms --- */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: none;
}
.card-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 10px 10px 0 0;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
}
.card-header.bg-white,
.card-header.bg-light {
    color: var(--primary-color);
}
.card-body {
    padding: 25px;
    background-color: #fff;
    border-radius: 0 0 10px 10px;
}
.form-control, .form-select {
    padding: 12px 15px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ced4da;
    margin-bottom: 15px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 61, 55, 0.25);
}

/* Filter button alignment with form controls */
.filter-btn-align {
    padding: 12px 20px !important;
}

/* --- Button Styling --- */
.btn {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
}
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-light);
}
.btn-primary:hover {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
}
.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.btn-success:hover { background-color: #27ae60; border-color: #27ae60; color: var(--text-light); }

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-light);
}
.btn-secondary:hover {
    background-color: var(--secondary-hover-color);
    border-color: var(--secondary-hover-color);
    color: var(--text-light);
}
.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}
.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-info {
    background-color: #0d9fba;
    border-color: #0d9fba;
    color: var(--text-light);
}
.btn-info:hover {
    background-color: #0b87a0;
    border-color: #0b87a0;
    color: var(--text-light);
}

/* Alerts */
.alert {
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid transparent;
    color: var(--text-dark);
}
.alert-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }
.alert-info { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; }


/* --- Mobile First Adjustments --- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%); /* Hide sidebar by default on mobile */
        position: fixed; /* Keep it fixed */
        height: 100vh;
        z-index: 1001;
        border-radius: 0 10px 10px 0;
        transition: transform 0.3s ease-in-out;
    }
    /* Class to show sidebar when toggle is clicked */
    .sidebar.visible {
        transform: translateX(0); /* Slide in */
    }

    .main-content {
        margin-left: 0 !important; /* Remove left margin when sidebar hidden */
        width: 100% !important;   /* Take full width */
        padding: 15px;
        transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
    }
    /* Class to adjust main content when sidebar is hidden */
    .main-content.shifted {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
    }
    /* Adjust card body padding for mobile */
    .card-body { padding: 15px; }
    /* Ensure search suggestions align well */
    #searchSuggestions { width: calc(100% - 30px); }
}

/* --- Print Styles --- */
@media print {
    /* ... (your existing receipt-print.css content) ... */
    /* Ensure you don't have conflicting styles */
    .sidebar, .hamburger-menu, .btn, form, .alert:not(.alert-danger), .card-header, #searchSuggestions {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: none !important;
    }
    .card-body {
        padding: 0 !important;
    }
    #printableReceipt {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .receipt-header, .receipt-footer {
        border-bottom: 1px solid #000 !important;
        padding-bottom: 5px !important;
        margin-bottom: 15px !important;
    }
    .receipt-header h2 { font-size: 24pt !important; }
    .receipt-header p { font-size: 10pt !important; }
    .receipt-footer {
        border-top: 1px solid #000 !important;
        padding-top: 5px !important;
        margin-top: 15px !important;
        font-size: 10pt !important;
    }
    .fees-table th, .fees-table td {
        padding: 8px 10px !important;
        border: 1px solid #000 !important;
    }
    .fees-table th { font-size: 12pt !important; background-color: #f2f2f2 !important; color: #000 !important; }
    .fees-table td.text-end { text-align: right !important; }
    .fees-table tfoot td { font-weight: bold !important; }
    .col-md-6 { width: 50% !important; float: left !important; }
    .row::after { content: ""; display: table; clear: both; }
}
/* --- Custom Card Header Styling --- */
/* Custom bg-light override for card headers */
.card-header.custom-bg-light {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
}

/* Apply primary color to heading text in custom-bg-light card headers */
.card-header.custom-bg-light h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.card-header.custom-bg-light h5 i {
    color: var(--primary-color);
}

/* ==========================================================================
   Admin Modules — Enquiries & Registrations
   Fixes Bootstrap -sm variant sizing being crushed by global .btn /
   .form-control overrides, and provides cohesive filter-bar + stat-card
   components aligned to the RSC brand palette.
   ========================================================================== */

/* ── Restore Bootstrap small-variant sizing ── */
.btn-sm {
    padding: .35rem .8rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: 5px;
}
.form-control-sm,
.form-select-sm {
    padding: .35rem .75rem;
    font-size: .875rem;
    line-height: 1.5;
    min-height: unset;
    margin-bottom: 0;
}

/* ── Admin filter bar ──
   A white pill-shadowed row that houses selects + buttons at the same height.
   Usage: <form class="admin-filter-bar d-flex align-items-center gap-2 flex-wrap">
   ────────────────────────────────────────────────────────────────────────── */
.admin-filter-bar {
    background: #fff;
    border: 1px solid #e4e9e8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,61,55,.07);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-filter-bar .form-select,
.admin-filter-bar .form-control {
    height: 38px;
    padding: .375rem .75rem;
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: 0;
    border-color: #ced4da;
}
.admin-filter-bar .form-select:focus,
.admin-filter-bar .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 .15rem rgba(0,61,55,.18);
}
.admin-filter-bar .btn {
    height: 38px;
    padding: 0 14px;
    font-size: .9rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.admin-filter-bar label {
    font-size: .875rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    margin-bottom: 0;
}

/* ── Admin stat cards ──
   Left-accent card with coloured icon badge and hover lift.
   Usage: <a class="admin-stat-card accent-primary h-100"> ... </a>
   ────────────────────────────────────────────────────────────────────────── */
.admin-stat-card {
    --card-accent:    #ced4da;
    --card-accent-bg: #f4f7f6;
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eaeeec;
    border-left: 4px solid var(--card-accent);
    padding: 16px 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: box-shadow .18s, transform .15s;
    color: inherit;
}
.admin-stat-card:hover {
    box-shadow: 0 5px 18px rgba(0,0,0,.11);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.admin-stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    background: var(--card-accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: var(--card-accent);
}
.admin-stat-card .stat-count {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1f1e;
}
.admin-stat-card .stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 3px;
}

/* Accent colour tokens */
.admin-stat-card.accent-primary  { --card-accent: var(--primary-color);  --card-accent-bg: rgba(0,61,55,.07); }
.admin-stat-card.accent-teal     { --card-accent: var(--secondary-color); --card-accent-bg: rgba(0,152,136,.08); }
.admin-stat-card.accent-warning  { --card-accent: #d4900f;               --card-accent-bg: rgba(212,144,15,.09); }
.admin-stat-card.accent-success  { --card-accent: #059788;               --card-accent-bg: rgba(5,151,136,.08); }
.admin-stat-card.accent-danger   { --card-accent: #dc3545;               --card-accent-bg: rgba(220,53,69,.07); }
.admin-stat-card.accent-muted    { --card-accent: #6c757d;               --card-accent-bg: rgba(108,117,125,.07); }

/* Inside normal Bootstrap form groups the 15px bottom margin on
   .form-control/.form-select is intentional for spacing.
   Reset it only when the input is the LAST child (button follows),
   or inside a d-flex row where the gap property handles spacing. */
.d-flex > .form-control,
.d-flex > .form-select,
.input-group .form-control,
.input-group .form-select {
    margin-bottom: 0;
}
.input-group .input-group-text {
    padding-top: 12px;
    padding-bottom: 12px;
}


/* --- Filter rows -----------------------------------------------------------
   A flex column only shrinks to its content's intrinsic minimum width, and a text
   input's minimum is wider than the space left once the fixed columns and the
   action buttons have taken theirs — which pushed the Filter/Clear group onto a
   line of its own. Allowing the growing column and its control to shrink keeps the
   whole filter bar, buttons included, on one row. */
.filter-row > [class*="col-"] { min-width: 0; }
.filter-row .form-control,
.filter-row .form-select { min-width: 0; }

/* Filter bars: a shrink-to-fit flex row rather than 12 fixed columns.
   Bootstrap's twelfths round to whole pixels, and six cells at 16.666% summed to one
   pixel more than the container, which bumped the Filter/Clear group onto a line of
   its own. Flex bases let every field give ground instead, so the buttons stay level
   with the inputs and the bar still wraps sensibly on small screens. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
/* position: relative anchors any autocomplete panel to its own field. */
.filter-bar .filter-field { flex: 1 1 170px; min-width: 0; position: relative; }
.filter-bar .filter-field .form-control,
.filter-bar .filter-field .form-select { min-width: 0; width: 100%; }
.filter-bar .filter-actions { flex: 0 0 auto; display: flex; gap: .5rem; }
@media (max-width: 575.98px) {
  .filter-bar .filter-field,
  .filter-bar .filter-actions { flex: 1 1 100%; }
  .filter-bar .filter-actions .btn { flex: 1 1 auto; }
}

/* From large screens up the bar stays on one line. Safe here because every field is
   flex: 1 1 170px with min-width 0, so they give ground instead of overflowing; the
   action buttons are the only item that keeps its size. Below 992px it wraps. */
@media (min-width: 992px) {
  .filter-bar { flex-wrap: nowrap; }
}

/* Floors so the shrinking never truncates a value: a date needs room for dd/mm/yyyy
   plus its picker icon, a select for its caret. Search absorbs the remaining squeeze. */
/* These must out-specify `.filter-bar .filter-field .form-control { min-width: 0 }`
   above, or the floor is ignored and the values truncate. */
/* The floor has to sit on the flex item itself. Putting it only on the control lets
   the wrapper shrink past it, and the control then spills over its neighbour. */
.filter-bar .filter-field:has(input[type="date"])  { min-width: 150px; }
/* A month renders its name in full ("September 2025"), so it needs more than a date. */
.filter-bar .filter-field:has(input[type="month"]) { min-width: 178px; }
.filter-bar .filter-field:has(select)              { min-width: 136px; }

.filter-bar .filter-field input[type="date"].form-control  { min-width: 150px; }
.filter-bar .filter-field input[type="month"].form-control { min-width: 100%; }
.filter-bar .filter-field select.form-select               { min-width: 136px; }

/* Free-text search and long option labels need more room than a date or a
   short select, so they claim a bigger share of the bar. */
.filter-bar .filter-field--wide { flex: 2 1 230px; }

/* The reconciled view carries one filter more than the others; seven controls on a
   single line squeezes the date pickers and wraps the labels, so this one keeps
   wrapping. The buttons still sit level with the fields on whichever row they land. */
.filter-bar--wrap { flex-wrap: wrap; }

/* .form-control carries margin-bottom: 15px globally (it suits stacked forms). Inside a
   bottom-aligned filter row that margin sits below the input, so flex-end lines up the
   COLUMN bottoms and leaves the buttons sitting 15px lower than the fields they belong
   to. Drop it wherever a row is explicitly bottom-aligned. */
.filter-bar .form-control,
.filter-bar .form-select,
.row.align-items-end .form-control,
.row.align-items-end .form-select { margin-bottom: 0; }
