:root {
    /* Premium SaaS Color Palette (Stripe/Linear Inspired) */
    --primary: #6366f1; /* Modern Indigo */
    --primary-hover: #4f46e5;
    --primary-dark: #3730a3;
    --primary-soft: #f5f3ff;
    --primary-glow: rgba(99, 102, 241, 0.15);
    
    --success: #10b981; /* Emerald green */
    --success-soft: #ecfdf5;
    
    --warning: #f59e0b; /* Amber */
    --warning-soft: #fffbeb;
    
    --danger: #ef4444; /* Rose red */
    --danger-soft: #fff5f5;
    
    --info: #06b6d4; /* Cyan */
    --info-soft: #ecfeff;
    
    --background: #f8fafc; /* Sleek Slate Gray */
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8; /* Slate 400 */
    --border: #e2e8f0; /* Slate 200 */
    
    /* Deep Slate/Indigo Dark Sidebar */
    --sidebar: #0f172a;
    --sidebar-2: #1e1b4b;
    --sidebar-border: rgba(255, 255, 255, 0.06);
    
    /* Shadows and Borders */
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1), 0 8px 16px rgba(15, 23, 42, 0.05);
    --radius: 14px;
    --radius-sm: 10px;
    
    /* Modals & Dialogs */
    --modal-bg: #ffffff;
    --modal-border: #e2e8f0;
    --modal-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    --modal-radius: 18px;
    --sidebar-width: 284px;
}

/* Global Aesthetics */
* {
    letter-spacing: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: 
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.04), transparent 45rem),
        radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.03), transparent 35rem),
        var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* App Shell Structure */
#wrapper {
    min-height: 100vh;
}

#page-content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-shell {
    min-height: 100vh;
    align-items: stretch;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color: #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1040;
    padding: 20px 16px;
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    flex: 0 0 auto;
}

.brand-title {
    color: white;
    font-weight: 700;
    line-height: 1.2;
    font-size: 0.95rem;
}

.brand-subtitle {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 1px;
}

.sidebar-profile {
    margin: 20px 4px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar,
.avatar-initials {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary);
    text-transform: uppercase;
    flex: 0 0 auto;
    font-size: 0.85rem;
}

.sidebar-profile .name {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-profile .role {
    color: #94a3b8;
    font-size: 0.72rem;
}

.sidebar-section {
    margin-top: 20px;
}

.sidebar-section-title {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 10px 8px;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-link i {
    font-size: 1.15rem;
    color: #64748b;
    transition: color 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: white;
}

.sidebar-link span,
.sidebar-section-title,
.sidebar-profile .name,
.sidebar-profile .role,
.brand-title,
.brand-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link:hover i,
.sidebar-link.active i,
.sidebar-link.active {
    color: white;
}

.sidebar-link.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.sidebar-link.active i {
    color: white;
}

/* Sticky Topbar Styling */
.app-topbar {
    min-height: 64px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.breadcrumb-mini {
    color: var(--text-secondary);
    font-size: 0.72rem;
    margin-top: 1px;
}

.topbar-search {
    max-width: 320px;
    width: 100%;
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-search input {
    padding-left: 36px;
    font-size: 0.85rem;
    background: #f1f5f9;
    border: 1px solid transparent;
}

.topbar-search input:focus {
    background: white;
    border-color: var(--primary);
}

.content-pad,
.container-fluid {
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.page-title {
    font-weight: 800 !important;
}

/* Page header bar — normalizes the legacy navbar header across all pages */
nav.navbar.navbar-expand-lg.navbar-light {
    background: transparent !important;
    border-bottom: none !important;
    padding: 18px 24px;
}

nav.navbar.navbar-expand-lg.navbar-light h2,
nav.navbar.navbar-expand-lg.navbar-light h1 {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    margin: 0 !important;
}

/* Financial / numeric table cells */
.table td.text-end,
.table th.text-end {
    text-align: right !important;
}

/* Premium Card Styles */
.card,
.table-card,
.card-settings,
.link-card,
.settings-card,
.metric-card,
.bg-white.rounded.shadow-sm,
.bg-white.rounded,
.p-4.bg-white,
.p-3.bg-white {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
    background: var(--surface) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
}

.card:hover,
.metric-card:hover {
    box-shadow: var(--shadow) !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}

/* List Toolbar Card Dropdown Overflow & Stacking */
.list-toolbar-card,
.card.list-toolbar-card {
    overflow: visible !important;
    position: relative;
    z-index: 20;
}

.list-toolbar-card .card-body,
.card.list-toolbar-card .card-body {
    overflow: visible !important;
}

.list-toolbar-card:hover,
.card.list-toolbar-card:hover {
    transform: none !important;
}

/* Form Controls & Styling */
.form-control,
.form-select,
.input-group-text {
    border-color: var(--border);
    border-radius: var(--radius-sm);
    min-height: 40px;
    font-size: 0.85rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.required-mark {
    color: var(--danger);
    font-weight: 700;
    margin-left: 2px;
}

/* Buttons System */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    transition: all 0.15s ease;
}

.btn-primary,
.btn-submit {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-submit:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

.btn-white,
.btn-light,
.btn-cancel {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-secondary) !important;
}

.btn-white:hover,
.btn-light:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: var(--text-primary) !important;
}

/* Tables & Pagination */
.table-responsive {
    border-radius: var(--radius);
}

.table {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.table thead th {
    background: var(--surface-muted) !important;
    color: var(--text-secondary) !important;
    font-size: 0.72rem !important;
    text-transform: uppercase;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border) !important;
    padding: 12px 16px !important;
}

.table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #f8fafc !important;
}

.page-item .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-color: var(--border);
}

.page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* Badge System */
.badge,
.status-badge,
.status-dropdown {
    border-radius: 6px !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.badge-paid,
.badge-completed,
.bg-paid-soft,
.badge-soft-success,
.bg-light-success,
.status-paid,
.status-completed {
    background: var(--success-soft) !important;
    color: var(--success) !important;
}

.badge-partial,
.badge-soft-warning,
.bg-warning,
.badge-pending,
.status-pending,
.status-partially_paid {
    background: var(--warning-soft) !important;
    color: var(--warning) !important;
}

.badge-failed,
.badge-cancelled,
.bg-outstanding-soft,
.badge-soft-danger,
.bg-light-danger,
.status-outstanding,
.status-cancelled {
    background: var(--danger-soft) !important;
    color: var(--danger) !important;
}

.badge-upgrade {
    background: #fff1f2 !important;
    color: #f64e60 !important;
    border: 1px solid #ffe4e6 !important;
}

.badge-draft {
    background: #f1f3f9 !important;
    color: #7e8299 !important;
    border: 1px solid #eef0f7 !important;
}

.badge-published {
    background: #e8fff3 !important;
    color: #50cd89 !important;
    border: 1px solid #d1f7e4 !important;
}

.form-icon-box {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #7e8299;
}

.btn-outline-custom {
    border: 1px solid #eef0f7;
    color: #3699ff;
    font-weight: 500;
    font-size: 0.85rem;
}

.btn-outline-custom:hover {
    background-color: #f1f6ff;
    color: #3699ff;
}

/* Modals Modernization */
.modal-backdrop.show {
    opacity: 0.3;
}

.modal-content,
.app-modal .modal-content {
    background: var(--modal-bg) !important;
    border: 1px solid var(--modal-border) !important;
    border-radius: var(--modal-radius) !important;
    box-shadow: var(--modal-shadow) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border) !important;
    background: var(--surface-muted) !important;
    padding: 16px 24px !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid var(--border) !important;
    background: var(--surface-muted) !important;
    padding: 16px 24px !important;
}

.modal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 1.15rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.modal-subtitle {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.app-toast-container {
    position: fixed !important;
    top: 1.25rem !important;
    right: 1.25rem !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    max-width: calc(100vw - 32px) !important;
    pointer-events: none !important;
}

@media (max-width: 576px) {
    .app-toast-container {
        top: 0.75rem !important;
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: auto !important;
        max-width: none !important;
    }
    .app-toast {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.app-toast {
    pointer-events: auto !important;
    width: 360px !important;
    max-width: calc(100vw - 32px) !important;
    background-color: #ffffff !important;
    border-radius: 14px !important;
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden;
}

.app-toast.showing,
.app-toast.show {
    animation: appToastSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes appToastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.96);
    }
    70% {
        transform: translateX(-3px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.app-toast-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}

.app-toast-icon-box {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.app-toast-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    margin-top: 1px;
}

.app-toast-title {
    font-size: 0.925rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    margin-bottom: 2px;
}

.app-toast-message {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.45;
    color: #334155;
    word-break: break-word;
}

.app-toast-close {
    flex-shrink: 0;
    margin-top: 2px;
    margin-right: -4px;
    width: 0.8rem;
    height: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.app-toast-close:hover {
    opacity: 1;
}

/* Danger / Error Theme (Bright, clean, highly visible) */
.app-toast-danger {
    border: 1px solid #fee2e2 !important;
    border-left: 4px solid #ef4444 !important;
}

.app-toast-danger .app-toast-icon-box {
    background: #fef2f2 !important;
    color: #ef4444 !important;
    border: 1px solid #fee2e2 !important;
}

/* Success Theme */
.app-toast-success {
    border: 1px solid #d1fae5 !important;
    border-left: 4px solid #10b981 !important;
}

.app-toast-success .app-toast-icon-box {
    background: #ecfdf5 !important;
    color: #10b981 !important;
    border: 1px solid #d1fae5 !important;
}

/* Warning Theme */
.app-toast-warning {
    border: 1px solid #fef3c7 !important;
    border-left: 4px solid #f59e0b !important;
}

.app-toast-warning .app-toast-icon-box {
    background: #fffbeb !important;
    color: #f59e0b !important;
    border: 1px solid #fef3c7 !important;
}

/* Info Theme */
.app-toast-info {
    border: 1px solid #cffafe !important;
    border-left: 4px solid #06b6d4 !important;
}

.app-toast-info .app-toast-icon-box {
    background: #ecfeff !important;
    color: #06b6d4 !important;
    border: 1px solid #cffafe !important;
}

/* Legacy markup compatibility */
.app-toast .toast-header {
    border-bottom: 0;
    background: #fff;
    padding: 0.85rem 1rem 0.25rem;
}

.app-toast .toast-body {
    padding: 0.25rem 1rem 0.95rem;
    color: #334155;
    font-size: 0.85rem;
}

.app-toast-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.65rem;
    font-size: 1.05rem;
}

.app-toast-success .app-toast-mark { background: var(--success-soft); color: var(--success); }
.app-toast-danger .app-toast-mark { background: var(--danger-soft); color: var(--danger); }
.app-toast-warning .app-toast-mark { background: var(--warning-soft); color: var(--warning); }
.app-toast-info .app-toast-mark { background: var(--info-soft); color: var(--info); }

.btn .app-btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.45rem;
    vertical-align: -0.15rem;
    animation: app-spin 0.7s linear infinite;
}

@keyframes app-spin {
    to { transform: rotate(360deg); }
}

/* KPI Metric Cards */
.kpi-card {
    min-height: 120px;
    padding: 20px !important;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.2rem;
}

.kpi-card::after {
    display: none; /* Strip out legacy round shape for modern card borders */
}

/* WebKit Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive & Sidebar Toggles */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        height: 100vh;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        z-index: 1030;
    }

    .sidebar {
        z-index: 1045;
    }

    .app-topbar {
        padding: 10px 16px;
    }

    .topbar-search {
        display: none;
    }

    .content-pad,
    .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .app-toast-container {
        left: 0;
        right: 0;
        top: 0;
        padding: 0.75rem !important;
    }

    .app-toast-container .toast {
        width: 100%;
    }
}

/* Legacy custom classes (normalized into the design system) */
.nav-icon-box {
    width: 40px;
    height: 40px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    position: relative;
    flex: 0 0 auto;
}

.plus-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.location-name {
    font-weight: 600;
    color: var(--text-primary);
}

.action-icons i {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    vertical-align: middle;
    margin-left: 10px;
}

.action-icons i:hover {
    color: var(--primary);
}

.dot-active {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.field-group {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.field-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    flex: 0 0 auto;
}

.field-content {
    flex-grow: 1;
}

.client-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    margin-right: 10px;
    flex: 0 0 auto;
}

.service-icon-box {
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    margin-right: 12px;
    flex: 0 0 auto;
}

.service-icon-box i {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.text-outstanding { color: var(--danger) !important; }
.text-paid { color: var(--success) !important; }
.fw-500 { font-weight: 500 !important; }

/* Filter bar / search controls */
.filter-select {
    background: var(--surface-muted);
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.filter-select:hover,
.filter-select.show {
    background: #fff;
    border-color: var(--border);
    color: var(--text-primary);
}

.search-container {
    position: relative;
}

.search-container i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 5;
}

.search-input {
    background: var(--surface-muted);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding-left: 40px;
}

.search-input:focus {
    background: #fff;
    border-color: var(--primary);
}

/* Friendly empty state */
.empty-state {
    padding: 4rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.35;
    margin-bottom: 1.25rem;
}

.empty-state h3,
.empty-state h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Field-level validation error styling (positioned directly above inputs) */
.app-field-error,
.invalid-feedback.d-block {
    display: block;
    width: 100%;
    margin-top: 0;
    margin-bottom: 6px;
    color: #dc3545;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
}

.is-invalid {
    border-color: #dc3545;
}
