/* Base & Typography */
:root {
    --primary: #006492;          /* Corporate Navy / Primary */
    --primary-container: #0da2e7;/* Ocean Blue / Container */
    --accent: #0da2e7;           /* Ocean Blue */
    --success: #10b981;          /* Emerald Green */
    --warning: #f59e0b;          /* Amber */
    --danger: #ef4444;           /* Rose/Red */
    --border: #e2e8f0;           /* Border Light */
    --bg: #f8f9fa;               /* Minimalist Light Gray (surface) */
    --surface: #f8f9fa;
    --surface-container-low: #f3f4f5;
    --surface-container-high: #e7e8e9;
    --surface-container-highest: #e1e3e4;
    --card-bg: #ffffff;          /* Surface White */
    --text-main: #191c1d;        /* on_surface */
    --text-heading: #191c1d;     /* on_surface */
    --text-muted: #3e4850;       /* on_surface_variant */
    
    --radius-sm: 4px;
    --radius-md: 8px;            /* ROUND_EIGHT */
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-ambient: 0 0 32px 0 rgba(25, 28, 29, 0.04); /* Soft glow ambient shadow */
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.5;
    background-color: var(--bg);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Layout */
.site-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    flex: 0 0 250px; /* Do not grow, do not shrink, fixed 250px */
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 64px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
}

.sidebar-header img {
    height: 20px;
    width: auto;
}

.sidebar-section-label {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-nav {
    flex-grow: 1;
    padding: 0.5rem 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.sidebar-nav a i {
    font-size: 1.25rem;
    width: 20px;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-left: 3px solid var(--accent);
}

.sidebar-nav a.sub-nav {
    padding-left: 2.75rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-nav a.sub-nav i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.sidebar-nav-bottom {
    margin-top: auto;
    padding-bottom: 0.5rem;
}



.sidebar-footer {
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Important for flex child truncation */
}

/* Header */
.top-header {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb .current {
    color: var(--text-heading);
    font-weight: 500;
}

main {
    flex: 1;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 100%; /* Fully fluid for all pages */
    padding: 0 2rem;
    box-sizing: border-box;
    margin: 0 auto;
}

footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

.customer-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: none;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 100%; /* Expanded customer portal header */
    padding: 0 2rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container img {
    height: 35px;
    width: auto;
}

.portal-title {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.customer-main {
    flex-grow: 1;
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: center;
}

.content-wrapper {
    width: 100%;
    max-width: 1200px; /* Expanded from 800px for larger customer forms */
}

/* Dialog & Modal */
dialog {
    padding: 0;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: var(--card-bg);
    max-width: 650px; /* Reduced from 800px */
    width: 90%;
}


dialog::backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .btn-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-header .btn-close:hover {
    color: var(--danger) !important;
}


.modal-content {
    padding: 1.25rem 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-heading);
}

.form-group input, .form-group select, .form-group textarea {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    width: 100%;
    margin-bottom: 0;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 162, 231, 0.1);
}


.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-footer .btn {
    width: auto;
}

/* Form Layouts within Modal */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem; /* Tighter gap */
    margin-bottom: 1rem;
}

/* Modern File Drop Zone (Compact) */
.drop-zone {
    border: 2px dashed var(--accent);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem; /* Compact padding */
    text-align: center;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
    background: rgba(13, 162, 231, 0.02);
    display: flex;
    flex-direction: row; /* Horizontal layout for compactness */
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.drop-zone:hover {
    background: rgba(13, 162, 231, 0.05);
    border-color: var(--accent);
}

.drop-zone i {
    font-size: 1.5rem; /* Smaller icon */
    color: var(--accent);
}

.drop-zone .drop-text {
    font-size: 0.85rem;
    text-align: left;
}

/* Quill Editor Customization (Compact & Scrollable) */
.quill-container {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
}

.ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    background: #f8fafc;
    padding: 4px 8px !important;
}

.ql-container.ql-snow {
    border: none !important;
    height: 200px; /* Fixed height for scrollbar */
}

.ql-editor {
    overflow-y: auto; /* Ensure scrollbar */
}


/* Shared Components & Document Card */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ambient);
    margin-bottom: 1.5rem;
}

.card-header {
    background: transparent;
    border-bottom: none;
    padding: 1.25rem 1.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.15rem; /* display-sm adjusted */
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    line-height: 1.2;
}

.card-subtitle {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 1rem; /* body-lg */
}

.card-body {
    padding: 1.5rem; 
}

/* Form Sections */
.section-title {
    font-size: 1.75rem; /* headline-md */
    font-weight: 700;
    color: var(--text-heading);
    margin: 3rem 0 1.5rem;
    padding-bottom: 0px; /* No border bottom */
    border-bottom: none;
    display: flex;
    align-items: center;
}

.section-number {
    background: transparent;
    color: var(--text-muted);
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem; /* label-md */
    margin-right: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}



label {
    display: block;
    font-size: 1.125rem; /* title-md */
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.75rem;
}

/* Base Input Styles */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-main);
    box-sizing: border-box;
    transition: all 0.2s;
    min-height: 48px; /* Standardize on 48px as default, down from 64px */
}

/* Customer Facing Forms should keep large touch targets */
.customer-main input,
.customer-main select,
.customer-main textarea {
    min-height: 64px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background-color: var(--card-bg); /* surface_container_lowest */
    box-shadow: 0 0 0 2px rgba(0, 100, 146, 0.2); /* Ghost border */
}

input[disabled] {
    background-color: var(--surface-container-low);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Pill Segmented Controls */
.pill-group {
    display: flex;
    background: var(--surface-container-high);
    border-radius: var(--radius-full);
    padding: 4px;
    gap: 4px;
    width: max-content;
    max-width: 100%;
}

.pill-option {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    flex: 1;
    margin-bottom: 0; /* Reset margin from global label style */
}

.pill-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.pill-label {
    padding: 12px 24px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.pill-option input:checked + .pill-label {
    background: var(--primary-container);
    color: #ffffff;
}

.customer-form-section {
    background: var(--surface-container-low);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn-header {
    width: auto !important;
    height: 38px !important;
    padding: 0 1.25rem !important;
    font-size: 0.85rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
}

.btn-header i {
    font-size: 1.1rem !important;
}

/* Selection Cards (Checkboxes/Radios) */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.checkbox-item, .radio-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover, .radio-item:hover {
    background: #f8fafc;
    border-color: var(--accent);
}

.checkbox-item input, .radio-item input {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
}

/* Dynamic Container */
.dynamic-container {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.hidden { display: none !important; }

/* Table Styling */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    background: #fdfdfd;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: var(--bg);
}

.text-center { text-align: center; }
.text-right { text-align: right; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px; /* Pill shape */
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-success { background: #d1fae5; color: #065f46; } /* Emerald tints */
.badge-warning { background: #fef3c7; color: #92400e; } /* Amber tints */
.badge-danger { background: #fee2e2; color: #991b1b; } /* Rose tints */
.badge-neutral { background: #f1f5f9; color: #475569; } /* Slate tints */

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending { background: #f1f5f9; color: #475569; }
.status-paid { background: #d1fae5; color: #065f46; }      /* submitted / received */
.status-voided { background: #fee2e2; color: #991b1b; }    /* expired */
.status-authorised { background: #e0f2fe; color: #0369a1; } /* emailed / reminder_sent */

/* Text-only status colors (for overview numbers) */
.text-status-pending { color: #475569 !important; }
.text-status-paid { color: #065f46 !important; }
.text-status-voided { color: #991b1b !important; }
.text-status-authorised { color: #0369a1 !important; }

/* Table Select Fix */
.table-select {
    min-height: auto !important;
    height: 32px !important;
    padding: 0 1.5rem 0 0.5rem !important;
    font-size: 0.78rem !important;
    margin: 0 !important;
    background-position: right 0.2rem center !important;
    background-size: 11px !important;
}

/* Metric Cards Grid */
.grid-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.metric-title {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.metric-value {
    color: var(--text-heading);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: var(--card-bg);
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-bar input[type="text"], 
.filter-bar select {
    margin: 0 !important;
    min-height: auto !important;
    height: 34px !important; /* Reduced from 38px */
    font-size: 0.82rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.filter-bar select {
    padding-left: 0.75rem !important;
    padding-right: 2rem !important;
}

.filter-bar input[type="text"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Highlighting Search Matches */
.highlight {
    background-color: rgba(255, 235, 59, 0.35);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* High Density Table Controls */
table input[type="email"],
table input[type="text"],
table select.status,
table select.table-select {
    min-height: auto !important;
    height: 32px !important;
    padding: 0 0.75rem !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
}

table select.status {
    padding-right: 1.5rem !important;
    background-position: right 0.4rem center !important;
    background-size: 10px !important;
    border-radius: 9999px !important;
}

/* Header Search Area */
.header-search-container {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    padding-right: 1.5rem;
}

.header-search {
    position: relative;
    width: 320px;
    transition: all 0.2s;
}

.header-search input {
    width: 100%;
    padding: 0.4rem 1rem 0.4rem 2.5rem;
    background: var(--surface-container-low);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.82rem;
    transition: all 0.2s;
    min-height: auto; /* Override base input min-height */
}

.header-search input:focus {
    background: white;
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 162, 231, 0.1);
}

.header-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Header Actions & Profile */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.user-profile-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--surface-container-high);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile-placeholder:hover {
    background: var(--surface-container-highest);
    color: var(--text-main);
}


/* Campaign Panel Animation (Slide-Down) */
.campaign-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: rgba(13, 162, 231, 0.03);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease-in-out;
    padding: 0 1.5rem; /* No vertical padding when closed */
}

.campaign-panel.active {
    max-height: 1000px;
    opacity: 1;
    padding: 1.25rem 1.5rem;
}

/* Premium Refresh Button */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-refresh:hover {
    border-color: var(--primary);
    background: var(--surface-container-low);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: var(--primary);
    text-decoration: none;
}

.btn-refresh:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-refresh i {
    font-size: 1.1rem;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-refresh:hover i {
    transform: rotate(180deg);
}

@keyframes spin-once {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-refresh.loading i {
    animation: spin-once 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dashboard & Invoices Specific Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.dashboard-header-title {
    flex-grow: 1;
}

.dashboard-header-title h2 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--text-heading);
    font-weight: 700;
}

.dashboard-header-title p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stats-pills {
    display: flex;
    gap: 0.3rem;
    background: #fff;
    padding: 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-right: 1.5rem;
    overflow-x: auto;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75px; /* Uniform width for all pills */
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-sizing: border-box;
}

.stat-pill:hover {
    background: #f1f5f9;
}

.stat-pill.active {
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px var(--border);
}

.stat-pill-divider {
    width: 1px;
    background: var(--border);
    margin: 0.5rem 0.25rem;
    flex-shrink: 0;
}

.stat-pill-label {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.stat-pill-value {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.filter-bar select#year-selection,
.filter-bar select#service-selection {
    max-width: 150px;
}

.filter-bar select#jurisdiction-selection {
    max-width: 200px;
}

.filter-bar .btn-clear {
    margin-left: auto;
    width: auto;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

table th.col-checkbox,
table td.col-checkbox {
    width: 2rem;
    padding-right: 0;
}

table th.col-company {
    width: 30%;
}

table th.col-sent {
    min-width: 100px;
}

table input[type="checkbox"] {
    margin: 0 !important;
    width: 16px;
    height: 16px;
}

table td.name strong {
    color: var(--text-heading);
}

table td.name ul.line-items {
    display: block;
    margin: 0.25rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

table td.name ul.line-items li {
    margin: 0;
}

table td.amount {
    font-weight: 500;
}

.text-muted-sm {
    font-size: 0.8rem;
    color: var(--text-muted);
}

table select.status {
    min-width: 130px;
}

table select.status.status-paid { background-color: #d1fae5 !important; color: #065f46 !important; border-color: #d1fae5 !important; }
table select.status.status-authorised { background-color: #e0f2fe !important; color: #0369a1 !important; border-color: #e0f2fe !important; }
table select.status.status-voided { background-color: #fee2e2 !important; color: #991b1b !important; border-color: #fee2e2 !important; }
table select.status.status-pending { background-color: #f1f5f9 !important; color: #475569 !important; border-color: #f1f5f9 !important; }

.pagination {
    text-align: right;
    padding: 1rem;
}

.pagination .btn {
    width: auto;
    margin-left: 1rem;
}

body.modal-open {
    overflow: hidden;
}

.form-grid-divider {
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.form-group-compact {
    margin-bottom: 1rem;
}
