/* FONFIX4U - Professional Theme */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255,255,255,0.08);
    --card-radius: 0.85rem;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.925rem;
    background: #f1f5f9;
    color: #1e293b;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transition: margin-left 0.25s ease;
}

.sidebar .brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .brand h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 0.65rem 1rem;
    margin: 0.15rem 0.75rem;
    border-radius: 0.55rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar .nav-link i {
    width: 22px;
    font-size: 1.05rem;
}

.sidebar .nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 1rem 1.5rem 0.4rem;
    font-weight: 600;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    border-radius: var(--card-radius);
    background: #fff;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.stat-card {
    border-left: 4px solid var(--primary);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(0,0,0,0.1);
}

/* Tables */
.table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}

.table th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom-width: 1px;
}

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

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Forms */
.form-label {
    font-weight: 600;
    font-size: 0.825rem;
    color: #334155;
}

.form-control, .form-select {
    border-color: var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header h4 {
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.search-box {
    max-width: 280px;
}

.action-btns .btn {
    padding: 0.25rem 0.5rem;
}

/* Badges */
.badge-status {
    font-weight: 500;
    padding: 0.35em 0.7em;
    border-radius: 0.35rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.65rem;
}

/* Mobile */
@media (max-width: 991.98px) {
    .sidebar {
        margin-left: calc(var(--sidebar-width) * -1);
    }

    .sidebar.show {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Print */
@media print {
    .sidebar,
    .topbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Phase 11 — Advanced UI/UX */
:root {
    --ui-surface: #ffffff;
    --ui-muted: #64748b;
    --ui-soft: #f8fafc;
}

.topbar {
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.94);
}

.global-search-form {
    width: min(430px, 42vw);
    position: relative;
    align-items: center;
}

.global-search-form > i {
    position: absolute;
    left: 13px;
    color: #94a3b8;
    pointer-events: none;
}

.global-search-form input {
    width: 100%;
    height: 40px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0 62px 0 38px;
    outline: none;
    transition: .18s ease;
}

.global-search-form input:focus {
    background: #fff;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}

.global-search-form kbd {
    position: absolute;
    right: 10px;
    border: 1px solid #dbe3ed;
    background: #fff;
    color: #64748b;
    border-radius: 5px;
    padding: 2px 5px;
    font-size: .67rem;
}

.global-search-live {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1080;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15,23,42,.12);
    max-height: min(70vh, 420px);
    overflow: auto;
    padding: 6px;
}
.global-search-live a,
.global-search-live .live-empty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
}
.global-search-live a:hover,
.global-search-live a.active {
    background: #eff6ff;
}
.global-search-live .live-ico {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #2563eb;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
}
.global-search-live .live-title {
    font-weight: 650;
    font-size: .86rem;
    line-height: 1.2;
}
.global-search-live .live-meta {
    font-size: .74rem;
    color: #64748b;
}
.global-search-live .live-pill {
    font-size: .65rem;
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: 6px;
}
.global-search-live .live-empty {
    color: #64748b;
    font-size: .85rem;
}

.topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: .18s ease;
}

.topbar-icon-btn:hover {
    background: #eef4ff;
    color: var(--primary);
}

.notification-dot {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 99px;
    background: #ef4444;
    color: #fff;
    font-size: .62rem;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
}

.ui-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ui-page-header h4 {
    font-weight: 750;
    letter-spacing: -.025em;
    margin: 0;
}

.ui-page-header p {
    color: var(--ui-muted);
    margin: .25rem 0 0;
}

.ui-soft-card {
    background: linear-gradient(180deg,#fff,#fbfdff);
    border: 1px solid #e8eef5;
    box-shadow: 0 10px 30px rgba(15,23,42,.045);
}

.ui-hover {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ui-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15,23,42,.08);
    border-color: #d8e4f0;
}

.search-result-group {
    margin-bottom: 1.5rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eef2f7;
}

.search-result-item:last-child {
    border-bottom: 0;
}

.search-result-item:hover {
    background: #f8fbff;
}

.search-result-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex: none;
}

.search-result-meta {
    font-size: .76rem;
    color: #64748b;
}

.search-pill {
    font-size: .7rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
}

.notification-item {
    position: relative;
    display: flex;
    gap: .85rem;
    padding: 1rem;
    border-bottom: 1px solid #eef2f7;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: #f8fbff;
}

.notification-item.unread {
    background: #f8fbff;
}

.notification-item.unread::before {
    content: '';
    width: 4px;
    border-radius: 4px;
    background: #2563eb;
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    background: #eef2ff;
    color: #4f46e5;
}

.notification-time {
    color: #94a3b8;
    font-size: .72rem;
}

@media (max-width: 767.98px) {
    .ui-page-header {
        flex-direction: column;
    }

    .global-search-form {
        width: 100%;
    }
}

/* =========================================================
   FONFIX4U - SIDEBAR CLEAN SCROLLBAR / GUTTER FIX
   ========================================================= */

/*
 * IMPORTANT:
 * The previous problem was caused by the navigation wrapper
 * using Bootstrap's overflow-auto class. Keep scrolling enabled,
 * but hide the scrollbar itself.
 */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar > .flex-grow-1 {
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;

    /* Firefox */
    scrollbar-width: none !important;

    /* Internet Explorer / old Edge */
    -ms-overflow-style: none !important;
}

.sidebar > .flex-grow-1::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

.sidebar > .flex-grow-1::-webkit-scrollbar-track,
.sidebar > .flex-grow-1::-webkit-scrollbar-thumb {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}

.sidebar > .p-3.border-top {
    flex-shrink: 0;
}

/* Prevent navigation items from creating horizontal overflow. */
.sidebar .nav,
.sidebar .nav-item,
.sidebar .nav-link {
    max-width: 100%;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
}

/* Main area must start exactly after the sidebar. */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Keep topbar inside the main content width. */
.main-content .topbar {
    width: 100%;
    box-sizing: border-box;
}

/* Mobile */
@media (max-width: 991.98px) {
    .sidebar {
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-width);
        margin-left: calc(var(--sidebar-width) * -1);
    }

    .sidebar.show {
        margin-left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}


/* FONFIX4U Professional Dashboard */
.dashboard-hero{position:relative;overflow:hidden;border:1px solid #dce8fb;border-radius:24px;padding:26px 28px;background:radial-gradient(circle at 100% 0%,rgba(37,99,235,.16),transparent 30%),linear-gradient(135deg,#f8fbff,#fff 58%,#f1fbf8);box-shadow:0 18px 45px rgba(15,23,42,.055)}
.dashboard-hero h2{letter-spacing:-.04em;font-weight:800}
.dashboard-stat{border:1px solid #e8eef5;border-radius:18px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.045);padding:18px;height:100%;transition:.18s ease}
.dashboard-stat:hover{transform:translateY(-2px);box-shadow:0 16px 38px rgba(15,23,42,.075)}
.dashboard-stat-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-size:1.1rem;background:#eff6ff;color:#2563eb}
.dashboard-stat-value{font-size:1.45rem;font-weight:800;letter-spacing:-.03em;margin-top:14px}
.dashboard-stat-label{font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;font-weight:700}
.quick-action{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;border:1px solid #e7edf5;border-radius:14px;text-decoration:none;color:inherit;background:#fff;transition:.18s ease}
.quick-action:hover{border-color:#cfe0f7;background:#f8fbff;transform:translateY(-1px)}
.quick-action-icon{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#eff6ff;color:#2563eb;flex:none}
.dashboard-table thead th{background:#f8fafc}.dashboard-table tbody tr:hover{background:#fbfdff}
@media(max-width:575.98px){.dashboard-hero{padding:20px}.dashboard-stat{padding:15px}}


/* FONFIX4U Save/Visibility Patch 2026 */
.dashboard-stat{border:1px solid #c9d7ea;background:#edf3fb;box-shadow:0 10px 28px rgba(15,23,42,.08);}
.dashboard-stat:hover{border-color:#a9c0e2;background:#e7effa;box-shadow:0 16px 36px rgba(15,23,42,.12);}
.dashboard-stat:nth-child(2) .dashboard-stat-icon{background:#ffecd9 !important;color:#c2410c !important;}
.dashboard-stat:nth-child(3) .dashboard-stat-icon{background:#dff7eb !important;color:#047857 !important;}
.dashboard-stat:nth-child(4) .dashboard-stat-icon{background:#ece5ff !important;color:#6d28d9 !important;}
.dashboard-stat:nth-child(5) .dashboard-stat-icon{background:#d9f5f8 !important;color:#0e7490 !important;}
.dashboard-stat:nth-child(6) .dashboard-stat-icon{background:#fee2e2 !important;color:#b91c1c !important;}
.dashboard-stat-value{font-weight:850;}
.dashboard-stat-label{color:#475569;}

/* FONFIX4U_FINAL_DASHBOARD_CARD_COLOURS */
.dashboard-overview-row .dashboard-stat{border:1px solid rgba(15,23,42,.08);box-shadow:0 12px 30px rgba(15,23,42,.07);background:#fff}
.dashboard-overview-row>div:nth-child(1) .dashboard-stat{background:linear-gradient(135deg,#eef4ff,#ffffff)}
.dashboard-overview-row>div:nth-child(2) .dashboard-stat{background:linear-gradient(135deg,#fff4e6,#ffffff)}
.dashboard-overview-row>div:nth-child(3) .dashboard-stat{background:linear-gradient(135deg,#e9fbf3,#ffffff)}
.dashboard-overview-row>div:nth-child(4) .dashboard-stat{background:linear-gradient(135deg,#f2edff,#ffffff)}
.dashboard-overview-row>div:nth-child(5) .dashboard-stat{background:linear-gradient(135deg,#e7fbfd,#ffffff)}
.dashboard-overview-row>div:nth-child(6) .dashboard-stat{background:linear-gradient(135deg,#fff0f0,#ffffff)}
.dashboard-overview-row .dashboard-stat-icon{box-shadow:0 5px 14px rgba(15,23,42,.08)}
.dashboard-overview-row .dashboard-stat-value{font-size:1.55rem}
/* FONFIX4U_NOTIFICATION_AND_THERMAL_UI */
.notification-dropdown-menu{width:min(390px,calc(100vw - 24px));border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 18px 45px rgba(15,23,42,.16);overflow:hidden}
.notification-dropdown-head{background:#fff}
.notification-dropdown-list{max-height:420px;overflow:auto}
.notification-dropdown-item{display:flex;gap:10px;padding:12px 14px;text-decoration:none;color:#1e293b;border-bottom:1px solid #eef2f7;transition:background .15s ease}
.notification-dropdown-item:hover{background:#f8fafc}
.notification-dropdown-item.unread{background:#eff6ff}
.notification-dropdown-icon{width:34px;height:34px;min-width:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#eef4ff;color:#2563eb}
.notification-unread-dot{width:8px;height:8px;border-radius:50%;background:#2563eb;display:inline-block;margin-top:5px}
.notification-dropdown-foot{background:#f8fafc}
.notification-item.focused{background:#eff6ff;box-shadow:inset 3px 0 0 #2563eb}
.detail-box{height:100%;padding:14px;border:1px solid #e2e8f0;border-radius:14px;background:#fbfdff}
/* Default: compact modal for simple forms (customer, payment, expense, supplier) */
#quickActionModal .modal-dialog{
  width:min(560px, calc(100vw - 32px));
  max-width:min(560px, calc(100vw - 32px));
}
/* Large only when JS adds .modal-lg (New Repair Job / complex forms) */
#quickActionModal .modal-dialog.modal-lg{
  width:min(960px, calc(100vw - 32px));
  max-width:min(960px, calc(100vw - 32px));
}
#quickActionModal .modal-content{max-height:calc(100vh - 64px)}
#quickActionModal .modal-body{max-height:calc(100vh - 150px);overflow:auto}
.dashboard-table .btn{white-space:nowrap}

/* ================================================================
   FONFIX4U POLISH LAYER — shared visual language
   ================================================================ */
:root{--f4u-ink:#0f172a;--f4u-muted:#64748b;--f4u-line:#e7edf4;--f4u-primary:#2563eb;--f4u-primary-dark:#1d4ed8;--f4u-success:#16a34a;--f4u-bg:#f6f8fb}
body{background:var(--f4u-bg);color:var(--f4u-ink)}
.main-content{background:linear-gradient(180deg,#f8fafc 0%,#f5f7fb 100%)}
.card{border-color:var(--f4u-line);box-shadow:0 10px 30px rgba(15,23,42,.045)}
.card-header{border-bottom-color:var(--f4u-line)}
.form-control,.form-select,.input-group-text{border-color:#dfe6ef}
.form-control:focus,.form-select:focus{border-color:#93b4ff;box-shadow:0 0 0 .2rem rgba(37,99,235,.09)}
.btn{font-weight:600;border-radius:10px;transition:transform .15s ease,box-shadow .15s ease,background-color .15s ease}
.btn-primary{background:var(--f4u-primary);border-color:var(--f4u-primary)}
.btn-primary:hover{background:var(--f4u-primary-dark);border-color:var(--f4u-primary-dark);transform:translateY(-1px);box-shadow:0 8px 18px rgba(37,99,235,.16)}
.table> :not(caption)>*>*{border-color:#edf1f6}
.badge{font-weight:600}
.f4u-flash{display:flex;align-items:flex-start;gap:12px;border:1px solid transparent;border-radius:14px;padding:13px 44px 13px 14px;box-shadow:0 7px 20px rgba(15,23,42,.05);margin-bottom:16px}
.f4u-flash-icon{font-size:1.1rem;line-height:1.3;flex:0 0 auto}
.f4u-flash-content{display:flex;flex-direction:column;gap:2px;line-height:1.35}
.f4u-flash-content strong{font-size:.84rem}
.f4u-flash-content>span{font-size:.9rem}
.alert-success.f4u-flash{background:#f0fdf4;border-color:#bbf7d0;color:#166534}
.alert-danger.f4u-flash{background:#fff7f7;border-color:#fecaca;color:#991b1b}
.alert-warning.f4u-flash{background:#fffbeb;border-color:#fde68a;color:#92400e}
.alert-info.f4u-flash{background:#eff6ff;border-color:#bfdbfe;color:#1e3a8a}
.f4u-alert-icon{display:inline-flex;align-items:center;justify-content:center;margin-right:10px;font-size:1rem}
.alert.alert-success,.alert.alert-danger,.alert.alert-warning,.alert.alert-info{border-radius:14px}
.f4u-session-warning{position:fixed;right:20px;bottom:20px;width:min(430px,calc(100vw - 40px));z-index:1085;padding:15px;border:1px solid #fde68a;border-radius:16px;background:#fffdf3;box-shadow:0 20px 50px rgba(15,23,42,.18)}
.f4u-session-warning-icon{width:38px;height:38px;border-radius:12px;background:#fef3c7;color:#92400e;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.page-header,.content-header{margin-bottom:18px}
.page-header h4,.content-header h4{font-weight:800;letter-spacing:-.02em}
.ui-soft-card{border-radius:16px;overflow:hidden}
.modal-content{border:1px solid var(--f4u-line);box-shadow:0 24px 70px rgba(15,23,42,.18)}
.modal-header,.modal-footer{border-color:var(--f4u-line)}
.dropdown-menu{border:1px solid var(--f4u-line);box-shadow:0 16px 40px rgba(15,23,42,.12)}
.nav-link,.dropdown-item{font-weight:500}
@media(max-width:768px){.f4u-session-warning{right:12px;bottom:12px;width:calc(100vw - 24px)}.card-body{padding:1rem!important}}

/* ================================================================
   FONFIX4U ADMIN UI SYSTEM — 2026-10-04
   Shared visual layer for every admin page. Business logic stays in
   individual PHP pages; this layer only standardizes presentation.
   ================================================================ */
:root{
  --f4u-bg:#f5f7fb;
  --f4u-surface:#ffffff;
  --f4u-surface-2:#f8fafc;
  --f4u-ink:#0f172a;
  --f4u-muted:#64748b;
  --f4u-line:#e5eaf1;
  --f4u-primary:#2563eb;
  --f4u-primary-dark:#1d4ed8;
  --f4u-success:#15803d;
  --f4u-danger:#b91c1c;
  --f4u-warning:#a16207;
  --f4u-radius:16px;
}

html{scroll-behavior:smooth}
body.admin-app{background:linear-gradient(180deg,#f8fafc 0%,var(--f4u-bg) 45%,#f3f6fa 100%);color:var(--f4u-ink)}
body.sidebar-open{overflow:hidden}
.min-width-0{min-width:0}

/* Sidebar */
.sidebar{box-shadow:12px 0 34px rgba(15,23,42,.08)}
.sidebar .brand{position:relative;padding:18px 18px 16px}
.sidebar-close-btn{border:0;background:rgba(255,255,255,.08);color:#fff;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:0 0 auto}
.sidebar-close-btn:hover{background:rgba(255,255,255,.16)}
.sidebar .nav-section{margin-top:4px}
.sidebar .nav-link{min-height:42px;gap:10px}
.sidebar .nav-link i{flex:0 0 22px;text-align:center}
.sidebar .nav-link .badge{margin-left:auto}

.f4u-sidebar-backdrop{display:none}

/* Top bar */
.topbar{min-height:70px;padding:12px 20px;border-bottom:1px solid rgba(226,232,240,.95);box-shadow:0 3px 18px rgba(15,23,42,.03)}
.topbar h5{font-size:1.05rem;letter-spacing:-.02em}
.global-search-form{border:1px solid #dce3ec;background:#f8fafc;border-radius:12px;padding-right:4px;box-shadow:inset 0 1px 0 rgba(255,255,255,.65)}
.global-search-form:focus-within{border-color:#9bb8ef;background:#fff;box-shadow:0 0 0 4px rgba(37,99,235,.08)}
.global-search-form input{background:transparent!important}
.global-search-form kbd{border:1px solid #d8e0ea;background:#fff;color:#64748b;border-radius:6px;font-size:.67rem;padding:2px 6px;margin-right:3px}

/* Unified page canvas */
.main-content>.p-3.p-md-4{max-width:1600px;margin:0 auto;width:100%;padding:24px clamp(16px,2.3vw,34px)!important}
.page-header,.content-header,.ui-page-header{padding-top:2px}
.page-header h4,.ui-page-header h4,.content-header h4{font-size:1.15rem}
.page-header form,.page-header>div{align-items:center}

/* Cards / sections */
.card,.ui-soft-card{border:1px solid var(--f4u-line);border-radius:var(--f4u-radius);box-shadow:0 8px 28px rgba(15,23,42,.045);overflow:hidden}
.card-header{padding:14px 18px;background:linear-gradient(180deg,#fff,#fbfcfe);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.card-footer{border-top:1px solid var(--f4u-line)!important}
.card-body{padding:18px}

/* Stat / dashboard-inspired cards used throughout admin */
.stat-card,.dashboard-stat{border-radius:17px}
.stat-card:hover,.dashboard-stat:hover{transform:translateY(-2px)}

/* Buttons */
.btn{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:4px}
.btn-sm{min-height:34px}
.btn-group .btn{min-height:34px}
.btn-outline-secondary{border-color:#d7dee8;color:#475569;background:#fff}
.btn-outline-secondary:hover{background:#f8fafc;border-color:#c6d1df;color:#334155}

/* Forms */
.form-label{margin-bottom:6px}
.form-control,.form-select{min-height:42px;padding:.58rem .75rem;background:#fff}
textarea.form-control{min-height:110px}
.form-check-input{box-shadow:none!important}
.input-group>.form-control,.input-group>.form-select,.input-group>.input-group-text{min-height:42px}

/* Search / filter rows */
.page-header form.d-flex,.page-header>.d-flex{flex-wrap:wrap}
.page-header .search-box{min-width:190px}

/* Tables */
.table-responsive{border-radius:14px}
.table{margin-bottom:0}
.table thead th{white-space:nowrap;vertical-align:middle}
.table tbody td{vertical-align:middle}
.table>tbody>tr>td:first-child,.table>thead>tr>th:first-child{padding-left:18px}
.table>tbody>tr>td:last-child,.table>thead>tr>th:last-child{padding-right:18px}
.table-hover>tbody>tr:hover>*{background:#f8fbff}
.action-btns{white-space:nowrap}
.action-btns .btn{min-width:34px}

/* Empty states */
.table tbody tr td.text-center.text-muted.py-4,
.table tbody tr td.text-center.text-muted.py-3{color:#94a3b8!important}

/* Pagination */
.pagination{gap:4px}
.pagination .page-link{border:1px solid #e1e7ef;border-radius:9px!important;color:#475569;background:#fff}
.pagination .page-item.active .page-link{background:var(--f4u-primary);border-color:var(--f4u-primary);color:#fff}

/* Alerts / success messages — one language everywhere */
.alert.f4u-flash{width:100%;max-width:100%;margin:0 0 18px;border-radius:14px;padding:13px 44px 13px 14px;box-shadow:0 8px 22px rgba(15,23,42,.05)}
.alert-success.f4u-flash{background:#effcf3;border-color:#bde8c9;color:#166534}
.alert-danger.f4u-flash{background:#fff5f5;border-color:#f2c4c4;color:#991b1b}
.alert-warning.f4u-flash{background:#fffaf0;border-color:#f3db9a;color:#92400e}
.alert-info.f4u-flash{background:#f1f7ff;border-color:#c7dafc;color:#1e40af}
.alert:not(.f4u-flash){border:1px solid var(--f4u-line);border-radius:14px;box-shadow:0 8px 22px rgba(15,23,42,.035);padding:13px 16px}
.alert-success:not(.f4u-flash){background:#effcf3;border-color:#bde8c9;color:#166534}
.alert-danger:not(.f4u-flash){background:#fff5f5;border-color:#f2c4c4;color:#991b1b}
.alert-warning:not(.f4u-flash){background:#fffaf0;border-color:#f3db9a;color:#92400e}
.alert-info:not(.f4u-flash){background:#f1f7ff;border-color:#c7dafc;color:#1e40af}

/* Modals */
.modal-backdrop.show{opacity:.48}
.modal-content{border-radius:18px!important}
.modal-header{padding:16px 18px}
.modal-footer{padding:12px 18px}
.modal-body{padding:18px}

/* Dropdowns */
.dropdown-menu{border-radius:14px!important;padding:6px;overflow:hidden}
.dropdown-item{padding:9px 10px}
.dropdown-item i{width:20px;text-align:center}

/* Dashboard quick actions can be reused by other pages */
.quick-action,.quick-action-btn{border-radius:13px}

/* Prevent horizontal overflow from wide forms/tables */
.main-content{overflow-x:hidden}
.table-responsive{overflow-x:auto}

/* Mobile layout */
@media (max-width:991.98px){
  .sidebar{box-shadow:18px 0 55px rgba(15,23,42,.24)}
  .f4u-sidebar-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:1035;backdrop-filter:blur(2px);display:block;opacity:0;visibility:hidden;transition:.2s ease}
  .f4u-sidebar-backdrop.show{opacity:1;visibility:visible}
  .topbar{padding:11px 14px;min-height:64px}
  .main-content>.p-3.p-md-4{padding:18px 14px!important}
  .page-header{align-items:stretch}
  .page-header form.d-flex{width:100%}
  .page-header form.d-flex .form-control{flex:1 1 180px}
  .page-header>div:last-child{width:100%}
  .page-header>div:last-child>.btn,.page-header>a.btn{flex:1 1 auto}
}

@media (max-width:767.98px){
  .topbar{gap:8px}
  .topbar>div:first-child{min-width:0}
  .topbar h5{font-size:.98rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar-new-job-popup{min-width:40px;padding-left:9px!important;padding-right:9px!important}
  .global-search-form{display:none!important}
  .main-content>.p-3.p-md-4{padding:14px 12px!important}
  .card-body{padding:14px}
  .card-header{padding:13px 14px}
  .ui-page-header{margin-bottom:14px}
  .ui-page-header h4,.page-header h4,.content-header h4{font-size:1.05rem}
  .form-control,.form-select{min-height:40px;font-size:.88rem}
  .btn{min-height:38px}
  .page-header>div:last-child{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
  .page-header>div:last-child>.btn,.page-header>a.btn{width:100%}
  .action-btns{white-space:nowrap}
  .table th,.table td{font-size:.82rem}
  .notification-dropdown-menu{width:calc(100vw - 24px)!important}
}

@media (max-width:575.98px){
  .main-content>.p-3.p-md-4{padding:12px 10px!important}
  .page-header>div:last-child{grid-template-columns:1fr}
  .page-header form.d-flex{display:grid!important;grid-template-columns:1fr auto auto;gap:7px!important}
  .page-header form.d-flex .search-box{min-width:0;width:100%}
  .topbar .topbar-icon-btn{width:38px;height:38px}
  .card{border-radius:14px}
  .modal-dialog{margin:10px!important}
  .modal-body{padding:14px}
  .f4u-session-warning{left:10px;right:10px;bottom:10px;width:auto}
}

/* Print keeps operational pages clean */
@media print{
  .main-content>.p-3.p-md-4{padding:0!important;max-width:none}
}
