/* ==========================================================================
   Finocred UI — corporate theme
   --------------------------------------------------------------------------
   One stylesheet for the whole application (main + CAF area + auth pages).
   Sections
     1. Design tokens            7. Components (cards, buttons, forms, ...)
     2. Base & typography        8. Data entry / upload workspace
     3. App shell                9. Dashboard KPI tiles
     4. Sidebar                 10. Legacy compatibility layer
     5. Topbar & profile        11. Utilities, responsive, print
     6. Page header
   Built on top of Bootstrap 5 (assets/vendor/bootstrap).
   ========================================================================== */

/* 1. DESIGN TOKENS ======================================================== */
:root {
    /* brand (taken from the finocred logo gradient) */
    --fc-brand-1: #2563eb;
    --fc-brand-2: #0ea5e9;
    --fc-brand: #2563eb;
    --fc-brand-600: #1d4ed8;
    --fc-brand-50: #eff6ff;
    --fc-brand-100: #dbeafe;
    --fc-gradient: linear-gradient(135deg, var(--fc-brand-1) 0%, var(--fc-brand-2) 100%);
    --fc-gradient-soft: linear-gradient(135deg, rgba(37, 99, 235, .10) 0%, rgba(14, 165, 233, .10) 100%);
    /* shell */
    --fc-navy-900: #0a1a3f;
    --fc-navy-800: #0f2557;
    --fc-navy-700: #17366f;
    --fc-hero-bg: linear-gradient(160deg, #0b1f4d 0%, #0f2f66 45%, #134a7c 80%, #1b6b90 100%);
    --fc-sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f7f9ff 60%, #eef4ff 100%);
    --fc-sidebar-text: #3b4766;
    --fc-sidebar-muted: #8592b0;
    --fc-sidebar-w: 264px;
    --fc-sidebar-w-collapsed: 76px;
    --fc-topbar-h: 64px;
    /* surfaces & text */
    --fc-bg: #f3f4fa;
    --fc-surface: #ffffff;
    --fc-surface-2: #f8f9fd;
    --fc-border: #e5e7f1;
    --fc-border-strong: #d3d7e8;
    --fc-text: #1b1f3b;
    --fc-text-2: #464c70;
    --fc-muted: #7a80a3;
    /* semantic */
    --fc-success: #10b981;
    --fc-success-50: #e7f8f1;
    --fc-warning: #f59e0b;
    --fc-warning-50: #fef4e2;
    --fc-danger: #ef4444;
    --fc-danger-50: #fdecec;
    --fc-info: #0ea5e9;
    --fc-info-50: #e6f5fd;
    --fc-excel: #1d7a46;
    /* shape */
    --fc-radius-sm: 8px;
    --fc-radius: 12px;
    --fc-radius-lg: 18px;
    --fc-shadow-sm: 0 1px 2px rgba(17, 24, 64, .06);
    --fc-shadow: 0 6px 18px -6px rgba(17, 24, 64, .12), 0 2px 6px rgba(17, 24, 64, .05);
    --fc-shadow-lg: 0 18px 40px -12px rgba(30, 20, 90, .25);
    --fc-ring: 0 0 0 .22rem rgba(37, 99, 235, .22);
    --fc-font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fc-ease: cubic-bezier(.4, 0, .2, 1);
}

/* 2. BASE & TYPOGRAPHY ==================================================== */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--fc-font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--fc-text);
    background: var(--fc-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--fc-text);
    font-weight: 700;
    letter-spacing: -.01em;
}

h1, .h1 { font-size: 1.6rem; }
h2, .h2 { font-size: 1.35rem; }
h3, .h3 { font-size: 1.15rem; }
h4, .h4 { font-size: 1.05rem; }
h5, .h5 { font-size: .95rem; }
h6, .h6 { font-size: .85rem; }

a { color: var(--fc-brand); text-decoration: none; transition: color .15s var(--fc-ease); }
a:hover { color: var(--fc-brand-600); }

::selection { background: var(--fc-brand-100); color: var(--fc-text); }

.text-muted { color: var(--fc-muted) !important; }
.text-brand { color: var(--fc-brand) !important; }
.text-gradient { background: var(--fc-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: #c9cde2 transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #c9cde2; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* 3. APP SHELL ============================================================ */
.fc-app { min-height: 100vh; }

.fc-main {
    margin-left: var(--fc-sidebar-w);
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .25s var(--fc-ease);
}

.fc-content {
    flex: 1 1 auto;
    padding: 24px 28px 32px;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}

.fc-footer {
    padding: 14px 28px;
    color: var(--fc-muted);
    font-size: 12px;
    border-top: 1px solid var(--fc-border);
    background: var(--fc-surface);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    justify-content: space-between;
}

.fc-footer a { color: var(--fc-text-2); }
.fc-footer .fc-social a { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; color: var(--fc-muted); font-size: 16px; }
.fc-footer .fc-social a:hover { background: var(--fc-brand-50); color: var(--fc-brand); }

body.fc-sidebar-collapsed .fc-main { margin-left: var(--fc-sidebar-w-collapsed); }

.fc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 48, .5);
    backdrop-filter: blur(2px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--fc-ease), visibility .2s;
}

/* page loader */
#loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--fc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .25s var(--fc-ease), visibility .25s;
}

#loading.is-hidden { opacity: 0; visibility: hidden; }
#loading .fc-loader-mark { width: 52px; height: 52px; animation: fc-spin 1s linear infinite; }

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

/* 4. SIDEBAR ============================================================== */
.fc-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--fc-sidebar-w);
    background: var(--fc-sidebar-bg);
    color: var(--fc-sidebar-text);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width .25s var(--fc-ease), transform .25s var(--fc-ease);
    border-right: 1px solid var(--fc-border);
    box-shadow: 4px 0 24px rgba(15, 37, 87, .06);
}

.fc-sidebar::after { /* subtle brand glow */
    content: "";
    position: absolute;
    top: -80px;
    right: -120px;
    width: 260px;
    height: 260px;
    background: radial-gradient(closest-side, rgba(37, 99, 235, .06), transparent);
    pointer-events: none;
}

.fc-brand {
    height: var(--fc-topbar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    color: #fff;
}

.fc-brand:hover { color: #fff; }
/* original logo artwork on a white strip (its tagline is dark, so it needs a light background) */
.fc-sidebar .fc-brand { background: #fff; border-bottom: 1px solid var(--fc-border); justify-content: center; }
.fc-brand-logo { height: 38px; width: auto; max-width: 100%; object-fit: contain; display: block; }
.fc-brand-mark { width: 38px; height: 38px; flex: 0 0 38px; object-fit: contain; }
.fc-sidebar .fc-brand .fc-brand-mark { display: none; }

.fc-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 12px 18px;
    position: relative;
    z-index: 1;
    scrollbar-color: #d3dbea transparent;
}

.fc-nav::-webkit-scrollbar-thumb { background: #d3dbea; }

.fc-nav-group { margin-bottom: 6px; }

.fc-nav-heading {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 700;
    color: var(--fc-sidebar-muted);
    padding: 12px 12px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 10px;
    color: var(--fc-sidebar-text);
    font-weight: 500;
    font-size: 13.5px;
    position: relative;
    white-space: nowrap;
    transition: background .15s var(--fc-ease), color .15s var(--fc-ease);
}

.fc-nav-link .icon,
.fc-nav-link > i {
    font-size: 19px;
    width: 24px;
    flex: 0 0 24px;
    text-align: center;
    color: var(--fc-sidebar-muted);
    transition: color .15s var(--fc-ease);
}

.fc-nav-link .fc-nav-text { overflow: hidden; text-overflow: ellipsis; }
.fc-nav-link .fc-nav-ext { margin-left: auto; font-size: 12px; opacity: .6; }

.fc-nav-link:hover { background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-nav-link:hover .icon, .fc-nav-link:hover > i { color: var(--fc-brand); }

.fc-nav-link.active {
    background: var(--fc-gradient);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .55);
}

.fc-nav-link.active .icon, .fc-nav-link.active > i { color: #fff; }

.fc-sidebar-footer {
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid var(--fc-border);
    position: relative;
    z-index: 1;
}

.fc-collapse-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: var(--fc-surface-2);
    color: var(--fc-sidebar-text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.fc-collapse-btn:hover { background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-collapse-btn .icon { font-size: 19px; width: 24px; flex: 0 0 24px; text-align: center; transition: transform .25s var(--fc-ease); }

/* collapsed (desktop) */
body.fc-sidebar-collapsed .fc-sidebar { width: var(--fc-sidebar-w-collapsed); }
body.fc-sidebar-collapsed .fc-brand { padding: 0 19px; }
body.fc-sidebar-collapsed .fc-sidebar .fc-brand-logo { display: none; }
body.fc-sidebar-collapsed .fc-sidebar .fc-brand .fc-brand-mark { display: block; }
body.fc-sidebar-collapsed .fc-brand-text,
body.fc-sidebar-collapsed .fc-nav-text,
body.fc-sidebar-collapsed .fc-nav-ext,
body.fc-sidebar-collapsed .fc-collapse-btn span { display: none; }
body.fc-sidebar-collapsed .fc-nav-heading { font-size: 0; padding: 10px 0 4px; }
body.fc-sidebar-collapsed .fc-nav-heading::before { content: ""; display: block; height: 1px; margin: 0 14px; background: var(--fc-border); }
body.fc-sidebar-collapsed .fc-nav-link { justify-content: center; padding: 10px 0; }
body.fc-sidebar-collapsed .fc-collapse-btn { justify-content: center; padding: 9px 0; }
body.fc-sidebar-collapsed .fc-collapse-btn .icon { transform: rotate(180deg); }

/* collapsed tooltips */
.fc-nav-tip {
    position: fixed;
    z-index: 1100;
    pointer-events: none;
    background: var(--fc-navy-900);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: var(--fc-shadow-lg);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .12s, transform .12s;
}

.fc-nav-tip.show { opacity: 1; transform: none; }

/* 5. TOPBAR & PROFILE ===================================================== */
.fc-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--fc-topbar-h);
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--fc-border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
}

.fc-icon-btn {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    border: 1px solid var(--fc-border);
    background: var(--fc-surface);
    color: var(--fc-text-2);
    font-size: 20px;
    transition: all .15s var(--fc-ease);
    position: relative;
}

.fc-icon-btn:hover { color: var(--fc-brand); border-color: var(--fc-brand-100); background: var(--fc-brand-50); }

.fc-topbar-title { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.fc-topbar-title h1 { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-topbar-title small { color: var(--fc-muted); font-size: 12px; }

.fc-search {
    flex: 1 1 auto;
    max-width: 440px;
    margin-left: auto;
    position: relative;
}

.fc-search > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--fc-muted); font-size: 18px; pointer-events: none; }

.fc-search > input {
    width: 100%;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--fc-border);
    background: var(--fc-surface-2);
    padding: 0 64px 0 40px;
    font-size: 13.5px;
    color: var(--fc-text);
    transition: all .15s var(--fc-ease);
}

.fc-search > input:focus { outline: 0; background: #fff; border-color: var(--fc-brand); box-shadow: var(--fc-ring); }
.fc-search > kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: #fff; border: 1px solid var(--fc-border); color: var(--fc-muted); font-size: 11px; border-radius: 6px; padding: 2px 6px; font-family: inherit; box-shadow: none; }

/* search suggestions dropdown */
.fc-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: min(520px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    overflow-y: auto;
    z-index: 1060;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius-lg);
    box-shadow: var(--fc-shadow-lg);
    padding: 6px;
    animation: fc-pop .14s var(--fc-ease);
}
.fc-sr-head { padding: 8px 10px 6px; font-size: 11.5px; color: var(--fc-muted); font-weight: 600; }
.fc-sr-head strong { color: var(--fc-text); }
.fc-sr-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; color: var(--fc-text); transition: background .12s var(--fc-ease); }
.fc-sr-item .fc-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }
.fc-sr-item:hover, .fc-sr-item.is-active { background: var(--fc-brand-50); color: var(--fc-text); }
.fc-sr-item.is-active { box-shadow: inset 3px 0 0 var(--fc-brand); }
.fc-sr-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fc-sr-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-sr-title strong { color: var(--fc-brand-600); margin-right: 4px; }
.fc-sr-meta { font-size: 11.5px; color: var(--fc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-sr-item .fc-status { flex: 0 0 auto; font-size: 10.5px; padding: 3px 8px; }
.fc-sr-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 8px; }
.fc-sr-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--fc-border); background: var(--fc-surface-2); color: var(--fc-text-2); font-size: 11.5px; font-weight: 600; }
.fc-sr-chip .fc-status { font-size: 10.5px; padding: 3px 9px; }
.fc-sr-chip:hover, .fc-sr-chip.is-active { border-color: var(--fc-brand); background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-search-results mark { background: #fef08a; color: inherit; padding: 0 1px; border-radius: 3px; }
.fc-search-results .fc-status mark { background: rgba(255, 255, 255, .32); color: #fff; }
.fc-sr-empty { padding: 18px 12px; text-align: center; color: var(--fc-muted); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.fc-sr-all { display: flex; width: 100%; align-items: center; gap: 8px; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid var(--fc-border); background: transparent; color: var(--fc-brand-600); font-weight: 600; font-size: 13px; border-radius: 0 0 12px 12px; text-align: left; }
.fc-sr-all:hover { background: var(--fc-brand-50); }
.fc-sr-all kbd { margin-left: auto; position: static; transform: none; }
@media (max-width: 767.98px) {
    .fc-search-results { position: fixed; top: calc(var(--fc-topbar-h) + 4px); left: 8px; right: 8px; min-width: 0; }
    .fc-sr-item .fc-status { display: none; }
}

.fc-topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: 4px; }

.fc-clock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border-radius: 11px;
    background: var(--fc-gradient-soft);
    color: var(--fc-brand-600);
    font-weight: 700;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fc-clock .icon { font-size: 17px; }

.fc-profile { position: relative; }

.fc-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: 14px;
    border: 1px solid var(--fc-border);
    background: var(--fc-surface);
    transition: all .15s var(--fc-ease);
    max-width: 260px;
}

.fc-profile-btn:hover, .fc-profile-btn[aria-expanded="true"] { border-color: var(--fc-brand-100); box-shadow: var(--fc-shadow-sm); }

.fc-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--fc-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.fc-avatar-lg { width: 52px; height: 52px; flex-basis: 52px; border-radius: 14px; font-size: 18px; }
.fc-profile-meta { min-width: 0; text-align: left; line-height: 1.2; }
.fc-profile-name { font-weight: 700; font-size: 13px; color: var(--fc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-profile-role { font-size: 11.5px; color: var(--fc-muted); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-profile-btn .ion-ios-arrow-down { color: var(--fc-muted); font-size: 14px; }

.fc-profile .dropdown-menu {
    width: 280px;
    padding: 8px;
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    box-shadow: var(--fc-shadow-lg);
    margin-top: 8px !important;
}

.fc-profile-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--fc-border); margin-bottom: 6px; }
.fc-profile-head strong { display: block; font-size: 14px; }
.fc-profile-head small { color: var(--fc-muted); text-transform: capitalize; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 9px;
    padding: 9px 10px;
    font-size: 13.5px;
    color: var(--fc-text-2);
    font-weight: 500;
}

.dropdown-item .icon { font-size: 18px; width: 20px; text-align: center; color: var(--fc-muted); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--fc-brand-50); color: var(--fc-brand-600); }
.dropdown-item:hover .icon { color: var(--fc-brand); }
.dropdown-item.text-danger .icon { color: var(--fc-danger); }
.dropdown-item.text-danger:hover { background: var(--fc-danger-50); color: var(--fc-danger) !important; }

/* 6. PAGE HEADER ========================================================== */
.fc-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-bottom: 22px;
}

.fc-page-header h1, .fc-page-title { font-size: 1.45rem; margin: 0; font-weight: 800; }
.fc-page-header p, .fc-page-subtitle { margin: 4px 0 0; color: var(--fc-muted); font-size: 13.5px; }
.fc-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fc-page-actions > .form-select, .fc-page-actions > .form-control, .fc-page-actions > select { width: auto; }

.fc-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fc-muted); margin-bottom: 4px; }
.fc-breadcrumb a { color: var(--fc-muted); }
.fc-breadcrumb a:hover { color: var(--fc-brand); }

/* month navigator */
.fc-period {
    display: inline-flex;
    align-items: center;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: 12px;
    padding: 3px;
    box-shadow: var(--fc-shadow-sm);
}

.fc-period > a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--fc-text-2); font-size: 18px; border: 0; background: transparent; }
.fc-period > a:hover { background: var(--fc-brand-50); color: var(--fc-brand); }
button.fc-period-label { white-space: nowrap; }
.fc-period { position: relative; }
.fc-period-label { padding: 0 12px; font-weight: 700; font-size: 13px; min-width: 120px; text-align: center; letter-spacing: .02em; }
button.fc-period-label { height: 34px; border: 0; background: transparent; border-radius: 9px; color: var(--fc-text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: background .15s var(--fc-ease); }
button.fc-period-label:hover, .fc-period.is-open button.fc-period-label { background: var(--fc-brand-50); color: var(--fc-brand-600); }
button.fc-period-label .icon { font-size: 16px; color: var(--fc-brand); }
button.fc-period-label .fc-period-caret { font-size: 12px; color: var(--fc-muted); transition: transform .2s var(--fc-ease); }
.fc-period.is-open .fc-period-caret { transform: rotate(180deg); }

/* big month / year calendar */
.fc-monthpicker {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1050;
    width: 340px;
    max-width: calc(100vw - 24px);
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius-lg);
    box-shadow: var(--fc-shadow-lg);
    overflow: hidden;
    animation: fc-pop .16s var(--fc-ease);
}
@keyframes fc-pop { from { transform: translateY(-6px) scale(.98); } to { transform: none; } } /* no opacity: popups must never be stuck invisible */
.fc-monthpicker-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 18px; background: var(--fc-hero-bg); color: #fff; }
.fc-mp-year { text-align: center; line-height: 1.1; }
.fc-mp-year small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #a9c2e6; font-weight: 700; }
.fc-mp-year strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fc-mp-nav { width: 38px; height: 38px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.fc-mp-nav:hover:not(:disabled) { background: rgba(255, 255, 255, .22); }
.fc-mp-nav:disabled { opacity: .35; cursor: not-allowed; }
.fc-mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; }
.fc-mp-month { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; border-radius: 12px; border: 1px solid var(--fc-border); background: var(--fc-surface-2); color: var(--fc-text); font-weight: 700; font-size: 14px; transition: all .15s var(--fc-ease); position: relative; }
.fc-mp-month small { font-size: 10.5px; font-weight: 600; color: var(--fc-muted); }
a.fc-mp-month:hover { border-color: var(--fc-brand-100); background: var(--fc-brand-50); color: var(--fc-brand-600); transform: translateY(-1px); }
.fc-mp-month.is-today::after { content: ""; position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--fc-brand-2); }
.fc-mp-month.is-selected { background: var(--fc-gradient); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(37, 99, 235, .6); }
.fc-mp-month.is-selected small { color: rgba(255, 255, 255, .8); }
.fc-mp-month.is-selected:hover { color: #fff; background: var(--fc-gradient); }
.fc-mp-month.is-disabled { opacity: .38; cursor: not-allowed; }
.fc-mp-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 14px; border-top: 1px solid var(--fc-border); background: var(--fc-surface-2); }
.fc-mp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--fc-border); background: #fff; color: var(--fc-text-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.fc-mp-chip:hover, .fc-mp-chip.is-active { border-color: var(--fc-brand); color: var(--fc-brand-600); background: var(--fc-brand-50); }
@media (max-width: 767.98px) { .fc-monthpicker { right: auto; left: 0; } }

/* 7. COMPONENTS =========================================================== */

/* cards */
.card {
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    box-shadow: var(--fc-shadow-sm);
    background: var(--fc-surface);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--fc-border);
    padding: 14px 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-header:first-child { border-radius: var(--fc-radius) var(--fc-radius) 0 0; }
.card-body { padding: 18px; }
.card-footer { background: var(--fc-surface-2); border-top: 1px solid var(--fc-border); padding: 12px 18px; }
.card-footer:last-child { border-radius: 0 0 var(--fc-radius) var(--fc-radius); }
.card-title { font-weight: 700; color: var(--fc-text); }

.fc-card-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin: 0; }
.fc-card-title .fc-chip-icon { width: 32px; height: 32px; font-size: 17px; }

.fc-chip-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--fc-brand-50);
    color: var(--fc-brand);
}

/* buttons */
.btn {
    font-weight: 600;
    font-size: 13.5px;
    border-radius: 10px;
    padding: .5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all .15s var(--fc-ease);
    line-height: 1.4;
}

.btn .icon, .btn > .fa { font-size: 1.15em; line-height: 1; }
.btn:focus, .btn:active:focus { box-shadow: var(--fc-ring); }
.btn-sm { padding: .32rem .7rem; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: .7rem 1.35rem; font-size: 15px; border-radius: 12px; }

.btn-primary, .btn-brand {
    background: var(--fc-gradient);
    border: 0;
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .55);
}

.btn-primary:hover, .btn-brand:hover, .btn-primary:focus, .btn-brand:focus, .btn-primary:active, .btn-primary.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 10px 22px -8px rgba(37, 99, 235, .7);
    transform: translateY(-1px);
}

.btn-primary:disabled, .btn-primary.disabled { background: var(--fc-gradient); opacity: .55; transform: none; }

.btn-secondary, .btn-light, .btn-default, .btn-outline-secondary {
    background: var(--fc-surface);
    border: 1px solid var(--fc-border-strong);
    color: var(--fc-text-2);
}

.btn-secondary:hover, .btn-light:hover, .btn-default:hover, .btn-outline-secondary:hover,
.btn-secondary:focus, .btn-light:focus, .btn-default:focus {
    background: var(--fc-surface-2);
    border-color: var(--fc-brand-100);
    color: var(--fc-brand-600);
}

.btn-outline-primary { border: 1px solid var(--fc-brand); color: var(--fc-brand); background: transparent; }
.btn-outline-primary:hover, .btn-outline-primary:focus { background: var(--fc-brand-50); color: var(--fc-brand-600); border-color: var(--fc-brand); }

.btn-success { background: var(--fc-success); border-color: var(--fc-success); color: #fff; }
.btn-success:hover, .btn-success:focus { background: #0ea271; border-color: #0ea271; color: #fff; }
.btn-danger { background: var(--fc-danger); border-color: var(--fc-danger); color: #fff; }
.btn-danger:hover, .btn-danger:focus { background: #dc2f2f; border-color: #dc2f2f; color: #fff; }
.btn-outline-danger { border-color: #f6b4b4; color: var(--fc-danger); background: #fff; }
.btn-outline-danger:hover, .btn-outline-danger:focus { background: var(--fc-danger-50); color: var(--fc-danger); border-color: var(--fc-danger); }
.btn-warning { background: var(--fc-warning); border-color: var(--fc-warning); color: #fff; }
.btn-warning:hover { background: #df8e06; border-color: #df8e06; color: #fff; }
.btn-info { background: var(--fc-info); border-color: var(--fc-info); color: #fff; }
.btn-info:hover { background: #0b93cf; border-color: #0b93cf; color: #fff; }
.btn-dark, .btn-black { background: var(--fc-navy-800); border-color: var(--fc-navy-800); color: #fff; }
.btn-dark:hover, .btn-black:hover { background: var(--fc-navy-700); color: #fff; }
.btn-link { color: var(--fc-brand); font-weight: 600; }

/* export / download buttons — always the same look & place (page header actions) */
.btn-export, .btn-excel {
    background: #fff;
    border: 1px solid #bfe3cf;
    color: var(--fc-excel);
}

.btn-export:hover, .btn-excel:hover, .btn-export:focus, .btn-excel:focus { background: #e9f7ef; border-color: var(--fc-excel); color: var(--fc-excel); }
.btn-export .fa, .btn-export .icon { color: var(--fc-excel); }
.btn-download { background: #fff; border: 1px solid var(--fc-brand-100); color: var(--fc-brand-600); }
.btn-download:hover, .btn-download:focus { background: var(--fc-brand-50); border-color: var(--fc-brand); color: var(--fc-brand-600); }

.btn-icon { width: 38px; height: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }

/* badges / status pills */
.badge {
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .01em;
    border-radius: 999px;
    padding: .38em .75em;
}

.fc-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    color: #fff;
}

.fc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }

/* forms */
label, .form-label, .control-label {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--fc-text-2);
    margin-bottom: 6px;
}

.required:after, label.required:after { content: " *"; color: var(--fc-danger); font-weight: 700; }

.form-control, .form-select, select.form-control, .custom-select {
    border: 1px solid var(--fc-border-strong);
    border-radius: 10px;
    min-height: 40px;
    padding: .5rem .8rem;
    font-size: 13.5px;
    color: var(--fc-text);
    background-color: #fff;
    transition: border-color .15s var(--fc-ease), box-shadow .15s var(--fc-ease);
}

textarea.form-control { min-height: 84px; }

.form-control:focus, .form-select:focus {
    border-color: var(--fc-brand);
    box-shadow: var(--fc-ring);
}

.form-control::placeholder { color: #a7acc8; }
.form-control:disabled, .form-control[readonly] { background: var(--fc-surface-2); color: var(--fc-text-2); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--fc-danger); background-image: none; padding-right: .8rem; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 .22rem rgba(239, 68, 68, .18); }
.form-control.is-valid { border-color: var(--fc-success); background-image: none; padding-right: .8rem; }
.invalid-feedback { font-size: 12px; font-weight: 500; }

select.form-control, select.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%237a80a3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 12px 10px;
    padding-right: 2.2rem;
}

select[multiple].form-control { background-image: none; padding-right: .8rem; }

.form-group { margin-bottom: 14px; }
.form-text, small.form-text { color: var(--fc-muted); font-size: 11.5px; }
.form-check-input:checked { background-color: var(--fc-brand); border-color: var(--fc-brand); }
.form-check-input:focus { box-shadow: var(--fc-ring); border-color: var(--fc-brand); }
.form-check-label { font-weight: 500; color: var(--fc-text); }

.input-group-text { background: var(--fc-surface-2); border-color: var(--fc-border-strong); color: var(--fc-muted); border-radius: 10px; }

.field-validation-error, .text-danger { color: var(--fc-danger) !important; }
.validation-summary-errors ul, .fc-error-list { margin: 0; padding-left: 18px; }

/* error / info summaries */
.fc-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--fc-radius);
    border: 1px solid;
    font-size: 13px;
    margin-bottom: 16px;
}

.fc-alert > .icon { font-size: 20px; line-height: 1; margin-top: 1px; }
.fc-alert-danger { background: var(--fc-danger-50); border-color: #f8caca; color: #a12626; }
.fc-alert-success { background: var(--fc-success-50); border-color: #b7ead5; color: #0b7a55; }
.fc-alert-warning { background: var(--fc-warning-50); border-color: #f8dca6; color: #8a5a06; }
.fc-alert-info { background: var(--fc-info-50); border-color: #bfe5f8; color: #0b6c99; }
.fc-alert ul { margin: 4px 0 0; padding-left: 18px; }
.fc-alert a { color: inherit; text-decoration: underline; }

.alert { border-radius: var(--fc-radius); border-width: 1px; font-size: 13.5px; }

/* validation summary (server-rendered or filled by page scripts) */
.fc-error-summary { display: none; }
.fc-error-summary.is-visible { display: flex; }
.fc-error-summary ul { margin: 4px 0 0; padding-left: 18px; }
.fc-error-summary a { text-decoration: none; border-bottom: 1px dashed currentColor; }

/* segmented control (radio groups) */
.fc-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background: var(--fc-surface-2);
    border: 1px solid var(--fc-border);
    border-radius: 12px;
}

.fc-segmented input { position: absolute; opacity: 0; pointer-events: none; }

.fc-segmented label {
    margin: 0;
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--fc-text-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    transition: all .15s var(--fc-ease);
    letter-spacing: .02em;
}

.fc-segmented label:hover { color: var(--fc-brand); background: #fff; }
.fc-segmented input:checked + label { background: var(--fc-gradient); color: #fff; box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .6); }
.fc-segmented input:focus-visible + label { box-shadow: var(--fc-ring); }
.fc-segmented.is-invalid { border-color: var(--fc-danger); background: var(--fc-danger-50); }
.fc-segmented.fc-segmented-block { display: flex; }
.fc-segmented.fc-segmented-block label { flex: 1 1 0; justify-content: center; }

/* option cards (surrogate type) */
.fc-option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.fc-option { position: relative; margin: 0; }
.fc-option input { position: absolute; opacity: 0; pointer-events: none; }

.fc-option .fc-option-body {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--fc-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all .15s var(--fc-ease);
}

.fc-option .fc-option-body .icon { font-size: 22px; color: var(--fc-muted); }
.fc-option .fc-option-title { font-weight: 700; font-size: 13px; color: var(--fc-text); line-height: 1.25; }
.fc-option .fc-option-sub { font-size: 11.5px; color: var(--fc-muted); font-weight: 500; }
.fc-option:hover .fc-option-body { border-color: var(--fc-brand-100); }
.fc-option input:checked + .fc-option-body { border-color: var(--fc-brand); background: var(--fc-brand-50); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.fc-option input:checked + .fc-option-body .icon { color: var(--fc-brand); }
.fc-option input:focus-visible + .fc-option-body { box-shadow: var(--fc-ring); }

/* tables */
.table { color: var(--fc-text); font-size: 13px; margin-bottom: 0; border-color: var(--fc-border); }
.table > :not(caption) > * > * { padding: .7rem .85rem; border-bottom-color: var(--fc-border); vertical-align: middle; }

.table thead th, .table > thead > tr > th {
    background: var(--fc-surface-2);
    color: var(--fc-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    border-bottom: 1px solid var(--fc-border) !important;
    white-space: nowrap;
}

.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: transparent; }
.table-striped > tbody > tr:nth-of-type(even) > * { background: #fafbfe; }
.table-hover > tbody > tr:hover > *, .table > tbody > tr:hover > * { background: #eff6ff; }
.table-bordered > :not(caption) > * > * { border-color: var(--fc-border); }
.fc-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--fc-radius); }
.fc-table-card .card-body { padding: 0; }
.fc-table-card .table thead th:first-child { border-top-left-radius: 0; }

/* DataTables (default + semantic integrations) */
.dataTables_wrapper { font-size: 13px; color: var(--fc-text-2); }
.dataTables_wrapper .ui.grid, .dataTables_wrapper .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 12px 16px; }
.dataTables_wrapper .ui.grid > .row { padding: 0; width: 100%; }
.dataTables_wrapper .ui.grid .column, .dataTables_wrapper .ui.grid .sixteen.wide.column { padding: 0; }
.dataTables_wrapper .ui.grid > .row:nth-child(2), .dataTables_wrapper .ui.grid .sixteen.wide.column { width: 100%; overflow-x: auto; }
.dataTables_wrapper .dataTables_length label, .dataTables_wrapper .dataTables_filter label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--fc-muted); }
.dataTables_wrapper .dataTables_length select, .dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .ui.input input, .dataTables_wrapper select.ui.dropdown {
    border: 1px solid var(--fc-border-strong);
    border-radius: 9px;
    padding: 6px 10px;
    min-height: 36px;
    font-size: 13px;
    background: #fff;
    color: var(--fc-text);
}
.dataTables_wrapper .dataTables_filter input:focus { outline: 0; border-color: var(--fc-brand); box-shadow: var(--fc-ring); }
.dataTables_wrapper .dataTables_info { color: var(--fc-muted); padding: 0 !important; }
.dataTables_wrapper .dataTables_paginate, .dataTables_wrapper .ui.pagination.menu { display: inline-flex; gap: 4px; flex-wrap: wrap; padding: 0 !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button, .dataTables_wrapper .ui.pagination.menu .item {
    border: 1px solid var(--fc-border) !important;
    border-radius: 8px !important;
    padding: 5px 11px !important;
    margin: 0 !important;
    min-width: 34px;
    text-align: center;
    background: #fff !important;
    color: var(--fc-text-2) !important;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover, .dataTables_wrapper .ui.pagination.menu .item:hover { background: var(--fc-brand-50) !important; color: var(--fc-brand) !important; border-color: var(--fc-brand-100) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .ui.pagination.menu .active.item { background: var(--fc-gradient) !important; color: #fff !important; border-color: transparent !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .ui.pagination.menu .disabled.item { opacity: .45; cursor: default; }
table.dataTable { border-collapse: collapse !important; width: 100% !important; }
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc { cursor: pointer; position: relative; padding-right: 22px !important; }
table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::after {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: "Ionicons"; font-size: 12px; opacity: .35; content: "\f3d0";
}
table.dataTable thead .sorting_asc::after { content: "\f3d8"; opacity: .9; color: var(--fc-brand); }
table.dataTable thead .sorting_desc::after { content: "\f3d0"; opacity: .9; color: var(--fc-brand); }
.dataTables_wrapper .dataTables_processing { background: #fff; border-radius: 10px; box-shadow: var(--fc-shadow); padding: 10px 16px; }
.dataTables_wrapper .dataTables_empty { text-align: center; color: var(--fc-muted); padding: 32px !important; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { padding: 12px 16px !important; }
.dataTables_wrapper .dataTables_length { float: left; }
.dataTables_wrapper .dataTables_filter { float: right; }
.dataTables_wrapper .dataTables_info { float: left; clear: both; }
.dataTables_wrapper .dataTables_paginate { float: right; }
.dataTables_wrapper::after { content: ""; display: table; clear: both; }
.dataTables_wrapper .dataTables_filter input { margin-left: 0; min-width: 220px; }
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { float: none; text-align: left; }
    .dataTables_wrapper .dataTables_filter input { min-width: 0; width: 100%; }
    .dataTables_wrapper .dataTables_filter label { width: 100%; }
}
table.dataTable.no-footer { border-bottom: 0; }

/* select2 */
.select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 40px;
    border: 1px solid var(--fc-border-strong);
    border-radius: 10px;
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; padding-left: 12px; color: var(--fc-text); font-size: 13.5px; width: 100%; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; right: 6px; }
.select2-container--default.select2-container--focus .select2-selection, .select2-container--default.select2-container--open .select2-selection { border-color: var(--fc-brand); box-shadow: var(--fc-ring); }
.select2-dropdown { border: 1px solid var(--fc-border); border-radius: 10px; box-shadow: var(--fc-shadow-lg); overflow: hidden; z-index: 1060; }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid var(--fc-border-strong); border-radius: 8px; padding: 6px 10px; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--fc-brand); }
.select2-results__option { padding: 8px 12px; font-size: 13px; }
.is-invalid + .select2-container .select2-selection { border-color: var(--fc-danger) !important; }

/* jQuery UI datepicker / tabs */
.ui-datepicker { z-index: 1070 !important; border: 1px solid var(--fc-border) !important; border-radius: 12px !important; box-shadow: var(--fc-shadow-lg); padding: 8px !important; font-family: var(--fc-font) !important; font-size: 12.5px !important; background: #fff !important; }
.ui-datepicker .ui-datepicker-header { background: var(--fc-gradient) !important; border: 0 !important; color: #fff !important; border-radius: 9px !important; }
.ui-datepicker .ui-state-default { border: 0 !important; background: transparent !important; text-align: center !important; border-radius: 7px; color: var(--fc-text) !important; }
.ui-datepicker .ui-state-hover, .ui-datepicker .ui-state-active, .ui-datepicker .ui-state-highlight { background: var(--fc-brand-50) !important; color: var(--fc-brand-600) !important; }
.ui-datepicker select { border-radius: 6px; border: 0; padding: 2px; color: var(--fc-text); }
.ui-widget { font-family: var(--fc-font) !important; }

/* tabs & nav pills */
.nav-tabs { border-bottom: 1px solid var(--fc-border); gap: 2px; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--fc-muted); font-weight: 600; font-size: 13px; padding: 10px 14px; border-radius: 0; }
.nav-tabs .nav-link:hover { color: var(--fc-brand); border-color: transparent; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--fc-brand); border-bottom-color: var(--fc-brand); background: transparent; }
.nav-pills .nav-link { color: var(--fc-text-2); font-weight: 600; font-size: 12.5px; border-radius: 9px; padding: 7px 12px; }
.nav-pills .nav-link:hover { background: var(--fc-brand-50); color: var(--fc-brand); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--fc-gradient); color: #fff; box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .6); }

/* modals, list groups, pagination */
.modal-content { border: 0; border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--fc-border); padding: 16px 20px; }
.modal-footer { border-top: 1px solid var(--fc-border); padding: 12px 20px; }
.modal-title { font-weight: 700; display: flex; align-items: center; gap: 10px; }
.list-group-item { border-color: var(--fc-border); }
.page-link { color: var(--fc-brand); border-color: var(--fc-border); }
.page-item.active .page-link { background: var(--fc-brand); border-color: var(--fc-brand); }

/* endless-scroll status row (CAF list "View all") */
.fc-lazy-status { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border-top: 1px solid var(--fc-border); color: var(--fc-muted); font-size: 13px; font-weight: 600; min-height: 60px; }
.fc-lazy-status > * { display: none; align-items: center; gap: 8px; }
.fc-lazy-status[data-state="loading"] .fc-lazy-loading { display: inline-flex; color: var(--fc-brand-600); }
.fc-lazy-status[data-state="done"] .fc-lazy-done { display: inline-flex; color: var(--fc-success); }
.fc-lazy-status[data-state="error"] .fc-lazy-retry { display: inline-flex; }
.fc-lazy-table tbody tr { animation: fc-row-in .25s var(--fc-ease); }
@keyframes fc-row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* empty state */
.fc-empty { text-align: center; padding: 48px 16px; color: var(--fc-muted); }
.fc-empty .icon { font-size: 44px; color: var(--fc-brand-100); display: block; margin-bottom: 10px; }
.fc-empty h3 { font-size: 16px; color: var(--fc-text); margin-bottom: 4px; }

/* centered state pages (sign out, access denied, 404) */
.fc-state { min-height: calc(100vh - var(--fc-topbar-h) - 160px); display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.fc-guest .fc-state { min-height: calc(100vh - 120px); }
.fc-state-card { width: 100%; max-width: 480px; text-align: center; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow); padding: 36px 32px; }
.fc-state-icon { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; font-size: 36px; color: #fff; background: var(--fc-gradient); box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .7); }
.fc-state-icon.is-danger { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 14px 30px -12px rgba(220, 38, 38, .6); }
.fc-state-code { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.04em; margin-bottom: 8px; }
.fc-state-card h1 { font-size: 1.35rem; margin-bottom: 8px; }
.fc-state-card p { color: var(--fc-muted); margin-bottom: 22px; }
.fc-state-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* toasts */
.fc-toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 2100; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.fc-toast { min-width: 260px; max-width: 380px; background: var(--fc-navy-800); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: var(--fc-shadow-lg); display: flex; gap: 10px; align-items: flex-start; font-size: 13px; animation: fc-toast-in .2s var(--fc-ease); }
.fc-toast .icon { font-size: 20px; color: #93c5fd; }
.fc-toast.is-success .icon { color: #5eead4; }
.fc-toast.is-danger .icon { color: #fca5a5; }
@keyframes fc-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 8. DATA ENTRY / UPLOAD WORKSPACE ======================================== */
.fc-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.fc-workspace.fc-workspace-wide-form { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.fc-workspace-pane { min-width: 0; }

@media (min-width: 992px) {
    /* the viewer column must span the full row height, otherwise its sticky child has no room to stick */
    .fc-workspace > .fc-workspace-viewer { align-self: stretch; }
    .fc-sticky-pane { position: sticky; top: calc(var(--fc-topbar-h) + 16px); max-height: calc(100vh - var(--fc-topbar-h) - 32px); overflow: auto; }
}

/* summary strip shown above data entry forms */
.fc-summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 22px;
    padding: 14px 18px;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    margin-bottom: 18px;
    box-shadow: var(--fc-shadow-sm);
}

.fc-summary-strip .fc-summary-item { display: flex; flex-direction: column; min-width: 0; }
.fc-summary-strip .fc-summary-item small { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--fc-muted); font-weight: 700; }
.fc-summary-strip .fc-summary-item strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-summary-strip .fc-summary-photo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; border: 2px solid #fff; box-shadow: var(--fc-shadow); }

/* form sections (numbered) */
.fc-form-section { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); margin-bottom: 14px; box-shadow: var(--fc-shadow-sm); scroll-margin-top: calc(var(--fc-topbar-h) + 12px); }
.fc-form-section-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--fc-border); }
.fc-step { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px; background: var(--fc-gradient); color: #fff; font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.fc-form-section-head h3 { font-size: 14.5px; margin: 0; }
.fc-form-section-head p { margin: 0; font-size: 12px; color: var(--fc-muted); }
.fc-form-section-head .fc-section-state { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--fc-muted); display: inline-flex; align-items: center; gap: 5px; }
.fc-form-section.is-complete .fc-section-state { color: var(--fc-success); }
.fc-form-section.has-error .fc-form-section-head { background: var(--fc-danger-50); border-radius: var(--fc-radius) var(--fc-radius) 0 0; }
.fc-form-section-body { padding: 16px 18px 6px; }
.fc-form-section-body .row { --bs-gutter-x: 14px; }
.fc-field-hint { font-size: 11.5px; color: var(--fc-muted); font-weight: 500; margin-left: 4px; }

/* progress */
.fc-progress { height: 6px; border-radius: 999px; background: var(--fc-border); overflow: hidden; }
.fc-progress > span { display: block; height: 100%; background: var(--fc-gradient); border-radius: inherit; transition: width .3s var(--fc-ease); }

/* section quick-nav */
.fc-section-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.fc-section-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--fc-surface); border: 1px solid var(--fc-border); color: var(--fc-text-2); font-size: 12px; font-weight: 600; }
.fc-section-nav a:hover { border-color: var(--fc-brand-100); color: var(--fc-brand); }
.fc-section-nav a .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-border-strong); }
.fc-section-nav a.is-complete .dot { background: var(--fc-success); }
.fc-section-nav a.has-error .dot { background: var(--fc-danger); }

/* sticky action bar */
.fc-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px;
    margin-top: 6px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    box-shadow: 0 -8px 24px -12px rgba(17, 24, 64, .2);
}

.fc-action-bar .fc-action-meta { font-size: 12px; color: var(--fc-muted); display: flex; align-items: center; gap: 10px; min-width: 180px; flex: 1 1 200px; }
.fc-action-bar .fc-action-meta .fc-progress { flex: 1 1 auto; max-width: 180px; }
.fc-action-bar .fc-action-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.fc-kbd { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .45); opacity: .85; }
.btn-secondary .fc-kbd, .btn-outline-danger .fc-kbd { border-color: var(--fc-border-strong); }

/* dropzone (file upload tiles) */
.fc-upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

.fc-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1.5px dashed var(--fc-border-strong);
    border-radius: var(--fc-radius);
    background: var(--fc-surface-2);
    padding: 12px;
    margin: 0;
    cursor: pointer;
    transition: border-color .15s var(--fc-ease), background .15s var(--fc-ease), box-shadow .15s var(--fc-ease);
    min-height: 196px;
}

.fc-dropzone:hover, .fc-dropzone.is-dragover { border-color: var(--fc-brand); background: var(--fc-brand-50); }
.fc-dropzone.is-invalid { border-color: var(--fc-danger); background: var(--fc-danger-50); }
.fc-dropzone.has-file { border-style: solid; border-color: #b7ead5; background: #fff; }
.fc-dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fc-dropzone-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fc-dropzone-title { font-weight: 700; font-size: 13px; color: var(--fc-text); line-height: 1.3; }
.fc-dropzone-title.required:after { content: " *"; color: var(--fc-danger); }
.fc-dropzone-types { font-size: 10.5px; font-weight: 700; color: var(--fc-muted); letter-spacing: .04em; text-transform: uppercase; }

.fc-dropzone-preview {
    flex: 1 1 auto;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--fc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
    overflow: hidden;
    text-align: center;
    padding: 8px;
    color: var(--fc-muted);
    font-size: 12px;
}

.fc-dropzone-preview img { max-width: 100%; max-height: 150px; object-fit: contain; border-radius: 6px; }
.fc-dropzone-preview .icon { font-size: 30px; color: var(--fc-brand); }
.fc-dropzone-file { font-size: 12px; font-weight: 600; color: var(--fc-text); word-break: break-all; }
.fc-dropzone-size { font-size: 11px; color: var(--fc-muted); }
.fc-dropzone-clear { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--fc-border); background: #fff; color: var(--fc-muted); display: none; align-items: center; justify-content: center; font-size: 15px; z-index: 2; }
.fc-dropzone.has-file .fc-dropzone-clear { display: inline-flex; }
.fc-dropzone-clear:hover { color: var(--fc-danger); border-color: #f6b4b4; }
.fc-dropzone-existing { margin-top: 8px; font-size: 11px; color: var(--fc-success); font-weight: 700; display: flex; gap: 4px; align-items: center; }

/* document viewer */
.fc-viewer .card-header { padding: 10px 12px; }
.fc-viewer-tabs { display: flex; gap: 4px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; width: 100%; scrollbar-width: none; }
.fc-viewer-tabs::-webkit-scrollbar { display: none; }
.fc-viewer-tabs .nav-link { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.fc-viewer-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--fc-border); background: var(--fc-surface-2); font-size: 12px; color: var(--fc-muted); flex-wrap: wrap; }
.fc-viewer-toolbar .ms-auto { margin-left: auto; }

.fc-viewer .box, .fc-viewer-stage {
    height: min(68vh, 640px);
    min-height: 380px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: repeating-conic-gradient(#f3f4fa 0% 25%, #ffffff 0% 50%) 50% / 22px 22px;
    border-radius: 0 0 var(--fc-radius) var(--fc-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.fc-viewer .box > img, .fc-viewer-stage > img { max-width: 92%; max-height: 92%; width: auto; height: auto; box-shadow: var(--fc-shadow); border-radius: 4px; transition: transform .2s var(--fc-ease); }
.fc-viewer iframe { width: 100%; height: min(72vh, 680px); min-height: 420px; border: 0; display: block; border-radius: 0 0 var(--fc-radius) var(--fc-radius); background: #fff; }

.fc-info-list { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; margin: 0; }
.fc-info-list dt, .fc-info-list dd { padding: 10px 16px; border-bottom: 1px solid var(--fc-border); margin: 0; font-size: 13px; }
.fc-info-list dt { color: var(--fc-muted); font-weight: 600; }
.fc-info-list dd { color: var(--fc-text); font-weight: 600; word-break: break-word; }
.fc-info-list .form-control { min-height: 32px; padding: 4px 8px; font-size: 12.5px; }

.fc-customer-hero { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--fc-gradient-soft); border-bottom: 1px solid var(--fc-border); }
.fc-customer-hero img { width: 104px; height: 128px; flex: 0 0 104px; border-radius: 14px; object-fit: cover; object-position: center top; background: #fff; border: 3px solid #fff; box-shadow: var(--fc-shadow); }
.fc-customer-hero .fc-customer-placeholder { width: 104px; height: 128px; flex: 0 0 104px; border-radius: 16px; background: var(--fc-gradient); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.fc-customer-hero h4 { margin: 0; font-size: 16px; }
.fc-customer-hero small { color: var(--fc-muted); }

.fc-reject-note { border-left: 4px solid var(--fc-danger); margin-bottom: 14px; }

/* upload tiles with a validation error: red ring + inline message on the card itself */
.fc-dropzone.is-invalid { box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.fc-dropzone.is-invalid .fc-dropzone-title { color: var(--fc-danger); }
.fc-dropzone.is-invalid .fc-dropzone-preview { border-color: #f6b4b4; }
.fc-dropzone-error { display: none; margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--fc-danger); line-height: 1.35; }
.fc-dropzone.is-invalid .fc-dropzone-error { display: flex; gap: 4px; align-items: flex-start; }
/* status history timeline (Track status modal / page) */
.fc-track-modal .modal-body { padding: 18px 20px 8px; background: var(--fc-surface-2); }
.fc-track-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--fc-gradient); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.fc-track-code { color: var(--fc-muted); font-weight: 600; font-size: 12.5px; margin-left: 4px; }
.fc-track-loading, .fc-track-empty { padding: 36px 0; text-align: center; color: var(--fc-muted); font-size: 13px; display: flex; gap: 8px; justify-content: center; align-items: center; }
.fc-track-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); }
.fc-track-head .fc-avatar { width: 42px; height: 42px; flex: 0 0 42px; font-size: 14px; }
.fc-track-name { font-weight: 700; font-size: 15px; color: var(--fc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-track-sub { font-size: 12px; color: var(--fc-muted); }

.fc-timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.fc-timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 18px; width: 2px; background: linear-gradient(180deg, var(--fc-brand-100), var(--fc-border)); border-radius: 2px; }
.fc-timeline-item { position: relative; margin-bottom: 12px; }
.fc-timeline-dot { position: absolute; left: -24px; top: 14px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--fc-border-strong); }
.fc-timeline-item.is-current .fc-timeline-dot { box-shadow: 0 0 0 4px rgba(37, 99, 235, .18); }
.fc-timeline-card { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 11px 14px; box-shadow: var(--fc-shadow-sm); transition: box-shadow .15s var(--fc-ease), border-color .15s var(--fc-ease); }
.fc-timeline-card:hover { border-color: var(--fc-brand-100); box-shadow: var(--fc-shadow); }
.fc-timeline-item.is-current .fc-timeline-card { border-color: var(--fc-brand-100); background: var(--fc-brand-50); }
.fc-timeline-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.fc-timeline-date { font-size: 12px; color: var(--fc-muted); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.fc-timeline-remark { margin-top: 8px; font-size: 13px; color: var(--fc-text-2); text-transform: uppercase; word-break: break-word; }
.fc-timeline-user { margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--fc-muted); display: inline-flex; gap: 4px; align-items: center; letter-spacing: .02em; }

/* Accounting (/accounts) */
.fc-period-disabled { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--fc-border-strong); font-size: 18px; }
.fc-acc-actions { align-items: center; }
.fc-acc-add { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fc-tone-btn { --t: var(--fc-brand); --t-bg: var(--fc-brand-50); display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--t) 30%, transparent); background: var(--t-bg); color: var(--t); font-weight: 700; }
.fc-tone-btn:hover { background: var(--t); color: #fff; border-color: var(--t); }
.tone-green { --t: #059669; --t-bg: #e7f8f1; }
.tone-red { --t: #dc2626; --t-bg: #fdecec; }
.tone-amber { --t: #d97706; --t-bg: #fef4e2; }
.tone-slate { --t: #475569; --t-bg: #f1f5f9; }

.fc-acc-summary { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fc-acc-sum-group { display: flex; align-items: stretch; gap: 8px; flex: 3 1 420px; }
.fc-acc-sum { flex: 1 1 0; min-width: 120px; padding: 10px 14px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-left: 4px solid var(--t, var(--fc-brand)); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); display: flex; flex-direction: column; justify-content: center; }
.fc-acc-sum small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--fc-muted); }
.fc-acc-sum strong { font-size: 18px; font-weight: 800; color: var(--fc-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-acc-sum > span { font-size: 11px; opacity: .85; }
.fc-acc-summary > .fc-acc-sum:first-child { flex: 1 1 150px; }
.fc-acc-op { align-self: center; font-size: 22px; font-weight: 800; color: var(--fc-muted); }
.fc-acc-op.sm { font-size: 16px; }
.fc-acc-net { flex: 1.3 1 190px; border-left: 0; color: #fff; }
.fc-acc-net small, .fc-acc-net strong { color: #fff; }
.fc-acc-net.is-profit { background: linear-gradient(135deg, #059669, #10b981); }
.fc-acc-net.is-loss { background: linear-gradient(135deg, #dc2626, #f97316); }

.fc-acc-table th, .fc-acc-table td { padding: 9px 14px; font-size: 13px; vertical-align: middle; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-acc-table thead th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fc-muted); background: var(--fc-surface-2); }
.fc-acc-table tbody th { font-weight: 700; color: var(--fc-text); }
.fc-acc-table tr.is-current { background: var(--fc-brand-50); }
.fc-acc-table tr.is-empty td, .fc-acc-table tr.is-empty th { color: var(--fc-muted); }
.fc-acc-table tr.is-empty .fc-acc-amt { color: var(--fc-border-strong); }
.fc-acc-amt { color: var(--fc-text-2); font-weight: 600; border-bottom: 1px dashed transparent; }
.fc-acc-amt.tone-green { color: #059669; }
.fc-acc-amt:hover { color: var(--fc-brand); border-bottom-color: currentColor; }
.fc-acc-table tfoot th, .fc-acc-table tfoot td { background: var(--fc-surface-2); font-weight: 800; border-top: 2px solid var(--fc-border-strong); }
.fc-acc-netcol { width: 230px; }
.fc-acc-netcell { display: flex; align-items: center; gap: 10px; }
.fc-acc-netcell strong { min-width: 90px; text-align: right; }
.fc-acc-netcell.is-profit strong { color: #059669; }
.fc-acc-netcell.is-loss strong { color: #dc2626; }
.fc-acc-bar { flex: 1 1 auto; height: 8px; border-radius: 999px; background: var(--fc-surface-2); overflow: hidden; }
.fc-acc-bar > span { display: block; height: 100%; border-radius: inherit; }
.fc-acc-netcell.is-profit .fc-acc-bar > span { background: linear-gradient(90deg, #6ee7b7, #059669); }
.fc-acc-netcell.is-loss .fc-acc-bar > span { background: linear-gradient(90deg, #fca5a5, #dc2626); }
@media (max-width: 767.98px) {
    .fc-acc-op { display: none; }
    .fc-acc-sum-group { flex-basis: 100%; flex-wrap: wrap; }
    .fc-acc-sum-group .fc-acc-op { display: none; }
    .fc-acc-sum { min-width: calc(50% - 4px); }
    .fc-acc-sum strong { font-size: 16px; }
}

/* shared: inline search box, filter chips, empty state */
.fc-search-box { position: relative; min-width: 240px; flex: 0 1 300px; }
.fc-search-box > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fc-muted); font-size: 16px; pointer-events: none; }
.fc-search-box .form-control { padding-left: 36px; }
.fc-chipbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.fc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fc-border); background: var(--fc-surface); color: var(--fc-text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s var(--fc-ease); }
.fc-chip > span { font-size: 11px; font-weight: 800; padding: 0 7px; border-radius: 999px; background: var(--fc-surface-2); color: var(--fc-muted); }
.fc-chip:hover { border-color: var(--fc-brand-100); color: var(--fc-brand); }
.fc-chip.is-active { background: var(--fc-gradient); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .6); }
.fc-chip.is-active > span { background: rgba(255, 255, 255, .25); color: #fff; }
.fc-empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 16px; color: var(--fc-muted); text-align: center; }
.fc-empty-state > .icon { font-size: 38px; color: var(--fc-brand-100); }
.fc-empty-state strong { color: var(--fc-text); }
.fc-icon-btn.sm { width: 30px; height: 30px; font-size: 18px; }
.fc-section-title small { font-size: 11px; font-weight: 800; color: var(--fc-muted); background: var(--fc-surface-2); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }

/* role manager */
.tone-blue { --t: #2563eb; --t-bg: #eff6ff; }
.tone-teal { --t: #0d9488; --t-bg: #e6f7f5; }
.tone-magenta { --t: #c026d3; --t-bg: #fbeefd; }
.tone-violet { --t: #6d28d9; --t-bg: #f1ecfd; }
.fc-role-section { margin-bottom: 18px; }
.fc-role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.fc-role { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); transition: border-color .15s var(--fc-ease), box-shadow .15s var(--fc-ease), transform .15s var(--fc-ease); overflow: hidden; }
.fc-role::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--t); }
.fc-role:hover { border-color: color-mix(in srgb, var(--t) 35%, var(--fc-border)); box-shadow: var(--fc-shadow); transform: translateY(-1px); }
.fc-role.is-unused { background: var(--fc-surface-2); }
.fc-role-top { display: flex; align-items: flex-start; gap: 10px; }
.fc-role-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--t-bg); color: var(--t); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.fc-role h3 { font-size: 13.5px; font-weight: 700; margin: 0; color: var(--fc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.fc-role code, .fc-page-header code { font-size: 11px; color: var(--fc-muted); background: none; padding: 0; }
.fc-role-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-avatar-stack { display: flex; padding-left: 6px; min-height: 26px; }
.fc-avatar-stack > * { width: 26px; height: 26px; margin-left: -6px; border-radius: 50%; border: 2px solid #fff; background: var(--t-bg, var(--fc-brand-50)); color: var(--t, var(--fc-brand)); font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; object-fit: cover; }
.fc-avatar-stack > .more { background: var(--fc-surface-2); color: var(--fc-muted); }
.fc-role-count { font-size: 12px; font-weight: 700; color: var(--t); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.fc-role.is-unused .fc-role-count { color: var(--fc-muted); }
.fc-role-preview { font-size: 12.5px; color: var(--fc-muted); padding: 8px 12px; background: var(--fc-surface-2); border-radius: var(--fc-radius-sm); }
.fc-role-preview strong { color: var(--fc-brand-600); }

.fc-members-toolbar { gap: 10px; }
.fc-changes { font-size: 12px; font-weight: 700; color: var(--fc-brand-600); background: var(--fc-brand-50); border-radius: 999px; padding: 4px 10px; }
.fc-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.fc-member { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0; border: 1px solid var(--fc-border); border-radius: var(--fc-radius); cursor: pointer; background: var(--fc-surface); transition: all .12s var(--fc-ease); }
.fc-member:hover { border-color: var(--fc-brand-100); }
.fc-member .form-check-input { margin: 0; flex: 0 0 auto; }
.fc-member .fc-avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: 11px; }
.fc-member strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-member small { display: block; font-size: 11px; color: var(--fc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-member.is-checked { background: var(--fc-brand-50); border-color: var(--fc-brand-100); }
.fc-member.is-changed { box-shadow: inset 3px 0 0 var(--fc-warning); }
.fc-member.is-inactive { opacity: .6; }

.fc-role-edit { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.fc-plain-list { list-style: none; margin: 0; padding: 6px 0; max-height: 520px; overflow: auto; }
.fc-plain-list li { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--fc-border); }
.fc-plain-list li:last-child { border-bottom: 0; }
.fc-plain-list .fc-avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 10px; }
.fc-priv-table th, .fc-priv-table td { font-size: 12.5px; padding: 8px 14px; }
.fc-priv-table td { text-align: center; }
@media (max-width: 991.98px) { .fc-role-edit { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575.98px) { .fc-search-box { min-width: 0; flex: 1 1 100%; } }

/* team directory (/account/manageemployee) */
.fc-dir-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.fc-dir-stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); cursor: pointer; transition: all .15s var(--fc-ease); }
.fc-dir-stat:hover { border-color: var(--fc-brand-100); }
.fc-dir-stat.is-active { border-color: var(--fc-brand); box-shadow: var(--fc-ring); }
.fc-dir-stat strong { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--fc-text); }
.fc-dir-stat small { font-size: 11.5px; font-weight: 600; color: var(--fc-muted); }
.fc-dir-stat-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: var(--t-bg); color: var(--t); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.fc-dir-toolbar { flex-direction: row; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px; }
.fc-dir-toolbar .form-select { width: auto; min-width: 150px; }
.fc-dir-count { font-size: 12.5px; color: var(--fc-muted); }
.fc-dir-count strong { color: var(--fc-text); }
.fc-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.fc-person { display: flex; flex-direction: column; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); transition: box-shadow .15s var(--fc-ease), border-color .15s var(--fc-ease); overflow: hidden; }
.fc-person:hover { box-shadow: var(--fc-shadow); border-color: var(--fc-brand-100); }
.fc-person.is-inactive { background: var(--fc-surface-2); }
.fc-person.is-inactive .fc-person-avatar { filter: grayscale(1); opacity: .75; }
.fc-person-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 8px 14px; }
.fc-person-avatar { position: relative; width: 48px; height: 48px; flex: 0 0 48px; }
.fc-person-avatar img, .fc-person-avatar > span { position: absolute; inset: 0; width: 48px; height: 48px; border-radius: 14px; object-fit: cover; object-position: center top; }
.fc-person-avatar > span { display: flex; align-items: center; justify-content: center; background: var(--fc-gradient); color: #fff; font-weight: 800; font-size: 15px; }
.fc-person-avatar img { z-index: 1; background: #fff; }
.fc-person-dot { position: absolute; z-index: 2; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; background: var(--fc-success); }
.fc-person.is-inactive .fc-person-dot { background: var(--fc-danger); }
.fc-person h3 { font-size: 13.5px; font-weight: 800; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fc-text); }
.fc-person-head p { margin: 3px 0 0; font-size: 12px; color: var(--fc-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fc-code-chip { font-family: var(--fc-mono, ui-monospace, monospace); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-code-chip:hover { background: var(--fc-brand); color: #fff; }
.fc-person-info { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 0; padding: 4px 14px 10px; }
.fc-person-info > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fc-person-info > div.wide { grid-column: 1 / -1; }
.fc-person-info dt { font-size: 14px; color: var(--fc-muted); width: 16px; flex: 0 0 16px; text-align: center; }
.fc-person-info dd { margin: 0; font-size: 12px; color: var(--fc-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fc-person-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 14px; margin-top: auto; border-top: 1px solid var(--fc-border); background: var(--fc-surface-2); }
.fc-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--fc-surface); border: 1px solid var(--fc-border); color: var(--fc-text-2); }
.fc-pill.is-on { background: var(--fc-success-50); border-color: #b7ead5; color: #0b7a55; }
.fc-pill.is-off { background: var(--fc-danger-50); border-color: #f8caca; color: #a12626; }
.fc-pill.is-link { color: var(--fc-brand-600); }
.fc-pill.is-link:hover, a.fc-pill:hover { border-color: var(--fc-brand); }
.fc-emp-code { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--fc-radius); background: var(--fc-hero-bg); color: #fff; }
.fc-emp-code small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #a9c2e6; font-weight: 700; }
.fc-emp-code strong { font-size: 20px; font-weight: 800; }
.fc-emp-photo { position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px; border: 1.5px dashed var(--fc-border-strong); border-radius: var(--fc-radius); cursor: pointer; background: var(--fc-surface-2); }
.fc-emp-photo:hover { border-color: var(--fc-brand); background: var(--fc-brand-50); }
.fc-emp-photo img, .fc-emp-photo-ph { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 12px; object-fit: cover; }
.fc-emp-photo img:not([hidden]) + .fc-emp-photo-ph { display: none; }
.fc-emp-photo-ph { display: flex; align-items: center; justify-content: center; background: var(--fc-surface); color: var(--fc-brand); font-size: 24px; border: 1px solid var(--fc-border); }
.fc-emp-photo strong { display: block; font-size: 13px; color: var(--fc-text); }
.fc-emp-photo small { font-size: 11.5px; color: var(--fc-muted); }
.fc-emp-photo input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fc-track-modal .modal-dialog.modal-lg { max-width: 760px; }
@media (max-width: 991.98px) { .fc-dir-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) {
    .fc-dir-toolbar .form-select { flex: 1 1 45%; min-width: 0; }
    .fc-dir-count { width: 100%; }
    .fc-dir-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Excel upload pages */
.fc-upload-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; max-width: 1040px; }
.fc-upload-step { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.fc-upload-step:last-child { margin-bottom: 0; }
.fc-upload-step > .fc-step { margin-top: 2px; }
.fc-upload-help ol { margin: 0; padding: 14px 18px 16px 34px; font-size: 13px; color: var(--fc-text-2); display: grid; gap: 8px; }
.fc-xl-upload { display: flex; flex-direction: column; gap: 10px; }
.fc-dropzone.fc-dropzone-wide { min-height: 0; }
.fc-dropzone-wide .fc-dropzone-preview { min-height: 130px; flex-direction: column; }
.fc-dropzone-wide .fc-dropzone-preview .icon { font-size: 36px; color: #1d7a46; }
.fc-xl-sample { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--fc-border); border-radius: var(--fc-radius); background: var(--fc-surface); color: var(--fc-text-2); }
.fc-xl-sample:hover { border-color: #1d7a46; background: #eef8f2; color: #1d7a46; }
.fc-xl-sample-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; background: #1d7a46; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.fc-xl-sample strong { display: block; font-size: 13px; }
.fc-xl-sample small { font-size: 11.5px; color: var(--fc-muted); }
.fc-xl-sample > .icon:last-child { margin-left: auto; font-size: 20px; }
.fc-narrow-form { max-width: 760px; }
@media (max-width: 991.98px) { .fc-upload-page { grid-template-columns: minmax(0, 1fr); } }

/* Legacy single-column form pages (old .appContent > card layouts): keep them a readable width on
   desktop and lay their stacked full-width "Submit / Go back" buttons out in one right-aligned row. */
@media (min-width: 768px) {
    .appContent > .card:not(:has(table)),
    .appContent > form:not(:has(table)) > .card,
    .appContent > form:not(:has(table)) > .form-group,
    .appContent > form:not(:has(table)) > .row { max-width: 820px; }
    .form-group:has(> .btn-block) { display: flex; flex-direction: row-reverse; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
    .form-group:has(> .btn-block) > p:empty { display: none; }
    .form-group > .btn-block, .card-body > .btn-block { width: auto; min-width: 150px; display: inline-flex; justify-content: center; margin-top: 0 !important; }
}

/* ---------- document viewer v2 (docx-features.js) ---------- */
.fc-viewer { overflow: hidden; }
.fc-viewer > .card-header { padding: 8px 10px; }
.fc-vt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--fc-border); background: var(--fc-surface); }
.fc-vt-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--fc-text); margin-right: 4px; white-space: nowrap; }
.fc-vt-title small { font-size: 10.5px; font-weight: 700; color: var(--fc-muted); background: var(--fc-surface-2); border-radius: 999px; padding: 1px 7px; }
.fc-vt-group { display: inline-flex; align-items: center; border: 1px solid var(--fc-border); border-radius: 9px; background: var(--fc-surface-2); overflow: visible; }
.fc-vt-group > button, .fc-vt-group > a, .fc-vt-group .fc-vt-zoom { height: 30px; min-width: 30px; padding: 0 7px; border: 0; background: transparent; color: var(--fc-text-2); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; border-radius: 8px; transition: background .12s var(--fc-ease), color .12s var(--fc-ease); }
.fc-vt-group > button:hover, .fc-vt-group > a:hover, .fc-vt-zoom:hover { background: var(--fc-brand-50); color: var(--fc-brand); }
.fc-vt-group > button.is-on { background: var(--fc-brand); color: #fff; }
.fc-vt-zoom { font-size: 12px !important; font-weight: 700; min-width: 54px !important; }
.fc-vt-menu { min-width: 180px; font-size: 13px; }
.fc-vt-menu .dropdown-item { display: flex; align-items: center; gap: 8px; }
.fc-vt-menu kbd { margin-left: auto; }

.fc-viewer-stage { position: relative; touch-action: none; user-select: none; cursor: grab; outline: none; height: min(72vh, 680px); min-height: 380px; width: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#f3f4fa 0% 25%, #ffffff 0% 50%) 50% / 22px 22px; }
.fc-viewer-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--fc-brand); }
.fc-viewer-stage.is-dragging { cursor: grabbing; }
.fc-viewer-stage > img[id] { max-width: 92%; max-height: 92%; width: auto; height: auto; box-shadow: 0 10px 30px -10px rgba(17, 24, 64, .35); border-radius: 3px; transform-origin: center center; will-change: transform; transition: filter .2s var(--fc-ease); pointer-events: none; }
.fc-viewer-stage.is-dragging > img[id] { transition: none; }
.fc-viewer-stage.is-missing { cursor: default; color: var(--fc-muted); font-weight: 600; gap: 8px; }
.fc-vs-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 54px; border: 0; border-radius: 10px; background: rgba(15, 37, 87, .55); color: #fff; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s var(--fc-ease), background .15s var(--fc-ease); z-index: 3; cursor: pointer; }
.fc-vs-nav.prev { left: 8px; }
.fc-vs-nav.next { right: 8px; }
.fc-viewer-stage:hover .fc-vs-nav { opacity: .85; }
.fc-vs-nav:hover { opacity: 1 !important; background: rgba(15, 37, 87, .85); }
.fc-vs-mini { position: absolute; right: 10px; bottom: 10px; width: 92px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, .92); box-shadow: var(--fc-shadow); opacity: 0; pointer-events: none; transition: opacity .2s var(--fc-ease); z-index: 3; }
.fc-vs-mini.is-on { opacity: 1; }
.fc-vs-mini img { display: block; width: 100%; height: auto; border-radius: 5px; }
.fc-vs-mini-box { position: absolute; border: 2px solid var(--fc-brand); background: rgba(37, 99, 235, .12); border-radius: 3px; margin: 3px; box-sizing: border-box; }
.fc-viewer iframe { width: 100%; height: min(76vh, 720px); min-height: 420px; border: 0; display: block; background: #fff; }
.fc-viewer-keys { flex-wrap: wrap; gap: 4px 14px; padding: 7px 12px; border-top: 1px solid var(--fc-border); background: var(--fc-surface-2); font-size: 11px; color: var(--fc-muted); }
.fc-viewer-keys kbd, .fc-vt-menu kbd, .fc-kbd-dark { display: inline-block; padding: 0 5px; min-width: 18px; text-align: center; font-family: inherit; font-size: 10.5px; font-weight: 700; line-height: 17px; color: var(--fc-text-2); background: var(--fc-surface); border: 1px solid var(--fc-border-strong); border-bottom-width: 2px; border-radius: 5px; box-shadow: none; }
@media (min-width: 992px) {
    .fc-sticky-pane .fc-viewer-stage { height: calc(100vh - var(--fc-topbar-h) - 205px); min-height: 360px; }
    .fc-sticky-pane .fc-viewer iframe { height: calc(100vh - var(--fc-topbar-h) - 205px); min-height: 360px; }
}
/* full screen: the whole viewer card fills the screen, stage takes the rest */
.fc-viewer:fullscreen, .fc-viewer.is-fullscreen { display: flex; flex-direction: column; width: 100vw; height: 100vh; border-radius: 0; background: #0f172a; }
.fc-viewer.is-fullscreen { position: fixed; inset: 0; z-index: 3000; }
.fc-viewer:fullscreen .tab-content, .fc-viewer.is-fullscreen .tab-content { flex: 1 1 auto; min-height: 0; }
.fc-viewer:fullscreen .tab-pane.active, .fc-viewer.is-fullscreen .tab-pane.active { display: flex; flex-direction: column; height: 100%; }
.fc-viewer:fullscreen .fc-viewer-stage, .fc-viewer:fullscreen iframe,
.fc-viewer.is-fullscreen .fc-viewer-stage, .fc-viewer.is-fullscreen iframe { flex: 1 1 auto; height: auto !important; min-height: 0; }
.fc-viewer:fullscreen .fc-viewer-stage { background: #111827; }
.fc-viewer:fullscreen .fc-viewer-keys { display: none !important; }

/* missing / broken images */
.fc-customer-photo { position: relative; width: 104px; height: 128px; flex: 0 0 104px; border-radius: 14px; overflow: hidden; border: 3px solid #fff; box-shadow: var(--fc-shadow); background: #fff; }
.fc-customer-hero .fc-customer-photo img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; z-index: 1; }
.fc-customer-hero .fc-customer-photo .fc-customer-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; flex-direction: column; gap: 2px; background: linear-gradient(160deg, var(--fc-brand-50), #e0ecff); color: var(--fc-brand-100); font-size: 46px; }
.fc-customer-placeholder small { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fc-muted); }
.fc-vs-empty { display: none; flex-direction: column; align-items: center; gap: 6px; max-width: 280px; text-align: center; color: var(--fc-muted); cursor: default; }
.fc-vs-empty-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--fc-surface); border: 1.5px dashed var(--fc-border-strong); color: var(--fc-border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; }
.fc-vs-empty strong { color: var(--fc-text); font-size: 14px; }
.fc-vs-empty small { font-size: 12px; line-height: 1.45; }
.fc-viewer-stage.is-broken { cursor: default; }
.fc-viewer-stage.is-broken > img[id], .fc-viewer-stage.is-broken .fc-vs-mini { display: none; }
.fc-viewer-stage.is-broken .fc-vs-empty { display: flex; }

/* ---------- CAF review panel (audit / details left side) ---------- */
.fc-review-workspace { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr) !important; }
.fc-review { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); overflow: hidden; }
.fc-review-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--fc-gradient-soft); border-bottom: 1px solid var(--fc-border); flex-wrap: wrap; }
.fc-review-head .fc-avatar { width: 40px; height: 40px; flex: 0 0 40px; font-size: 13px; }
.fc-review-head strong { display: block; font-size: 14px; color: var(--fc-text); }
.fc-review-head small { font-size: 12px; color: var(--fc-muted); }
.fc-review-tags { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.fc-review-jump { display: flex; gap: 4px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid var(--fc-border); scrollbar-width: none; position: sticky; top: var(--fc-topbar-h); z-index: 2; background: var(--fc-surface); }
.fc-review-jump::-webkit-scrollbar { display: none; }
.fc-review-jump a { white-space: nowrap; font-size: 11.5px; font-weight: 700; color: var(--fc-text-2); padding: 4px 9px; border-radius: 999px; background: var(--fc-surface-2); display: inline-flex; gap: 4px; align-items: center; }
.fc-review-jump a:hover { background: var(--fc-brand-50); color: var(--fc-brand); }
.fc-review-sec { border-bottom: 1px solid var(--fc-border); scroll-margin-top: calc(var(--fc-topbar-h) + 50px); }
.fc-review-sec:last-child { border-bottom: 0; }
.fc-review-sec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--fc-text-2); cursor: pointer; background: var(--fc-surface-2); }
.fc-review-sec > summary::-webkit-details-marker { display: none; }
.fc-review-sec-icon { width: 24px; height: 24px; border-radius: 7px; background: var(--fc-brand-50); color: var(--fc-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.fc-review-caret { margin-left: auto; transition: transform .2s var(--fc-ease); color: var(--fc-muted); }
.fc-review-sec:not([open]) .fc-review-caret { transform: rotate(-90deg); }
.fc-review-sec dl { display: grid; grid-template-columns: minmax(110px, 36%) 1fr; margin: 0; }
.fc-review-sec dt, .fc-review-sec dd { margin: 0; padding: 7px 14px; font-size: 12.5px; border-top: 1px solid var(--fc-border); }
.fc-review-sec dt { color: var(--fc-muted); font-weight: 600; }
.fc-review-sec dd { color: var(--fc-text); font-weight: 600; display: flex; align-items: flex-start; gap: 6px; word-break: break-word; }
.fc-review-sec dd > span { flex: 1 1 auto; min-width: 0; }
.fc-review-sec dd.is-empty { color: var(--fc-border-strong); }
.fc-review-sec dl > dt:first-of-type, .fc-review-sec dl > dd:first-of-type { border-top: 0; }
.fc-copy { flex: 0 0 auto; width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent; color: var(--fc-muted); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .12s; }
.fc-review-sec dd:hover .fc-copy { opacity: 1; }
.fc-copy:hover { background: var(--fc-brand-50); color: var(--fc-brand); }

/* audit decision */
.fc-decision { margin-top: 14px; }
.fc-decision-options { display: grid; grid-template-columns: 1fr; gap: 8px; border-radius: var(--fc-radius); }
.fc-decision-options.is-invalid { outline: 2px solid var(--fc-danger); outline-offset: 3px; }
.fc-decision-option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0; border: 1.5px solid var(--fc-border); border-radius: var(--fc-radius); cursor: pointer; background: var(--fc-surface); transition: all .15s var(--fc-ease); }
.fc-decision-option input { position: absolute; opacity: 0; pointer-events: none; }
.fc-decision-option strong { display: block; font-size: 13.5px; color: var(--fc-text); }
.fc-decision-option small { font-size: 11.5px; color: var(--fc-muted); }
.fc-decision-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; background: var(--fc-surface-2); color: var(--fc-muted); }
.fc-decision-option:hover { border-color: var(--fc-border-strong); }
.fc-decision-option.is-approve:has(input:checked) { border-color: var(--fc-success); background: var(--fc-success-50); }
.fc-decision-option.is-approve:has(input:checked) .fc-decision-icon { background: var(--fc-success); color: #fff; }
.fc-decision-option.is-reject:has(input:checked) { border-color: var(--fc-danger); background: var(--fc-danger-50); }
.fc-decision-option.is-reject:has(input:checked) .fc-decision-icon { background: var(--fc-danger); color: #fff; }
.fc-decision-option:has(input:focus-visible) { box-shadow: var(--fc-ring); }
.fc-remark-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fc-remark-chips button { border: 1px dashed var(--fc-border-strong); background: var(--fc-surface); color: var(--fc-text-2); font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.fc-remark-chips button:hover { border-style: solid; border-color: var(--fc-brand); color: var(--fc-brand); }
.fc-decision .form-control.is-invalid { border-color: var(--fc-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
@media (min-width: 1400px) { .fc-decision-options { grid-template-columns: repeat(3, 1fr); } .fc-decision-option { flex-direction: column; text-align: center; } }
@media (max-width: 1199.98px) { .fc-review-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; } }
@media (max-width: 991.98px) { .fc-review-workspace { grid-template-columns: minmax(0, 1fr) !important; } .fc-review-jump { top: 0; } }

/* DSA switcher in page headers */
.fc-dsa-switch { position: relative; display: inline-flex; align-items: center; margin: 0; }
.fc-dsa-switch > .icon { position: absolute; left: 12px; color: var(--fc-brand); font-size: 16px; pointer-events: none; }
.fc-dsa-switch .form-select { padding-left: 34px; min-width: 150px; font-weight: 700; font-size: 13px; }

/* an empty validation summary must not render as an empty red box */
.fc-alert.validation-summary-valid { display: none; }

/* My account (Identity/Account/Manage) */
.fc-account { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1120px; }
.fc-account-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--fc-topbar-h) + 16px); }
.fc-account-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 18px 18px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-sm); position: relative; overflow: hidden; }
.fc-account-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 64px; background: var(--fc-gradient); }
.fc-account-avatar { position: relative; width: 96px; height: 96px; margin-bottom: 12px; }
.fc-account-avatar img, .fc-account-avatar > span { width: 96px; height: 96px; border-radius: 50%; border: 4px solid #fff; box-shadow: var(--fc-shadow); object-fit: cover; background: var(--fc-brand-50); }
.fc-account-avatar > span { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: var(--fc-brand); }
.fc-account-avatar-edit { position: absolute; right: 0; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--fc-surface); border: 1px solid var(--fc-border); color: var(--fc-brand); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: var(--fc-shadow-sm); }
.fc-account-avatar-edit:hover { background: var(--fc-brand); color: #fff; }
.fc-account-name { font-size: 16px; color: var(--fc-text); line-height: 1.3; }
.fc-account-user { font-size: 12.5px; color: var(--fc-muted); }
.fc-account-nav { display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-sm); }
.fc-account-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--fc-radius); color: var(--fc-text-2); font-weight: 600; font-size: 13.5px; }
.fc-account-nav a small { display: block; font-weight: 500; font-size: 11.5px; color: var(--fc-muted); }
.fc-account-nav a:hover { background: var(--fc-surface-2); color: var(--fc-text); }
.fc-account-nav a.active { background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-account-nav-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--fc-surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--fc-muted); }
.fc-account-nav a.active .fc-account-nav-icon { background: var(--fc-gradient); color: #fff; }
.fc-account-main { min-width: 0; }
.fc-account-main > .fc-alert { margin-bottom: 14px; }

.fc-info-list-2 { grid-template-columns: minmax(110px, 20%) 1fr minmax(110px, 20%) 1fr; }
.fc-info-list-2 dd.fc-info-wide { grid-column: span 3; }
.fc-pin .form-control { letter-spacing: .4em; max-width: 200px; }
.fc-pin .btn { border-radius: 0 var(--fc-radius-sm) var(--fc-radius-sm) 0; }
.fc-pin .form-control.is-invalid { border-color: var(--fc-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }

.fc-photo-edit { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.fc-photo-current { position: relative; width: 180px; height: 180px; border-radius: 50%; overflow: hidden; background: var(--fc-brand-50); border: 4px solid #fff; box-shadow: var(--fc-shadow); display: flex; align-items: center; justify-content: center; }
.fc-photo-current img { width: 100%; height: 100%; object-fit: cover; }
.fc-photo-current > span:not(.fc-photo-tag) { font-size: 72px; color: var(--fc-brand-100); }
.fc-photo-tag { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(15, 37, 87, .75); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; }
.fc-photo-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 20px; margin: 0; border: 1.5px dashed var(--fc-border-strong); border-radius: var(--fc-radius); background: var(--fc-surface-2); color: var(--fc-muted); font-size: 13px; cursor: pointer; transition: border-color .15s var(--fc-ease), background .15s var(--fc-ease); }
.fc-photo-drop .icon { font-size: 34px; color: var(--fc-brand); }
.fc-photo-drop strong { color: var(--fc-text); font-size: 14px; }
.fc-photo-drop small { font-size: 11.5px; margin-top: 4px; }
.fc-photo-drop:hover, .fc-photo-drop.is-dragover { border-color: var(--fc-brand); background: var(--fc-brand-50); }
.fc-photo-drop.is-invalid { border-color: var(--fc-danger); background: var(--fc-danger-50); }
.fc-photo-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fc-photo-file { font-weight: 700; color: var(--fc-success); word-break: break-all; }

@media (max-width: 991.98px) {
    .fc-account { grid-template-columns: minmax(0, 1fr); }
    .fc-account-side { position: static; }
    .fc-account-card { flex-direction: row; text-align: left; gap: 14px; padding: 14px; }
    .fc-account-card::before { display: none; }
    .fc-account-avatar, .fc-account-avatar img, .fc-account-avatar > span { width: 64px; height: 64px; margin: 0; }
    .fc-account-avatar > span { font-size: 22px; }
    .fc-account-avatar-edit { width: 24px; height: 24px; font-size: 13px; }
    .fc-account-card .fc-badge-soft { margin-left: auto; }
    .fc-account-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
    .fc-account-nav a { flex: 1 0 auto; }
    .fc-account-nav a small { display: none; }
    .fc-info-list-2 { grid-template-columns: minmax(120px, 38%) 1fr; }
    .fc-info-list-2 dd.fc-info-wide { grid-column: auto; }
}

@media (max-width: 575.98px) {
    .fc-photo-edit { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    .fc-photo-drop { width: 100%; }
    .fc-account-nav-icon { width: 28px; height: 28px; flex-basis: 28px; font-size: 15px; }
}

/* manual status form (modal / page) */
.fc-mstatus .fc-track-head { margin-bottom: 16px; }
.fc-mstatus-current { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
.fc-mstatus-current small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--fc-muted); font-weight: 700; }
.fc-badge-soft { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--fc-brand-50); color: var(--fc-brand-600); border: 1px solid var(--fc-brand-100); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.fc-mstatus .fc-error-summary:not(.is-visible) { display: none; }
.fc-mstatus .form-control.is-invalid { border-color: var(--fc-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.fc-mstatus-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--fc-border); }
.fc-track-modal .modal-body .fc-mstatus .fc-track-head { background: var(--fc-surface); }
@media (max-width: 575.98px) { .fc-mstatus-current { display: none; } }

/* update lead form (modal / page): compact grouped fields sized for a ~560px dialog */
.fc-track-modal .modal-dialog:not(.modal-lg) { max-width: 560px; }
.fc-lead-group { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); padding: 12px 14px 14px; margin-bottom: 12px; }
.fc-lead-group-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fc-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.fc-lead-group-title .icon { font-size: 14px; color: var(--fc-brand); }
.fc-lead-form label { font-size: 12px; margin-bottom: 4px; }
.fc-lead-form .form-control, .fc-lead-form .form-select, .fc-lead-form .input-group-text { min-height: 38px; font-size: 13px; }
.fc-lead-form .select2-container .select2-selection--single { min-height: 38px; }
.fc-lead-form .is-invalid, .fc-lead-form .select2-selection.is-invalid { border-color: var(--fc-danger) !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.fc-lead-form .fc-mstatus-actions { margin-top: 4px; }

.fc-form-section .form-control.is-invalid { border-color: var(--fc-danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }

/* 9. DASHBOARD KPI TILES ================================================== */
.fc-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; }

.fc-kpi {
    --tone: var(--fc-brand);
    --tone-2: var(--fc-brand-2);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: var(--fc-radius-lg);
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    box-shadow: var(--fc-shadow-sm);
    color: var(--fc-text);
    overflow: hidden;
    transition: transform .18s var(--fc-ease), box-shadow .18s var(--fc-ease), border-color .18s;
    text-align: left;
    width: 100%;
}

.fc-kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: linear-gradient(135deg, var(--tone), var(--tone-2)); opacity: .08; transition: opacity .2s; }
.fc-kpi:hover { transform: translateY(-3px); box-shadow: var(--fc-shadow-lg); border-color: transparent; color: var(--fc-text); }
.fc-kpi:hover::after { opacity: .16; }
.fc-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.fc-kpi-icon { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 21px; background: linear-gradient(135deg, var(--tone), var(--tone-2)); box-shadow: 0 8px 18px -8px var(--tone); }
.fc-kpi-go { width: 30px; height: 30px; border-radius: 9px; background: var(--fc-surface-2); color: var(--fc-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; transition: all .18s var(--fc-ease); }
.fc-kpi:hover .fc-kpi-go { background: linear-gradient(135deg, var(--tone), var(--tone-2)); color: #fff; }
.fc-kpi-value { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.fc-kpi-label { font-size: 13px; font-weight: 600; color: var(--fc-text-2); position: relative; z-index: 1; }
.fc-kpi.is-empty { box-shadow: none; background: var(--fc-surface-2); cursor: default; }
.fc-kpi.is-empty:hover { transform: none; box-shadow: none; border-color: var(--fc-border); }
.fc-kpi.is-empty .fc-kpi-icon { background: #e3e5f0; box-shadow: none; color: #9aa0bf; }
.fc-kpi.is-empty .fc-kpi-value { color: #a5aac6; }
.fc-kpi.is-empty .fc-kpi-go { opacity: 0; }

/* tones */
.tone-violet { --tone: #4338ca; --tone-2: #6366f1; }
.tone-blue { --tone: #2563eb; --tone-2: #38bdf8; }
.tone-indigo { --tone: #4f46e5; --tone-2: #818cf8; }
.tone-teal { --tone: #0d9488; --tone-2: #2dd4bf; }
.tone-green { --tone: #059669; --tone-2: #34d399; }
.tone-navy { --tone: #1e3a8a; --tone-2: #3b82f6; }
.tone-magenta { --tone: #c026d3; --tone-2: #f472b6; }
.tone-cyan { --tone: #0891b2; --tone-2: #22d3ee; }
.tone-amber { --tone: #d97706; --tone-2: #fbbf24; }
.tone-red { --tone: #dc2626; --tone-2: #f87171; }
.tone-rose { --tone: #e11d48; --tone-2: #fb7185; }
.tone-slate { --tone: #475569; --tone-2: #94a3b8; }

.fc-section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--fc-muted); }
.fc-section-title::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--fc-border); }
.fc-section-title:first-child { margin-top: 0; }

/* hero / overview card */
.fc-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--fc-radius-lg);
    padding: 22px 24px;
    background: var(--fc-hero-bg);
    color: #fff;
    box-shadow: var(--fc-shadow-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.fc-hero::before { content: ""; position: absolute; right: -60px; top: -90px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(14, 165, 233, .45), transparent); }
.fc-hero::after { content: ""; position: absolute; left: 30%; bottom: -140px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(37, 99, 235, .4), transparent); }
.fc-hero > * { position: relative; z-index: 1; }
.fc-hero h2 { color: #fff; margin: 0; font-size: 1.35rem; font-weight: 800; }
.fc-hero p { margin: 4px 0 0; color: #c7d7ee; font-size: 13px; }
.fc-hero-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.fc-hero-stat { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 16px; min-width: 128px; }
.fc-hero-stat small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #9fb9db; font-weight: 700; }
.fc-hero-stat strong { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fc-hero .fc-progress { background: rgba(255, 255, 255, .12); margin-top: 8px; }

/* ---- compact dashboard: everything fits one screen on a normal laptop/desktop ---------------- */
.fc-dash .fc-page-header { margin-bottom: 14px; }
.fc-dash .fc-page-header h1 { font-size: 1.3rem; }
.fc-dash .fc-page-header p { margin-top: 2px; font-size: 12.5px; }
.fc-dash .fc-breadcrumb { margin-bottom: 2px; }

.fc-dash .fc-hero { padding: 14px 20px; gap: 12px 18px; margin-bottom: 4px; border-radius: 16px; }
.fc-dash .fc-hero h2 { font-size: 1.1rem; }
.fc-dash .fc-hero p { font-size: 12px; margin-top: 2px; }
.fc-dash .fc-hero .fc-progress { margin-top: 6px; height: 5px; }
.fc-dash .fc-hero-stats { gap: 8px; }
.fc-dash .fc-hero-stat { padding: 7px 14px; min-width: 104px; border-radius: 12px; }
.fc-dash .fc-hero-stat small { font-size: 10px; }
.fc-dash .fc-hero-stat strong { font-size: 19px; line-height: 1.2; }

.fc-dash .fc-section-title { margin: 16px 0 10px; font-size: 11.5px; }

/* horizontal tile: icon | value + label | arrow */
.fc-dash .fc-kpi-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(168px, 13vw, 230px), 1fr)); gap: 10px; }
.fc-dash .fc-kpi {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon value" "icon label";
    column-gap: 12px;
    row-gap: 1px;
    align-items: center;
    padding: 12px 30px 12px 14px;
    border-radius: 14px;
    min-height: 68px;
}
.fc-dash .fc-kpi::after { width: 90px; height: 90px; right: -34px; top: -34px; }
.fc-dash .fc-kpi:hover { transform: translateY(-2px); }
.fc-dash .fc-kpi-top { display: contents; }
.fc-dash .fc-kpi-icon { grid-area: icon; width: 40px; height: 40px; font-size: 19px; border-radius: 12px; }
.fc-dash .fc-kpi-value { grid-area: value; font-size: 22px; align-self: end; }
.fc-dash .fc-kpi-label { grid-area: label; font-size: 12px; align-self: start; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-dash .fc-kpi-go { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; font-size: 13px; border-radius: 7px; z-index: 1; }

/* tall screens get a little more breathing room, short ones a little less */
@media (min-height: 900px) and (min-width: 1200px) {
    .fc-dash .fc-kpi { min-height: 78px; padding: 14px 14px 14px 16px; }
    .fc-dash .fc-kpi-icon { width: 44px; height: 44px; font-size: 20px; }
    .fc-dash .fc-kpi-value { font-size: 24px; }
    .fc-dash .fc-section-title { margin: 20px 0 12px; }
}
@media (max-height: 720px) and (min-width: 992px) {
    .fc-dash .fc-kpi { min-height: 58px; padding: 9px 10px 9px 12px; }
    .fc-dash .fc-kpi-icon { width: 34px; height: 34px; font-size: 16px; }
    .fc-dash .fc-kpi-value { font-size: 19px; }
    .fc-dash .fc-section-title { margin: 12px 0 8px; }
    .fc-dash .fc-hero { padding: 10px 16px; }
}
@media (max-width: 575.98px) {
    .fc-dash .fc-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .fc-dash .fc-kpi { column-gap: 10px; padding: 10px; }
    .fc-dash .fc-kpi-go { display: none; }
    .fc-dash .fc-kpi-icon { width: 34px; height: 34px; font-size: 16px; }
    .fc-dash .fc-kpi-value { font-size: 19px; }
    .fc-dash .fc-kpi-label { font-size: 11px; }
    .fc-dash .fc-hero-stat { min-width: 0; flex: 1 1 calc(50% - 8px); }
}

/* toolbar row (filters + actions) */
.fc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fc-toolbar .form-control, .fc-toolbar .form-select { width: auto; min-width: 160px; }

/* 10. LEGACY COMPATIBILITY LAYER ========================================== */
/* Mobile-template containers used by existing views */
.appContent { padding: 0; }
#appCapsule:not(.fc-content) { padding: 0; } /* never strip the shell's own content gutter */
.sectionTitle { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.sectionTitle .title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.sectionTitle .title h1 { font-size: 1.4rem; margin: 0; }
.appFooter { display: none; } /* replaced by the shell footer */
.appHeader, .appBottomMenu { display: none !important; }
/* legacy in-page search box (e.g. Manage users) — shown inline */
#searchBox { position: relative; margin: 12px 0; max-width: 420px; }
#searchBox form { position: relative; margin: 0; }
#searchBox .inputIcon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fc-muted); font-size: 18px; z-index: 1; }
#searchBox .form-control { padding-left: 38px; }
#searchBox .closeButton { display: none; }
.counter { font-weight: 800; font-variant-numeric: tabular-nums; }
.lead { font-size: 1rem; font-weight: 400; }
.content { padding: 0; }
.content-wrapper { margin: 0 !important; padding: 0 !important; background: transparent !important; min-height: 0 !important; }
.listview { list-style: none; padding: 0; margin: 0; }

/* Bootstrap 3 panels → cards */
.panel { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius); box-shadow: var(--fc-shadow-sm); margin-bottom: 18px; }
.panel-heading { padding: 14px 18px; border-bottom: 1px solid var(--fc-border); font-weight: 700; background: transparent; border-radius: var(--fc-radius) var(--fc-radius) 0 0; }
.panel-heading h4, .panel-heading h3 { margin: 0; }
.panel-body { padding: 18px; }
.panel-body::after { content: ""; display: table; clear: both; }
/* Bootstrap 3 let columns float side by side anywhere; Bootstrap 5 needs a .row.
   Legacy panels that put col-* straight inside .panel-body / form get row behaviour back. */
.panel-body:has(> [class*="col-"]), .panel-body > form:has(> [class*="col-"]) { display: flex; flex-wrap: wrap; align-items: flex-start; margin: 0; }
.panel-body > [class*="col-"], .panel-body > form > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
.panel-body > .row, .panel-body > form > .row { width: 100%; }
.panel-footer { padding: 12px 18px; border-top: 1px solid var(--fc-border); background: var(--fc-surface-2); }
.panel-bd > .panel-heading { color: var(--fc-text); }

/* Bootstrap 3/4 helpers */
.btn-xs { padding: .2rem .55rem; font-size: 11.5px; border-radius: 7px; }
.btn-block { display: flex; width: 100%; }
.btn-pink { background: #ec4899; border-color: #ec4899; color: #fff; }
.btn-pink:hover { background: #db2777; color: #fff; }
.pull-right, .float-right, .f-right { float: right !important; }
.pull-left, .float-left, .f-left { float: left !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.font-weight-bold { font-weight: 700 !important; }
.font-weight-normal { font-weight: 400 !important; }
.m-b-5 { margin-bottom: 5px !important; }
.m-t-0 { margin-top: 0 !important; }
.w-md { min-width: 110px; }
.hidden { display: none !important; }
.label { display: inline-block; padding: .3em .65em; font-size: 11px; font-weight: 700; border-radius: 999px; color: #fff; }
.label-success, .badge-success { background: var(--fc-success); color: #fff; }
.label-danger, .badge-danger { background: var(--fc-danger); color: #fff; }
.label-warning, .badge-warning { background: var(--fc-warning); color: #fff; }
.label-info, .badge-info { background: var(--fc-info); color: #fff; }
.label-primary, .badge-primary { background: var(--fc-brand); color: #fff; }
.label-default, .badge-secondary, .badge-light { background: #e8eaf4; color: var(--fc-text-2); }
.badge-dark { background: var(--fc-navy-800); color: #fff; }
.form-horizontal .control-label { padding-top: 8px; }
.input-group-addon { padding: .5rem .75rem; background: var(--fc-surface-2); border: 1px solid var(--fc-border-strong); border-radius: 10px; }
.img-thumbnail { border-radius: 10px; border-color: var(--fc-border); }
.bg-head { background: var(--fc-navy-800); color: #fff; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.bg-head h5 { color: #fff; margin: 0; text-transform: uppercase; font-size: 13px; letter-spacing: .06em; }
.bg-sub-head { background: var(--fc-gradient); color: #fff; border-radius: 10px; padding: 7px 14px; margin: 14px 0 12px; }
.bg-sub-head h5 { color: #fff; margin: 0; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.box-layout { padding: 14px; border: 1px solid var(--fc-border); border-radius: var(--fc-radius); background: var(--fc-surface); margin-bottom: 14px; }
.reset-button { padding: 0; }
.excel { color: var(--fc-excel); font-size: 22px; }
.text-remark { border: 0; background: transparent; font-weight: 600; font-size: 11px; color: var(--fc-danger); pointer-events: none; }

/* order cards (legacy CAF dashboard widgets) */
.order-card { color: #fff; border: 0; border-radius: var(--fc-radius-lg); overflow: hidden; }
.order-card .card-block { padding: 20px; }
.order-card i { font-size: 26px; }
.bg-c-blue { background: linear-gradient(135deg, #059669, #34d399) !important; }
.bg-c-green { background: linear-gradient(135deg, #0d9488, #2dd4bf) !important; }
.bg-c-yellow { background: var(--fc-gradient) !important; }
.bg-c-pink { background: linear-gradient(135deg, #e11d48, #fb923c) !important; }

/* CAF status colours (used as tile classes and as bg-* badges in reports) */
.lead-generated, .bg-lead-generated { background: linear-gradient(135deg, #4f46e5, #818cf8) !important; color: #fff !important; }
.doc-upload, .bg-doc-upload { background: linear-gradient(135deg, #2563eb, #38bdf8) !important; color: #fff !important; }
.data-done, .bg-data-done { background: linear-gradient(135deg, #4f46e5, #818cf8) !important; color: #fff !important; }
.dataentry-reject, .bg-dataentry-reject { background: linear-gradient(135deg, #dc2626, #f87171) !important; color: #fff !important; }
.print-done, .bg-print-done { background: linear-gradient(135deg, #0891b2, #22d3ee) !important; color: #fff !important; }
.data-first-audit-done, .bg-data-first-audit-done { background: linear-gradient(135deg, #059669, #34d399) !important; color: #fff !important; }
.data-first-audit-rejected, .bg-data-first-audit-rejected { background: linear-gradient(135deg, #e11d48, #fb7185) !important; color: #fff !important; }
.doc-first-audit-rejected, .bg-doc-first-audit-rejected { background: linear-gradient(135deg, #b91c1c, #ef4444) !important; color: #fff !important; }
.data-docs-downloaded, .bg-data-docs-downloaded { background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important; color: #fff !important; }
.lead-call, .bg-lead-call { background: linear-gradient(135deg, #c026d3, #f472b6) !important; color: #fff !important; }
.form-finalize, .bg-form-finalize { background: linear-gradient(135deg, #0d9488, #2dd4bf) !important; color: #fff !important; }
.default-tile, .bg-default-tile { background: linear-gradient(135deg, #64748b, #94a3b8) !important; color: #fff !important; }
.negative-tile, .bg-negative-tile { background: linear-gradient(135deg, #991b1b, #dc2626) !important; color: #fff !important; }
.warning-tile, .bg-warning-tile { background: linear-gradient(135deg, #d97706, #fbbf24) !important; color: #fff !important; }
.lead-generated p, .lead-generated i, .doc-upload p, .doc-upload i, .data-done p, .data-done i, .negative-tile p, .negative-tile i,
.default-tile p, .default-tile i, .warning-tile p, .warning-tile i, .form-finalize p, .form-finalize i, .lead-call p, .lead-call i { color: #fff; }
.badge-status-info { background: linear-gradient(135deg, #0891b2, #6d28d9) !important; color: #fff !important; }
.badge-status-primary { background: linear-gradient(135deg, #047857, #10b981) !important; color: #fff !important; }
.badge-direct-print { background: var(--fc-gradient) !important; color: #fff !important; }

/* counter boxes (legacy tiles elsewhere in the app) */
.counter-box { border-radius: var(--fc-radius) !important; padding: 14px !important; box-shadow: var(--fc-shadow); margin-bottom: 14px; }
.counter-box .counter { font-size: 26px; color: #fff; display: block; }
.counter-box p { margin: 4px 0 0; font-weight: 600; font-size: 13px; }

/* 11. UTILITIES, RESPONSIVE, PRINT ======================================== */
.fc-gap-sm { gap: 8px; }
.fc-hide-mobile { }
.fc-nowrap { white-space: nowrap; }
.fc-mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.fc-uppercase input[type=text], .fc-uppercase textarea, input.fc-upper, textarea.fc-upper { text-transform: uppercase; }
.fc-divider { height: 1px; background: var(--fc-border); margin: 16px 0; }
.cursor-pointer { cursor: pointer; }
.min-w-0 { min-width: 0; }

@media (max-width: 1399.98px) {
    .fc-workspace, .fc-workspace.fc-workspace-wide-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 1199.98px) {
    .fc-clock { display: none; }
    .fc-workspace { gap: 14px; }
    .fc-viewer .box, .fc-viewer-stage { min-height: 320px; }
}

@media (max-width: 991.98px) {
    .fc-workspace, .fc-workspace.fc-workspace-wide-form { grid-template-columns: minmax(0, 1fr); }
    .fc-workspace-viewer { order: -1; }
    .fc-viewer .box, .fc-viewer-stage { height: 52vh; }
    .fc-viewer iframe { height: 60vh; }
}

/* tablet & phone: sidebar becomes an off-canvas drawer */
@media (max-width: 991.98px) {
    .fc-main, body.fc-sidebar-collapsed .fc-main { margin-left: 0; }
    .fc-sidebar, body.fc-sidebar-collapsed .fc-sidebar { width: var(--fc-sidebar-w); transform: translateX(-100%); }
    body.fc-sidebar-collapsed .fc-brand-text, body.fc-sidebar-collapsed .fc-nav-text, body.fc-sidebar-collapsed .fc-collapse-btn span { display: initial; }
    body.fc-sidebar-collapsed .fc-sidebar .fc-brand-logo { display: block; }
    body.fc-sidebar-collapsed .fc-sidebar .fc-brand .fc-brand-mark { display: none; }
    body.fc-sidebar-collapsed .fc-nav-link { justify-content: flex-start; padding: 9px 12px; }
    body.fc-sidebar-collapsed .fc-nav-heading { font-size: 10.5px; padding: 12px 12px 6px; }
    body.fc-sidebar-collapsed .fc-nav-heading::before { display: none; }
    body.fc-sidebar-open .fc-sidebar { transform: none; }
    body.fc-sidebar-open .fc-backdrop { opacity: 1; visibility: visible; }
    body.fc-sidebar-open { overflow: hidden; }
    .fc-sidebar-footer .fc-collapse-btn { display: none; }
    .fc-content { padding: 18px 16px 26px; }
    .fc-topbar { padding: 0 14px; gap: 10px; }
    .fc-profile-meta, .fc-profile-btn .ion-ios-arrow-down { display: none; }
    .fc-profile-btn { padding: 2px; border-radius: 12px; }
    .fc-search > kbd { display: none; }
    .fc-search > input { padding-right: 12px; }
    .fc-footer { padding: 12px 16px; }
}

@media (max-width: 767.98px) {
    body { font-size: 13.5px; }
    .fc-topbar-title { display: none; }
    .fc-search { max-width: none; }
    .fc-page-header { margin-bottom: 16px; }
    .fc-page-header h1, .fc-page-title { font-size: 1.2rem; }
    .fc-page-actions { width: 100%; }
    .fc-page-actions > .btn, .fc-page-actions > form, .fc-page-actions > .fc-period { flex: 1 1 auto; }
    .fc-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .fc-kpi { padding: 14px; gap: 10px; border-radius: 14px; }
    .fc-kpi-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 11px; }
    .fc-kpi-value { font-size: 24px; }
    .fc-kpi-label { font-size: 12px; }
    .fc-hero { padding: 18px; }
    .fc-hero-stat { flex: 1 1 calc(50% - 12px); min-width: 0; }
    .fc-form-section-body { padding: 14px 14px 4px; }
    .fc-action-bar { bottom: 8px; }
    .fc-action-bar .fc-action-buttons { width: 100%; }
    .fc-action-bar .fc-action-buttons .btn { flex: 1 1 auto; }
    .fc-info-list { grid-template-columns: 1fr; }
    .fc-info-list dt { border-bottom: 0; padding-bottom: 0; }
    .fc-upload-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .fc-dropzone { min-height: 170px; }
    .card-body, .panel-body { padding: 14px; }
    .fc-kbd { display: none; }
    .table > :not(caption) > * > * { padding: .55rem .6rem; }
}

@media (max-width: 339.98px) {
    .fc-kpi-grid { grid-template-columns: minmax(0, 1fr); }
}

@media print {
    .fc-sidebar, .fc-topbar, .fc-footer, .fc-backdrop, .fc-action-bar, .btn, #loading { display: none !important; }
    .fc-main { margin: 0 !important; }
    .fc-content { padding: 0; max-width: none; }
    body { background: #fff; }
    .card, .panel { box-shadow: none; border-color: #ccc; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ========================================================================
   TELE-CALLING DIALER (Views/Caller/Index.cshtml)
   ======================================================================== */
.fc-dialer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; max-width: 1180px; margin: 0 auto; }
.fc-dialer-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

.fc-dial-hero { position: relative; text-align: center; padding: 18px 20px 22px; border-radius: var(--fc-radius-lg); color: #fff; background: var(--fc-hero-bg); box-shadow: var(--fc-shadow-lg); overflow: hidden; }
.fc-dial-hero::after { content: ""; position: absolute; inset: auto -60px -80px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(14,165,233,.35), transparent 70%); pointer-events: none; }
.fc-dial-meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.fc-dial-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.fc-dial-count { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font-size: 12.5px; }
.fc-dial-count strong { font-weight: 800; }
.fc-dial-avatar { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; letter-spacing: .5px; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.35); }
.fc-dial-name { font-size: 24px; font-weight: 800; line-height: 1.2; color: #fff; margin: 0 0 6px; word-break: break-word; }
.fc-dial-number { display: inline-block; font-size: 34px; font-weight: 800; letter-spacing: 1.5px; color: #fff; font-variant-numeric: tabular-nums; text-decoration: none; }
.fc-dial-number:hover { color: #bae6fd; }
.fc-dial-prev { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.fc-dial-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.fc-dial-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; font-size: 16px; font-weight: 700; text-decoration: none; transition: transform .15s var(--fc-ease), box-shadow .15s var(--fc-ease); }
.fc-dial-btn .icon { font-size: 22px; }
.fc-dial-btn.is-call { background: #10b981; color: #fff; box-shadow: 0 10px 24px -8px rgba(16,185,129,.8); }
.fc-dial-btn.is-call .icon { animation: fcDialRing 1.6s ease-in-out infinite; }
.fc-dial-btn.is-alt { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); font-size: 14px; }
.fc-dial-btn:hover { color: #fff; transform: translateY(-1px); }
@keyframes fcDialRing { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.fc-dial-done { display: none; position: relative; z-index: 1; margin: 14px auto 0; padding: 8px 16px; border: 0; border-radius: 999px; background: transparent; color: #bae6fd; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.fc-dial-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: var(--t); background: var(--t-bg); white-space: nowrap; }

.fc-dial-form { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-sm); padding: 18px; }
.fc-dial-block { margin-bottom: 16px; }
.fc-dial-block[hidden], #divNot[hidden] { display: none !important; }
.fc-dial-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fc-text-2); margin-bottom: 8px; }
.fc-dial-label em { color: var(--fc-danger); font-style: normal; }
.fc-dial-label small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--fc-muted); margin-left: 4px; }
.fc-dial-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fc-dial-form .form-control { min-height: 44px; font-size: 15px; }

.fc-dial-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fc-dial-opt { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border: 1.5px solid var(--fc-border); border-radius: var(--fc-radius); background: var(--fc-surface); cursor: pointer; transition: all .15s var(--fc-ease); }
.fc-dial-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fc-dial-opt > .icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; color: var(--t); background: var(--t-bg); }
.fc-dial-opt strong { display: block; font-size: 13.5px; color: var(--fc-text); line-height: 1.2; }
.fc-dial-opt small { display: block; font-size: 11px; color: var(--fc-muted); line-height: 1.25; }
.fc-dial-opt:hover { border-color: var(--fc-border-strong); }
.fc-dial-opt:has(input:checked) { border-color: var(--t); background: var(--t-bg); box-shadow: 0 0 0 1px var(--t) inset; }
.fc-dial-opt:has(input:checked) > .icon { background: var(--t); color: #fff; }
.fc-dial-opt:has(input:focus-visible) { box-shadow: var(--fc-ring); }

.fc-dial-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fc-dial-chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--fc-border); background: var(--fc-surface-2); color: var(--fc-text-2); font-size: 12px; font-weight: 600; }
.fc-dial-chip:hover { border-color: var(--fc-brand); color: var(--fc-brand); background: var(--fc-brand-50); }

.fc-yesno { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; border-radius: 999px; background: var(--fc-surface-2); border: 1px solid var(--fc-border); min-width: 220px; }
.fc-yesno label { margin: 0; cursor: pointer; }
.fc-yesno input { position: absolute; opacity: 0; pointer-events: none; }
.fc-yesno span { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--fc-muted); transition: all .15s var(--fc-ease); }
.fc-yesno span .icon { font-size: 20px; }
.fc-yesno .is-yes input:checked + span { background: var(--fc-success); color: #fff; box-shadow: 0 6px 14px -8px rgba(16,185,129,.9); }
.fc-yesno .is-no input:checked + span { background: var(--fc-text-2); color: #fff; }
.fc-yesno input:focus-visible + span { box-shadow: var(--fc-ring); }

.fc-bank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fc-bank-opt { margin: 0; cursor: pointer; }
.fc-bank-opt input { position: absolute; opacity: 0; pointer-events: none; }
.fc-bank-opt span { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1.5px solid var(--fc-border); border-radius: var(--fc-radius-sm); font-size: 13px; font-weight: 600; color: var(--fc-text-2); background: var(--fc-surface); transition: all .15s var(--fc-ease); }
.fc-bank-opt span .icon { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--fc-border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: transparent; }
.fc-bank-opt input:checked + span { border-color: var(--fc-brand); background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-bank-opt input:checked + span .icon { background: var(--fc-brand); border-color: var(--fc-brand); color: #fff; }
.fc-bank-opt input:focus-visible + span { box-shadow: var(--fc-ring); }

.fc-dial-err { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--fc-danger); }
.fc-dial-err.is-shown { display: block; }
.fc-dial-block.is-invalid .form-control { border-color: var(--fc-danger); box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.fc-dial-block.is-invalid .fc-dial-status, .fc-dial-block.is-invalid .fc-bank-grid { outline: 2px solid var(--fc-danger); outline-offset: 4px; border-radius: var(--fc-radius); }

.fc-dial-submit { padding-top: 4px; }
.fc-dial-submit .btn { width: 100%; min-height: 50px; font-size: 16px; font-weight: 700; border-radius: var(--fc-radius); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.fc-dial-history { position: sticky; top: calc(var(--fc-topbar-h) + 16px); max-height: calc(100vh - var(--fc-topbar-h) - 32px); display: flex; flex-direction: column; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-sm); overflow: hidden; }
.fc-dial-history header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--fc-border); }
.fc-dial-history h3 { margin: 0; font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.fc-dial-history h3 span { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--fc-brand-50); color: var(--fc-brand); }
.fc-dial-history header .fc-icon-btn { display: none; }
.fc-dial-history-list { overflow-y: auto; padding: 10px; display: grid; gap: 8px; align-content: start; }
.fc-dial-item { position: relative; padding: 10px 12px; border: 1px solid var(--fc-border); border-radius: var(--fc-radius); background: var(--fc-surface-2); font-size: 12.5px; }
.fc-dial-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fc-dial-item-head strong { font-size: 13.5px; color: var(--fc-text); }
.fc-dial-item-no { margin-top: 2px; color: var(--fc-muted); font-variant-numeric: tabular-nums; }
.fc-dial-item-no a { color: var(--fc-text-2); font-weight: 600; }
.fc-dial-item-fu { margin-top: 4px; color: var(--fc-brand); font-weight: 600; }
.fc-dial-item p { margin: 5px 0 0; color: var(--fc-text-2); }
.fc-dial-item-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; color: var(--fc-muted); }
.fc-dial-recall { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--fc-brand); color: #fff; font-weight: 700; font-size: 12px; }
.fc-dial-recall:hover { color: #fff; background: var(--fc-brand-600); }
.fc-dial-empty { text-align: center; padding: 30px 10px; color: var(--fc-muted); }
.fc-dial-empty .icon { display: block; font-size: 32px; margin-bottom: 6px; }
.fc-dial-backdrop { display: none; }

@media (max-width: 1199.98px) {
    .fc-dialer { grid-template-columns: minmax(0, 1fr) 320px; }
    .fc-dial-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .fc-dialer { grid-template-columns: minmax(0, 1fr); }
    .fc-dial-history { position: static; max-height: none; }
}

/* ---- mobile: focused dialer, everything else set aside ---- */
@media (max-width: 767.98px) {
    body.fc-focus-mode .fc-search,
    body.fc-focus-mode .fc-clock,
    body.fc-focus-mode .fc-footer,
    body.fc-focus-mode .fc-topbar-title small { display: none !important; }
    body.fc-focus-mode .fc-content { padding: 12px 12px 24px; }
    body.fc-noscroll { overflow: hidden; }

    .fc-dial-hero { padding: 14px 16px 20px; }
    .fc-dial-avatar { width: 64px; height: 64px; font-size: 22px; }
    .fc-dial-name { font-size: 22px; }
    .fc-dial-number { font-size: 32px; letter-spacing: 1px; }
    .fc-dial-actions { flex-direction: column; align-items: stretch; }
    .fc-dial-btn { width: 100%; min-height: 56px; font-size: 17px; }
    .fc-dial-done { display: inline-block; }
    .fc-dialer.is-called .fc-dial-done { display: none; }

    /* outcome form appears only once the call is done */
    .fc-dialer:not(.is-called) .fc-dial-form { display: none; }
    .fc-dialer.is-called .fc-dial-form { animation: fcDialIn .25s var(--fc-ease); }
    .fc-dial-form { padding: 14px; }
    .fc-dial-row { grid-template-columns: 1fr; }
    .fc-dial-status { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .fc-dial-opt { padding: 9px 10px; gap: 8px; }
    .fc-dial-opt > .icon { flex-basis: 30px; width: 30px; height: 30px; font-size: 17px; }
    .fc-dial-opt small { display: none; }
    .fc-bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fc-yesno { display: grid; width: 100%; }
    .fc-dial-form .form-control { font-size: 16px; } /* stops iOS zoom on focus */
    .fc-dial-submit { position: sticky; bottom: 0; margin: 0 -14px -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255,255,255,.85), #fff 35%); border-top: 1px solid var(--fc-border); border-radius: 0 0 var(--fc-radius-lg) var(--fc-radius-lg); z-index: 5; }

    /* today's calls: bottom sheet */
    .fc-dial-history { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1060; max-height: 82vh; border-radius: 20px 20px 0 0; transform: translateY(102%); transition: transform .28s var(--fc-ease); box-shadow: var(--fc-shadow-lg); }
    .fc-dial-history header .fc-icon-btn { display: inline-flex; }
    .fc-dial-history header::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--fc-border-strong); }
    .fc-dial-history header { position: relative; padding-top: 16px; }
    .fc-dial-history-list { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    .fc-dialer.is-history-open .fc-dial-history { transform: none; }
    .fc-dialer.is-history-open .fc-dial-backdrop { display: block; position: fixed; inset: 0; z-index: 1055; background: rgba(10,26,63,.45); }
}
@keyframes fcDialIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ========================================================================
   AUDIENCE BUILDER (Views/Audience)
   ======================================================================== */
.fc-ab-asof { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--fc-surface); border: 1px solid var(--fc-border); font-size: 12.5px; color: var(--fc-text-2); white-space: nowrap; }
.fc-ab-asof.is-stale { background: var(--fc-warning-50); border-color: #f8dca6; color: #8a5a06; }
.fc-ab-asof.is-busy .icon { animation: fcSpin 1s linear infinite; }
@keyframes fcSpin { to { transform: rotate(360deg); } }

.fc-ab { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.fc-ab-rail { position: sticky; top: calc(var(--fc-topbar-h) + 16px); max-height: calc(100vh - var(--fc-topbar-h) - 32px); overflow-y: auto; display: grid; gap: 16px; padding-right: 2px; }
.fc-ab-rail section { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); padding: 12px; }
.fc-ab-rail h3 { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--fc-muted); margin: 2px 4px 8px; }
.fc-ab-railnote { font-size: 12px; color: var(--fc-muted); margin: 0 4px; line-height: 1.45; }
.fc-ab-presets, .fc-ab-saved, .fc-ab-taglist { display: grid; gap: 2px; }
.fc-ab-preset, .fc-ab-seg > button:first-child, .fc-ab-railtag { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-text-2); font-size: 13px; font-weight: 600; text-align: left; transition: background .15s var(--fc-ease); }
.fc-ab-preset .icon { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--t); background: var(--t-bg); }
.fc-ab-preset:hover, .fc-ab-seg > button:first-child:hover, .fc-ab-railtag:hover { background: var(--fc-surface-2); color: var(--fc-text); }
.fc-ab-preset.is-active, .fc-ab-seg > button.is-active { background: var(--fc-brand-50); color: var(--fc-brand-600); box-shadow: inset 3px 0 0 var(--fc-brand); }
.fc-ab-seg { display: flex; align-items: center; }
.fc-ab-seg > button:first-child .icon { color: var(--fc-muted); font-size: 16px; }
.fc-ab-seg > button:first-child span, .fc-ab-railtag span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-ab-mini { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: var(--fc-muted); font-size: 15px; }
.fc-ab-mini:hover { background: var(--fc-surface-2); color: var(--fc-text); }
.fc-ab-mini.is-text { font-size: 12px; font-weight: 700; border: 1px dashed var(--fc-border-strong); }
.fc-ab-seg .fc-ab-mini { opacity: 0; }
.fc-ab-seg:hover .fc-ab-mini { opacity: 1; }
.fc-ab-railtag i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--t); }
.fc-ab-railtag b { font-size: 11px; color: var(--fc-muted); font-weight: 700; }

.fc-ab-main { min-width: 0; display: grid; gap: 14px; }
.fc-ab-query { background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-sm); }
.fc-ab-searchrow { display: flex; gap: 10px; padding: 12px; }
.fc-ab-search { position: relative; flex: 1 1 auto; }
.fc-ab-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--fc-muted); }
.fc-ab-search input { width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-surface-2); font-size: 14.5px; color: var(--fc-text); }
.fc-ab-search input:focus { outline: 0; border-color: var(--fc-brand); background: #fff; box-shadow: var(--fc-ring); }
.fc-ab-ftoggle { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.fc-ab-count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--fc-brand); color: #fff; font-size: 11px; font-weight: 800; }

.fc-ab-builder { border-top: 1px solid var(--fc-border); padding: 12px; }
.fc-ab-builder.is-collapsed { display: none; }
.fc-ab-rows { display: grid; gap: 8px; }
.fc-ab-row { display: grid; grid-template-columns: 64px minmax(170px, 1.1fr) minmax(140px, .8fr) minmax(200px, 1.6fr) 32px; gap: 8px; align-items: start; padding: 8px; border-radius: 12px; background: var(--fc-surface-2); border: 1px solid transparent; }
.fc-ab-row.is-or { margin-top: 10px; position: relative; }
.fc-ab-row.is-or::before { content: ""; position: absolute; left: 8px; right: 8px; top: -10px; border-top: 1px dashed var(--fc-border-strong); }
.fc-ab-row:focus-within { border-color: var(--fc-brand-100); background: #fff; }
.fc-ab-row .form-select, .fc-ab-row .form-control { min-height: 34px; font-size: 13px; }
.fc-ab-row textarea.form-control { min-height: 34px; resize: vertical; }
.fc-ab-c-join { display: flex; align-items: center; height: 34px; }
.fc-ab-where { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--fc-muted); padding-left: 4px; }
.fc-ab-join { width: 56px; height: 28px; border-radius: 999px; border: 1px solid var(--fc-border-strong); background: #fff; font-size: 12px; font-weight: 800; color: var(--fc-text-2); }
.fc-ab-join.is-or { background: var(--fc-warning-50); border-color: #f8dca6; color: #8a5a06; }
.fc-ab-join:hover { border-color: var(--fc-brand); }
.fc-ab-range { display: flex; align-items: center; gap: 6px; }
.fc-ab-range span { font-size: 12px; color: var(--fc-muted); white-space: nowrap; }
.fc-ab-novalue { display: inline-flex; align-items: center; height: 34px; font-size: 12px; color: var(--fc-muted); font-style: italic; }
.fc-ab-hint { display: block; margin-top: 3px; font-size: 11px; color: var(--fc-muted); }
.fc-ab-del { width: 32px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--fc-muted); font-size: 20px; }
.fc-ab-del:hover { background: var(--fc-danger-50); color: var(--fc-danger); }
.fc-ab-norows { padding: 14px; border-radius: 12px; border: 1px dashed var(--fc-border-strong); color: var(--fc-muted); font-size: 13px; text-align: center; }
.fc-ab-builder-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.fc-ab-add { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--fc-brand); font-weight: 700; font-size: 13.5px; padding: 6px 8px; border-radius: 8px; }
.fc-ab-add:hover { background: var(--fc-brand-50); }
.fc-ab-add .icon { font-size: 18px; }
.fc-ab-help { font-size: 12px; color: var(--fc-muted); }
.fc-ab-spacer { flex: 1 1 auto; }
.fc-ab-row .select2-container .select2-selection--multiple { min-height: 34px; border-color: var(--fc-border); border-radius: 8px; }
.fc-ab-row .select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--fc-brand-50); border-color: var(--fc-brand-100); color: var(--fc-brand-600); font-size: 12px; font-weight: 600; border-radius: 6px; }

.fc-ab-results { position: relative; background: var(--fc-surface); border: 1px solid var(--fc-border); border-radius: var(--fc-radius-lg); box-shadow: var(--fc-shadow-sm); min-height: 200px; }
.fc-ab-results.is-busy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(255,255,255,.55); }
.fc-ab-results.is-busy::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2; background: linear-gradient(90deg, transparent, var(--fc-brand), transparent); background-size: 50% 100%; animation: fcAbBar 1s linear infinite; border-radius: 3px; }
@keyframes fcAbBar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.fc-ab-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 50px 16px; color: var(--fc-muted); }

.fc-ab-summary { display: flex; flex-wrap: wrap; align-items: stretch; gap: 14px; padding: 14px; border-bottom: 1px solid var(--fc-border); }
.fc-ab-total { display: flex; flex-direction: column; justify-content: center; padding-right: 14px; border-right: 1px solid var(--fc-border); min-width: 130px; }
.fc-ab-total strong { font-size: 28px; font-weight: 800; line-height: 1; color: var(--fc-text); font-variant-numeric: tabular-nums; }
.fc-ab-total span { font-size: 12.5px; color: var(--fc-text-2); margin-top: 4px; }
.fc-ab-total small { font-size: 10.5px; color: var(--fc-muted); }
.fc-ab-mix { flex: 1 1 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fc-ab-mixitem { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px 10px; border: 1px solid var(--fc-border); border-radius: 12px; background: #fff; text-align: left; overflow: hidden; transition: border-color .15s var(--fc-ease), transform .15s var(--fc-ease); }
.fc-ab-mixitem:not(:disabled):hover { border-color: var(--t); transform: translateY(-1px); }
.fc-ab-mixitem:disabled { opacity: .55; }
.fc-ab-mixlabel { font-size: 11.5px; font-weight: 600; color: var(--fc-muted); white-space: nowrap; }
.fc-ab-mixitem strong { font-size: 17px; font-weight: 800; color: var(--t); font-variant-numeric: tabular-nums; }
.fc-ab-mixitem i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--t); border-radius: 0 3px 0 0; }
.fc-ab-mixitem.is-alt { background: var(--t-bg); border-color: transparent; }

.fc-ab-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--fc-border); }
.fc-ab-selinfo { font-size: 13px; color: var(--fc-text-2); }
.fc-ab-selbadge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--fc-brand-50); color: var(--fc-brand-600); }
.fc-ab-selbadge .btn { padding: 0 8px; font-size: 12px; }
.fc-ab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fc-ab-actions .btn { display: inline-flex; align-items: center; gap: 5px; }
.fc-ab-size { width: auto; }
.fc-ab-selall { padding: 8px 14px; background: var(--fc-brand-50); color: var(--fc-brand-600); font-size: 13px; text-align: center; border-bottom: 1px solid var(--fc-brand-100); }
.fc-ab-selall .btn { padding: 0 4px; font-size: 13px; font-weight: 700; vertical-align: baseline; }
.fc-ab-empty { padding: 60px 16px; }

.fc-ab-tablewrap { overflow-x: auto; }
.fc-ab-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.fc-ab-table thead th { position: sticky; top: 0; z-index: 1; background: var(--fc-surface-2); border-bottom: 1px solid var(--fc-border); padding: 8px 10px; text-align: left; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--fc-muted); white-space: nowrap; }
.fc-ab-table tbody td { padding: 10px; border-bottom: 1px solid var(--fc-border); vertical-align: top; }
.fc-ab-table tbody tr { cursor: pointer; transition: background .12s var(--fc-ease); }
.fc-ab-table tbody tr:hover { background: #fafbff; }
.fc-ab-table tbody tr.is-selected { background: var(--fc-brand-50); }
.fc-ab-table td:nth-child(2) { min-width: 220px; }
.fc-ab-table td:nth-child(3) { min-width: 200px; max-width: 280px; }
.fc-ab-table td:nth-child(5), .fc-ab-table td:nth-child(6) { min-width: 160px; }
.fc-ab-chk { width: 36px; }
.fc-ab-chk input { width: 16px; height: 16px; margin-top: 3px; cursor: pointer; accent-color: var(--fc-brand); }
.fc-ab-sort { border: 0; background: transparent; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; }
.fc-ab-sort::after { content: "↕"; margin-left: 4px; opacity: .35; }
.fc-ab-sort.is-sorted { color: var(--fc-brand); }
.fc-ab-sort.is-sorted::after { content: "↓"; opacity: 1; }
.fc-ab-sort.is-sorted.is-asc::after { content: "↑"; }
.fc-ab-who { display: flex; gap: 10px; }
.fc-ab-avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; color: var(--t); background: var(--t-bg); }
.fc-ab-who strong { display: block; font-size: 13.5px; color: var(--fc-text); line-height: 1.25; }
.fc-ab-no { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--fc-text-2); letter-spacing: .02em; }
.fc-ab-no:hover { color: var(--fc-brand); }
.fc-ab-sub { display: block; font-size: 12px; color: var(--fc-muted); line-height: 1.4; margin-top: 2px; }
.fc-ab-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-ab-src { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.fc-ab-src i { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .03em; padding: 1px 6px; border-radius: 5px; }
.fc-ab-src .is-call { background: #eef2ff; color: #4338ca; }
.fc-ab-src .is-caf { background: var(--fc-success-50); color: #0b7a55; }
.fc-ab-src .is-lead { background: var(--fc-warning-50); color: #8a5a06; }
.fc-ab-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--t); background: var(--t-bg); white-space: nowrap; margin: 0 2px 2px 0; }
.fc-ab-pill.is-ghost { background: transparent; border: 1px solid var(--fc-border); color: var(--fc-text-2); }
.fc-ab-city { font-weight: 700; color: var(--fc-text); }
.fc-ab-dash { color: var(--fc-border-strong); }
.fc-ab-app { display: inline-block; font-weight: 800; color: var(--fc-brand-600); margin-right: 4px; }
.fc-ab-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--t); background: var(--t-bg); margin: 0 3px 3px 0; white-space: nowrap; }
.fc-ab-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--t); }

.fc-ab-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; padding: 12px; }
.fc-ab-pager button { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--fc-border); border-radius: 9px; background: #fff; font-weight: 700; font-size: 13px; color: var(--fc-text-2); }
.fc-ab-pager button:hover:not(:disabled) { border-color: var(--fc-brand); color: var(--fc-brand); }
.fc-ab-pager button.is-current { background: var(--fc-brand); border-color: var(--fc-brand); color: #fff; }
.fc-ab-pager button:disabled { opacity: .4; }
.fc-ab-pager span { color: var(--fc-muted); padding: 0 2px; }

/* drawer */
.fc-ab-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 1045; background: var(--fc-surface); box-shadow: var(--fc-shadow-lg); transform: translateX(105%); transition: transform .25s var(--fc-ease); display: flex; flex-direction: column; }
.fc-ab-drawer-body { flex: 1 1 auto; overflow-y: auto; }
.fc-ab-drawer-backdrop { position: fixed; inset: 0; z-index: 1040; background: rgba(10, 26, 63, .35); opacity: 0; pointer-events: none; transition: opacity .2s var(--fc-ease); }
body.fc-ab-drawer-open .fc-ab-drawer { transform: none; }
body.fc-ab-drawer-open .fc-ab-drawer-backdrop { opacity: 1; pointer-events: auto; }
.fc-ab-dhead { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 10px; padding: 18px 18px 14px; color: #fff; background: var(--fc-hero-bg); }
.fc-ab-dhead h2 { font-size: 19px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.fc-ab-dhead .fc-icon-btn { color: #fff; background: rgba(255,255,255,.12); border-color: transparent; }
.fc-ab-dno { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; font-size: 18px; font-weight: 800; letter-spacing: .04em; color: #fff; font-variant-numeric: tabular-nums; }
.fc-ab-dno.is-alt { font-size: 13px; font-weight: 600; color: #bae6fd; }
.fc-ab-dno:hover { color: #bae6fd; }
.fc-ab-dnote { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,.8); }
.fc-ab-dtags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 18px; border-bottom: 1px solid var(--fc-border); }
.fc-ab-dsec { padding: 14px 18px; border-bottom: 1px solid var(--fc-border); }
.fc-ab-dsec h3 { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--fc-muted); margin: 0 0 10px; }
.fc-ab-dsec h3 span { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--fc-surface-2); color: var(--fc-text-2); }
.fc-ab-dnone { margin: 0; font-size: 13px; color: var(--fc-muted); }
.fc-ab-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.fc-ab-facts dt { font-size: 11px; font-weight: 600; color: var(--fc-muted); }
.fc-ab-facts dd { margin: 0; font-size: 13px; font-weight: 600; color: var(--fc-text); word-break: break-word; }
.fc-ab-dcard { display: block; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--fc-border); border-radius: 12px; color: inherit; background: var(--fc-surface-2); }
a.fc-ab-dcard:hover { border-color: var(--fc-brand); color: inherit; }
.fc-ab-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--fc-border); }
.fc-ab-timeline li { position: relative; padding: 0 0 12px 12px; }
.fc-ab-timeline li::before { content: ""; position: absolute; left: -21px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--fc-brand); }
.fc-ab-timeline p { margin: 4px 0 0; font-size: 12.5px; color: var(--fc-text-2); }
.fc-ab-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fc-ab-tl-head .fc-ab-sub { margin: 0; }

/* modals */
.fc-ab-modal-sub { font-size: 13px; color: var(--fc-muted); margin: -4px 0 12px; }
.fc-ab-colors { display: flex; gap: 8px; margin-top: 10px; }
.fc-ab-colors label { cursor: pointer; }
.fc-ab-colors input { position: absolute; opacity: 0; }
.fc-ab-colors span { display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--t); box-shadow: 0 0 0 2px #fff, 0 0 0 3px transparent; }
.fc-ab-colors input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--t); }
.fc-ab-checks { display: grid; gap: 6px; font-size: 13px; }
.fc-ab-checks input { margin-right: 6px; accent-color: var(--fc-brand); }
.fc-ab-tagmanage { display: grid; gap: 8px; }
.fc-ab-tagrow { display: flex; align-items: center; gap: 10px; }
.fc-ab-tagrow .text-muted { flex: 1 1 auto; font-size: 12.5px; }

@media (max-width: 1199.98px) {
    .fc-ab-row { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr) 32px; }
    .fc-ab-c-val { grid-column: 2 / 4; }
}
@media (max-width: 991.98px) {
    .fc-ab { grid-template-columns: minmax(0, 1fr); }
    .fc-ab-rail { position: static; max-height: none; grid-template-columns: 1fr; gap: 10px; }
    .fc-ab-presets { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .fc-ab-preset { flex: 0 0 auto; width: auto; border: 1px solid var(--fc-border); white-space: nowrap; }
}
@media (max-width: 767.98px) {
    .fc-ab-row { grid-template-columns: 1fr 32px; }
    .fc-ab-c-join, .fc-ab-c-field, .fc-ab-c-op, .fc-ab-c-val { grid-column: 1; }
    .fc-ab-del { grid-column: 2; grid-row: 1; }
    .fc-ab-total { border-right: 0; padding-right: 0; }
    .fc-ab-mix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fc-ab-help { display: none; }
}

/* ---- Audience Builder: compact filter builder ---- */
.fc-ab-searchrow { padding: 10px 12px; gap: 8px; }
.fc-ab-search input { height: 38px; font-size: 13.5px; border-radius: 10px; padding-left: 38px; }
.fc-ab-search .icon { left: 12px; font-size: 17px; }
.fc-ab-ftoggle { height: 38px; padding: 0 12px; font-size: 13px; }
.fc-ab-builder { padding: 6px 12px 10px; }
.fc-ab-rows { gap: 0; }
.fc-ab-row { grid-template-columns: 52px minmax(150px, 220px) minmax(120px, 160px) minmax(180px, 1fr) 26px; gap: 6px; align-items: center; padding: 4px 0; border: 0; border-radius: 0; background: transparent; }
.fc-ab-row + .fc-ab-row { border-top: 1px solid var(--fc-border); }
.fc-ab-row:focus-within { background: transparent; }
.fc-ab-row.is-or { margin-top: 0; border-top: 1px dashed #f3c97a !important; }
.fc-ab-row.is-or::before { content: none; }
.fc-ab-row .form-select, .fc-ab-row .form-control { min-height: 30px; height: 30px; padding-top: 3px; padding-bottom: 3px; font-size: 12.5px; border-radius: 7px; }
.fc-ab-row .form-select { padding-right: 26px; background-position: right 8px center; }
.fc-ab-row textarea.form-control { height: 30px; min-height: 30px; }
.fc-ab-c-join { height: 30px; }
.fc-ab-where { font-size: 10.5px; padding-left: 2px; }
.fc-ab-join { width: 46px; height: 22px; font-size: 11px; }
.fc-ab-novalue { height: 30px; font-size: 11.5px; }
.fc-ab-range { gap: 4px; }
.fc-ab-del { width: 26px; height: 26px; font-size: 17px; border-radius: 6px; }
.fc-ab-row .select2-container .select2-selection--multiple { min-height: 30px; border-radius: 7px; padding: 0 4px; }
.fc-ab-row .select2-container--default .select2-selection--multiple .select2-selection__rendered { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px 0; margin: 0; }
.fc-ab-row .select2-container--default .select2-selection--multiple .select2-selection__choice { margin: 0; padding: 0 6px 0 18px; font-size: 11.5px; line-height: 20px; }
.fc-ab-row .select2-container .select2-search--inline .select2-search__field { height: 20px; margin: 0; font-size: 12px; }
.fc-ab-norows { padding: 8px 10px; font-size: 12.5px; }
.fc-ab-builder-foot { margin-top: 6px; gap: 6px; padding-top: 8px; border-top: 1px solid var(--fc-border); }
.fc-ab-builder-foot .btn { height: 32px; padding: 0 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.fc-ab-add { font-size: 13px; padding: 4px 6px; }
.fc-ab-help { font-size: 11.5px; }
@media (max-width: 1199.98px) {
    .fc-ab-row { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 150px) 26px; }
    .fc-ab-c-val { grid-column: 2 / 4; }
}
@media (max-width: 767.98px) {
    .fc-ab-row { grid-template-columns: 52px minmax(0, 1fr) 26px; padding: 6px 0; }
    .fc-ab-c-join { grid-column: 1; grid-row: 1; }
    .fc-ab-c-field { grid-column: 2; grid-row: 1; }
    .fc-ab-c-op, .fc-ab-c-val { grid-column: 2; }
    .fc-ab-del { grid-column: 3; grid-row: 1; }
}
