﻿/* ============================================================
   inspectpro.css  —  Unified InspectPro Design System
   Single file for ALL modules: Supervisor, Questionnaire, Inspector
   
   USAGE IN _Layout.cshtml <head>:
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet"/>
   <link rel="stylesheet" href="~/css/inspectpro.css" asp-append-version="true"/>
   
   Delete supervisor.css and questionnaire-admin.css — this replaces both.
============================================================ */

/* ══════════════════════════════════════════════════════════
   1. DESIGN TOKENS — single source of truth
══════════════════════════════════════════════════════════ */
:root {
    /* Surfaces */
    --ip-bg: #f4f2ed;
    --ip-s0: #ffffff;
    --ip-s1: #faf9f6;
    --ip-s2: #f0ede5;
    --ip-s3: #e8e3d8;
    /* Borders */
    --ip-b1: #ddd8cc;
    --ip-b2: #ccc5b7;
    --ip-b3: #bbb2a0;
    /* Text */
    --ip-tx: #1c1a16;
    --ip-tx2: #6b6357;
    --ip-tx3: #766d60;   /* was #a09889 — too faint (2.6:1); now 4.5:1 on --ip-bg */
    /* Accent — earthy green */
    --ip-acc: #2d6a4f;
    --ip-acc2: #1b4332;
    --ip-acc-l: rgba(45,106,79,.09);
    --ip-acc-m: rgba(45,106,79,.22);
    /* Green (used by supervisor status badges) */
    --ip-green: #1a7c3e;
    --ip-green-l: rgba(26,124,62,.09);
    --ip-green-m: rgba(26,124,62,.18);
    /* Semantic colours */
    --ip-gold: #a87a0a;
    --ip-gold-l: rgba(168,122,10,.10);
    --ip-gold-m: rgba(168,122,10,.25);
    --ip-red: #b83232;
    --ip-red-l: rgba(184,50,50,.09);
    --ip-red-m: rgba(184,50,50,.22);
    --ip-blue: #1a5276;
    --ip-blue-l: rgba(26,82,118,.09);
    --ip-blue-m: rgba(26,82,118,.22);
    --ip-purple: #6c3483;
    --ip-purple-l: rgba(108,52,131,.09);
    --ip-purple-m: rgba(108,52,131,.20);
    --ip-orange: #a04000;
    --ip-orange-l: rgba(160,64,0,.09);
    --ip-teal: #0f7a70;
    --ip-teal-l: rgba(15,122,112,.09);
    --ip-teal-m: rgba(15,122,112,.20);
    --ip-amber: #a87a0a;
    --ip-amber-l: rgba(168,122,10,.10);
    --ip-amber-m: rgba(168,122,10,.25);
    /* Short aliases — used by several existing classes (.btn-gr, .btn-rd,
       .badge-gr, .badge-rd, .badge-am, etc.) that were never given their
       own variables, silently breaking their colors until now. */
    --gr: var(--ip-green);
    --gr-l: var(--ip-green-l);
    --gr-m: var(--ip-green-m);
    --rd: var(--ip-red);
    --rd-l: var(--ip-red-l);
    --rd-m: var(--ip-red-m);
    --am: var(--ip-amber);
    --am-l: var(--ip-amber-l);
    --am-m: var(--ip-amber-m);
    --or: var(--ip-orange);
    --or-l: var(--ip-orange-l);
    --or-m: var(--ip-orange-m);
    /* Typography */
    --ip-head: 'Playfair Display', Georgia, serif;
    --ip-body: 'DM Sans', sans-serif;
    --ip-mono: 'DM Mono', monospace;
    /* Radii */
    --ip-r: 8px;
    --ip-r-sm: 5px;
    --ip-r-lg: 12px;
    --ip-r-xl: 18px;
    /* Shadows */
    --ip-sh: 0 1px 3px rgba(0,0,0,.07), 0 4px 14px rgba(0,0,0,.05);
    --ip-sh-lg: 0 8px 32px rgba(0,0,0,.11);
    /* ── Supervisor alias tokens (sv-* map to ip-*) ──────────
     Supervisor views use sv-* class names and sv-* variables.
     These aliases make them resolve to the unified ip-* values
     so supervisor.css can be deleted. */
    --sv-bg: var(--ip-bg);
    --sv-s0: var(--ip-s0);
    --sv-s1: var(--ip-s1);
    --sv-s2: var(--ip-s2);
    --sv-s3: var(--ip-s3);
    --sv-b1: var(--ip-b1);
    --sv-b2: var(--ip-b2);
    --sv-b3: var(--ip-b3);
    --sv-tx: var(--ip-tx);
    --sv-tx2: var(--ip-tx2);
    --sv-tx3: var(--ip-tx3);
    --sv-acc: var(--ip-acc);
    --sv-acc2: var(--ip-acc2);
    --sv-acc-l: var(--ip-acc-l);
    --sv-acc-m: var(--ip-acc-m);
    --sv-blue: var(--ip-blue);
    --sv-blue-l: var(--ip-blue-l);
    --sv-blue-m: var(--ip-blue-m);
    --sv-green: var(--ip-green);
    --sv-green-l: var(--ip-green-l);
    --sv-green-m: var(--ip-green-m);
    --sv-amber: var(--ip-amber);
    --sv-amber-l: var(--ip-amber-l);
    --sv-amber-m: var(--ip-amber-m);
    --sv-red: var(--ip-red);
    --sv-red-l: var(--ip-red-l);
    --sv-red-m: var(--ip-red-m);
    --sv-purple: var(--ip-purple);
    --sv-purple-l: var(--ip-purple-l);
    --sv-teal: var(--ip-teal);
    --sv-teal-l: var(--ip-teal-l);
    --sv-teal-m: var(--ip-teal-m);
    --sv-mono: var(--ip-mono);
    --sv-head: var(--ip-head);
    --sv-r: var(--ip-r);
    --sv-r-sm: var(--ip-r-sm);
    --sv-r-lg: var(--ip-r-lg);
    --sv-sh: var(--ip-sh);
    --sv-sh-lg: var(--ip-sh-lg);
    /* ── Old questionnaire alias tokens ── */
    --bg: var(--ip-bg);
    --s0: var(--ip-s0);
    --s1: var(--ip-s1);
    --s2: var(--ip-s2);
    --b1: var(--ip-b1);
    --b2: var(--ip-b2);
    --b3: var(--ip-b3);
    --tx: var(--ip-tx);
    --tx2: var(--ip-tx2);
    --tx3: var(--ip-tx3);
    --acc: var(--ip-acc);
    --acc2: var(--ip-acc2);
    --acc-l: var(--ip-acc-l);
    --acc-m: var(--ip-acc-m);
    --gold: var(--ip-gold);
    --gold-l: var(--ip-gold-l);
    --gold-m: var(--ip-gold-m);
    --red: var(--ip-red);
    --red-l: var(--ip-red-l);
    --red-m: var(--ip-red-m);
    --blue: var(--ip-blue);
    --blue-l: var(--ip-blue-l);
    --blue-m: var(--ip-blue-m);
    --purple: var(--ip-purple);
    --purple-l: var(--ip-purple-l);
    --orange: var(--ip-orange);
    --orange-l: var(--ip-orange-l);
    --head: var(--ip-head);
    --body: var(--ip-body);
    --mono: var(--ip-mono);
    --r: var(--ip-r);
    --r-sm: var(--ip-r-sm);
    --r-lg: var(--ip-r-lg);
    --r-xl: var(--ip-r-xl);
    --sh: var(--ip-sh);
    --sh-lg: var(--ip-sh-lg);

    /* ── Batch UI-1: tokens used by the shared UI kit and the app shell ── */
    /* Semantic status colours — use these, not green/red/amber by name */
    --ip-ok: var(--ip-green);
    --ip-ok-l: var(--ip-green-l);
    --ip-ok-m: var(--ip-green-m);
    --ip-warn: var(--ip-amber);
    --ip-warn-l: var(--ip-amber-l);
    --ip-warn-m: var(--ip-amber-m);
    --ip-bad: var(--ip-red);
    --ip-bad-l: var(--ip-red-l);
    --ip-bad-m: var(--ip-red-m);
    --ip-info: var(--ip-blue);
    --ip-info-l: var(--ip-blue-l);
    --ip-info-m: var(--ip-blue-m);
    --ip-orange-m: rgba(160,64,0,.22);
    --ip-danger: #dc2626;          /* solid destructive buttons */
    --ip-danger-hover: #b91c1c;
    /* Brand (top navigation) */
    --ip-brand: #c2440a;
    --ip-brand2: #f97316;
    --ip-brand-l: rgba(194,68,10,.06);
    --ip-brand-m: rgba(194,68,10,.15);
    --ip-nav-bg: #1c1a16;
    --ip-nav-tx: #9ca3af;
    --ip-nav-line: rgba(255,255,255,.1);
    --ip-nav-h: 52px;
    /* Type scale */
    --ip-fs-2xs: 10px;
    --ip-fs-xs: 11px;
    --ip-fs-sm: 12px;
    --ip-fs-md: 13px;
    --ip-fs-lg: 15px;
    --ip-fs-xl: 20px;
    --ip-fs-2xl: 26px;
    /* Spacing scale */
    --ip-sp-1: 4px;
    --ip-sp-2: 8px;
    --ip-sp-3: 12px;
    --ip-sp-4: 16px;
    --ip-sp-5: 20px;
    --ip-sp-6: 24px;
    --ip-sp-8: 32px;
    /* Interaction */
    --ip-hover: var(--ip-s1);
    --ip-focus: 0 0 0 3px var(--ip-acc-m);
    --ip-ease: .15s ease;
    --ip-arabic: 'Cairo', 'DM Sans', sans-serif;
    /* Names used by older rules but never defined */
    --ip-t1: var(--ip-tx);
    --ip-t2: var(--ip-tx2);
    --tx1: var(--ip-tx);
}

/* ══════════════════════════════════════════════════════════
   GLOBAL MODULE HEADER (REPLACES BLACK BAR)
══════════════════════════════════════════════════════════ */

.app-header {
    background: #fff;
    border-bottom: 1px solid var(--ip-b1);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-tx);
}

.app-header-spacer {
    flex: 1;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header-status {
    font-size: 12px;
    color: var(--ip-acc);
}
/* ══════════════════════════════════════════════════════════
   2. BASE
══════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--ip-bg);
    color: var(--ip-tx);   /* site.css still sets the old dark-theme text colour (#f0ede8) */
    margin: 0;
    font-family: var(--ip-body);
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--ip-s1);
}

::-webkit-scrollbar-thumb {
    background: var(--ip-b2);
    border-radius: 3px;
}

/* Bootstrap container reset when a module shell is inside */
.container:has(.ip-shell),
.container-fluid:has(.ip-shell),
.container:has(.supervisor-shell),
.container-fluid:has(.supervisor-shell),
.container:has(.admin-shell),
.container-fluid:has(.admin-shell) {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

/* ══════════════════════════════════════════════════════════
   NAVBAR MENU
══════════════════════════════════════════════════════════ */

.app-menu {
    gap: 10px;
}

    .app-menu .nav-link {
        font-size: 14px;
        font-weight: 500;
        color: var(--ip-tx2) !important;
        padding: 6px 12px;
        border-radius: var(--ip-r-sm);
        transition: all 0.2s ease;
    }

        /* Hover */
        .app-menu .nav-link:hover {
            background: var(--ip-s1);
            color: var(--ip-tx) !important;
        }

        /* Active (you can enhance later with JS) */
        .app-menu .nav-link.active {
            background: var(--ip-acc-l);
            color: var(--ip-acc) !important;
        }

        /* Admin special styling */
        .app-menu .nav-link.text-danger {
            color: var(--ip-red) !important;
        }

            .app-menu .nav-link.text-danger:hover {
                background: var(--ip-red-l);
            }
/* ══════════════════════════════════════════════════════════
   LOGO
══════════════════════════════════════════════════════════ */

.app-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* Optional: spacing if you add text later */
.navbar-brand {
    gap: 3px;
}

/* ══════════════════════════════════════════════════════════
   3. SUPERVISOR MODULE — sv-* classes
   Preserved exactly as they were in supervisor.css
══════════════════════════════════════════════════════════ */
.supervisor-shell * {
    box-sizing: border-box;
}

.supervisor-shell {
    background: var(--sv-bg);
    font-family: var(--sv-head);
    font-size: 14px;
    line-height: 1.55;
    color: var(--sv-tx);
    margin: -1rem;
    padding: 0;
}

.pill-auto {
    background: rgba(26,124,62,.2);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,.25);
}

.pill-manual {
    background: rgba(26,95,201,.2);
    color: #60a5fa;
    border: 1px solid rgba(96,165,250,.25);
}

.pill-hybrid {
    background: rgba(124,58,237,.2);
    color: #c084fc;
    border: 1px solid rgba(192,132,252,.25);
}

.lpb-gray {
    background: var(--sv-s2);
    color: var(--sv-tx3);
    border: 1px solid var(--sv-b1);
}

.wl-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--sv-tx2);
    margin-bottom: 10px;
}

.wl-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.wl-name {
    font-size: 11px;
    color: var(--sv-tx);
    width: 70px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes svFadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.delta-up {
    color: var(--sv-red);
}

.delta-dn {
    color: var(--sv-green);
}

.b-unassigned {
    background: var(--sv-amber-l);
    color: var(--sv-amber);
    border: 1px solid var(--sv-amber-m);
}

.b-assigned {
    background: var(--sv-blue-l);
    color: var(--sv-blue);
    border: 1px solid var(--sv-blue-m);
}

.b-inprogress {
    background: var(--sv-amber-l);
    color: var(--sv-amber);
    border: 1px solid var(--sv-amber-m);
}

.b-completed {
    background: var(--sv-green-l);
    color: var(--sv-green);
    border: 1px solid var(--sv-green-m);
}

.b-overdue {
    background: var(--sv-red-l);
    color: var(--sv-red);
    border: 1px solid var(--sv-red-m);
}

.b-reviewed {
    background: var(--sv-teal-l);
    color: var(--sv-teal);
    border: 1px solid var(--sv-teal-m);
}

.b-cancelled {
    background: var(--sv-s2);
    color: var(--sv-tx3);
    border: 1px solid var(--sv-b1);
}

.pri {
    font-family: var(--sv-mono);
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pri-critical {
    background: var(--sv-red);
    color: #fff;
}

.pri-high {
    background: var(--ip-brand2);
    color: #fff;
}

.pri-medium {
    background: var(--sv-amber);
    color: #fff;
}

.pri-low {
    background: var(--sv-b2);
    color: var(--sv-tx2);
}

.cap-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .3s;
}

.assign-columns {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 20px;
}

    .assign-columns > div {
        min-width: 0;
    }

@media (max-width: 1100px) {
    .assign-columns {
        grid-template-columns: 1fr;
    }
}

/* Assignment panel */
.assign-panel {
    background: var(--sv-s0);
    border: 1px solid var(--sv-b1);
    border-radius: var(--sv-r-lg);
    overflow: hidden;
    margin-bottom: 16px;
}

.assign-panel-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--sv-b1);
    background: var(--sv-s1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.assign-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-tx);
}

.assign-panel-sub {
    font-size: 12px;
    color: var(--sv-tx2);
    margin-top: 2px;
}

.score-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sv-mono);
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.score-hi {
    background: var(--sv-green-l);
    border: 2px solid var(--sv-green);
    color: var(--sv-green);
}

.score-md {
    background: var(--sv-amber-l);
    border: 2px solid var(--sv-amber);
    color: var(--sv-amber);
}

.score-lo {
    background: var(--sv-red-l);
    border: 2px solid var(--sv-red);
    color: var(--sv-red);
}

.insp-card-info {
    flex: 1;
    min-width: 0;
}

.insp-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.insp-tag {
    font-family: var(--sv-mono);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--sv-s2);
    color: var(--sv-tx2);
    border: 1px solid var(--sv-b1);
}

    .insp-tag.match {
        background: var(--sv-green-l);
        color: var(--sv-green);
        border-color: var(--sv-green-m);
    }

    .insp-tag.no-match {
        background: var(--sv-red-l);
        color: var(--sv-red);
        border-color: var(--sv-red-m);
    }

.top-pick-badge {
    font-family: var(--sv-mono);
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 20px;
    background: var(--sv-acc);
    color: #fff;
    margin-left: 6px;
}

.insp-stat {
    text-align: center;
    flex-shrink: 0;
    min-width: 64px;
}

.insp-stat-label {
    font-size: 11px;
    color: var(--sv-tx2);
    margin-bottom: 2px;
}

.insp-stat-val {
    font-family: var(--sv-mono);
    font-size: 13px;
    font-weight: 500;
}

/* Confirm banner */
.confirm-banner {
    background: var(--sv-green-l);
    border: 1px solid var(--sv-green-m);
    border-radius: var(--sv-r-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirm-banner-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sv-green);
}

.confirm-banner-sub {
    font-size: 12px;
    color: var(--sv-tx2);
    margin-top: 3px;
}

.rei-banner-acts {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.rule-card {
    background: var(--sv-s0);
    border: 1px solid var(--sv-b1);
    border-radius: var(--sv-r-lg);
    padding: 18px;
    transition: border-color .15s;
}

    .rule-card:hover {
        border-color: var(--sv-b2);
    }

    .rule-card.active {
        border-color: var(--sv-green);
        background: var(--sv-green-l);
    }

    .rule-card.inactive {
        opacity: .6;
    }

.rule-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rule-card-icon {
    font-size: 22px;
}

.rule-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-tx);
    margin-top: 4px;
}

.rule-card-desc {
    font-size: 12px;
    color: var(--sv-tx2);
    line-height: 1.5;
    margin-bottom: 12px;
}

.rule-card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rule-tag {
    font-family: var(--sv-mono);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
}

@keyframes svPulse {
    0%,100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

/* Responsive */

/* ══════════════════════════════════════════════════════════
   4. QUESTIONNAIRE MODULE — ip-* classes
══════════════════════════════════════════════════════════ */
.ip-shell {
    background: var(--ip-bg);
    color: var(--ip-tx);
    font-family: var(--ip-body);
    font-size: 14px;
    line-height: 1.55;
    min-height: calc(100vh - 56px);
    overflow-x: hidden;
}

/* Topbar */
.ip-topbar {
    height: 50px;
    background: var(--ip-s0);
    border-bottom: 1px solid var(--ip-b1);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ip-topbar-brand {
    font-family: var(--ip-head);
    font-size: 17px;
    font-weight: 700;
    color: var(--ip-tx);
    letter-spacing: -.3px;
    white-space: nowrap;
}

    .ip-topbar-brand em {
        color: var(--ip-acc);
        font-style: normal;
    }

.ip-topbar-sep {
    width: 1px;
    height: 20px;
    background: var(--ip-b1);
    flex-shrink: 0;
}

.ip-topbar-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx2);
    white-space: nowrap;
}

.ip-topbar-spacer {
    flex: 1;
}

.ip-topbar-saved {
    font-size: 12px;
    color: var(--ip-acc);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--ip-acc-l);
    border-radius: 20px;
}

/* Layout */
.ip-page {
    display: flex;
    height: calc(100vh - 56px - 50px);
    overflow: hidden;
}

/* Sidebar */
.ip-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--ip-s0);
    border-right: 1px solid var(--ip-b1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ip-sidebar-top {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    flex-shrink: 0;
}

.ip-sidebar-heading {
    font-family: var(--ip-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-tx);
    margin-bottom: 10px;
}

.ip-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 12px;
}

.ip-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    flex-shrink: 0;
}

.ip-group-label {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px 5px;
}

.ip-nav-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .12s;
    text-decoration: none;
    color: inherit;
}

    .ip-nav-row:hover {
        background: var(--ip-s1);
    }

    .ip-nav-row.active {
        background: var(--ip-acc-l);
        border-left-color: var(--ip-acc);
    }

.ip-nav-ico {
    width: 30px;
    height: 30px;
    border-radius: var(--ip-r-sm);
    background: var(--ip-s2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ip-nav-row.active .ip-nav-ico {
    background: var(--ip-acc-l);
}

.ip-nav-info {
    flex: 1;
    min-width: 0;
}

.ip-nav-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ip-nav-row.active .ip-nav-name {
    color: var(--ip-acc);
}

.ip-nav-sub {
    font-size: 10px;
    color: var(--ip-tx3);
    font-family: var(--ip-mono);
    margin-top: 1px;
}

.ip-nav-badge {
    font-family: var(--ip-mono);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--ip-s2);
    color: var(--ip-tx3);
    white-space: nowrap;
    flex-shrink: 0;
}

.ip-nav-row.active .ip-nav-badge {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
}

.ip-nav-badge.new {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
}

/* Main */
.ip-main {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 80px;
    min-width: 0;
}

/* Search */
.ip-search {
    position: relative;
}

    .ip-search input {
        width: 100%;
        padding: 7px 10px 7px 30px;
        background: var(--ip-s0);
        border: 1.5px solid var(--ip-b1);
        border-radius: var(--ip-r-sm);
        font-family: var(--ip-body);
        font-size: 12px;
        color: var(--ip-tx);
        outline: none;
        transition: border-color .15s;
    }

        .ip-search input:focus {
            border-color: var(--ip-acc);
        }

.ip-search-ico {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--ip-tx3);
    pointer-events: none;
}

/* Page header */
.ip-ph {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.ip-ph-eyebrow {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: var(--ip-acc);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ip-ph-title {
    font-family: var(--ip-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--ip-tx);
    letter-spacing: -.5px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.ip-ph-sub {
    font-size: 12px;
    color: var(--ip-tx2);
}

.ip-ph-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* Buttons */
.ip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--ip-r-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ip-body);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    text-decoration: none;
    transition: all .14s;
}

.ip-btn-primary {
    background: var(--ip-acc);
    color: #fff;
}

    .ip-btn-primary:hover {
        background: var(--ip-acc2);
        color: #fff;
    }

.ip-btn-outline {
    background: transparent;
    border: 1.5px solid var(--ip-b2);
    color: var(--ip-tx);
}

    .ip-btn-outline:hover {
        border-color: var(--ip-b3);
        background: var(--ip-s1);
    }

.ip-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--ip-b1);
    color: var(--ip-tx2);
}

    .ip-btn-ghost:hover {
        border-color: var(--ip-b2);
        color: var(--ip-tx);
        background: var(--ip-s1);
    }

/* .ip-btn-danger — see UI KIT section */

.ip-btn-gold {
    background: var(--ip-gold);
    color: #fff;
}

    .ip-btn-gold:hover {
        opacity: .88;
    }

.ip-btn-success {
    background: var(--ip-green);
    color: #fff;
}

    .ip-btn-success:hover {
        opacity: .88;
    }

.ip-btn-sm {
    padding: 6px 13px;
    font-size: 12px;
}

.ip-btn-xs {
    padding: 4px 9px;
    font-size: 11px;
}

.ip-btn-ico {
    padding: 0;
    width: 28px;
    height: 28px;
    justify-content: center;
    font-size: 13px;
}

.ip-w-full {
    width: 100%;
    justify-content: center;
}

/* Stat cards */
.ip-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ip-stat {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 14px 18px;
    box-shadow: var(--ip-sh);
    position: relative;
    overflow: hidden;
    min-width: 90px;
    flex: 1;
}

    .ip-stat::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--ip-stat-color, var(--ip-acc));
    }

.ip-stat-val {
    font-family: var(--ip-mono);
    font-size: 26px;
    font-weight: 500;
    color: var(--ip-tx);
    line-height: 1;
    margin-bottom: 3px;
}

.ip-stat-lbl {
    font-size: 11px;
    color: var(--ip-tx2);
}

/* Generic card */
.ip-card {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    box-shadow: var(--ip-sh);
    overflow: hidden;
    transition: box-shadow .2s;
}

    .ip-card:hover {
        box-shadow: var(--ip-sh-lg);
    }

.ip-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
}

.ip-card-body {
    padding: 18px;
}

/* Table */
.ip-table-wrap {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    overflow-x: auto;
    box-shadow: var(--ip-sh);
}

.ip-table {
    width: 100%;
    border-collapse: collapse;
}

    .ip-table thead th {
        padding: 10px 14px;
        text-align: left;
        font-size: 11px;
        font-weight: 600;
        color: var(--ip-tx2);
        text-transform: uppercase;
        letter-spacing: .5px;
        background: var(--ip-s1);
        border-bottom: 1px solid var(--ip-b1);
        white-space: nowrap;
    }

    .ip-table tbody td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--ip-b1);
        font-size: 13px;
        color: var(--ip-tx);
        vertical-align: middle;
    }

    .ip-table tbody tr:last-child td {
        border-bottom: none;
    }

    .ip-table tbody tr {
        transition: background .1s;
        cursor: pointer;
    }

        .ip-table tbody tr:hover {
            background: var(--ip-s1);
        }

/* Form fields */
.ip-fg {
    margin-bottom: 12px;
}

.ip-fl {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 5px;
}

.ip-fi, .ip-textarea, .ip-select {
    width: 100%;
    padding: 8px 11px;
    background: var(--ip-s0);
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r-sm);
    color: var(--ip-tx);
    font-family: var(--ip-body);
    font-size: 13px;
    outline: none;
    transition: border-color .14s;
}

    .ip-fi:focus, .ip-textarea:focus, .ip-select:focus {
        border-color: var(--ip-acc);
    }

.ip-textarea {
    resize: vertical;
    min-height: 64px;
}

.ip-fg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.ip-divider {
    height: 1px;
    background: var(--ip-b1);
    margin: 12px 0;
}

/* Badges */
.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid;
}

.ip-badge-acc {
    color: var(--ip-acc);
    border-color: var(--ip-acc-m);
    background: var(--ip-acc-l);
}

.ip-badge-red {
    color: var(--ip-red);
    border-color: var(--ip-red-m);
    background: var(--ip-red-l);
}

.ip-badge-gold {
    color: var(--ip-gold);
    border-color: var(--ip-gold-m);
    background: var(--ip-gold-l);
}

.ip-badge-blue {
    color: var(--ip-blue);
    border-color: var(--ip-blue-m);
    background: var(--ip-blue-l);
}

.ip-badge-purple {
    color: var(--ip-purple);
    border-color: var(--ip-purple-m);
    background: var(--ip-purple-l);
}

.ip-badge-orange {
    color: var(--ip-orange);
    border-color: var(--ip-orange-l);
    background: var(--ip-orange-l);
}

.ip-badge-teal {
    color: var(--ip-teal);
    border-color: var(--ip-teal-m);
    background: var(--ip-teal-l);
}

.ip-badge-neutral {
    color: var(--ip-tx2);
    border-color: var(--ip-b2);
    background: var(--ip-s2);
}

/* Modal */
.ip-modal .modal-content {
    border: none;
    border-radius: var(--ip-r-xl);
    box-shadow: var(--ip-sh-lg);
}

.ip-modal .modal-header {
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl) var(--ip-r-xl) 0 0;
    padding: 18px 22px;
}

.ip-modal .modal-title {
    font-family: var(--ip-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-tx);
}

.ip-modal .modal-body {
    padding: 22px;
}

.ip-modal .modal-footer {
    background: var(--ip-s1);
    border-top: 1px solid var(--ip-b1);
    border-radius: 0 0 var(--ip-r-xl) var(--ip-r-xl);
    padding: 14px 22px;
    gap: 8px;
}

/* Questionnaire drawer */
.ip-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.20);
    backdrop-filter: blur(2px);
    z-index: 300;
    display: none;
}

    .ip-drawer-overlay.open {
        display: block;
    }

.ip-drawer {
    position: fixed;
    top: 56px;
    right: -500px;
    bottom: 0;
    width: 460px;
    background: var(--ip-s0);
    border-left: 1px solid var(--ip-b1);
    box-shadow: -6px 0 28px rgba(0,0,0,.10);
    z-index: 301;
    transition: right .24s ease;
    display: flex;
    flex-direction: column;
}

    .ip-drawer.open {
        right: 0;
    }

.ip-drawer-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ip-drawer-title {
    font-family: var(--ip-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-tx);
}

.ip-drawer-close {
    width: 28px;
    height: 28px;
    border-radius: var(--ip-r-sm);
    border: 1px solid var(--ip-b1);
    background: transparent;
    color: var(--ip-tx2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .14s;
}

    .ip-drawer-close:hover {
        background: var(--ip-s2);
        color: var(--ip-tx);
    }

.ip-drawer-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.ip-drawer-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

/* Score threshold bar */
.ip-threshold-bar {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 16px 18px;
    margin-bottom: 22px;
    box-shadow: var(--ip-sh);
}

.ip-threshold-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px;
}

.ip-threshold-track {
    position: relative;
    height: 24px;
    border-radius: 6px;
    margin-bottom: 4px;
    background: linear-gradient(90deg,#c0392b 0%,#c0392b 20%,#e67e22 30%,#f1c40f 50%,#27ae60 72%,var(--ip-acc) 100%);
}

.ip-threshold-marker {
    position: absolute;
    top: -5px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ip-threshold-marker-tag {
    background: var(--ip-tx);
    color: #fff;
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
    margin-top: -36px;
    position: relative;
}

.ip-threshold-marker-line {
    width: 2px;
    height: 34px;
    background: var(--ip-tx);
}

.ip-threshold-zones {
    display: flex;
    justify-content: space-between;
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

/* Section cards */
.ip-section-card {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    margin-bottom: 14px;
    box-shadow: var(--ip-sh);
    overflow: hidden;
    transition: box-shadow .2s;
    animation: ip-fade-up .3s ease both;
}

    .ip-section-card:hover {
        box-shadow: var(--ip-sh-lg);
    }

.ip-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
    cursor: pointer;
    user-select: none;
}

.ip-section-drag {
    color: var(--ip-tx3);
    font-size: 14px;
    cursor: grab;
    flex-shrink: 0;
}

.ip-section-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--ip-r-sm);
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ip-section-info {
    flex: 1;
    min-width: 0;
}

.ip-section-title {
    font-family: var(--ip-head);
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-tx);
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.ip-section-count {
    font-family: var(--ip-mono);
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--ip-s2);
    color: var(--ip-tx3);
}

.ip-section-meta {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ip-section-weight {
    font-family: var(--ip-mono);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--ip-acc-l);
    color: var(--ip-acc);
}

.ip-section-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.ip-section-chevron {
    font-size: 11px;
    color: var(--ip-tx3);
    transition: transform .2s;
}

.ip-section-card.open .ip-section-chevron {
    transform: rotate(180deg);
}

/* Question list */
.ip-q-list {
    display: none;
}

.ip-section-card.open .ip-q-list {
    display: block;
}

.ip-q-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ip-b1);
    transition: background .12s;
    position: relative;
}

    .ip-q-row:last-child {
        border-bottom: none;
    }

    .ip-q-row:hover {
        background: var(--ip-s1);
    }

        .ip-q-row:hover .ip-q-acts {
            opacity: 1;
        }

.ip-q-drag {
    color: var(--ip-tx3);
    font-size: 11px;
    cursor: grab;
    flex-shrink: 0;
    margin-top: 3px;
}

.ip-q-num {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: var(--ip-tx3);
    width: 22px;
    flex-shrink: 0;
    margin-top: 3px;
}

.ip-q-body {
    flex: 1;
    min-width: 0;
}

.ip-q-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx);
    margin-bottom: 4px;
    line-height: 1.45;
}

.ip-q-help {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-bottom: 7px;
    line-height: 1.45;
}

.ip-q-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 6px;
}

.ip-q-acts {
    display: flex;
    gap: 4px;
    align-items: center;
    opacity: 0;
    transition: opacity .14s;
    flex-shrink: 0;
}

.ip-qt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid;
}

.ip-qt-compliance {
    color: var(--ip-acc);
    border-color: var(--ip-acc-m);
    background: var(--ip-acc-l);
}

.ip-qt-yesno {
    color: var(--ip-blue);
    border-color: var(--ip-blue-m);
    background: var(--ip-blue-l);
}

.ip-qt-dropdown {
    color: var(--ip-purple);
    border-color: var(--ip-purple-m);
    background: var(--ip-purple-l);
}

.ip-qt-number {
    color: var(--ip-orange);
    border-color: var(--ip-orange-l);
    background: var(--ip-orange-l);
}

.ip-qt-text {
    color: var(--ip-tx2);
    border-color: var(--ip-b2);
    background: var(--ip-s2);
}

.ip-qt-multiselect {
    color: var(--ip-blue);
    border-color: var(--ip-blue-m);
    background: var(--ip-blue-l);
}

.ip-q-wt {
    font-family: var(--ip-mono);
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border: 1px solid var(--ip-gold-m);
}

.ip-q-req {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-red);
    border: 1px solid var(--ip-red-m);
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--ip-red-l);
}

.ip-q-opts {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.ip-q-opt {
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1.5px solid var(--ip-b1);
    color: var(--ip-tx2);
    background: var(--ip-s0);
}

.ip-q-opt-score {
    font-family: var(--ip-mono);
    font-size: 9px;
    opacity: .65;
    margin-left: 3px;
}

.ip-q-ai {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 7px;
    padding: 7px 10px;
    background: linear-gradient(135deg,var(--ip-gold-l),var(--ip-acc-l));
    border: 1px solid var(--ip-gold-m);
    border-radius: var(--ip-r-sm);
    font-size: 11px;
    color: var(--ip-gold);
    line-height: 1.4;
}

.ip-q-ai-ico {
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Question type picker */
.ip-qt-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 7px;
    margin-bottom: 14px;
}

.ip-qt-card {
    border: 2px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    background: var(--ip-s0);
    transition: all .14s;
}

    .ip-qt-card:hover {
        border-color: var(--ip-b2);
        background: var(--ip-s1);
    }

    .ip-qt-card.sel {
        border-color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

.ip-qt-card-ico {
    font-size: 17px;
    margin-bottom: 3px;
}

.ip-qt-card-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-tx2);
}

.ip-qt-card.sel .ip-qt-card-name {
    color: var(--ip-acc);
}

.ip-qt-card-desc {
    font-size: 9px;
    color: var(--ip-tx3);
    margin-top: 2px;
}

/* Add question form */
.ip-add-q-wrap {
    padding: 14px 18px;
    display: none;
}

    .ip-add-q-wrap.open {
        display: block;
    }

.ip-add-q-form {
    background: var(--ip-s1);
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 18px;
}

/* Answer option editor */
.ip-ao-list {
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r-sm);
    overflow: hidden;
    background: var(--ip-s0);
    margin-bottom: 8px;
}

.ip-ao-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--ip-b1);
}

    .ip-ao-row:last-child {
        border-bottom: none;
    }

.ip-ao-drag {
    font-size: 10px;
    color: var(--ip-tx3);
    cursor: grab;
}

.ip-ao-text {
    flex: 1;
}

.ip-ao-score {
    width: 72px;
}

.ip-ao-del {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--ip-red-m);
    background: var(--ip-red-l);
    color: var(--ip-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: background .14s;
}

    .ip-ao-del:hover {
        background: var(--ip-red-m);
    }

.ip-ao-add {
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ip-acc);
    transition: background .12s;
    border-top: 1px solid var(--ip-b1);
}

    .ip-ao-add:hover {
        background: var(--ip-acc-l);
    }

/* Questionnaire builder — Compliance answer scores */
.ip-cs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ip-cs-ok { color: var(--ip-acc); }
.ip-cs-part { color: var(--ip-gold); }
.ip-cs-bad { color: var(--ip-red); }

/* Questionnaire builder — Number scored ranges */
.ip-rg-list {
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r-sm);
    background: var(--ip-s0);
    margin-bottom: 8px;
}

    .ip-rg-list:empty {
        display: none;
    }

.ip-rg-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px;
    grid-template-areas: "nums del" "labels del";
    gap: 6px 8px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--ip-b1);
}

    .ip-rg-row:last-child {
        border-bottom: none;
    }

    .ip-rg-row .ip-ao-del {
        grid-area: del;
        align-self: center;
    }

    .ip-rg-row .ip-fi {
        padding: 5px 8px;
        font-size: 12px;
    }

.ip-rg-nums {
    grid-area: nums;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ip-rg-labels {
    grid-area: labels;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

    .ip-rg-labels [dir="rtl"] {
        text-align: right;
    }

.ip-rg-cap {
    display: block;
    font-size: 10.5px;
    color: var(--ip-tx3);
    margin-bottom: 2px;
}

.ip-rg-help {
    font-size: 11.5px;
    color: var(--ip-tx3);
    margin: 6px 0 14px;
    line-height: 1.5;
}

/* Add section button */
.ip-add-section-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 2px dashed var(--ip-b2);
    border-radius: var(--ip-r-xl);
    cursor: pointer;
    color: var(--ip-tx3);
    font-size: 13px;
    font-weight: 500;
    transition: all .18s;
    margin-bottom: 20px;
    background: transparent;
    width: 100%;
    font-family: var(--ip-body);
}

    .ip-add-section-btn:hover {
        border-color: var(--ip-acc);
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

/* Compliance preview buttons */
.ip-comp-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ip-comp-btn {
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid;
    cursor: pointer;
    transition: all .14s;
    font-family: var(--ip-body);
}

.ip-comp-c {
    border-color: var(--ip-acc-m);
    color: var(--ip-acc);
    background: var(--ip-s0);
}

.ip-comp-p {
    border-color: var(--ip-gold-m);
    color: var(--ip-gold);
    background: var(--ip-s0);
}

.ip-comp-n {
    border-color: var(--ip-red-m);
    color: var(--ip-red);
    background: var(--ip-s0);
}

.ip-comp-a {
    border-color: var(--ip-b2);
    color: var(--ip-tx3);
    background: var(--ip-s0);
}

/* Empty state */
.ip-empty {
    text-align: center;
    padding: 80px 40px;
}

.ip-empty-ico {
    font-size: 52px;
    display: block;
    opacity: .3;
    margin-bottom: 16px;
}

.ip-empty-title {
    font-family: var(--ip-head);
    font-size: 20px;
    font-weight: 600;
    color: var(--ip-tx2);
    margin-bottom: 8px;
}

.ip-empty-sub {
    font-size: 13px;
    color: var(--ip-tx3);
    line-height: 1.6;
}

/* Toast */
.ip-toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ip-tx);
    color: #fff;
    border-radius: 30px;
    padding: 9px 20px;
    font-size: 13px;
    font-family: var(--ip-body);
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 600;
    box-shadow: var(--ip-sh-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    white-space: nowrap;
}

    .ip-toast.show {
        opacity: 1;
    }

/* Animations */
@keyframes ip-fade-up {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ip-fade-up {
    animation: ip-fade-up .3s ease both;
}

    .ip-fade-up:nth-child(2) {
        animation-delay: .05s;
    }

    .ip-fade-up:nth-child(3) {
        animation-delay: .10s;
    }

    .ip-fade-up:nth-child(4) {
        animation-delay: .15s;
    }

    .ip-fade-up:nth-child(5) {
        animation-delay: .20s;
    }

/* Utilities */
.ip-mono {
    font-family: var(--ip-mono);
}

.ip-serif {
    font-family: var(--ip-head);
}

.ip-muted {
    color: var(--ip-tx3);
}

.ip-small {
    font-size: 11px;
}

.ip-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* admin style section*/

body > .container,
body > .container-fluid,
.container:has(.admin-shell),
.container-fluid:has(.admin-shell) {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ══ ADMIN SHELL — full-page takeover below the navbar ══ */
.admin-shell {
    /* Design tokens */
    --bg: var(--ip-bg);
    --s0: #fff;
    --s1: var(--ip-s1);
    --s2: var(--ip-s2);
    --b1: var(--ip-b1);
    --b2: var(--ip-b2);
    --b3: var(--ip-b3);
    --tx: var(--ip-tx);
    --tx2: var(--ip-tx2);
    --tx3: var(--ip-tx3);
    --acc: var(--ip-acc);
    --acc2: var(--ip-acc2);
    --acc-l: rgba(45,106,79,.09);
    --acc-m: rgba(45,106,79,.22);
    --red: var(--ip-red);
    --red-l: rgba(184,50,50,.09);
    --red-m: rgba(184,50,50,.22);
    --gold: var(--ip-gold);
    --gold-l: rgba(168,122,10,.10);
    --gold-m: rgba(168,122,10,.25);
    --blue: var(--ip-blue);
    --blue-l: rgba(26,82,118,.09);
    --blue-m: rgba(26,82,118,.22);
    --purple: var(--ip-purple);
    --purple-l: rgba(108,52,131,.09);
    --teal: var(--ip-teal);
    --teal-l: rgba(15,122,112,.09);
    --teal-m: rgba(15,122,112,.20);
    --orange: var(--ip-orange);
    --orange-l: rgba(160,64,0,.09);
    --head: 'Playfair Display',Georgia,serif;
    --body: 'DM Sans',sans-serif;
    --mono: 'DM Mono',monospace;
    --r: 8px;
    --r-sm: 5px;
    --r-lg: 12px;
    --r-xl: 18px;
    --sh: 0 1px 3px rgba(0,0,0,.07),0 4px 14px rgba(0,0,0,.05);
    --sh-lg: 0 8px 32px rgba(0,0,0,.11);
    /* Layout */
    position: fixed;
    top: 56px; /* height of Bootstrap navbar */
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: row;
    background: var(--bg);
    color: var(--tx);
    font-family: var(--body);
    font-size: 14px;
    line-height: 1.55;
    z-index: 10;
}

    .admin-shell * {
        box-sizing: border-box;
    }

    .admin-shell ::-webkit-scrollbar {
        width: 5px;
    }

    .admin-shell ::-webkit-scrollbar-track {
        background: var(--s1);
    }

    .admin-shell ::-webkit-scrollbar-thumb {
        background: var(--b2);
        border-radius: 3px;
    }

    /* ── SIDEBAR ── */
    .admin-shell .sidebar {
        width: 260px;
        flex-shrink: 0;
        background: var(--s0);
        border-right: 1px solid var(--b1);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

        .admin-shell .sidebar::-webkit-scrollbar {
            width: 3px;
        }

    .admin-shell .sb-header {
        padding: 16px 16px 10px;
        border-bottom: 1px solid var(--b1);
        background: var(--s1);
    }

    .admin-shell .sb-title {
        font-family: var(--head);
        font-size: 13px;
        font-weight: 600;
        color: var(--tx);
        margin-bottom: 8px;
    }

    .admin-shell .sb-search {
        position: relative;
    }

        .admin-shell .sb-search input {
            width: 100%;
            padding: 6px 10px 6px 28px;
            background: var(--s0);
            border: 1.5px solid var(--b1);
            border-radius: var(--r-sm);
            font-family: var(--body);
            font-size: 12px;
            color: var(--tx);
            outline: none;
        }

            .admin-shell .sb-search input:focus {
                border-color: var(--acc);
            }

    .admin-shell .sb-search-ico {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 11px;
        color: var(--tx3);
        pointer-events: none;
    }

    .admin-shell .sb-list {
        flex: 1;
        padding-bottom: 12px;
    }

    .admin-shell .sb-group {
        padding: 10px 16px 4px;
        font-family: var(--mono);
        font-size: 9px;
        color: var(--tx3);
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-top: 4px;
    }

    .admin-shell .sb-item {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 7px 16px;
        cursor: pointer;
        border-left: 3px solid transparent;
        transition: background .12s;
        text-decoration: none;
        color: inherit;
    }

        .admin-shell .sb-item:hover {
            background: var(--s1);
            color: inherit;
            text-decoration: none;
        }

        .admin-shell .sb-item.active {
            background: var(--acc-l);
            border-left-color: var(--acc);
        }

    .admin-shell .sb-item-ico {
        width: 22px;
        height: 22px;
        border-radius: 4px;
        background: var(--s2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        flex-shrink: 0;
    }

    .admin-shell .sb-item.active .sb-item-ico {
        background: var(--acc-l);
    }

    .admin-shell .sb-item-name {
        font-size: 12px;
        font-weight: 500;
        color: var(--tx2);
    }

    .admin-shell .sb-item.active .sb-item-name {
        color: var(--acc);
    }

    /* ── MAIN ── */
    .admin-shell .main {
        flex: 1;
        overflow-y: auto;
        padding: 28px 32px 80px;
        background: var(--bg);
    }

    /* ── DASHBOARD HERO ── */
    .admin-shell .dash-hero {
        margin-bottom: 28px;
    }

    .admin-shell .dash-eyebrow {
        font-family: var(--mono);
        font-size: 10px;
        color: var(--acc);
        letter-spacing: 1.2px;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    .admin-shell .dash-title {
        font-family: var(--head);
        font-size: 32px;
        font-weight: 700;
        color: var(--tx);
        letter-spacing: -.5px;
        line-height: 1.2;
        margin-bottom: 6px;
    }

    .admin-shell .dash-sub {
        font-size: 13px;
        color: var(--tx2);
    }

    /* ── STATS ── */
    .admin-shell .stats {
        display: flex;
        gap: 12px;
        margin-bottom: 24px;
        flex-wrap: wrap;
    }

    .admin-shell .stat {
        background: var(--s0);
        border: 1px solid var(--b1);
        border-radius: var(--r-lg);
        padding: 12px 16px;
        box-shadow: var(--sh);
        position: relative;
        overflow: hidden;
        min-width: 80px;
        flex: 1;
    }

        .admin-shell .stat::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--stat-c, var(--acc));
        }

    .admin-shell .stat-val {
        font-family: var(--mono);
        font-size: 22px;
        font-weight: 500;
        color: var(--tx);
        line-height: 1;
        margin-bottom: 3px;
    }

    .admin-shell .stat-lbl {
        font-size: 11px;
        color: var(--tx2);
    }

    /* ── GRID ── */
    .admin-shell .dash-grid {
        display: grid;
        grid-template-columns: repeat(3,1fr);
        gap: 16px;
    }

    .admin-shell .dash-group {
        background: var(--s0);
        border: 1px solid var(--b1);
        border-radius: var(--r-xl);
        overflow: hidden;
        box-shadow: var(--sh);
        transition: box-shadow .2s;
    }

        .admin-shell .dash-group:hover {
            box-shadow: var(--sh-lg);
        }

    .admin-shell .dg-head {
        padding: 16px 20px 12px;
        border-bottom: 1px solid var(--b1);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .admin-shell .dg-ico {
        width: 34px;
        height: 34px;
        border-radius: var(--r-sm);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0;
    }

    .admin-shell .dg-title {
        font-family: var(--head);
        font-size: 14px;
        font-weight: 600;
        color: var(--tx);
    }

    .admin-shell .dg-sub {
        font-size: 11px;
        color: var(--tx3);
        margin-top: 1px;
    }

    .admin-shell .dg-body {
        padding: 6px 0;
    }

    .admin-shell .dg-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 20px;
        transition: background .12s;
        text-decoration: none;
        color: inherit;
    }

        .admin-shell .dg-link:hover {
            background: var(--s1);
            text-decoration: none;
            color: inherit;
        }

    .admin-shell .dg-link-ico {
        font-size: 14px;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

    .admin-shell .dg-link-name {
        font-size: 13px;
        font-weight: 500;
        color: var(--tx);
    }

    .admin-shell .dg-link-ct {
        margin-left: auto;
        font-family: var(--mono);
        font-size: 9px;
        padding: 2px 6px;
        border-radius: 10px;
        background: var(--s2);
        color: var(--tx3);
        white-space: nowrap;
    }

    .admin-shell .dg-link-arrow {
        color: var(--tx3);
        font-size: 10px;
        margin-left: 4px;
        opacity: 0;
        transition: opacity .12s, transform .12s;
    }

    .admin-shell .dg-link:hover .dg-link-arrow {
        opacity: 1;
        transform: translateX(2px);
    }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.admin-shell .dash-group {
    animation: fadeUp .35s ease both;
}

    .admin-shell .dash-group:nth-child(2) {
        animation-delay: .06s
    }

    .admin-shell .dash-group:nth-child(3) {
        animation-delay: .12s
    }

    .admin-shell .dash-group:nth-child(4) {
        animation-delay: .06s
    }

    .admin-shell .dash-group:nth-child(5) {
        animation-delay: .12s
    }

    .admin-shell .dash-group:nth-child(6) {
        animation-delay: .18s
    }

@keyframes gsUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Footer Fix — applies to entire project ── */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

    body > .container {
        flex: 1;
    }

footer.footer {
    position: relative !important;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}

/* Hide footer on full-screen module pages */
body:has(.supervisor-shell) footer,
body:has(.ip-shell) footer {
    display: none !important;
}

.sp {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all .18s;
    white-space: nowrap;
    border: none;
    background: none;
    font-family: var(--ip-body)
}
    .sp.disabled {
        opacity: .4;
        cursor: not-allowed;
        pointer-events: none;
    }

    .sp:hover {
        background: var(--ip-s1)
    }

    .sp.active {
        border-bottom-color: var(--ip-orange,var(--ip-brand));
        background: rgba(194,68,10,.06)
    }

    .sp.done {
        border-bottom-color: var(--ip-acc)
    }

.si {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 14px;
    cursor: pointer;
    transition: background .12s;
    border-left: 3px solid transparent;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--ip-body)
}
    .si.disabled {
        opacity: .4;
        cursor: not-allowed;
        pointer-events: none;
    }

    .si:hover {
        background: var(--ip-s1)
    }

    .si.active {
        background: rgba(194,68,10,.06);
        border-left: 3px solid var(--ip-orange,var(--ip-brand))
    }

    .si.done {
        border-left: 3px solid var(--ip-acc)
    }

.si-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--ip-b2);
    flex-shrink: 0;
    margin-top: 5px;
    transition: all .18s
}

.si.active .si-dot {
    background: var(--ip-orange,var(--ip-brand));
    border-color: var(--ip-orange,var(--ip-brand))
}

.si.done .si-dot {
    background: var(--ip-acc);
    border-color: var(--ip-acc)
}

.si-text .st {
    font-size: 12px;
    font-weight: 500;
    color: var(--ip-tx3)
}

.si.active .si-text .st {
    color: var(--ip-orange,var(--ip-brand));
    font-weight: 600
}

.si.done .si-text .st {
    color: var(--ip-tx2)
}

.si-text .ss {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 1px
}

.si-badge {
    font-family: var(--ip-mono);
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 3px
}

.sb-req {
    background: var(--ip-red-l);
    color: var(--ip-red);
    border: 1px solid var(--ip-red-m)
}

.sb-ai {
    background: var(--ip-purple-l);
    color: var(--ip-purple);
    border: 1px solid var(--ip-purple-m)
}

.sb-opt {
    background: var(--ip-s2);
    color: var(--ip-tx3);
    border: 1px solid var(--ip-b1)
}

.si-divider {
    height: 1px;
    background: var(--ip-b1);
    margin: 10px 0
}

@keyframes pulse2 {
    0%, 100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.sec-head {
    margin-bottom: 22px
}

.sec-tag {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: var(--ip-orange,var(--ip-brand));
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 5px
}

.sec-title {
    font-family: var(--ip-head);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.3px;
    color: var(--ip-tx)
}

.sec-desc {
    font-size: 13px;
    color: var(--ip-tx2);
    margin-top: 5px;
    max-width: 540px;
    line-height: 1.7
}

.sec-pills {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap
}

.sec-pill {
    font-family: var(--ip-mono);
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--ip-b1);
    color: var(--ip-tx3);
    background: var(--ip-s0)
}

.info-badge {
    font-family: var(--ip-mono);
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700
}

/* Editable fields */
.fg {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px
}

/* AI Box */
.ai-box {
    background: linear-gradient(135deg,var(--ip-purple-l),rgba(108,52,131,.02));
    border: 1px solid var(--ip-purple-m);
    border-radius: var(--ip-r-lg);
    padding: 14px;
    margin-top: 12px
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px
}

.ai-logo {
    width: 28px;
    height: 28px;
    border-radius: var(--ip-r-sm);
    background: linear-gradient(135deg,var(--ip-purple),#9b59b6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0
}

.ai-name {
    font-family: var(--ip-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--ip-purple);
    text-transform: uppercase;
    letter-spacing: .5px
}

.ai-model {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 1px
}

.ai-lbl {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-purple);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 5px
}

.ai-txt {
    font-size: 12px;
    color: var(--ip-tx);
    line-height: 1.65
}

    .ai-txt strong {
        color: var(--ip-purple)
    }

.ai-acts {
    display: flex;
    gap: 7px;
    margin-top: 10px;
    flex-wrap: wrap
}

.ai-btn-small {
    font-size: 11px;
    padding: 5px 11px;
    border-radius: var(--ip-r-sm);
    border: 1px solid var(--ip-purple-m);
    background: var(--ip-purple-l);
    color: var(--ip-purple);
    cursor: pointer;
    font-family: var(--ip-body);
    transition: all .15s
}

    .ai-btn-small:hover {
        background: var(--ip-purple-m)
    }

    .ai-btn-small.pri {
        background: var(--ip-purple);
        color: #fff;
        border-color: var(--ip-purple)
    }

.ai-insights {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px
}

.ai-input-wrap {
    display: flex;
    gap: 8px;
    margin-top: 10px
}

.ai-input {
    flex: 1;
    background: var(--ip-s0);
    border: 1.5px solid var(--ip-purple-m);
    border-radius: var(--ip-r-sm);
    padding: 7px 11px;
    font-size: 12px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    outline: none
}

    .ai-input:focus {
        border-color: var(--ip-purple)
    }

.ai-send-btn {
    background: var(--ip-purple);
    color: #fff;
    border: none;
    border-radius: var(--ip-r-sm);
    padding: 7px 14px;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--ip-body);
    white-space: nowrap
}

.att-num {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-orange,var(--ip-brand));
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 10px
}

/* Checklist */
.chk-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--ip-b1)
}

    .chk-item:last-child {
        border-bottom: none;
        padding-bottom: 0
    }

.chk-left {
    flex: 1;
    min-width: 0
}

.chk-num {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-tx3);
    margin-bottom: 3px
}

.chk-q {
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx);
    line-height: 1.5
}

.chk-hint {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 4px;
    line-height: 1.5;
    padding-left: 10px;
    border-left: 2px solid rgba(194,68,10,.3)
}

.chk-std {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-orange,var(--ip-brand));
    margin-top: 4px
}

.chk-prev {
    padding: 5px 9px;
    background: var(--ip-gold-l);
    border: 1px solid var(--ip-gold-m);
    border-radius: var(--ip-r-sm);
    font-size: 11px;
    color: var(--ip-gold);
    margin-top: 6px;
    line-height: 1.4
}

.chk-btns {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    padding-top: 2px
}

.chk-btn {
    width: 38px;
    height: 32px;
    border-radius: var(--ip-r-sm);
    border: 1.5px solid var(--ip-b1);
    background: var(--ip-s1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all .15s
}

    .chk-btn:hover {
        transform: scale(1.06)
    }

    .chk-btn.p {
        background: var(--ip-acc-l);
        border-color: var(--ip-acc);
        color: var(--ip-acc)
    }

    .chk-btn.f {
        background: var(--ip-red-l);
        border-color: var(--ip-red);
        color: var(--ip-red)
    }

    .chk-btn.na {
        background: var(--ip-s2);
        border-color: var(--ip-b2);
        color: var(--ip-tx3)
    }

.sev-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 7px;
    margin-bottom: 12px
}

.sev-btn {
    padding: 9px 6px;
    border-radius: var(--ip-r-sm);
    border: 1.5px solid var(--ip-b1);
    background: var(--ip-s0);
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    font-family: var(--ip-body);
    color: var(--ip-tx2)
}

    .sev-btn:hover {
        transform: translateY(-1px)
    }

.sev-icon {
    font-size: 18px;
    margin-bottom: 3px
}

.sev-lbl {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--ip-mono)
}

/* Temp grid */
.temp-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin-bottom: 14px
}

.temp-card {
    padding: 12px;
    border-radius: var(--ip-r-sm);
    border: 1.5px solid var(--ip-b1);
    background: var(--ip-s1)
}

    .temp-card.fail-t {
        background: var(--ip-red-l);
        border-color: var(--ip-red-m)
    }

.temp-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px
}

.temp-val {
    font-family: var(--ip-mono);
    font-size: 20px;
    font-weight: 600
}

    .temp-val.ok {
        color: var(--ip-acc)
    }

    .temp-val.fail {
        color: var(--ip-red)
    }

.temp-range {
    font-size: 9px;
    color: var(--ip-tx3);
    margin-top: 2px;
    font-family: var(--ip-mono)
}

/* ══════════════════════════════════════════════════════════
   5. INSPECTOR MODULE — NAVBAR & LIVE SCORE
   Inspector layout uses .nav (not .insp-nav) to match design
══════════════════════════════════════════════════════════ */

/* Inspector top nav — dark bar */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--ip-tx);
    border-bottom: 2px solid var(--ip-orange);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    z-index: 400;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.nav-brand {
    font-family: var(--ip-head);
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
    text-decoration: none;
}

    .nav-brand em {
        color: var(--ip-brand2);
        font-style: normal;
    }

.nav-sep {
    width: 1px;
    height: 20px;
    background: #374151;
    flex-shrink: 0;
}

.nav-spacer {
    flex: 1;
}

.nav-pills {
    display: flex;
    gap: 3px;
}

.nav-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid transparent;
    color: #9ca3af;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .nav-pill:hover {
        color: #fff;
        background: rgba(255,255,255,.1);
    }

    .nav-pill.active {
        background: var(--ip-orange-l);
        color: var(--ip-brand2);
        border-color: var(--ip-orange-m);
    }

    .nav-pill.disabled {
        opacity: .45;
        cursor: not-allowed;
        pointer-events: none;
    }

.nav-sos {
    background: var(--ip-red);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: .5px;
    transition: all .2s;
    font-family: var(--ip-mono);
    flex-shrink: 0;
}

    .nav-sos:hover {
        background: #dc2626;
        transform: scale(1.04);
    }

/* (Batch UI-1) .nav-av moved to the APP SHELL section */

.nav-logout {
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    padding: 0 8px;
    font-family: var(--ip-body);
}

    .nav-logout:hover {
        color: #fff;
    }

.nav-autosave {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: #6b9dfc;
    display: flex;
    align-items: center;
    gap: 4px;
}

.save-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}

.nav-ref {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: #9ca3af;
    padding: 3px 8px;
    border: 1px solid #374151;
    border-radius: 4px;
}

/* Inspector page body (below fixed nav) */
.insp-body {
    margin-top: 52px;
    min-height: calc(100vh - 52px);
}

/* SOS Modal */
.sos-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(184,50,50,.12);
    z-index: 900;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

    .sos-overlay.open {
        display: flex;
    }

.sos-modal {
    background: var(--ip-s0);
    border: 2px solid var(--ip-red-m);
    border-radius: 18px;
    width: 380px;
    max-width: 95vw;
    box-shadow: 0 0 48px rgba(184,50,50,.2);
    overflow: hidden;
}

.sos-head {
    background: var(--ip-red-l);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--ip-red-m);
}

.sos-title {
    font-family: var(--ip-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--ip-red);
}

.sos-sub {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

.sos-body {
    padding: 20px;
}

.sos-note {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-bottom: 14px;
    text-align: center;
}

.sos-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--ip-body);
    cursor: pointer;
    border: none;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .15s;
}

.sos-emergency {
    background: var(--ip-red);
    color: #fff;
}

    .sos-emergency:hover {
        background: #dc2626;
    }

.sos-police {
    background: var(--ip-blue-l);
    color: var(--ip-blue);
    border: 1.5px solid var(--ip-blue-m) !important;
}

.sos-supervisor {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border: 1.5px solid var(--ip-gold-m) !important;
}

.sos-cancel {
    background: transparent;
    color: var(--ip-tx3);
    border: 1px solid var(--ip-b1) !important;
}

.sos-time {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-tx3);
    text-align: center;
    margin-top: 10px;
}

/* ══ FLOATING LIVE SCORE BOX ══ */
.live-score-float {
    position: fixed;
    right: 20px;
    top: 120px;
    width: 180px;
    background: var(--ip-s0);
    border: 2px solid var(--ip-orange-m);
    border-radius: var(--ip-r-xl);
    box-shadow: var(--ip-sh-lg);
    z-index: 250;
    overflow: hidden;
    display: none;
    animation: lsfSlideIn .3s ease;
}

    .live-score-float.visible {
        display: block;
    }

@keyframes lsfSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lsf-head {
    background: var(--ip-orange);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lsf-title {
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.lsf-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: lsfPulse 1.5s ease-in-out infinite;
}

@keyframes lsfPulse {
    0%,100% {
        opacity: 1;
    }

    50% {
        opacity: .3;
    }
}

.lsf-body {
    padding: 14px 12px;
}

.lsf-ring-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.lsf-ring {
    position: relative;
    width: 80px;
    height: 80px;
}

    .lsf-ring svg {
        transform: rotate(-90deg);
    }

.lsf-ring-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ip-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--ip-gold);
}

.lsf-bar-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ip-tx2);
    padding: 3px 0;
    border-bottom: 1px solid var(--ip-b1);
}

    .lsf-bar-row:last-of-type {
        border-bottom: none;
    }

.lsf-bar-val {
    font-family: var(--ip-mono);
    font-weight: 700;
}

.lsf-threshold {
    margin-top: 8px;
    height: 5px;
    background: var(--ip-s2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.lsf-threshold-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ip-red), var(--ip-gold), var(--ip-acc));
    border-radius: 3px;
    transition: width .5s;
}

.lsf-threshold-marker {
    position: absolute;
    top: -2px;
    height: 9px;
    width: 2px;
    background: var(--ip-tx);
    border-radius: 1px;
}

.lsf-warning {
    font-size: 10px;
    color: var(--ip-red);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--ip-mono);
}

.lsf-step {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-tx3);
    margin-top: 6px;
    text-align: center;
}

/* Override: hide footer on inspector pages */
body:has(.insp-body) footer {
    display: none !important;
}
/* ============================================================
   inspectpro.css  —  Unified InspectPro Design System
   Single file for ALL modules: Supervisor, Questionnaire, Inspector
   
   USAGE IN _Layout.cshtml <head>:
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet"/>
   <link rel="stylesheet" href="~/css/inspectpro.css" asp-append-version="true"/>
   
   Delete supervisor.css and questionnaire-admin.css — this replaces both.
============================================================ */

/* ══════════════════════════════════════════════════════════

/* ══════════════════════════════════════════════════════════
   6. INSPECTOR FOOTER & BUTTON CLASSES (matching design)
══════════════════════════════════════════════════════════ */

/* Footer layout */
.if-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.if-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.if-step {
    font-family: var(--ip-mono);
    font-size: 11px;
    color: var(--ip-tx3);
}

.if-pct {
    font-family: var(--ip-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-orange,var(--ip-brand));
}

.if-save {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: var(--ip-acc);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Generic button base */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--ip-r-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ip-body);
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 5px 11px;
    font-size: 12px;
}

/* Orange — primary action */
.btn-or {
    background: var(--ip-acc);
    color: #fff;
    border-color: var(--ip-acc);
}

    .btn-or:hover,
    a.btn-or:hover {
        background: var(--ip-acc2, #1e4d38) !important;
        color: #fff !important;
        border-color: var(--ip-acc2, #1e4d38) !important;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(45,106,79,.3);
    }

    .btn-or:disabled {
        background: var(--ip-s2);
        color: var(--ip-tx3);
        border-color: var(--ip-b1);
        opacity: 1;
        cursor: not-allowed;
    }

/* Ghost — secondary */
.btn-ghost {
    background: transparent;
    color: var(--ip-tx2);
    border-color: var(--ip-b1);
}

    .btn-ghost:hover {
        background: var(--ip-s1);
        color: var(--ip-tx);
        text-decoration: none;
    }

/* Amber — flag / warning */
.btn-am {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border-color: var(--ip-gold-m);
}

    .btn-am:hover {
        background: var(--ip-gold-m);
    }

/* Danger */
.btn-danger {
    background: var(--ip-red-l);
    color: var(--ip-red);
    border-color: var(--ip-red-m);
}

    .btn-danger:hover {
        background: var(--ip-red-m);
    }

/* Green / success */
.btn-green {
    background: var(--ip-acc);
    color: #fff;
    border-color: var(--ip-acc);
}

    .btn-green:hover {
        background: var(--ip-acc2);
    }

/* Voice transcript box */
.voice-transcript-box {
    background: var(--ip-s0);
    border: 1px solid var(--ip-purple-m);
    border-radius: var(--ip-r-lg);
    padding: 13px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ip-tx);
    line-height: 1.6;
}

.transcript-meta {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-purple);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
/* ============================================================
   inspectpro.css  —  Unified InspectPro Design System
   Single file for ALL modules: Supervisor, Questionnaire, Inspector
   
   USAGE IN _Layout.cshtml <head>:
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet"/>
   <link rel="stylesheet" href="~/css/inspectpro.css" asp-append-version="true"/>
   
   Delete supervisor.css and questionnaire-admin.css — this replaces both.
============================================================ */

/* ══════════════════════════════════════════════════════════

   LOOKUP PAGES — lkp-* classes
   Shared by: Sectors, FacilityTypes, Departments, Locations,
              LegalForms, LicenseTypes, IssuingAuthorities,
              RiskLevels, InspectionTypes, SeverityLevels,
              ViolationCategories, ViolationTypes
   Append this block to the bottom of Inspectpro.css
============================================================ */

/* ── Page shell ── */
.lkp-shell {
    font-family: var(--ip-body);
    color: var(--ip-tx);
    background: var(--ip-bg);
    min-height: calc(100vh - 52px);
    padding: 28px 32px 80px;
}

/* ── Breadcrumb ── */
.lkp-crumb {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .lkp-crumb a {
        color: var(--ip-tx2);
        text-decoration: none;
    }

        .lkp-crumb a:hover {
            color: var(--ip-acc);
        }

.lkp-crumb-sep {
    color: var(--ip-b3);
    font-size: 10px;
}

/* ── Page header ── */
.lkp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.lkp-title {
    font-family: var(--ip-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--ip-tx);
    letter-spacing: -.4px;
    line-height: 1.2;
}

.lkp-sub {
    font-size: 13px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

.lkp-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Search bar ── */
.lkp-search-wrap {
    position: relative;
}

.lkp-search {
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1.5px solid var(--ip-b1);
    border-radius: 20px;
    background: var(--ip-s0);
    font-family: var(--ip-body);
    font-size: 13px;
    color: var(--ip-tx);
    outline: none;
    width: 220px;
    transition: border-color .15s, width .2s;
}

    .lkp-search:focus {
        border-color: var(--ip-acc);
        width: 260px;
    }

.lkp-search-ico {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--ip-tx3);
    pointer-events: none;
}

/* ── Add button ── */
.lkp-btn-add {
    height: 36px;
    padding: 0 16px;
    background: var(--ip-acc);
    color: #fff;
    border: none;
    border-radius: var(--ip-r);
    font-family: var(--ip-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .15s;
    white-space: nowrap;
}

    .lkp-btn-add:hover {
        background: var(--ip-acc2);
    }

/* ── Card wrapper ── */
.lkp-card {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    box-shadow: var(--ip-sh);
    overflow: hidden;
}

/* ── Table ── */
.lkp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .lkp-table thead tr {
        background: var(--ip-s1);
        border-bottom: 2px solid var(--ip-b1);
    }

    .lkp-table th {
        padding: 11px 16px;
        text-align: left;
        font-family: var(--ip-mono);
        font-size: 10px;
        font-weight: 500;
        color: var(--ip-tx3);
        text-transform: uppercase;
        letter-spacing: .6px;
        white-space: nowrap;
    }

        .lkp-table th.lkp-th-r {
            text-align: right;
        }

    .lkp-table td {
        padding: 12px 16px;
        border-bottom: 1px solid var(--ip-b1);
        vertical-align: middle;
        color: var(--ip-tx);
    }

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

    .lkp-table tbody tr {
        animation: lkp-row-in .2s ease both;
    }

/* ── Import / Export bar (master-data pages) ─────────────────── */
.lkp-io-wrap {
    position: relative;
}

.lkp-io-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r);
    box-shadow: var(--ip-sh-lg);
    min-width: 220px;
    z-index: 400;
    overflow: hidden;
}

    .lkp-io-menu.open {
        display: block;
    }

.lkp-io-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--ip-body);
    font-size: 13px;
    color: var(--ip-tx);
    cursor: pointer;
}

    .lkp-io-menu-item:hover {
        background: var(--ip-s1);
    }

    .lkp-io-menu-item + .lkp-io-menu-item {
        border-top: 1px solid var(--ip-b1);
    }

.lkp-io-menu-ico {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Import results modal — reuses .lkp-modal-overlay / .lkp-modal, widened */
.lkp-modal-lg {
    width: 620px;
}

.lkp-io-summary {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.lkp-io-stat {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--ip-mono);
}

.lkp-io-stat-ok {
    background: var(--ip-green-l);
    color: var(--ip-green);
}

.lkp-io-stat-upd {
    background: var(--ip-blue-l);
    color: var(--ip-blue);
}

.lkp-io-stat-skip {
    background: var(--ip-s2);
    color: var(--ip-tx3);
}

.lkp-io-stat-err {
    background: var(--ip-red-l);
    color: var(--ip-red);
}

.lkp-io-rows {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r);
}

.lkp-io-row {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    font-size: 12px;
    border-bottom: 1px solid var(--ip-b1);
}

    .lkp-io-row:last-child {
        border-bottom: none;
    }

.lkp-io-row-num {
    font-family: var(--ip-mono);
    color: var(--ip-tx3);
    flex-shrink: 0;
    width: 30px;
}

.lkp-io-row-err {
    color: var(--ip-red);
}
        /* ── Lookup extras — code badge, tags, drawer sections, flags ──
   Append these after the main lkp-* block in Inspectpro.css
─────────────────────────────────────────────────────────────── */

        .lkp-table tbody tr:hover {
            background: var(--ip-s1);
        }

        .lkp-table tbody tr.lkp-row-inactive {
            opacity: .5;
        }

/* ── ID badge ── */
.lkp-id {
    font-family: var(--ip-mono);
    font-size: 11px;
    color: var(--ip-tx3);
    background: var(--ip-s2);
    padding: 2px 7px;
    border-radius: 10px;
    display: inline-block;
}

/* ── Name cells ── */
.lkp-name-en {
    font-weight: 500;
    color: var(--ip-tx);
}

.lkp-name-ar {
    font-size: 12px;
    color: var(--ip-tx3);
    direction: rtl;
    margin-top: 2px;
}

/* ── Status pill ── */
.lkp-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-family: var(--ip-mono);
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.lkp-pill-active {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
    border-color: var(--ip-acc-m);
}

    .lkp-pill-active:hover {
        background: var(--ip-red-l);
        color: var(--ip-red);
        border-color: var(--ip-red-m);
    }

.lkp-pill-inactive {
    background: #FFF4E5;
    color: #9A5B00;
    border-color: #F0C674;
}

/* ── Row actions ── */
.lkp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.lkp-btn-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--ip-r-sm);
    border: 1px solid var(--ip-b1);
    background: var(--ip-s0);
    color: var(--ip-tx2);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
}

    .lkp-btn-icon:hover {
        border-color: var(--ip-acc);
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

    .lkp-btn-icon.danger:hover {
        border-color: var(--ip-red);
        color: var(--ip-red);
        background: var(--ip-red-l);
    }

/* ── Empty state ── */
.lkp-empty {
    text-align: center;
    padding: 60px 20px;
}

.lkp-empty-ico {
    font-size: 42px;
    opacity: .25;
    display: block;
    margin-bottom: 12px;
}

.lkp-empty-title {
    font-family: var(--ip-head);
    font-size: 18px;
    font-weight: 600;
    color: var(--ip-tx2);
    margin-bottom: 6px;
}

.lkp-empty-sub {
    font-size: 13px;
    color: var(--ip-tx3);
}

/* ── Count badge in header ── */
.lkp-count {
    font-family: var(--ip-mono);
    font-size: 11px;
    background: var(--ip-s2);
    color: var(--ip-tx3);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--ip-b1);
    align-self: center;
}

/* ── Drawer overlay ── */
.lkp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 400;
    backdrop-filter: blur(1px);
}

    .lkp-overlay.open {
        display: block;
    }

/* ── Drawer panel ── */
.lkp-drawer {
    position: fixed;
    top: 52px; /* below admin nav */
    right: -440px;
    bottom: 0;
    width: 420px;
    background: var(--ip-s0);
    border-left: 1px solid var(--ip-b1);
    box-shadow: -8px 0 32px rgba(0,0,0,.12);
    z-index: 401;
    display: flex;
    flex-direction: column;
    transition: right .25s cubic-bezier(.4,0,.2,1);
}

    .lkp-drawer.open {
        right: 0;
    }

.lkp-drawer-head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.lkp-drawer-title {
    font-family: var(--ip-head);
    font-size: 17px;
    font-weight: 600;
    color: var(--ip-tx);
}

.lkp-drawer-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--ip-b1);
    background: var(--ip-s0);
    color: var(--ip-tx3);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
}

    .lkp-drawer-close:hover {
        border-color: var(--ip-red);
        color: var(--ip-red);
    }

.lkp-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lkp-drawer-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ── Form fields inside drawer ── */
.lkp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lkp-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--ip-mono);
}

.lkp-input, .lkp-select {
    height: 38px;
    padding: 0 11px;
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r);
    background: var(--ip-s0);
    font-family: var(--ip-body);
    font-size: 13px;
    color: var(--ip-tx);
    outline: none;
    transition: border-color .15s;
    width: 100%;
}

    .lkp-input:focus, .lkp-select:focus {
        border-color: var(--ip-acc);
    }

    .lkp-input[dir="rtl"] {
        text-align: right;
    }

.lkp-hint {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 2px;
}

/* ── Drawer buttons ── */
.lkp-btn-save {
    height: 36px;
    padding: 0 20px;
    background: var(--ip-acc);
    color: #fff;
    border: none;
    border-radius: var(--ip-r);
    font-family: var(--ip-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

    .lkp-btn-save:hover {
        background: var(--ip-acc2);
    }

    .lkp-btn-save:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.lkp-btn-cancel {
    height: 36px;
    padding: 0 16px;
    background: transparent;
    color: var(--ip-tx2);
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r);
    font-family: var(--ip-body);
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}

    .lkp-btn-cancel:hover {
        border-color: var(--ip-b3);
        color: var(--ip-tx);
    }

.lkp-btn-delete {
    height: 36px;
    padding: 0 16px;
    background: transparent;
    color: var(--ip-red);
    border: 1.5px solid var(--ip-red-m);
    border-radius: var(--ip-r);
    font-family: var(--ip-body);
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
    margin-right: auto;
}

    .lkp-btn-delete:hover {
        background: var(--ip-red-l);
    }

/* ── Divider inside drawer ── */
.lkp-divider {
    height: 1px;
    background: var(--ip-b1);
    margin: 4px 0;
}

/* ── Toast ── */
.lkp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--ip-tx);
    color: #fff;
    border-radius: 24px;
    padding: 9px 20px;
    font-size: 13px;
    font-family: var(--ip-body);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    white-space: nowrap;
    box-shadow: var(--ip-sh-lg);
}

    .lkp-toast.lkp-toast-show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .lkp-toast.lkp-toast-err {
        background: var(--ip-red);
    }

/* ── Delete confirm modal ── */
.lkp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

    .lkp-modal-overlay.open {
        display: flex;
    }

.lkp-modal {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    width: 380px;
    max-width: 95vw;
    box-shadow: var(--ip-sh-lg);
    overflow: hidden;
}

.lkp-modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ip-b1);
    background: var(--ip-s1);
}

.lkp-modal-title {
    font-family: var(--ip-head);
    font-size: 16px;
    font-weight: 600;
    color: var(--ip-tx);
}

.lkp-modal-body {
    padding: 20px;
    font-size: 13px;
    color: var(--ip-tx2);
    line-height: 1.6;
}

.lkp-modal-foot {
    padding: 12px 20px;
    border-top: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.lkp-btn-confirm-del {
    height: 34px;
    padding: 0 16px;
    background: var(--ip-red);
    color: #fff;
    border: none;
    border-radius: var(--ip-r);
    font-family: var(--ip-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
}

    .lkp-btn-confirm-del:hover {
        opacity: .85;
    }

/* ── Row animation ── */
@keyframes lkp-row-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lkp-table tbody tr {
    animation: lkp-row-in .2s ease both;
}
/* ── Lookup extras — code badge, tags, drawer sections, flags ──
   Append these after the main lkp-* block in Inspectpro.css
─────────────────────────────────────────────────────────────── */

/* Code badge (monospace pill in table) */
.lkp-code {
    font-family: var(--ip-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--ip-acc);
    background: var(--ip-acc-l);
    border: 1px solid var(--ip-acc-m);
    padding: 2px 8px;
    border-radius: var(--ip-r-sm);
    display: inline-block;
    letter-spacing: .3px;
}

/* Inline mono input (for Code field) */
.lkp-mono-input {
    font-family: var(--ip-mono);
    letter-spacing: .5px;
}

/* Hint inline (small text next to label) */
.lkp-hint-inline {
    font-family: var(--ip-body);
    font-size: 10px;
    color: var(--ip-tx3);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Classification/sector/risk tags in table */
.lkp-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-family: var(--ip-mono);
    border: 1px solid transparent;
    white-space: nowrap;
}

.lkp-tag-blue {
    background: var(--ip-blue-l);
    color: var(--ip-blue);
    border-color: var(--ip-blue-m);
}

.lkp-tag-risk {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border-color: var(--ip-gold-m);
}

.lkp-tag-green {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
    border-color: var(--ip-acc-m);
}

.lkp-tag-red {
    background: var(--ip-red-l);
    color: var(--ip-red);
    border-color: var(--ip-red-m);
}

/* Drawer section label (divider with text) */
.lkp-drawer-section-label {
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 700;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ip-b1);
    margin-bottom: 2px;
}

/* Checkbox flag rows inside drawer */
.lkp-flags-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lkp-flag {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ip-tx2);
    user-select: none;
}

    .lkp-flag input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--ip-acc);
        cursor: pointer;
        flex-shrink: 0;
    }

    .lkp-flag:hover {
        color: var(--ip-tx);
    }

/* Hierarchical indent for Locations tree */
.lkp-indent-1 {
    padding-left: 20px;
}

.lkp-indent-2 {
    padding-left: 40px;
}

.lkp-indent-3 {
    padding-left: 60px;
}

.lkp-level-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 7px;
    flex-shrink: 0;
}

.lkp-level-dot-1 {
    background: var(--ip-acc);
}

.lkp-level-dot-2 {
    background: var(--ip-blue);
}

.lkp-level-dot-3 {
    background: var(--ip-gold);
}

.lkp-muted {
    color: var(--ip-tx3);
    font-size: 13px;
}

.dvb-pending {
    background: var(--ip-s2);
    color: var(--ip-tx3);
    border: 1px solid var(--ip-b1);
}
/* ── Location level filter tabs ─────────────────────────────
   Append to Inspectpro.css after the lkp-* blocks
─────────────────────────────────────────────────────────── */

.lkp-level-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.lkp-level-tab {
    height: 32px;
    padding: 0 14px;
    border-radius: 20px;
    border: 1.5px solid var(--ip-b1);
    background: var(--ip-s0);
    color: var(--ip-tx2);
    font-family: var(--ip-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
    white-space: nowrap;
}

    .lkp-level-tab:hover {
        border-color: var(--ip-acc);
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

    .lkp-level-tab.active {
        background: var(--ip-acc);
        border-color: var(--ip-acc);
        color: #fff;
    }

.lkp-level-count {
    background: rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 10px;
    font-family: var(--ip-mono);
}

.lkp-level-tab:not(.active) .lkp-level-count {
    background: var(--ip-s2);
    color: var(--ip-tx3);
}
/* ══════════════════════════════════════════════════════════
   ROLES & PERMISSIONS MODULE  —  rm-* classes
   Unified with InspectPro design tokens (ip-*)
══════════════════════════════════════════════════════════ */

/* Shell — scoped wrapper, sits inside admin content area */
.rm-shell {
    padding: 24px 32px 60px;
    max-width: 1400px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
}

/* ── Breadcrumb ── */
.rm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ip-tx3);
    margin-bottom: 14px;
    font-family: var(--ip-mono);
}

.rm-bc-link {
    color: var(--ip-tx2);
    text-decoration: none;
    transition: color .13s;
}

    .rm-bc-link:hover {
        color: var(--ip-acc);
    }

.rm-bc-sep {
    color: var(--ip-b3);
}

.rm-bc-cur {
    color: var(--ip-tx);
    font-weight: 500;
}

/* ── Sub-tabs ── */
.rm-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--ip-b1);
    margin-bottom: 22px;
}

.rm-tab {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: var(--ip-r-sm) var(--ip-r-sm) 0 0;
    transition: all .14s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .rm-tab:hover {
        color: var(--ip-tx);
        background: var(--ip-s1);
    }

.rm-tab-active {
    color: var(--ip-acc);
    border-bottom-color: var(--ip-acc);
    background: var(--ip-acc-l);
    font-weight: 600;
}

/* ── Page header ── */
.rm-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.rm-page-title {
    font-family: var(--ip-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--ip-tx);
    letter-spacing: -.3px;
    margin-bottom: 4px;
}

.rm-page-sub {
    font-size: 13px;
    color: var(--ip-tx3);
    max-width: 500px;
    line-height: 1.5;
}

/* ── Role cards grid ── */
.rm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.rm-card {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    padding: 20px;
    box-shadow: var(--ip-sh);
    transition: box-shadow .18s, transform .18s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .rm-card:hover {
        box-shadow: var(--ip-sh-lg);
        transform: translateY(-2px);
    }

.rm-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rm-card-av {
    width: 42px;
    height: 42px;
    border-radius: var(--ip-r-lg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

.rm-card-info {
    flex: 1;
    min-width: 0;
}

.rm-card-name {
    font-family: var(--ip-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-tx);
}

.rm-card-badge {
    display: inline-block;
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--ip-s2);
    color: var(--ip-tx3);
    border: 1px solid var(--ip-b1);
    margin-top: 3px;
}

.rm-card-desc {
    font-size: 12px;
    color: var(--ip-tx3);
    line-height: 1.45;
}

/* Progress bar */
.rm-card-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rm-card-bar-track {
    flex: 1;
    height: 5px;
    background: var(--ip-s2);
    border-radius: 3px;
    overflow: hidden;
}

.rm-card-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease;
}

.rm-card-bar-pct {
    font-family: var(--ip-mono);
    font-size: 10px;
    color: var(--ip-tx3);
    white-space: nowrap;
}

/* Stats row */
.rm-card-stats {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 0;
    border-top: 1px solid var(--ip-b1);
    border-bottom: 1px solid var(--ip-b1);
}

.rm-card-stat {
    flex: 1;
    text-align: center;
}

.rm-card-stat-val {
    font-family: var(--ip-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--ip-tx);
    line-height: 1.1;
}

.rm-card-stat-lbl {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.rm-card-stat-div {
    width: 1px;
    height: 32px;
    background: var(--ip-b1);
    flex-shrink: 0;
}

.rm-card-actions {
    display: flex;
    gap: 8px;
}

.rm-w-full {
    flex: 1;
    justify-content: center;
}

/* ── Matrix wrapper ── */
.rm-matrix-wrap {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    box-shadow: var(--ip-sh);
    overflow: hidden;
}

.rm-matrix-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--ip-b1);
    background: var(--ip-s1);
}

.rm-matrix-title {
    font-family: var(--ip-head);
    font-size: 16px;
    font-weight: 600;
    color: var(--ip-tx);
}

.rm-matrix-sub {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-top: 3px;
}

/* Legend */
.rm-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.rm-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--ip-tx2);
    font-family: var(--ip-mono);
}

/* ── Table ── */
.rm-table-scroll {
    overflow-x: auto;
}

.rm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

/* Column headers */
.rm-th-feature {
    padding: 11px 20px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .6px;
    background: var(--ip-s2);
    border-bottom: 1px solid var(--ip-b1);
    white-space: nowrap;
    min-width: 220px;
}

.rm-th-role {
    padding: 11px 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ip-tx);
    background: var(--ip-s2);
    border-bottom: 1px solid var(--ip-b1);
    border-left: 1px solid var(--ip-b1);
    white-space: nowrap;
    min-width: 110px;
}

/* Module separator row */
.rm-group-row td {
    padding: 8px 20px;
    background: var(--ip-bg);
    border-bottom: 1px solid var(--ip-b1);
}

.rm-module-label {
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ip-tx3);
}

/* Permission row */
.rm-perm-row {
    transition: background .1s;
}

    .rm-perm-row:hover {
        background: var(--ip-s1);
    }

    .rm-perm-row:last-child td {
        border-bottom: none;
    }

.rm-perm-name {
    padding: 11px 20px;
    font-size: 13px;
    color: var(--ip-tx);
    border-bottom: 1px solid var(--ip-b1);
}

.rm-perm-cell {
    padding: 11px 20px;
    text-align: center;
    border-bottom: 1px solid var(--ip-b1);
    border-left: 1px solid var(--ip-b1);
}

/* ── Toggle ── */
.rm-toggle {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .16s;
    position: relative;
}

    .rm-toggle::after {
        content: '';
        display: block;
        transition: all .16s;
    }

    .rm-toggle:hover {
        transform: scale(1.15);
    }

.rm-toggle-on {
    background: var(--ip-acc);
    border-color: var(--ip-acc2);
}

    .rm-toggle-on::after {
        content: '✓';
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
    }

.rm-toggle-off {
    background: var(--ip-s1);
    border-color: var(--ip-b2);
}

    .rm-toggle-off:hover {
        border-color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

/* ── Toast animation ── */
@keyframes rmToastIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .rm-shell {
        padding: 16px 16px 40px;
    }

    .rm-cards {
        grid-template-columns: 1fr 1fr;
    }

    .rm-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .rm-cards {
        grid-template-columns: 1fr;
    }

    .rm-tabs {
        overflow-x: auto;
    }
}
/* ══════════════════════════════════════════════════════════
   ROLES & PERMISSIONS — replaces admin-dark.css
   Targets exact class names used in Views/Roles/Index.cshtml
══════════════════════════════════════════════════════════ */

/* ── Shell wrapper ── */
.page-view {
    padding: 24px 32px 60px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    max-width: 1400px;
}

/* ── Sub-navigation tabs ── */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--ip-b1);
    margin-bottom: 24px;
}

.tab {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: var(--ip-r-sm) var(--ip-r-sm) 0 0;
    transition: all .14s;
    white-space: nowrap;
}

    .tab:hover {
        color: var(--ip-tx);
        background: var(--ip-s2);
        text-decoration: none;
    }

    .tab.active {
        color: var(--ip-acc);
        border-bottom-color: var(--ip-acc);
        background: var(--ip-acc-l);
        font-weight: 600;
    }

/* ── Page header ── */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-family: var(--ip-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--ip-tx);
    letter-spacing: -.3px;
    margin-bottom: 5px;
}

.page-sub {
    font-size: 13px;
    color: var(--ip-tx3);
    line-height: 1.5;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--ip-r-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ip-body);
    cursor: pointer;
    border: 1.5px solid var(--ip-b2);
    background: var(--ip-s0);
    color: var(--ip-tx);
    transition: all .14s;
    white-space: nowrap;
}

    .btn:hover {
        background: var(--ip-s1);
        border-color: var(--ip-b3);
    }

    .btn.primary {
        background: var(--ip-acc);
        border-color: var(--ip-acc2);
        color: #fff;
    }

        .btn.primary:hover {
            background: var(--ip-acc2);
        }

/* ── Role cards grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.role-card-pro {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    padding: 20px;
    box-shadow: var(--ip-sh);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow .18s, transform .18s;
}

    .role-card-pro:hover {
        box-shadow: var(--ip-sh-lg);
        transform: translateY(-2px);
    }

.role-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.role-name {
    font-family: var(--ip-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-tx);
}

.role-badge {
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--ip-acc-l);
    color: var(--ip-acc);
    border: 1px solid var(--ip-acc-m);
    white-space: nowrap;
}

.role-desc {
    font-size: 12px;
    color: var(--ip-tx3);
    line-height: 1.45;
}

.role-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--ip-b1);
    border-bottom: 1px solid var(--ip-b1);
    padding: 10px 0;
}

    .role-stats > div {
        flex: 1;
        text-align: center;
    }

        .role-stats > div:not(:last-child) {
            border-right: 1px solid var(--ip-b1);
        }

    .role-stats strong {
        display: block;
        font-family: var(--ip-mono);
        font-size: 18px;
        font-weight: 700;
        color: var(--ip-acc);
        line-height: 1.1;
    }

    .role-stats > div > div {
        font-size: 10px;
        color: var(--ip-tx3);
        margin-top: 2px;
        text-transform: uppercase;
        letter-spacing: .4px;
    }

.role-actions {
    display: flex;
    gap: 8px;
}

    .role-actions .btn {
        flex: 1;
        justify-content: center;
    }

/* ── Matrix section ── */
.matrix-section {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    box-shadow: var(--ip-sh);
    overflow: hidden;
    padding: 22px;
}

    .matrix-section h3 {
        font-family: var(--ip-head);
        font-size: 16px;
        font-weight: 600;
        color: var(--ip-tx);
        margin: 0 0 4px 0;
    }

    .matrix-section > p {
        font-size: 12px;
        color: var(--ip-tx3);
        margin: 0 0 14px 0;
    }

/* ── Toggle boxes (legend + matrix cells) ── */
.toggle-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--ip-b2);
    background: var(--ip-s1);
    cursor: pointer;
    transition: all .16s;
    vertical-align: middle;
    flex-shrink: 0;
}

    .toggle-box:hover {
        transform: scale(1.12);
    }

.toggle-on {
    background: var(--ip-acc);
    border-color: var(--ip-acc2);
}

    .toggle-on::after {
        content: '✓';
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
    }

.toggle-off {
    background: var(--ip-s1);
    border-color: var(--ip-b2);
}

    .toggle-off:hover {
        border-color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

.toggle-partial {
    background: var(--ip-gold-l);
    border-color: var(--ip-gold-m);
}

    .toggle-partial::after {
        content: '–';
        color: var(--ip-gold);
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
    }

/* ── Matrix table ── */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

    .matrix-table th {
        padding: 10px 18px;
        background: var(--ip-s2);
        border-bottom: 2px solid var(--ip-b1);
        font-size: 11px;
        font-weight: 600;
        color: var(--ip-tx2);
        text-transform: uppercase;
        letter-spacing: .5px;
        white-space: nowrap;
    }

.role-header {
    text-align: center;
    border-left: 1px solid var(--ip-b1);
    min-width: 110px;
    font-family: var(--ip-body);
    font-size: 12px;
    color: var(--ip-tx);
}

.matrix-module {
    padding: 7px 18px;
    background: var(--ip-bg);
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ip-tx3);
    border-top: 1px solid var(--ip-b1);
    border-bottom: 1px solid var(--ip-b1);
}

.matrix-table td {
    padding: 10px 18px;
    border-bottom: 1px solid var(--ip-b1);
    font-size: 13px;
    color: var(--ip-tx);
    vertical-align: middle;
}

.matrix-table tbody tr:hover {
    background: var(--ip-s1);
}

[class^="role-col-"] {
    text-align: center;
    border-left: 1px solid var(--ip-b1);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .page-view {
        padding: 16px 16px 40px;
    }

    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
    }
}
/* ══════════════════════════════════════════════════════════
   RESCHEDULE CALENDAR  —  rsched-*  (Supervisor task drawer, supervisor.js)
══════════════════════════════════════════════════════════ */
.rsched-panel { margin-top: 18px; padding: 14px; background: var(--ip-s1); border: 1px solid var(--ip-b1); border-radius: var(--ip-r); }
.rsched-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rsched-cal-title { font-size: var(--ip-fs-md); font-weight: 600; color: var(--ip-tx); }
.rsched-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 10px; }
.rsched-day-hdr { text-align: center; font-size: var(--ip-fs-xs); font-weight: 700; color: var(--ip-tx3); padding: 4px 0; }
.rsched-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0; font: inherit; font-size: var(--ip-fs-sm); border: 1px solid transparent; border-radius: var(--ip-r-sm); background: transparent; color: var(--ip-tx3); }
.rsched-day:focus-visible { outline: 2px solid var(--ip-focus); outline-offset: 1px; }
.rsched-day-avail { background: var(--ip-s0); border-color: var(--ip-b1); color: var(--ip-tx); cursor: pointer; }
.rsched-day-avail:hover { background: var(--ip-info-l); border-color: var(--ip-info); color: var(--ip-info); }
.rsched-day-override { background: var(--ip-warn-l); border-color: var(--ip-warn-m); color: var(--ip-warn); cursor: pointer; }
.rsched-day-selected { background: var(--ip-info); border-color: var(--ip-info); color: #fff; font-weight: 700; cursor: pointer; }
.rsched-day-disabled { background: var(--ip-s2); opacity: .45; cursor: not-allowed; }
.rsched-selected-lbl { margin-bottom: 8px; padding: 7px 10px; font-size: var(--ip-fs-sm); color: var(--ip-info); background: var(--ip-info-l); border-radius: var(--ip-r-sm); }
.rsched-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: var(--ip-fs-xs); }
.rsched-leg-work { color: var(--ip-ok); }
.rsched-leg-override { color: var(--ip-warn); }
.rsched-leg-off { color: var(--ip-tx3); }
.rsched-day-holiday { background: var(--ip-bad-l); color: var(--ip-bad); text-decoration: line-through; }
.rsched-day-ramadan { box-shadow: inset 0 -3px 0 var(--ip-acc); }
.rsched-leg-holiday { color: var(--ip-bad); }
.rsched-leg-ramadan { color: var(--ip-acc); }

/* ══════════════════════════════════════════════════════════
   NOTIFICATION BELL  —  nav-bell-* + notif-* classes
══════════════════════════════════════════════════════════ */

.nav-bell-wrap {
    position: relative;
    flex-shrink: 0;
}

.nav-bell {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #d1d5db;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all .15s;
    flex-shrink: 0;
}

    .nav-bell:hover {
        background: rgba(255,255,255,.15);
        color: #fff;
    }

.nav-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    background: var(--ip-red);
    color: #fff;
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--ip-tx);
    pointer-events: none;
}

.notif-panel {
    position: fixed;
    width: 320px;
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
    .notif-panel.open {
        display: flex;
        animation: notifIn .15s ease;
    }

@keyframes notifIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--ip-b1);
    background: var(--ip-s1);
}

.notif-panel-title {
    font-family: var(--ip-head);
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-tx);
}

.notif-mark-all {
    font-size: 10px;
    color: var(--ip-acc);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--ip-mono);
    padding: 0;
}

    .notif-mark-all:hover {
        text-decoration: underline;
    }

.notif-list {
    max-height: 360px;
    overflow-y: auto;
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--ip-tx3);
    font-family: var(--ip-mono);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--ip-b1);
    cursor: pointer;
    transition: background .13s;
    position: relative;
}

    .notif-item:last-child {
        border-bottom: none;
    }

    .notif-item:hover {
        background: var(--ip-s1);
    }

.notif-unread {
    background: var(--ip-acc-l);
}

    .notif-unread:hover {
        background: var(--ip-acc-l);
        filter: brightness(.97);
    }

.notif-ico {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    margin-top: 1px;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-family: var(--ip-head);
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-msg {
    font-size: 11px;
    color: var(--ip-tx2);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-time {
    font-family: var(--ip-mono);
    font-size: 9px;
    color: var(--ip-tx3);
}

.notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ip-acc);
    flex-shrink: 0;
    margin-top: 5px;
}

/* ══════════════════════════════════════════════════════════

   NEXFLOW WORKFLOW DESIGNER — Tab 2
   Append to the very end of inspectpro.css.
   All variables map to existing --ip-* tokens so no new
   colour values are introduced — the designer inherits the
   full InspectPro warm-light palette automatically.
   Class names are prefixed nf- or use the exact names from
   nexflow-tab2-designer.html to match the Razor view 1-to-1.
══════════════════════════════════════════════════════════ */

/* ── Scoped token aliases ────────────────────────────────────
   The designer HTML uses short aliases (--acc, --bg, --tx3).
   We declare them inside .nf-root so they resolve to the
   correct ip-* values without touching the global :root.
   Every designer element sits inside <div class="nf-root">.
────────────────────────────────────────────────────────── */
.nf-root {
    --bg: var(--ip-bg);
    --s0: var(--ip-s0);
    --s1: var(--ip-s1);
    --s2: var(--ip-s2);
    --s3: var(--ip-s3);
    --b1: var(--ip-b1);
    --b2: var(--ip-b2);
    --b3: var(--ip-b3);
    --tx: var(--ip-tx);
    --tx2: var(--ip-tx2);
    --tx3: var(--ip-tx3);
    --acc: var(--ip-acc);
    --acc2: var(--ip-acc2);
    --acc-l: var(--ip-acc-l);
    --acc-m: var(--ip-acc-m);
    --grn: var(--ip-green);
    --grn-l: var(--ip-green-l);
    --grn-m: var(--ip-green-m);
    --gld: var(--ip-gold);
    --gld-l: var(--ip-gold-l);
    --gld-m: var(--ip-gold-m);
    --red: var(--ip-red);
    --red-l: var(--ip-red-l);
    --red-m: var(--ip-red-m);
    --blue: var(--ip-blue);
    --blue-l: var(--ip-blue-l);
    --blue-m: var(--ip-blue-m);
    --pur: var(--ip-purple);
    --pur-l: var(--ip-purple-l);
    --pur-m: var(--ip-purple-m);
    --teal: var(--ip-teal);
    --teal-l: var(--ip-teal-l);
    --teal-m: var(--ip-teal-m);
    --org: var(--ip-orange);
    --org-l: var(--ip-orange-l);
    --head: var(--ip-head);
    --sans: var(--ip-body);
    --mono: var(--ip-mono);
    --r: var(--ip-r);
    --rl: var(--ip-r-lg);
    --sh: var(--ip-sh);
    --sh-lg: var(--ip-sh-lg);
    /* Layout */
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px); /* subtract admin navbar height */
    overflow: clip;
    font-family: var(--ip-body);
    font-size: 13px;
    color: var(--ip-tx);
    background: var(--ip-bg);
}

    /* ══════════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════════ */
    .nf-root .topbar {
        height: 52px;
        flex-shrink: 0;
        background: var(--s0);
        border-bottom: 1px solid var(--b1);
        display: flex;
        align-items: center;
        box-shadow: var(--sh);
        z-index: 60;
        position: relative;
    }

    .nf-root .tb-brand {
        padding: 0 18px;
        border-right: 1px solid var(--b1);
        height: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 200px;
    }

    .nf-root .tb-logo {
        width: 30px;
        height: 30px;
        border-radius: 7px;
        background: var(--acc);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        color: #fff;
        box-shadow: 0 2px 8px var(--acc-m);
    }

    .nf-root .tb-word {
        font-family: var(--head);
        font-size: 17px;
        color: var(--tx);
        letter-spacing: -.2px;
    }

    .nf-root .tb-ver {
        font-size: 9px;
        font-family: var(--mono);
        color: var(--tx3);
        background: var(--s2);
        border: 1px solid var(--b1);
        padding: 2px 6px;
        border-radius: 4px;
        margin-left: 2px;
    }

    /* Tab strip inside top bar */
    .nf-root .tb-tabs {
        display: flex;
        height: 100%;
    }

    .nf-root .tbt {
        padding: 0 14px;
        height: 100%;
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 500;
        color: var(--tx3);
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: all .15s;
        white-space: nowrap;
        text-decoration: none;
    }

        .nf-root .tbt:hover {
            color: var(--tx2);
            background: var(--s1);
        }

        .nf-root .tbt.on {
            color: var(--acc);
            border-bottom-color: var(--acc);
            background: var(--s1);
        }
    .nf-root .tbt-disabled {
        opacity: .45;
        cursor: not-allowed;
    }

        .nf-root .tbt-disabled:hover {
            background: transparent;
            color: var(--tx3);
        }

    .nf-root .tb-bdg {
        font-size: 9px;
        font-family: var(--mono);
        padding: 1px 6px;
        border-radius: 10px;
        font-weight: 700;
    }

        .nf-root .tb-bdg.r {
            background: var(--red-l);
            color: var(--red);
            border: 1px solid var(--red-m);
        }

        .nf-root .tb-bdg.g {
            background: var(--gld-l);
            color: var(--gld);
            border: 1px solid var(--gld-m);
        }

    .nf-root .tb-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 16px;
    }

    .nf-root .wf-name {
        background: var(--s1);
        border: 1.5px solid var(--b2);
        border-radius: var(--r);
        padding: 5px 12px;
        font-family: var(--sans);
        font-size: 12px;
        color: var(--tx);
        outline: none;
        width: 220px;
        transition: border-color .15s;
    }

        .nf-root .wf-name:focus {
            border-color: var(--acc);
            box-shadow: 0 0 0 3px var(--acc-l);
        }

    /* Status chip */
    .nf-root .schip {
        font-size: 9px;
        font-family: var(--mono);
        padding: 3px 9px;
        border-radius: 20px;
        font-weight: 600;
    }

        .nf-root .schip.draft {
            background: var(--s2);
            color: var(--tx3);
            border: 1px solid var(--b2);
        }

        .nf-root .schip.active {
            background: var(--grn-l);
            color: var(--grn);
            border: 1px solid var(--grn-m);
        }

        .nf-root .schip.testing {
            background: var(--gld-l);
            color: var(--gld);
            border: 1px solid var(--gld-m);
        }

    /* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
    .nf-root .btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 6px 14px;
        border-radius: var(--r);
        font-size: 12px;
        font-weight: 500;
        font-family: var(--sans);
        cursor: pointer;
        transition: all .15s;
        border: none;
        white-space: nowrap;
    }

    .nf-root .btn-acc {
        background: var(--acc);
        color: #fff;
        box-shadow: 0 2px 8px var(--acc-m);
    }

        .nf-root .btn-acc:hover {
            background: var(--acc2);
            transform: translateY(-1px);
            box-shadow: 0 4px 14px var(--acc-m);
        }

    .nf-root .btn-ghost {
        background: transparent;
        color: var(--tx2);
        border: 1.5px solid var(--b2);
    }

        .nf-root .btn-ghost:hover {
            background: var(--s2);
            color: var(--tx);
            border-color: var(--b3);
        }

    .nf-root .btn-grn {
        background: var(--grn-l);
        color: var(--grn);
        border: 1px solid var(--grn-m);
    }

    .nf-root .btn-red {
        background: var(--red-l);
        color: var(--red);
        border: 1px solid var(--red-m);
    }

    .nf-root .btn-gld {
        background: var(--gld-l);
        color: var(--gld);
        border: 1px solid var(--gld-m);
    }

    .nf-root .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }

    .nf-root .btn-xs {
        padding: 3px 8px;
        font-size: 10px;
    }

    /* ══════════════════════════════════════════════════════════
   MAIN LAYOUT — three-column designer wrap
══════════════════════════════════════════════════════════ */
    .nf-root .designer-wrap {
        flex: 1;
        display: flex;
        overflow: hidden;
    }

    /* ══════════════════════════════════════════════════════════
   LEFT PALETTE
══════════════════════════════════════════════════════════ */
    .nf-root .palette {
        width: 212px;
        flex-shrink: 0;
        background: var(--s0);
        border-right: 1px solid var(--b1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 2px 0 10px rgba(0,0,0,.04);
    }

    .nf-root .pal-head {
        padding: 13px 13px 9px;
        border-bottom: 1px solid var(--b1);
        background: var(--s1);
    }

    .nf-root .pal-title {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .8px;
        color: var(--tx3);
        font-family: var(--mono);
        margin-bottom: 8px;
    }

    .nf-root .pal-search {
        width: 100%;
        background: var(--s0);
        border: 1.5px solid var(--b1);
        border-radius: var(--r);
        padding: 6px 10px;
        font-size: 11px;
        font-family: var(--sans);
        color: var(--tx);
        outline: none;
        transition: border-color .15s;
    }

        .nf-root .pal-search:focus {
            border-color: var(--acc);
        }

    .nf-root .pal-body {
        flex: 1;
        overflow-y: auto;
        padding: 8px 0;
    }

    .nf-root .pal-group {
        margin-bottom: 4px;
    }

    .nf-root .pal-group-label {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .8px;
        color: var(--tx3);
        font-family: var(--mono);
        padding: 8px 13px 4px;
    }

    .nf-root .pal-node {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 7px 13px;
        cursor: grab;
        transition: background .12s;
        border-radius: 0;
    }

        .nf-root .pal-node:hover {
            background: var(--s1);
        }

        .nf-root .pal-node:active {
            cursor: grabbing;
        }

    .nf-root .pn-icon {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        flex-shrink: 0;
    }

    .nf-root .pn-name {
        font-size: 11px;
        font-weight: 600;
        color: var(--tx);
        line-height: 1.2;
    }

    .nf-root .pn-desc {
        font-size: 10px;
        color: var(--tx3);
        margin-top: 1px;
    }

    /* ══════════════════════════════════════════════════════════
   CANVAS AREA
══════════════════════════════════════════════════════════ */
    .nf-root .canvas-wrap {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--bg);
        position: relative;
    }

    /* Canvas toolbar */
    .nf-root .canvas-toolbar {
        height: 40px;
        flex-shrink: 0;
        background: var(--s0);
        border-bottom: 1px solid var(--b1);
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0 12px;
    }

    .nf-root .ct-sep {
        width: 1px;
        height: 20px;
        background: var(--b1);
        margin: 0 4px;
    }

    .nf-root .ctb {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        border: 1.5px solid transparent;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 13px;
        color: var(--tx2);
        transition: all .12s;
    }

        .nf-root .ctb:hover {
            background: var(--s2);
            color: var(--tx);
        }

        .nf-root .ctb.on {
            background: var(--acc-l);
            border-color: var(--acc-m);
            color: var(--acc);
        }

    .nf-root .ct-zoom {
        font-size: 11px;
        font-family: var(--mono);
        color: var(--tx3);
        min-width: 36px;
        text-align: center;
    }

    .nf-root .ct-spacer {
        flex: 1;
    }

    /* Canvas scroll container */
    .nf-root .canvas-scroll {
        flex: 1;
        overflow: auto;
        position: relative;
    }

    .nf-root .canvas {
        position: relative;
        min-width: 1800px;
        min-height: 700px;
        background-image: radial-gradient(circle, var(--b1) 1px, transparent 1px);
        background-size: 20px 20px;
    }

    /* Minimap */
    .nf-root .minimap {
        position: absolute;
        bottom: 16px;
        right: 16px;
        width: 160px;
        height: 100px;
        background: var(--s0);
        border: 1px solid var(--b2);
        border-radius: var(--r);
        box-shadow: var(--sh);
        overflow: hidden;
        z-index: 10;
    }

    .nf-root .minimap-inner {
        width: 100%;
        height: 100%;
        position: relative;
    }

    .nf-root .mm-node {
        position: absolute;
        border-radius: 2px;
        opacity: .7;
    }

    .nf-root .mm-vp {
        position: absolute;
        border: 1.5px solid var(--acc);
        border-radius: 2px;
        background: var(--acc-l);
        pointer-events: none;
    }

    /* ══════════════════════════════════════════════════════════
   SWIM LANES
══════════════════════════════════════════════════════════ */
    .nf-root .lane {
        position: absolute;
        left: 0;
        right: 0;
        border-bottom: 1px dashed var(--b2);
    }

    .nf-root .lane-label {
        position: absolute;
        left: 0;
        top: 0;
        width: 80px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .6px;
        color: var(--tx3);
        font-family: var(--mono);
        border-right: 1px solid var(--b2);
        writing-mode: vertical-rl;
        transform: rotate(180deg);
    }

    /* ══════════════════════════════════════════════════════════
   BPMN NODES
══════════════════════════════════════════════════════════ */
    .nf-root .bnode {
        position: absolute;
        cursor: pointer;
        user-select: none;
    }

        .nf-root .bnode.selected > .bshell,
        .nf-root .bnode.selected > .bshell-task,
        .nf-root .bnode.selected > .bshell-xor,
        .nf-root .bnode.selected > .bshell-and,
        .nf-root .bnode.selected > .bshell-msg {
            outline: 2.5px solid var(--acc);
            outline-offset: 3px;
        }

    /* Task shell — all task types share this base */
    .nf-root .bshell-task {
        background: var(--s0);
        border: 1.5px solid var(--b2);
        border-radius: var(--r);
        padding: 10px 12px 10px;
        box-shadow: var(--sh);
        transition: box-shadow .15s, border-color .15s;
        min-height: 80px;
    }

        .nf-root .bshell-task:hover {
            border-color: var(--acc-m);
            box-shadow: var(--sh-lg);
        }

        /* Task type colour variants */
        .nf-root .bshell-task.user {
            border-top: 3px solid var(--acc);
        }

        .nf-root .bshell-task.service {
            border-top: 3px solid var(--grn);
        }

        .nf-root .bshell-task.script {
            border-top: 3px solid var(--pur);
        }

        .nf-root .bshell-task.manual {
            border-top: 3px solid var(--gld);
        }

        .nf-root .bshell-task.send {
            border-top: 3px solid var(--teal);
        }

        .nf-root .bshell-task.receive {
            border-top: 3px solid var(--blue);
        }

    /* Task header row */
    .nf-root .task-header {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 6px;
    }

    .nf-root .task-type-ic {
        font-size: 12px;
    }

    .nf-root .task-type-lbl {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .5px;
        color: var(--tx3);
        font-family: var(--mono);
        flex: 1;
    }

    .nf-root .task-menu {
        font-size: 14px;
        color: var(--tx3);
        padding: 0 2px;
        border-radius: 4px;
        cursor: pointer;
        opacity: 0;
        transition: opacity .15s;
    }

    .nf-root .bshell-task:hover .task-menu {
        opacity: 1;
    }

    .nf-root .task-role {
        font-size: 10px;
        color: var(--tx3);
        margin-bottom: 3px;
    }

    .nf-root .task-sla {
        font-size: 10px;
        color: var(--tx3);
        font-family: var(--mono);
    }

        .nf-root .task-sla.breach {
            color: var(--red);
        }

        .nf-root .task-sla.warn {
            color: var(--gld);
        }

    /* Node badges (status indicators top-right of node) */
    .nf-root .bnode-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9px;
        font-weight: 700;
        border: 2px solid var(--s0);
        z-index: 2;
    }

        .nf-root .bnode-badge.brk {
            background: var(--red);
            color: #fff;
        }

        .nf-root .bnode-badge.wait {
            background: var(--gld);
            color: #fff;
        }

        .nf-root .bnode-badge.run {
            background: var(--grn);
            color: #fff;
        }

    /* Connection ports (appear on hover) */
    .nf-root .bport {
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--acc);
        border: 2px solid #fff;
        opacity: 0;
        transition: opacity .15s;
        z-index: 3;
        cursor: crosshair;
    }

    .nf-root .bnode:hover .bport {
        opacity: 1;
    }

    .nf-root .bport.r {
        right: -5px;
        top: 50%;
        transform: translateY(-50%);
    }

    .nf-root .bport.l {
        left: -5px;
        top: 50%;
        transform: translateY(-50%);
    }

    .nf-root .bport.t {
        top: -5px;
        left: 50%;
        transform: translateX(-50%);
    }

    .nf-root .bport.b {
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Gateway shells */
    .nf-root .bshell-xor {
        width: 44px;
        height: 44px;
        background: var(--gld-l);
        border: 2px solid var(--gld-m);
        transform: rotate(45deg);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--sh);
        transition: box-shadow .15s;
    }

    .nf-root .bshell-xor-inner {
        transform: rotate(-45deg);
        font-size: 16px;
        font-weight: 700;
        color: var(--gld);
    }

    .nf-root .bshell-and {
        width: 44px;
        height: 44px;
        background: var(--teal-l);
        border: 2px solid var(--teal-m);
        transform: rotate(45deg);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--sh);
    }

    .nf-root .bshell-and-inner {
        transform: rotate(-45deg);
        font-size: 18px;
        font-weight: 700;
        color: var(--teal);
    }

    /* Event shells */
    .nf-root .bshell {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        box-shadow: var(--sh);
        transition: box-shadow .15s;
    }

        .nf-root .bshell:hover {
            box-shadow: var(--sh-lg);
        }

    .nf-root .bshell-start {
        background: var(--grn-l);
        border: 2.5px solid var(--grn);
        color: var(--grn);
    }

    .nf-root .bshell-end {
        background: var(--red-l);
        border: 4px solid var(--red);
        color: var(--red);
    }

    .nf-root .bshell-msg {
        background: var(--blue-l);
        border: 2px solid var(--blue-m);
        color: var(--blue);
    }

    /* Node label (below gateway / event shapes) */
    .nf-root .bnode-label {
        text-align: center;
        font-size: 10px;
        font-weight: 600;
        color: var(--tx2);
        margin-top: 6px;
        line-height: 1.3;
        pointer-events: none;
    }

    /* ══════════════════════════════════════════════════════════
   SVG CONNECTIONS
══════════════════════════════════════════════════════════ */
    .nf-root .canvas-svg {
        position: absolute;
        inset: 0;
        pointer-events: none;
        overflow: visible;
    }

    .nf-root .conn {
        fill: none;
        stroke: var(--b3);
        stroke-width: 1.5;
        marker-end: url(#arrow);
    }

        .nf-root .conn.active-path {
            stroke: var(--acc);
            stroke-width: 2;
        }

        .nf-root .conn.error-path {
            stroke: var(--red);
            stroke-width: 2;
            stroke-dasharray: 5 3;
        }

    .nf-root .conn-label {
        font-size: 9px;
        font-family: var(--mono);
        fill: var(--tx3);
    }

    /* ══════════════════════════════════════════════════════════
   PROPERTIES PANEL (right)
══════════════════════════════════════════════════════════ */
    .nf-root .props-panel {
        width: 300px;
        flex-shrink: 0;
        background: var(--s0);
        border-left: 1px solid var(--b1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transition: width .2s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,.04);
    }

        .nf-root .props-panel.collapsed {
            width: 0;
            border-left: none;
        }

    .nf-root .pp-head {
        padding: 14px 14px 10px;
        border-bottom: 1px solid var(--b1);
        background: var(--s1);
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        flex-shrink: 0;
    }

    .nf-root .pp-node-name {
        font-size: 13px;
        font-weight: 700;
        color: var(--tx);
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .nf-root .pp-node-type {
        font-size: 9px;
        font-family: var(--mono);
        color: var(--tx3);
        background: var(--s2);
        border: 1px solid var(--b1);
        padding: 2px 7px;
        border-radius: 10px;
    }

    .nf-root .pp-close {
        font-size: 14px;
        color: var(--tx3);
        cursor: pointer;
        padding: 2px 4px;
        border-radius: 4px;
        transition: all .12s;
        flex-shrink: 0;
    }

        .nf-root .pp-close:hover {
            background: var(--s2);
            color: var(--tx);
        }

    /* Properties panel sub-tabs */
    .nf-root .pp-tabs {
        display: flex;
        border-bottom: 1px solid var(--b1);
        flex-shrink: 0;
        background: var(--s1);
    }

    .nf-root .ppt {
        flex: 1;
        text-align: center;
        padding: 8px 4px;
        font-size: 10px;
        font-weight: 600;
        color: var(--tx3);
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: all .12s;
        white-space: nowrap;
    }

        .nf-root .ppt:hover {
            color: var(--tx2);
        }

        .nf-root .ppt.on {
            color: var(--acc);
            border-bottom-color: var(--acc);
            background: var(--s0);
        }

    /* Properties panel body */
    .nf-root .pp-body {
        flex: 1;
        overflow-y: auto;
        padding: 14px;
    }

    .nf-root .pp-section {
        margin-bottom: 18px;
    }

    .nf-root .pp-sec-lbl {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .7px;
        color: var(--tx3);
        font-family: var(--mono);
        margin-bottom: 8px;
    }
    .nf-root .pp-actions-list-wrap {
        margin-top: 10px;
    }

    .nf-root .action-row-main {
        flex: 1;
    }

    .nf-root .action-dot.ad-approve {
        background: var(--grn);
    }

    .nf-root .action-dot.ad-reject {
        background: var(--red);
    }

    .nf-root .action-dot.ad-return {
        background: var(--gld);
    }

    .nf-root .action-dot.ad-escalate {
        background: var(--pur);
    }

    .nf-root .action-dot.ad-info {
        background: var(--teal);
    }

    .nf-root .action-dot.ad-custom {
        background: var(--acc);
    }

    .nf-root .action-dot.style-ba {
        background: var(--ip-green);
    }

    .nf-root .action-dot.style-br {
        background: var(--ip-red);
    }

    .nf-root .action-dot.style-bu {
        background: var(--ip-gold);
    }

    .nf-root .action-dot.style-be {
        background: var(--ip-tx2);
    }
    .nf-root .pp-badge-todo {
        display: inline-block;
        margin-inline-start: 8px;
        padding: 1px 8px;
        border-radius: 10px;
        background: #fdf1dc;
        color: #9a6b12;
        font-size: 9px;
        font-family: var(--mono);
        font-weight: 500;
        letter-spacing: normal;
        text-transform: none;
        vertical-align: middle;
    }
    /* Form fields inside properties panel */
    .nf-root .fg {
        margin-bottom: 10px;
    }

    .nf-root .fl {
        font-size: 10px;
        font-weight: 700;
        color: var(--tx2);
        display: block;
        margin-bottom: 4px;
    }

    .nf-root .fi {
        width: 100%;
        background: var(--s1);
        border: 1.5px solid var(--b1);
        border-radius: 6px;
        padding: 7px 9px;
        font-size: 12px;
        font-family: var(--sans);
        color: var(--tx);
        outline: none;
        transition: border-color .15s;
    }

        .nf-root .fi:focus {
            border-color: var(--acc);
            box-shadow: 0 0 0 3px var(--acc-l);
        }

    .nf-root .fi-ta {
        resize: vertical;
        min-height: 64px;
        line-height: 1.5;
    }

    .nf-root .fi-sel {
        appearance: auto;
        cursor: pointer;
    }

    .nf-root .mono {
        font-family: var(--mono);
    }

    /* Toggle rows */
    .nf-root .tog-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .nf-root .tog-label {
        font-size: 11px;
        color: var(--tx2);
    }

    .nf-root .toggle {
        width: 32px;
        height: 18px;
        border-radius: 9px;
        background: var(--b2);
        cursor: pointer;
        position: relative;
        flex-shrink: 0;
        transition: background .2s;
    }

        .nf-root .toggle::after {
            content: '';
            position: absolute;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #fff;
            top: 2px;
            left: 2px;
            transition: transform .2s;
            box-shadow: 0 1px 3px rgba(0,0,0,.2);
        }

        .nf-root .toggle.on {
            background: var(--acc);
        }

            .nf-root .toggle.on::after {
                transform: translateX(14px);
            }

    .nf-root .mt4 {
        margin-top: 4px;
    }

    .nf-root .mt8 {
        margin-top: 8px;
    }

    .nf-root .help-text {
        font-size: 10px;
        color: var(--tx3);
        line-height: 1.5;
    }

    .nf-root .add-link {
        font-size: 11px;
        color: var(--acc);
        cursor: pointer;
        margin-top: 8px;
        display: inline-block;
    }

        .nf-root .add-link:hover {
            text-decoration: underline;
        }

    .nf-root .req {
        color: var(--red);
    }

    /* SLA panel */
    .nf-root .sla-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
    }

    .nf-root .sla-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .nf-root .sla-info {
        font-size: 11px;
        color: var(--tx2);
    }

    /* Assignment panel */
    .nf-root .assign-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: var(--acc-l);
        border: 1px solid var(--acc-m);
        border-radius: 20px;
        padding: 3px 10px;
        font-size: 11px;
        color: var(--acc);
        font-weight: 600;
        margin-bottom: 8px;
    }

    /* Actions panel */
    .nf-root .action-row {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px solid var(--b1);
    }

        .nf-root .action-row:last-child {
            border-bottom: none;
        }

    .nf-root .action-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .nf-root .action-name {
        font-size: 11px;
        font-weight: 600;
        color: var(--tx);
        font-family: var(--mono);
    }

    .nf-root .action-goes {
        font-size: 10px;
        color: var(--tx3);
        margin-top: 1px;
    }

    /* Variables panel */
    .nf-root .var-row {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 0;
        border-bottom: 1px solid var(--b1);
    }

        .nf-root .var-row:last-child {
            border-bottom: none;
        }

    .nf-root .var-name {
        font-size: 11px;
        font-weight: 600;
        color: var(--tx);
        font-family: var(--mono);
    }

    .nf-root .var-type {
        font-size: 9px;
        font-family: var(--mono);
        color: var(--pur);
        background: var(--pur-l);
        border: 1px solid var(--pur-m);
        padding: 1px 6px;
        border-radius: 10px;
        margin-top: 2px;
        display: inline-block;
    }

    .nf-root .var-desc {
        font-size: 10px;
        color: var(--tx3);
        margin-top: 2px;
    }

    /* ══════════════════════════════════════════════════════════
   BOTTOM PANEL
══════════════════════════════════════════════════════════ */
    .nf-root .bottom-panel {
        height: 220px;
        flex-shrink: 0;
        background: var(--s0);
        border-top: 1px solid var(--b1);
        display: flex;
        flex-direction: column;
        box-shadow: 0 -2px 10px rgba(0,0,0,.04);
    }

    .nf-root .bp-tabs {
        display: flex;
        border-bottom: 1px solid var(--b1);
        background: var(--s1);
        flex-shrink: 0;
    }

    .nf-root .bpt {
        padding: 8px 14px;
        font-size: 11px;
        font-weight: 500;
        color: var(--tx3);
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: all .12s;
        display: flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
    }

        .nf-root .bpt:hover {
            color: var(--tx2);
        }

        .nf-root .bpt.on {
            color: var(--acc);
            border-bottom-color: var(--acc);
            background: var(--s0);
        }

    .nf-root .bp-bdg {
        font-size: 9px;
        font-family: var(--mono);
        padding: 1px 5px;
        border-radius: 8px;
        font-weight: 700;
    }

        .nf-root .bp-bdg.b {
            background: var(--acc-l);
            color: var(--acc);
            border: 1px solid var(--acc-m);
        }

        .nf-root .bp-bdg.g {
            background: var(--grn-l);
            color: var(--grn);
            border: 1px solid var(--grn-m);
        }

        .nf-root .bp-bdg.r {
            background: var(--red-l);
            color: var(--red);
            border: 1px solid var(--red-m);
        }

    .nf-root .bp-content {
        flex: 1;
        overflow: hidden;
        position: relative;
    }

    /* Workflow cards (Workflows tab) */
    .nf-root .wf-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100%;
    }

    .nf-root .wf-card {
        background: var(--s1);
        border: 1.5px solid var(--b1);
        border-radius: var(--r);
        padding: 6px 12px;
        cursor: pointer;
        transition: all .15s;
        display: flex;
        align-items: center;
        gap: 14px;
    }

        .nf-root .wf-card:hover {
            border-color: var(--b2);
            background: var(--s0);
            box-shadow: var(--sh);
        }

        .nf-root .wf-card.active {
            border-color: var(--acc-m);
            background: var(--acc-l);
        }

    .nf-root .wf-card-name {
        font-size: 12px;
        font-weight: 600;
        color: var(--tx);
        white-space: nowrap;
    }

    .nf-root .wf-card-key {
        font-size: 9px;
        font-family: var(--mono);
        color: var(--tx3);
        white-space: nowrap;
    }

    .nf-root .wf-card-meta {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-inline-start: auto;
    }

    .nf-root .wf-add {
        min-width: 120px;
        border: 1.5px dashed var(--b2);
        border-radius: var(--r);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px;
        cursor: pointer;
        color: var(--tx3);
        transition: all .15s;
        flex-shrink: 0;
        height: 72px;
    }

        .nf-root .wf-add:hover {
            border-color: var(--acc);
            color: var(--acc);
            background: var(--acc-l);
        }

    .nf-root .wf-add-ico {
        font-size: 20px;
        line-height: 1;
    }

    .nf-root .wf-add-lbl {
        font-size: 11px;
        font-weight: 500;
    }

    /* Data table (Instances, Audit Log, Variables, Exceptions tabs) */
    .nf-root .dt {
        width: 100%;
        border-collapse: collapse;
        font-size: 12px;
    }

        .nf-root .dt th {
            text-align: left;
            padding: 7px 12px;
            font-size: 9px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .5px;
            color: var(--tx3);
            font-family: var(--mono);
            border-bottom: 1px solid var(--b1);
            background: var(--s1);
            position: sticky;
            top: 0;
            z-index: 2;
        }

        .nf-root .dt td {
            padding: 7px 12px;
            border-bottom: 1px solid var(--b1);
            color: var(--tx);
            vertical-align: middle;
        }

        .nf-root .dt tr:hover td {
            background: var(--s1);
        }

        .nf-root .dt tr:last-child td {
            border-bottom: none;
        }

    /* Progress dots row in instances table */
    .nf-root .prog {
        display: flex;
        gap: 3px;
        align-items: center;
    }

    .nf-root .ps {
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

        .nf-root .ps.d {
            background: var(--acc);
        }
        /* done */
        .nf-root .ps.e {
            background: var(--red);
        }
        /* error / current breached */
        .nf-root .ps.w {
            background: var(--b2);
        }
    /* waiting */

    /* ══════════════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════════════ */
    .nf-root .modal-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.35);
        z-index: 800;
        align-items: center;
        justify-content: center;
    }

        .nf-root .modal-overlay.open {
            display: flex;
        }

    .nf-root .modal {
        background: var(--s0);
        border: 1px solid var(--b1);
        border-radius: var(--rl);
        width: 520px;
        max-width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
        box-shadow: var(--sh-lg);
    }

    .nf-root .modal-head {
        padding: 16px 20px;
        border-bottom: 1px solid var(--b1);
        background: var(--s1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .nf-root .modal-title {
        font-family: var(--head);
        font-size: 16px;
        font-weight: 700;
        color: var(--tx);
    }

    .nf-root .modal-close {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--tx3);
        font-size: 14px;
        transition: all .12s;
    }

        .nf-root .modal-close:hover {
            background: var(--s2);
            color: var(--tx);
        }

    .nf-root .modal-body {
        padding: 20px;
    }

    .nf-root .modal-foot {
        padding: 14px 20px;
        border-top: 1px solid var(--b1);
        background: var(--s1);
        display: flex;
        gap: 8px;
        justify-content: flex-end;
        position: sticky;
        bottom: 0;
    }

    /* ══════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════ */
    .nf-root .toast {
        position: fixed;
        bottom: 260px; /* sits above bottom panel */
        left: 50%;
        transform: translateX(-50%);
        background: var(--tx);
        color: #fff;
        padding: 9px 18px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 500;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s;
        z-index: 900;
        white-space: nowrap;
        box-shadow: 0 4px 16px rgba(0,0,0,.18);
    }

        .nf-root .toast.show {
            opacity: 1;
        }

            .nf-root .toast.show.s {
                background: var(--grn);
            }

            .nf-root .toast.show.e {
                background: var(--red);
            }

            .nf-root .toast.show.w {
                background: var(--gld);
            }

    /* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */
    .nf-root .nf-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: var(--tx3);
        gap: 10px;
    }

    .nf-root .nf-empty-icon {
        font-size: 40px;
    }

    .nf-root .nf-empty-title {
        font-family: var(--head);
        font-size: 18px;
        color: var(--tx);
    }

    .nf-root .nf-empty-sub {
        font-size: 13px;
    }

.stat-val {
    font-family: var(--ip-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--ip-tx)
}

.stat-lbl {
    font-size: 10px;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(45,106,79,.4)
    }

    50% {
        box-shadow: 0 0 0 5px rgba(45,106,79,0)
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(194,68,10,.4)
    }

    50% {
        box-shadow: 0 0 0 5px rgba(194,68,10,0)
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--mono);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .3px;
    border: 1px solid transparent
}

.badge-gr {
    background: var(--gr-l);
    color: var(--gr);
    border-color: var(--gr-m)
}

.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--tx3)
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 800;
    align-items: center;
    justify-content: center
}

    .modal-overlay.open {
        display: flex
    }

.modal-box {
    background: var(--s0);
    border: 1px solid var(--b1);
    border-radius: var(--r-xl);
    width: 480px;
    max-width: 95vw;
    box-shadow: var(--sh-lg);
    overflow: hidden
}

.modal-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--b1);
    background: var(--s1);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.modal-title {
    font-family: var(--head);
    font-size: 16px;
    font-weight: 600;
    color: var(--tx)
}

.modal-body {
    padding: 20px
}

.modal-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--b1);
    background: var(--s1);
    display: flex;
    gap: 8px;
    justify-content: flex-end
}

.col-span-2 {
    grid-column: span 2
}

.av-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    border-radius: 50%
}

/* Map */
#homeMap {
    height: 200px;
    border-radius: 12px;
    border: 1.5px solid var(--ip-b1);
    margin-bottom: 12px;
    z-index: 1
}

.toggle {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0
}

    .toggle input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute
    }

/* Buttons */
/* Stats */
.stat-box {
    text-align: center;
    padding: 12px;
    background: var(--ip-s1);
    border-radius: 12px;
    border: 1px solid var(--ip-b1)
}
/* Badge */
.badge-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    font-family: monospace;
    white-space: nowrap;
    border: 1px solid transparent
}

@media(max-width:900px) {

    .col-span-2 {
        grid-column: span 1
    }
}
.u-shell {
    font-family: var(--ip-body);
    color: var(--ip-tx);
}

/* ── Page header ── */
.u-ph {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.u-ph-title {
    font-family: var(--ip-head);
    font-size: 24px;
    font-weight: 700;
    color: var(--ip-tx);
    letter-spacing: -.3px;
}

.u-ph-sub {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-top: 3px;
}

.u-ph-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Stats ── */
.u-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.u-stat {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 12px 18px;
    box-shadow: var(--ip-sh);
    flex: 1;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

    .u-stat::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--stat-c, var(--ip-acc));
    }

.u-stat-val {
    font-family: var(--ip-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--ip-tx);
}

.u-stat-lbl {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 2px;
}

/* ── Toolbar ── */
.u-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.u-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

    .u-search input {
        width: 100%;
        padding: 8px 12px 8px 32px;
        background: var(--ip-s0);
        border: 1.5px solid var(--ip-b1);
        border-radius: var(--ip-r);
        font-size: 13px;
        font-family: var(--ip-body);
        color: var(--ip-tx);
        outline: none;
        transition: border .15s;
    }

        .u-search input:focus {
            border-color: var(--ip-acc);
        }

.u-search-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--ip-tx3);
    pointer-events: none;
}

.u-sel {
    background: var(--ip-s0);
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r);
    padding: 8px 11px;
    font-size: 13px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    outline: none;
    cursor: pointer;
}

.u-spacer {
    flex: 1;
}

/* ── Table ── */
.u-tbl-wrap {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-xl);
    overflow: hidden;
    box-shadow: var(--ip-sh);
}

.u-tbl {
    width: 100%;
    border-collapse: collapse;
}

    .u-tbl thead tr {
        background: var(--ip-s1);
        border-bottom: 1px solid var(--ip-b1);
    }

    .u-tbl th {
        padding: 10px 14px;
        font-size: 11px;
        font-weight: 700;
        color: var(--ip-tx3);
        text-transform: uppercase;
        letter-spacing: .5px;
        text-align: left;
        white-space: nowrap;
    }

    .u-tbl tbody tr {
        border-bottom: 1px solid var(--ip-b1);
        transition: background .1s;
    }

        .u-tbl tbody tr:last-child {
            border-bottom: none;
        }

        .u-tbl tbody tr:hover {
            background: var(--ip-s1);
        }

    .u-tbl td {
        padding: 11px 14px;
        font-size: 13px;
        color: var(--ip-tx);
        vertical-align: middle;
    }

/* ── Avatar ── */
.u-av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ip-mono);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Badges ── */
.u-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--ip-mono);
    white-space: nowrap;
}

    .u-badge.green {
        background: var(--ip-acc-l);
        color: var(--ip-acc);
    }

    .u-badge.red {
        background: var(--ip-red-l);
        color: var(--ip-red);
    }

    .u-badge.blue {
        background: var(--ip-blue-l);
        color: var(--ip-blue);
    }

    .u-badge.gold {
        background: var(--ip-gold-l);
        color: var(--ip-gold);
    }

    .u-badge.purple {
        background: var(--ip-purple-l);
        color: var(--ip-purple);
    }

    .u-badge.gray {
        background: var(--ip-s2);
        color: var(--ip-tx3);
    }

.u-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ── Approval cell ── */
.u-approval-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.u-approval-toggle {
    position: relative;
    display: inline-flex;
    width: 32px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

    .u-approval-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

.u-at-track {
    position: absolute;
    inset: 0;
    background: var(--ip-b2);
    border-radius: 20px;
    transition: background .2s;
}

.u-at-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.u-approval-toggle input:checked ~ .u-at-track {
    background: var(--ip-acc);
}

.u-approval-toggle input:checked ~ .u-at-thumb {
    transform: translateX(14px);
}

.u-level-sel {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-sm);
    padding: 4px 8px;
    font-size: 11px;
    font-family: var(--ip-mono);
    color: var(--ip-tx2);
    outline: none;
    cursor: pointer;
}

    .u-level-sel:disabled {
        opacity: .4;
        cursor: default;
    }

/* ── Action buttons ── */
.u-actions {
    display: flex;
    gap: 6px;
}

.u-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: var(--ip-r-sm);
    border: 1.5px solid transparent;
    font-size: 12px;
    font-family: var(--ip-body);
    cursor: pointer;
    transition: all .14s;
    white-space: nowrap;
    text-decoration: none;
}

.u-btn-ghost {
    background: transparent;
    border-color: var(--ip-b1);
    color: var(--ip-tx2);
}

    .u-btn-ghost:hover {
        background: var(--ip-s1);
        color: var(--ip-tx);
    }

.u-btn-danger {
    background: var(--ip-red-l);
    border-color: var(--ip-red-m);
    color: var(--ip-red);
}

    .u-btn-danger:hover {
        background: var(--ip-red-m);
    }

.u-btn-primary {
    background: var(--ip-acc);
    border-color: var(--ip-acc);
    color: #fff;
}

    .u-btn-primary:hover {
        background: var(--ip-acc2);
    }

/* ── Modal ── */
.u-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

    .u-modal-overlay.open {
        display: flex;
    }

.u-modal {
    background: var(--ip-s0);
    border-radius: var(--ip-r-xl);
    width: 500px;
    max-width: 95vw;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--ip-sh-lg);
    animation: gsUp .2s ease;
}

.u-modal-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--ip-b1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ip-s1);
    border-radius: var(--ip-r-xl) var(--ip-r-xl) 0 0;
}

.u-modal-title {
    font-family: var(--ip-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ip-tx);
}

.u-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--ip-tx3);
}

.u-modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

.cu-tabs {
    display: flex;
    border-bottom: 2px solid var(--ip-b1);
    margin: -4px -4px 14px;
    gap: 0;
}

.cu-tab {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ip-tx3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .14s;
    white-space: nowrap;
}

    .cu-tab:hover {
        color: var(--ip-tx);
    }

    .cu-tab.active {
        color: var(--ip-acc);
        border-bottom-color: var(--ip-acc);
        font-weight: 600;
    }

.cu-panel {
    display: none;
}

    .cu-panel.active {
        display: block;
    }

.u-modal-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--ip-b1);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    background: var(--ip-s1);
    border-radius: 0 0 var(--ip-r-xl) var(--ip-r-xl);
}

.u-fg {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.u-fl {
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.u-fi {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r);
    padding: 8px 11px;
    font-size: 13px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    outline: none;
    transition: border .15s;
    width: 100%;
}

    .u-fi:focus {
        border-color: var(--ip-acc);
    }

.u-fsel {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r);
    padding: 8px 11px;
    font-size: 13px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    outline: none;
    width: 100%;
    cursor: pointer;
}

.u-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.u-divider {
    font-size: 10px;
    font-weight: 700;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 6px 0 4px;
    border-bottom: 1px solid var(--ip-b1);
    margin-bottom: 12px;
}

/* ── Approval section in modal ── */
.u-approval-box {
    background: var(--ip-acc-l);
    border: 1.5px solid var(--ip-acc-m);
    border-radius: var(--ip-r-lg);
    padding: 14px 16px;
}

.u-approval-box-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--ip-acc);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.u-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--ip-b1);
}

    .u-toggle-row:last-child {
        border-bottom: none;
    }

.u-tl {
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx);
}

.u-th {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 1px;
}

/* ── Toast ── */
.u-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ip-acc);
    color: #fff;
    border-radius: 30px;
    padding: 10px 22px;
    font-size: 13px;
    z-index: 999;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--ip-sh-lg);
}

    .u-toast.show {
        opacity: 1;
    }

.rm-page {
    padding: 24px 32px;
    max-width: 1600px;
    margin: 0 auto;
}

.rm-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.rm-title {
    font-family: 'Playfair Display',serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ip-tx);
    flex: 1;
}

.rm-sub {
    font-size: 13px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

/* Role selector tabs */
.role-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.role-tab {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--ip-b1);
    background: var(--ip-s1);
    color: var(--ip-tx2);
    font-family: 'DM Sans',sans-serif;
    transition: all .12s;
}

    .role-tab:hover {
        border-color: var(--ip-acc-m);
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

    .role-tab.active {
        background: var(--ip-acc);
        color: #fff;
        border-color: var(--ip-acc);
    }

/* Role actions */
.rm-role-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.rm-role-stats {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-left: auto;
}

/* Module groups */
.group-card {
    background: #fff;
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
}

.group-head {
    padding: 12px 18px;
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ip-tx3);
    font-family: 'DM Mono',monospace;
}

.group-count {
    font-size: 10px;
    color: var(--ip-tx3);
    background: var(--ip-s2);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
}

/* Module rows */
.module-row {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid var(--ip-s2);
    transition: background .1s;
}

    .module-row:last-child {
        border-bottom: none;
    }

    .module-row:hover {
        background: var(--ip-s1);
    }

.module-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--ip-s2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.module-info {
    flex: 1;
    margin-left: 12px;
    min-width: 0;
}

.module-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ip-tx);
}

.module-key {
    font-size: 10px;
    color: var(--ip-tx3);
    font-family: 'DM Mono',monospace;
    margin-top: 1px;
}

.module-access {
    flex-shrink: 0;
    margin-left: 16px;
}

/* Menu-management columns: show-in-menu checkbox, icon picker, category picker */
.module-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 18px;
    flex-shrink: 0;
}

.module-meta-chk {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--ip-tx3);
    cursor: pointer;
    white-space: nowrap;
}

    .module-meta-chk input {
        accent-color: var(--ip-acc2);
        cursor: pointer;
    }

.module-meta-icon-select,
.module-meta-cat-select {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    padding: 4px 8px;
    border: 1px solid var(--ip-s2);
    border-radius: 6px;
    background: #fff;
    color: var(--ip-tx);
    max-width: 160px;
}

.dd-icon i,
.module-icon i {
    font-size: 14px;
    line-height: 1;
}

/* Toggle switch */
.toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

    .toggle input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

.toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    cursor: pointer;
    background: var(--ip-b2);
    transition: background .2s;
}

    .toggle-slider:before {
        content: '';
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #fff;
        transition: transform .2s;
        box-shadow: 0 1px 3px rgba(0,0,0,.2);
    }

.toggle input:checked + .toggle-slider {
    background: var(--ip-acc);
}

    .toggle input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }

.toggle-lbl {
    font-size: 11px;
    font-weight: 600;
    width: 50px;
    color: var(--ip-tx3);
}

    .toggle-lbl.on {
        color: var(--ip-acc);
    }

/* No-permission state */
.no-perm-row {
    background: var(--ip-s1);
}

    .no-perm-row .module-name {
        color: var(--ip-tx3);
    }

/* Summary bar */
.summary-bar {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sum-item {
    text-align: center;
}

.sum-num {
    font-size: 18px;
    font-weight: 600;
    color: var(--ip-tx);
    font-family: 'DM Mono',monospace;
}

/* Toast */
.rm-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: var(--ip-tx);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transform: translateY(80px);
    opacity: 0;
    transition: all .25s;
    pointer-events: none;
}

    .rm-toast.show {
        transform: translateY(0);
        opacity: 1;
    }

    .rm-toast.success {
        border-left: 4px solid var(--ip-acc);
    }

    .rm-toast.error {
        border-left: 4px solid #c0392b;
    }
.int-page {
    padding: 28px 32px;
    max-width: 1500px;
    margin: 0 auto
}

.int-ph {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px
}

.int-pt {
    font-family: 'Playfair Display',serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ip-tx)
}

.int-ps {
    font-size: 13px;
    color: var(--ip-tx3);
    margin-top: 3px
}

.int-sb2 {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7
}

.int-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2e7d32;
    animation: iblink 2s infinite
}

@keyframes iblink {
    0%, 100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}
/* ── Configure modal ─────────────────────────────────────── */
.cfg-ov {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1000;
    align-items: flex-start;
    justify-content: flex-end
}

    .cfg-ov.op {
        display: flex
    }

.cfg-panel {
    background: #fff;
    width: 420px;
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid #e8e4dd;
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column
}

.cfg-head {
    padding: 20px;
    border-bottom: 1px solid #e8e4dd;
    display: flex;
    align-items: center;
    gap: 10px
}

.cfg-head-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: var(--ip-bg)
}

.cfg-head-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-tx);
    flex: 1
}

.cfg-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ip-tx3);
    font-size: 18px;
    padding: 4px;
    line-height: 1
}

    .cfg-close:hover {
        color: var(--ip-tx)
    }

.cfg-tabs {
    display: flex;
    border-bottom: 1px solid #e8e4dd;
    padding: 0 16px
}

.cfg-tab {
    padding: 10px 14px;
    font-size: 12px;
    color: var(--ip-tx2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-family: 'DM Sans',sans-serif;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none
}

    .cfg-tab.active {
        color: var(--ip-brand);
        border-bottom-color: var(--ip-brand);
        font-weight: 600
    }

.cfg-body {
    padding: 20px;
    flex: 1
}

.cfg-section {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: 'DM Mono',monospace;
    margin: 16px 0 8px
}

    .cfg-section:first-child {
        margin-top: 0
    }

.cfg-field {
    margin-bottom: 12px
}

.cfg-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--ip-tx2);
    margin-bottom: 4px
}

.cfg-input {
    width: 100%;
    background: var(--ip-s1);
    border: 1px solid #e8e4dd;
    border-radius: 7px;
    padding: 7px 10px;
    font-size: 12px;
    color: var(--ip-tx);
    font-family: 'DM Sans',sans-serif;
    outline: none;
    box-sizing: border-box
}

    .cfg-input:focus {
        border-color: var(--ip-brand)
    }

.cfg-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--ip-bg)
}

.cfg-toggle-label {
    font-size: 12px;
    color: var(--ip-tx)
}

.cfg-toggle-sub {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 2px
}

.cfg-save {
    width: 100%;
    padding: 10px;
    background: var(--ip-brand);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans',sans-serif;
    margin-top: 16px
}

    .cfg-save:hover {
        background: #a03508
    }

    .cfg-save.testing {
        background: #2e7d32
    }

.cfg-msg {
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
    min-height: 18px
}
/* ── Event checkboxes ──────────────────────────────────────── */
.evt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px
}

.evt-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid #e8e4dd;
    border-radius: 7px;
    font-size: 11px;
    color: var(--ip-tx);
    cursor: pointer;
    background: var(--ip-s1)
}

    .evt-item:hover {
        border-color: var(--ip-brand)
    }

    .evt-item input {
        accent-color: var(--ip-brand)
    }
/* ── Field mapping canvas ─────────────────────────────────── */
.map-canvas {
    margin-top: 8px
}

.map-row {
    display: grid;
    grid-template-columns: 1fr 28px 1fr 28px;
    gap: 4px;
    align-items: center;
    margin-bottom: 6px
}

.map-src {
    font-size: 10px;
    font-family: 'DM Mono',monospace;
    color: #534AB7;
    background: #ede7f6;
    border-radius: 4px;
    padding: 4px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #d5cfef
}

.map-tgt {
    font-size: 10px;
    font-family: 'DM Mono',monospace;
    color: #0F6E56;
    background: #e8f5e9;
    border-radius: 4px;
    padding: 4px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #a5d6a7
}

.map-arrow {
    text-align: center;
    color: var(--ip-tx3);
    font-size: 11px
}

.map-del {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ip-tx3);
    font-size: 14px;
    padding: 0 2px
}

    .map-del:hover {
        color: #c0392b
    }

.map-add {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ip-tx2);
    cursor: pointer;
    padding: 6px 0;
    border: none;
    background: none;
    font-family: 'DM Sans',sans-serif
}

    .map-add:hover {
        color: var(--ip-brand)
    }

.map-empty {
    font-size: 11px;
    color: var(--ip-tx3);
    text-align: center;
    padding: 12px 0
}

.discover-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #1565c0;
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'DM Sans',sans-serif;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px
}

    .discover-btn:hover {
        background: #bbdefb
    }

.transform-badge {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: 'DM Mono',monospace;
    cursor: pointer
}

.tp-none {
    background: #e3f2fd;
    color: #1565c0
}

.tp-lower {
    background: #ede7f6;
    color: #534AB7
}

.tp-bool {
    background: #fff3e0;
    color: #e65100
}

.tp-lookup {
    background: #e8f5e9;
    color: #2e7d32
}

.tp-const {
    background: #f5f5f5;
    color: #616161
}

.tp-split {
    background: #fce4ec;
    color: #c62828
}

.int-stats {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 10px;
    margin-bottom: 20px
}

.ist {
    background: #fff;
    border: 1px solid #e8e4dd;
    border-radius: 10px;
    padding: 12px 16px
}

.ist-l {
    font-size: 10px;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: 'DM Mono',monospace;
    margin-bottom: 4px
}

.ist-v {
    font-size: 22px;
    font-weight: 600;
    color: var(--ip-tx);
    font-family: 'DM Mono',monospace
}

    .ist-v.g {
        color: #1D9E75
    }

.int-grid {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 0;
    background: #fff;
    border: 1px solid #e8e4dd;
    border-radius: 12px;
    overflow: hidden;
    min-height: 640px
}

.int-sb {
    background: var(--ip-s1);
    border-right: 1px solid #e8e4dd;
    padding: 14px 0;
    overflow-y: auto;
    max-height: 680px
}

.int-sbt {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 14px 6px;
    font-family: 'DM Mono',monospace
}

.int-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 12px;
    color: var(--ip-tx2);
    transition: background .15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'DM Sans',sans-serif;
    border-right: 2px solid transparent
}

    .int-cat:hover {
        background: #fff;
        color: var(--ip-tx)
    }

    .int-cat.active {
        background: #fff;
        color: var(--ip-brand);
        font-weight: 600;
        border-right-color: var(--ip-brand)
    }

.int-cc {
    margin-left: auto;
    font-size: 10px;
    background: #e8e4dd;
    color: var(--ip-tx2);
    border-radius: 8px;
    padding: 1px 6px;
    font-family: 'DM Mono',monospace
}

.int-main {
    padding: 16px;
    overflow-y: auto;
    max-height: 680px
}

.int-mh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px
}

.int-mt {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-tx)
}

.int-srch {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--ip-s1);
    border: 1px solid #e8e4dd;
    border-radius: 8px;
    padding: 5px 10px;
    width: 190px
}

    .int-srch input {
        border: none;
        background: none;
        font-size: 12px;
        color: var(--ip-tx);
        font-family: 'DM Sans',sans-serif;
        outline: none;
        width: 100%
    }

.int-spoke {
    border: 1px solid #e8e4dd;
    border-radius: 8px;
    margin-bottom: 7px;
    overflow: hidden;
    background: #fff
}

.int-sh {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background .15s
}

    .int-sh:hover {
        background: var(--ip-s1)
    }

.int-spoke.sel .int-sh {
    background: #fff8f5;
    border-bottom: 1px solid #e8e4dd
}

.int-si {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0
}

.int-sn {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx)
}

.int-sd {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 1px
}

.int-sm {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px
}

.int-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 12px
}

.pill-av {
    background: #f1efe8;
    color: var(--ip-tx2)
}

.int-chev {
    font-size: 12px;
    color: var(--ip-tx3);
    transition: transform .2s
}

    .int-chev.op {
        transform: rotate(180deg)
    }

.int-ap {
    display: none;
    padding: 10px 12px 12px 54px;
    border-top: 1px solid #f0ece6
}

    .int-ap.op {
        display: block
    }

.int-al {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: 'DM Mono',monospace;
    margin-bottom: 6px
}

.int-ag {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 5px
}

.int-af {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid #e8e4dd;
    border-radius: 7px;
    background: var(--ip-s1);
    cursor: pointer;
    transition: border-color .15s
}

    .int-af:hover {
        border-color: var(--ip-brand)
    }

    .int-af.af-sel {
        border-color: var(--ip-brand);
        background: #fff8f5
    }

.int-dir {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
    font-family: 'DM Mono',monospace
}

.di {
    background: #e8f5e9;
    color: #2e7d32
}

.do {
    background: #e3f2fd;
    color: #1565c0
}

.db {
    background: #ede7f6;
    color: #4527a0
}

.int-atext {
    font-size: 11px;
    color: var(--ip-tx);
    line-height: 1.4
}

.int-atrig {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 1px
}

.int-dp {
    background: var(--ip-s1);
    border-left: 1px solid #e8e4dd;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 680px
}

.int-dh {
    padding: 14px 16px;
    border-bottom: 1px solid #e8e4dd
}

.int-dn {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-tx);
    margin-bottom: 2px
}

.int-dsub {
    font-size: 11px;
    color: var(--ip-tx3)
}

.int-ds {
    padding: 10px 14px;
    border-bottom: 1px solid #e8e4dd
}

.int-dl {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: 'DM Mono',monospace;
    margin-bottom: 5px
}

.int-dv {
    font-size: 11px;
    color: var(--ip-tx2);
    font-family: 'DM Mono',monospace;
    word-break: break-all
}

    .int-dv.n {
        font-family: 'DM Sans',sans-serif;
        font-size: 12px;
        color: var(--ip-tx)
    }

.int-tr {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.int-tog {
    width: 34px;
    height: 19px;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background .2s;
    border: none
}

    .int-tog.on {
        background: #1D9E75
    }

    .int-tog.off {
        background: #b4b2a9
    }

    .int-tog::after {
        content: '';
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #fff;
        position: absolute;
        top: 2px;
        left: 2px;
        transition: transform .2s
    }

    .int-tog.on::after {
        transform: translateX(15px)
    }

.int-tb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    border: 1px solid #e8e4dd;
    border-radius: 7px;
    font-size: 12px;
    color: var(--ip-tx2);
    cursor: pointer;
    background: #fff;
    transition: all .15s;
    font-family: 'DM Sans',sans-serif
}

    .int-tb:hover {
        background: var(--ip-s1);
        border-color: var(--ip-tx3)
    }

    .int-tb.ok {
        color: #2e7d32;
        border-color: #81c784;
        background: #e8f5e9
    }

.int-rb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: var(--ip-brand);
    color: #fff;
    border: none;
    transition: background .15s;
    font-family: 'DM Sans',sans-serif
}

    .int-rb:hover {
        background: #a03508
    }

.int-fm {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px
}

.int-fr {
    display: grid;
    grid-template-columns: 1fr 16px 1fr;
    gap: 3px;
    align-items: center
}

.int-fs {
    font-size: 10px;
    font-family: 'DM Mono',monospace;
    color: #534AB7;
    background: #ede7f6;
    border-radius: 3px;
    padding: 3px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.int-fa {
    font-size: 11px;
    color: var(--ip-tx3);
    text-align: center
}

.int-fd {
    font-size: 10px;
    font-family: 'DM Mono',monospace;
    color: #0F6E56;
    background: #e8f5e9;
    border-radius: 3px;
    padding: 3px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.int-feed {
    padding: 12px 14px
}

.int-ft {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: 'DM Mono',monospace;
    margin-bottom: 7px
}

.int-fi {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    color: var(--ip-tx2);
    padding: 4px 0;
    border-bottom: 1px solid #f0ece6;
    animation: ifade .4s ease
}

@keyframes ifade {
    from {
        opacity: 0;
        transform: translateY(-3px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.int-ftime {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-left: auto;
    white-space: nowrap;
    font-family: 'DM Mono',monospace
}

.iov {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 3000;
    align-items: center;
    justify-content: center
}

    .iov.op {
        display: flex
    }

.iob {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 440px;
    max-width: 95vw
}

.iob-t {
    font-size: 15px;
    font-weight: 700;
    color: var(--ip-tx);
    margin-bottom: 3px
}

.iob-s {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-bottom: 16px
}

.ipb {
    height: 4px;
    background: #e8e4dd;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0 16px
}

.ipf {
    height: 100%;
    background: #1D9E75;
    border-radius: 2px;
    width: 0;
    transition: width .3s
}

.ipc {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
    margin-bottom: 16px
}

.ipc-item {
    background: var(--ip-s1);
    border-radius: 8px;
    padding: 10px;
    text-align: center
}

.ipc-v {
    font-size: 22px;
    font-weight: 700;
    color: var(--ip-tx);
    font-family: 'DM Mono',monospace
}

.ipc-l {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 2px
}

.ibtns {
    display: flex;
    gap: 8px
}

.ibcancel {
    flex: 1;
    padding: 9px;
    border: 1px solid #e8e4dd;
    border-radius: 7px;
    font-size: 12px;
    color: var(--ip-tx2);
    cursor: pointer;
    background: #fff;
    font-family: 'DM Sans',sans-serif
}

.ibconfirm {
    flex: 2;
    padding: 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: var(--ip-brand);
    border: none;
    font-family: 'DM Sans',sans-serif
}

    .ibconfirm:disabled {
        background: var(--ip-b1);
        color: var(--ip-tx3);
        cursor: not-allowed
    }

.mcat-sep {
    font-size: 10px;
    font-weight: 600;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 10px 14px 3px;
    font-family: 'DM Mono',monospace
}

.fi-sel {
    background: var(--ip-s0);
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r);
    padding: 8px 11px;
    font-size: 13px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    outline: none;
    cursor: pointer;
}

.fi-btn-ghost {
    background: var(--ip-s0);
    color: var(--ip-tx2);
    border-color: var(--ip-b1);
}

    .fi-btn-ghost:hover {
        background: var(--ip-s1);
        color: var(--ip-tx);
    }

.fc-shell {
    font-family: var(--ip-body);
    color: var(--ip-tx);
    background: var(--ip-bg);
    min-height: 100vh
}

.fc-header {
    background: var(--ip-s0);
    border-bottom: 1px solid var(--ip-b1);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--ip-sh)
}

.fc-title {
    font-family: var(--ip-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--ip-tx)
}

.fc-panel {
    display: none
}

    .fc-panel.active {
        display: block
    }

.fc-fg {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.fc-fl {
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .4px
}

    .fc-fl .req {
        color: var(--ip-red);
        margin-left: 2px
    }

.fc-fi {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r);
    padding: 9px 12px;
    font-size: 13px;
    font-family: var(--ip-body);
    color: var(--ip-tx);
    outline: none;
    transition: border .15s;
    width: 100%
}

    .fc-fi:focus {
        border-color: var(--ip-acc);
        background: var(--ip-s0)
    }

.fc-toggle {
    position: relative;
    display: inline-flex;
    width: 36px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0
}

    .fc-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute
    }

#fc-map {
    height: 260px;
    border-radius: var(--ip-r-lg);
    overflow: hidden;
    border: 1px solid var(--ip-b1);
    margin-top: 12px
}

.fc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--ip-r);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ip-body);
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .15s;
    text-decoration: none
}

.fc-btn-primary {
    background: var(--ip-acc);
    color: #fff;
    border-color: var(--ip-acc)
}

    .fc-btn-primary:hover {
        background: var(--ip-acc2)
    }

.fc-btn-ghost {
    background: var(--ip-s0);
    color: var(--ip-tx2);
    border-color: var(--ip-b1)
}

    .fc-btn-ghost:hover {
        background: var(--ip-s1);
        color: var(--ip-tx)
    }

.ta {
    font-size: 11px;
    color: var(--ip-tx2);
    margin-top: 2px
}

.tr {
    font-family: 'DM Mono',monospace;
    font-size: 10px;
    color: #9ca3af;
    margin-top: 1px
}

.fb-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
}

.fb-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

    .fb-topbar h1 {
        font-size: 20px;
        font-weight: 700;
        color: var(--ip-tx);
        margin: 0;
        flex: 1;
    }

    .fb-topbar p {
        font-size: 13px;
        color: var(--ip-tx3);
        margin: 0;
    }

.lt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.lt-card {
    background: #fff;
    border: 1px solid var(--ip-b1);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .lt-card:hover {
        border-color: var(--ip-acc-m);
    }

.lt-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.lt-icon-grn {
    background: var(--ip-acc-l);
}

.lt-icon-gry {
    background: var(--ip-s2);
}

.lt-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-tx);
}

.lt-sub {
    font-size: 12px;
    color: var(--ip-tx3);
    margin-top: 2px;
}

.lt-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    width: fit-content;
}

.lt-published {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
    border: 1px solid var(--ip-acc-m);
}

.lt-draft {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border: 1px solid var(--ip-gold-m);
}

.lt-none {
    background: var(--ip-s2);
    color: var(--ip-tx3);
    border: 1px solid var(--ip-b1);
}

.lt-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-edit {
    flex: 1;
    text-align: center;
    background: var(--ip-acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

    .btn-edit:hover {
        background: var(--ip-acc2);
        color: #fff;
    }

.btn-new {
    flex: 1;
    text-align: center;
    background: var(--ip-s2);
    color: var(--ip-tx2);
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

    .btn-new:hover {
        border-color: var(--ip-acc);
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

.lt-meta {
    font-size: 11px;
    color: var(--ip-tx3);
}
.re-page {
    padding: 24px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.re-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.re-title {
    font-family: 'Playfair Display',serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ip-tx);
    flex: 1;
}

.re-sub {
    font-size: 13px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

/* Stats bar */
.re-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.rst {
    background: #fff;
    border: 1px solid var(--ip-b1);
    border-radius: 10px;
    padding: 12px 16px;
}

.rst-l {
    font-size: 10px;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: 'DM Mono',monospace;
    margin-bottom: 4px;
}

.rst-v {
    font-size: 22px;
    font-weight: 600;
    color: var(--ip-tx);
    font-family: 'DM Mono',monospace;
}

/* Rule cards */
.rule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.re.rule-card {
    background: #fff;
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .12s;
}

.re-rule-card:hover {
    border-color: var(--ip-acc-m);
}

.re-rule-card.inactive {
    opacity: .6;
}

.rule-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.re-rule-card.expanded .rule-head {
    border-bottom-color: var(--ip-b1);
}

.rule-order {
    font-size: 10px;
    font-family: 'DM Mono',monospace;
    color: var(--ip-tx3);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.rule-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.rule-info {
    flex: 1;
    min-width: 0;
}

.rule-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ip-tx);
}

.rule-desc {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rule-meta {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.rule-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.rb-active {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
}

.rb-inactive {
    background: var(--ip-s2);
    color: var(--ip-tx3);
}

.rb-term {
    background: #ede7f6;
    color: #534AB7;
}

.rb-scope {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
}

/* Rule actions bar */
.rule-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
    align-items: center;
    flex-shrink: 0;
}

.ra-btn {
    background: none;
    border: 1px solid var(--ip-b1);
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 11px;
    color: var(--ip-tx2);
    cursor: pointer;
    font-family: 'DM Sans',sans-serif;
    transition: all .12s;
}

    .ra-btn:hover {
        border-color: var(--ip-acc);
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

    .ra-btn.danger:hover {
        border-color: var(--ip-red);
        color: var(--ip-red);
        background: var(--ip-red-l);
    }

.ra-tog {
    width: 34px;
    height: 18px;
    position: relative;
    flex-shrink: 0;
}

    .ra-tog input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

.ra-tog-sl {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: var(--ip-b2);
    cursor: pointer;
    transition: .2s;
}

    .ra-tog-sl:before {
        content: '';
        position: absolute;
        height: 12px;
        width: 12px;
        left: 3px;
        top: 3px;
        border-radius: 50%;
        background: #fff;
        transition: .2s;
    }

.ra-tog input:checked + .ra-tog-sl {
    background: var(--ip-acc);
}

    .ra-tog input:checked + .ra-tog-sl:before {
        transform: translateX(16px);
    }

/* Expanded body */
.rule-body {
    padding: 16px 18px;
    display: none;
}

.re-rule-card.expanded .rule-body {
    display: block;
}

.rb-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ip-tx3);
    font-family: 'DM Mono',monospace;
    margin: 14px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ip-b1);
}

    .rb-section:first-child {
        margin-top: 0;
    }

/* Condition rows */
.cond-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.cond-field {
    font-family: 'DM Mono',monospace;
    color: #534AB7;
    font-size: 11px;
    background: #ede7f6;
    padding: 2px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}

.cond-op {
    color: var(--ip-tx3);
    font-size: 11px;
    flex-shrink: 0;
}

.cond-val {
    color: var(--ip-tx);
    font-weight: 500;
    flex: 1;
}

.cond-del {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ip-tx3);
    font-size: 14px;
    padding: 2px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}

    .cond-del:hover {
        color: var(--ip-red);
        background: var(--ip-red-l);
    }

/* Action rows */
.act-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.act-type {
    font-family: 'DM Mono',monospace;
    color: #0F6E56;
    font-size: 11px;
    background: #e8f5e9;
    padding: 2px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}

.act-val {
    color: var(--ip-tx);
    flex: 1;
}

.act-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* Add buttons */
.add-row-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--ip-tx3);
    cursor: pointer;
    padding: 5px 0;
    background: none;
    border: none;
    font-family: 'DM Sans',sans-serif;
}

    .add-row-btn:hover {
        color: var(--ip-acc);
    }

/* Inline editor */
.inline-ed {
    background: var(--ip-acc-l);
    border: 1px solid var(--ip-acc-m);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.ie-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ie-fg {
    margin-bottom: 8px;
}

.ie-lbl {
    font-size: 10px;
    font-weight: 500;
    color: var(--ip-tx2);
    margin-bottom: 3px;
    display: block;
}

.ie-inp {
    width: 100%;
    background: #fff;
    border: 1px solid var(--ip-acc-m);
    border-radius: 6px;
    padding: 6px 9px;
    font-size: 12px;
    color: var(--ip-tx);
    font-family: 'DM Sans',sans-serif;
    outline: none;
    box-sizing: border-box;
}

    .ie-inp:focus {
        border-color: var(--ip-acc);
    }

.ie-btns {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.ie-save {
    background: var(--ip-acc);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.ie-cancel {
    background: none;
    border: 1px solid var(--ip-b1);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 11px;
    color: var(--ip-tx2);
    cursor: pointer;
}

/* Test panel */
.test-panel {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 10px;
    padding: 16px 18px;
    margin-top: 20px;
}

    .test-panel h3 {
        font-size: 13px;
        font-weight: 600;
        color: var(--ip-tx);
        margin-bottom: 12px;
    }

.test-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
}

.test-result {
    background: #fff;
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 12px;
    font-size: 12px;
    display: none;
}

    .test-result.show {
        display: block;
    }

/* Toast */
.re-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: var(--ip-tx);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transform: translateY(80px);
    opacity: 0;
    transition: all .25s;
    pointer-events: none;
}

    .re-toast.show {
        transform: translateY(0);
        opacity: 1;
    }

    .re-toast.success {
        border-left: 4px solid var(--ip-acc);
    }

    .re-toast.error {
        border-left: 4px solid var(--ip-red);
    }
[dir="rtl"] .u-tbl th,
[dir="rtl"] .u-tbl td {
    text-align: right;
}

.stat-val {
    font-family: var(--ip-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--ip-tx)
}

.stat-lbl {
    font-size: 10px;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(45,106,79,.4)
    }

    50% {
        box-shadow: 0 0 0 5px rgba(45,106,79,0)
    }
}

/* ============================================================
   FILE: inspectpro.css
   ADD these styles at the END of the file
   ============================================================ */

/* ── Questionnaire Builder: Template list in sidebar ───────── */
.ip-nav-row {
    display: block;
    position: relative;
}

.ip-nav-row-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    transition: background .15s;
}

    .ip-nav-row-link:hover {
        background: var(--ip-hover);
    }

.ip-nav-row.active > .ip-nav-row-link {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
}

.ip-tpl-list {
    margin: 0 8px 6px 36px;
    border-left: 2px solid var(--ip-b1);
    padding-left: 10px;
}

.ip-tpl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--ip-t2);
    font-size: 12px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 2px;
}

    .ip-tpl-item:hover {
        background: var(--ip-hover);
        color: var(--ip-t1);
    }

    .ip-tpl-item.active {
        background: var(--ip-acc-l);
        color: var(--ip-acc);
        font-weight: 600;
    }

.ip-tpl-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ip-tpl-ver {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    flex-shrink: 0;
}

    .ip-tpl-ver.pub {
        background: #dcfce7;
        color: #16a34a;
    }

    .ip-tpl-ver.draft {
        background: #fef9c3;
        color: #92400e;
    }

/* ── Version badge next to title ────────────────────────────── */
.ip-ver-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    vertical-align: middle;
}

    .ip-ver-badge.pub {
        background: #dcfce7;
        color: #16a34a;
    }

    .ip-ver-badge.draft {
        background: #fef9c3;
        color: #92400e;
    }

/* ── Version picker dropdown ─────────────────────────────────── */
.ip-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ip-ver-picker select {
    padding: 6px 10px;
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    background: var(--ip-bg);
    color: var(--ip-t1);
    font-size: 13px;
    cursor: pointer;
}

/* ── Duplicate modal options ─────────────────────────────────── */
.ip-dup-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.ip-dup-opt {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 2px solid var(--ip-b1);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

    .ip-dup-opt:hover {
        border-color: var(--ip-acc);
    }

.ip-dup-ico {
    font-size: 28px;
    flex-shrink: 0;
}

.ip-dup-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.ip-dup-sub {
    font-size: 12px;
    color: var(--ip-t2);
    line-height: 1.4;
}

/* ── Settings modal danger zone ─────────────────────────────── */
.ip-danger-zone {
    border: 1px solid #fecaca;
    background: #fff5f5;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 8px;
}

.ip-danger-label {
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 8px;
}

/* (Batch UI-1) .ip-btn-danger is defined once, in the UI KIT section */

.ip-modal-hint {
    font-size: 13px;
    color: var(--ip-t2);
    margin-bottom: 4px;
}

/* ── Fix Bootstrap modal backdrop blocked by ip-shell z-index ── */

/* Force backdrop to appear above everything in the page */
.modal-backdrop {
    z-index: 1500 !important;
}

/* Force modal itself above the backdrop */
.modal {
    z-index: 1600 !important;
}

/* Nav dropdown must sit BELOW the modal stack */
.nav-dropdown-panel {
    z-index: 1030 !important;
}

/* ip-shell and ip-page must NOT create a stacking context that traps the modal */
.ip-shell,
.ip-page,
.ip-sidebar,
.ip-main {
    transform: none !important;
    filter: none !important;
    will-change: auto !important;
    isolation: auto !important;
}

.sec-score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--ip-b1)
}

    .sec-score-row:last-child {
        border-bottom: none
    }

.sec-score-name {
    font-size: 12px;
    color: var(--ip-tx2);
    width: 160px;
    flex-shrink: 0
}

.sec-score-bar {
    flex: 1;
    height: 7px;
    background: var(--ip-s2);
    border-radius: 4px;
    overflow: hidden
}

.sec-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s
}

.sec-score-pct {
    font-family: var(--ip-mono);
    font-size: 11px;
    font-weight: 700;
    width: 36px;
    text-align: right
}

@@keyframes wv {
    0%, 100% {
        transform: scaleY(1)
    }

    50% {
        transform: scaleY(.35)
    }
}

/* ════════════════════════════════════════════════════════════
   FORM BUILDER 2.0 — Designer (fb2-*)
   Appended block. The old fb-* classes (legacy builder) remain
   untouched until the legacy Edit view is retired.
   ════════════════════════════════════════════════════════════ */

/* ── Top bar ─────────────────────────────────────────────── */
.fb2-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ip-b1);
}

.fb2-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ip-tx);
    margin: 0;
}

.fb2-topbar-spacer {
    flex: 1;
}

.fb2-pill {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border: 1px solid var(--ip-gold-m);
}

.fb2-dirty {
    color: transparent;
    font-size: 14px;
    transition: color .15s;
}

.fb2-dirty-on {
    color: var(--ip-gold);
}

/* ── 3-pane shell ────────────────────────────────────────── */
.fb2-shell {
    display: grid;
    grid-template-columns: 232px 1fr 300px;
    height: calc(100vh - 130px);
    overflow: hidden;
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    background: var(--ip-s0);
}

/* ── Palette ─────────────────────────────────────────────── */
.fb2-palette {
    border-right: 1px solid var(--ip-b1);
    overflow-y: auto;
    padding: 12px;
    background: var(--ip-s0);
}

.fb2-pal-group {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ip-tx3);
    margin: 14px 0 8px;
}

    .fb2-pal-group:first-child {
        margin-top: 0;
    }

.fb2-pal-tile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--ip-b1);
    background: var(--ip-s0);
    margin-bottom: 5px;
    cursor: grab;
    font-size: 12px;
    color: var(--ip-tx2);
    transition: background .12s, border-color .12s;
    user-select: none;
}

    .fb2-pal-tile:hover {
        background: var(--ip-acc-l);
        color: var(--ip-acc);
        border-color: var(--ip-acc-m);
    }

    .fb2-pal-tile i {
        font-size: 15px;
        width: 18px;
        text-align: center;
    }

/* ── Canvas ──────────────────────────────────────────────── */
.fb2-canvas-wrap {
    overflow-y: auto;
    background: var(--ip-s1);
}

.fb2-canvas {
    padding: 20px;
    min-height: 100%;
}

.fb2-loading {
    color: var(--ip-tx3);
    font-size: 13px;
    text-align: center;
    padding: 48px 0;
}

.fb2-page {
    max-width: 860px;
    margin: 0 auto;
}

/* Drop areas */
.fb2-children {
    min-height: 34px;
    border-radius: 8px;
    padding: 4px;
    transition: background .12s;
}

.fb2-empty-page {
    min-height: 220px;
    border: 2px dashed var(--ip-b2);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .fb2-empty-page::after {
        content: 'Drag controls here to build your form';
        color: var(--ip-tx3);
        font-size: 13px;
    }

/* Container drop areas show a faint inset when empty */
.fb2-container > .fb2-children:empty {
    min-height: 40px;
    border: 1px dashed var(--ip-b2);
    background: var(--ip-s1);
}

/* ── Nodes ───────────────────────────────────────────────── */
.fb2-node {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 10px;
    margin-bottom: 8px;
    position: relative;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s;
}

    .fb2-node:hover {
        border-color: var(--ip-acc-m);
    }

    .fb2-node.fb2-selected {
        border-color: var(--ip-acc);
        box-shadow: 0 0 0 3px var(--ip-acc-l);
    }

.fb2-ghost {
    opacity: .35;
}

.fb2-node-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    font-size: 13px;
}

    .fb2-node-head i {
        color: var(--ip-tx3);
        font-size: 15px;
    }

.fb2-node-title {
    font-weight: 500;
    color: var(--ip-tx);
}

.fb2-req {
    color: var(--ip-red);
    margin-left: 2px;
}

.fb2-node-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--ip-tx3);
    background: var(--ip-s2);
    padding: 2px 7px;
    border-radius: 10px;
}

.fb2-node-sub {
    font-size: 11px;
    color: var(--ip-tx3);
    padding: 0 12px 9px 35px;
}

/* hover-revealed node actions */
.fb2-node-actions {
    margin-left: auto;
    display: none;
    gap: 2px;
}

.fb2-node:hover > .fb2-node-head .fb2-node-actions,
.fb2-node.fb2-selected > .fb2-node-head .fb2-node-actions {
    display: flex;
}

.fb2-act {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ip-tx3);
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 5px;
}

    .fb2-act:hover {
        color: var(--ip-acc);
        background: var(--ip-acc-l);
    }

    .fb2-act[data-act="del"]:hover {
        color: var(--ip-red);
        background: var(--ip-red-l);
    }

/* ── Containers ──────────────────────────────────────────── */
.fb2-container {
    background: var(--ip-s1);
}

    .fb2-container > .fb2-children {
        margin: 0 10px 10px;
    }

.fb2-c-section > .fb2-node-head {
    background: var(--ip-gold-l);
    border-bottom: 1px solid var(--ip-gold-m);
    border-radius: 10px 10px 0 0;
}

    .fb2-c-section > .fb2-node-head .fb2-node-title {
        color: var(--ip-gold);
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: .5px;
        font-weight: 700;
    }

.fb2-c-repeater > .fb2-node-head {
    background: var(--ip-blue-l);
    border-bottom: 1px solid var(--ip-blue-m);
    border-radius: 10px 10px 0 0;
}

/* Row → columns side by side */
.fb2-row-cols {
    align-items: stretch;
}

.fb2-c-column > .fb2-node-head {
    padding: 5px 10px;
    font-size: 11px;
}

/* ── Properties panel ────────────────────────────────────── */
.fb2-props {
    border-left: 1px solid var(--ip-b1);
    overflow-y: auto;
    padding: 16px;
    background: var(--ip-s0);
}

.fb2-props-empty {
    color: var(--ip-tx3);
    font-size: 13px;
    text-align: center;
    padding: 40px 12px;
}

    .fb2-props-empty i {
        font-size: 24px;
        display: block;
        margin-bottom: 8px;
    }

.fb2-prop-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ip-tx3);
    margin: 16px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ip-b1);
}

    .fb2-prop-section:first-child {
        margin-top: 0;
    }

.fb2-prop {
    margin-bottom: 12px;
}

.fb2-prop-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--ip-tx2);
    margin-bottom: 4px;
    display: block;
}

.fb2-prop-input {
    width: 100%;
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 6px;
    padding: 6px 9px;
    font-size: 12px;
    color: var(--ip-tx);
    font-family: var(--ip-body);
    outline: none;
}

    .fb2-prop-input:focus {
        border-color: var(--ip-acc);
    }

.fb2-prop-hint {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 3px;
}

.fb2-prop-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ip-tx2);
}

/* Button card — capacity warning (limit) */
.fb2-limit-values {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 2px 0 4px;
}

.fb2-limit-warn {
    color: var(--ip-warn, #b45309);
}

/* Record search — labels for list values */
.fb2-vl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0;
    font-size: 12px;
}

    .fb2-vl-table th {
        text-align: start;
        font-weight: 600;
        color: var(--ip-tx3);
        padding: 2px 4px;
    }

    .fb2-vl-table td {
        padding: 2px 4px;
    }

    .fb2-vl-table .fb2-prop-input {
        width: 100%;
    }

.fb2-vl-col {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    color: var(--ip-tx2);
}

/* ── Utility ─────────────────────────────────────────────── */
.fb2-hidden {
    display: none !important;
}
/* ════════════════════════════════════════════════════════════
   FORM BUILDER 2.0 — Runtime renderer (fbr-*)
   Shared by: PreviewV2, applicant portal, public link, embed.
   Appended after the fb2-* designer block.
   ════════════════════════════════════════════════════════════ */

/* ── Preview page chrome ─────────────────────────────────── */
.fbr-preview-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ip-b1);
}

.fbr-preview-stage {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 28px 16px;
    min-height: calc(100vh - 180px);
}

.fbr-preview-sheet {
    max-width: 760px;
    margin: 0 auto;
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    padding: 28px;
}

.fbr-submit-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--ip-b1);
}

.fbr-submit-msg {
    font-size: 12px;
    color: var(--ip-tx3);
}

.fbr-submit-ok {
    color: var(--ip-green);
}

.fbr-submit-err {
    color: var(--ip-red);
}

/* ── Form & fields ───────────────────────────────────────── */
.fbr-form {
    font-family: var(--ip-body);
}

.fbr-page-title {
    font-family: var(--ip-head);
    font-size: 18px;
    color: var(--ip-tx);
    margin-bottom: 16px;
}

.fbr-field {
    margin-bottom: 16px;
}

.fbr-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx2);
    margin-bottom: 5px;
}

.fbr-req {
    color: var(--ip-red);
}

.fbr-input {
    width: 100%;
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 13px;
    color: var(--ip-tx);
    font-family: var(--ip-body);
    outline: none;
    transition: border-color .12s;
}

    .fbr-input:focus {
        border-color: var(--ip-acc);
    }

.fbr-help {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

.fbr-error {
    font-size: 11px;
    color: var(--ip-red);
    margin-top: 4px;
    min-height: 0;
}

.fbr-invalid .fbr-input,
.fbr-invalid .fbr-signature-canvas {
    border-color: var(--ip-red);
}

/* ── Choice controls ─────────────────────────────────────── */
.fbr-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fbr-radio-item {
    font-size: 13px;
    color: var(--ip-tx);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.fbr-checkbox input,
.fbr-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--ip-acc);
    cursor: pointer;
}

/* ── Currency ────────────────────────────────────────────── */
.fbr-currency {
    display: flex;
    align-items: stretch;
}

.fbr-currency-symbol {
    background: var(--ip-s2);
    border: 1px solid var(--ip-b1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: var(--ip-tx2);
    display: flex;
    align-items: center;
}

.fbr-currency .fbr-input {
    border-radius: 0 8px 8px 0;
}

/* ── Signature ───────────────────────────────────────────── */
.fbr-signature-canvas {
    width: 100%;
    max-width: 420px;
    background: var(--ip-s1);
    border: 1px dashed var(--ip-b2);
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
}

.fbr-signature-clear {
    display: block;
    margin-top: 6px;
    background: none;
    border: 1px solid var(--ip-b1);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--ip-tx2);
    cursor: pointer;
}

    .fbr-signature-clear:hover {
        border-color: var(--ip-red);
        color: var(--ip-red);
    }

/* ── Rating ──────────────────────────────────────────────── */
.fbr-rating {
    display: flex;
    gap: 4px;
}

.fbr-star {
    font-size: 22px;
    color: var(--ip-b2);
    cursor: pointer;
    transition: color .1s;
}

    .fbr-star:hover,
    .fbr-star-on {
        color: var(--ip-gold);
    }

/* ── Display elements ────────────────────────────────────── */
.fbr-text-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-tx);
    margin-bottom: 10px;
}

.fbr-info {
    background: var(--ip-blue-l);
    border: 1px solid var(--ip-blue-m);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--ip-blue);
    margin-bottom: 16px;
}

.fbr-button {
    background: var(--ip-s2);
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--ip-tx);
    cursor: pointer;
    font-family: var(--ip-body);
}

/* ── Layout containers ───────────────────────────────────── */
.fbr-section {
    margin-bottom: 22px;
}

.fbr-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--ip-gold);
    background: var(--ip-gold-l);
    border: 1px solid var(--ip-gold-m);
    border-radius: 8px;
    padding: 7px 12px;
    margin-bottom: 14px;
}

.fbr-panel,
.fbr-card,
.fbr-groupbox {
    border: 1px solid var(--ip-b1);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--ip-s0);
}

.fbr-card {
    box-shadow: 0 1px 4px rgba(28,26,22,.06);
}

.fbr-panel-title,
.fbr-card-title,
.fbr-groupbox-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ip-tx);
    margin-bottom: 12px;
}

.fbr-row {
    display: flex;
    gap: 14px;
}

@media (max-width: 640px) {
    .fbr-row {
        flex-wrap: wrap;
    }
}

.fbr-column {
    flex: 1 1 0;
    min-width: 0;
}

/* ── Tabs ────────────────────────────────────────────────── */
.fbr-tabs {
    margin-bottom: 18px;
}

.fbr-tabs-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--ip-b1);
    margin-bottom: 14px;
}

.fbr-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx3);
    cursor: pointer;
    font-family: var(--ip-body);
}

    .fbr-tab-btn.fbr-active {
        color: var(--ip-acc);
        border-bottom-color: var(--ip-acc);
    }

/* ── Accordion ───────────────────────────────────────────── */
.fbr-accordion {
    margin-bottom: 18px;
}

.fbr-acc-item {
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    margin-bottom: 6px;
    overflow: hidden;
}

.fbr-acc-head {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ip-s1);
    border: none;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx);
    cursor: pointer;
    font-family: var(--ip-body);
}

.fbr-acc-chev {
    color: var(--ip-tx3);
    font-style: normal;
}

.fbr-acc-body {
    padding: 14px;
}

/* ── Repeater ────────────────────────────────────────────── */
.fbr-repeater {
    border: 1px solid var(--ip-blue-m);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 18px;
    background: var(--ip-s0);
}

.fbr-repeater-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--ip-blue);
    margin-bottom: 10px;
}

.fbr-repeater-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--ip-s1);
}

.fbr-repeater-cells {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

    .fbr-repeater-cells .fbr-field {
        flex: 1 1 0;
        min-width: 140px;
        margin-bottom: 0;
    }

.fbr-repeater-del {
    background: none;
    border: none;
    color: var(--ip-tx3);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
}

    .fbr-repeater-del:hover {
        color: var(--ip-red);
    }

.fbr-repeater-add {
    background: var(--ip-acc-l);
    border: 1px dashed var(--ip-acc-m);
    border-radius: 8px;
    width: 100%;
    padding: 8px;
    font-size: 12px;
    color: var(--ip-acc);
    cursor: pointer;
    font-family: var(--ip-body);
}

/* ── Utility ─────────────────────────────────────────────── */
.fbr-hidden {
    display: none !important;
}

/* a tab that is not the open one (its fields still count) */
.fbr-tab-off {
    display: none;
}
/* ── FB2 additions — Phase 1 Session 1 ───────────────────────
   Paste at the END of Inspectpro.css (after the fbr-* block). */

/* state badges on canvas nodes */
.fb2-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--ip-tx3);
    background: var(--ip-s2);
    border: 1px solid var(--ip-b1);
    padding: 1px 6px;
    border-radius: 9px;
}

.fb2-badge-hidden {
    color: var(--ip-gold);
    background: var(--ip-gold-l);
    border-color: var(--ip-gold-m);
}

.fb2-badge-logic {
    color: var(--ip-blue);
    background: var(--ip-blue-l);
    border-color: var(--ip-blue-m);
}

/* min/max pair editor */
.fb2-prop-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* options editor */
.fb2-opts {
    margin-bottom: 12px;
}

.fb2-opts-head {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 24px;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--ip-tx3);
    margin-bottom: 4px;
}

.fb2-opt-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 24px;
    gap: 6px;
    align-items: center;
    margin-bottom: 5px;
    cursor: grab;
}

    /* tabs/accordion item rows reuse fb2-opt-row with 2 columns */
    .fb2-opt-row:has(> input:only-of-type) {
        grid-template-columns: 1fr 24px;
    }

.fb2-add-item {
    width: 100%;
    background: var(--ip-acc-l);
    border: 1px dashed var(--ip-acc-m);
    border-radius: 7px;
    padding: 6px;
    font-size: 11px;
    color: var(--ip-acc);
    cursor: pointer;
    font-family: var(--ip-body);
    margin-bottom: 12px;
}

    .fb2-add-item:hover {
        background: var(--ip-acc-m);
    }

/* uploaded file chips (runtime) */
.fbr-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.fbr-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ip-s2);
    border: 1px solid var(--ip-b1);
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--ip-tx2);
}

    .fbr-file-chip button {
        background: none;
        border: none;
        color: var(--ip-tx3);
        cursor: pointer;
        font-size: 13px;
        line-height: 1;
        padding: 0;
    }

        .fbr-file-chip button:hover {
            color: var(--ip-red);
        }

.fbr-file-uploading {
    color: var(--ip-gold);
    font-size: 11px;
    margin-top: 4px;
}
/* ── FB2 additions — Phase 1 Session 2 (WYSIWYG + pages) ────
   Paste at the END of Inspectpro.css, after the Phase 1
   Session 1 block. */

/* ── Page bar ────────────────────────────────────────────── */
.fb2-pagebar {
    max-width: 860px;
    margin: 0 auto 14px;
    display: flex;
    gap: 4px;
    align-items: center;
    border-bottom: 1px solid var(--ip-b1);
    padding-bottom: 0;
}

.fb2-pagetab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx3);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    user-select: none;
}

    .fb2-pagetab:hover {
        color: var(--ip-tx);
        background: var(--ip-s2);
    }

.fb2-pagetab-active {
    color: var(--ip-acc);
    background: var(--ip-s0);
    border-color: var(--ip-b1);
    position: relative;
    top: 1px;
}

.fb2-pagetab-x {
    background: none;
    border: none;
    color: var(--ip-tx3);
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

    .fb2-pagetab-x:hover {
        color: var(--ip-red);
    }

.fb2-pagetab-add {
    background: none;
    border: 1px dashed var(--ip-b2);
    border-radius: 7px;
    padding: 5px 11px;
    font-size: 11px;
    color: var(--ip-tx3);
    cursor: pointer;
    font-family: var(--ip-body);
    margin-left: 6px;
    margin-bottom: 4px;
}

    .fb2-pagetab-add:hover {
        color: var(--ip-acc);
        border-color: var(--ip-acc-m);
        background: var(--ip-acc-l);
    }

/* ── WYSIWYG control nodes ───────────────────────────────── */
.fb2-wys {
    padding: 10px 12px 12px;
}

/* floating type/actions bar */
.fb2-wys-bar {
    display: none;
    position: absolute;
    top: -11px;
    right: 8px;
    z-index: 5;
    align-items: center;
    gap: 6px;
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 14px;
    padding: 2px 6px 2px 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--ip-tx3);
    box-shadow: 0 2px 6px rgba(28,26,22,.10);
}

    .fb2-wys-bar i {
        font-size: 12px;
    }

.fb2-wys:hover > .fb2-wys-bar,
.fb2-wys.fb2-selected > .fb2-wys-bar {
    display: inline-flex;
}

.fb2-wys-bar .fb2-node-actions {
    display: inline-flex;
    margin-left: 2px;
}

/* preview body — looks real, but not interactive */
.fb2-pv {
    pointer-events: none;
}

.fb2-pv-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-tx2);
    margin-bottom: 5px;
}

.fb2-pv-help {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

.fb2-pv-body .fbr-input:disabled,
.fb2-pv-body .fbr-input[disabled] {
    opacity: 1;
    background: var(--ip-s1);
    color: var(--ip-tx3);
    cursor: default;
}

/* rich text preview */
.fb2-pv-rt-toolbar {
    display: flex;
    gap: 10px;
    background: var(--ip-s2);
    border: 1px solid var(--ip-b1);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--ip-tx3);
}

.fb2-pv-rt-area {
    border: 1px solid var(--ip-b1);
    border-radius: 0 0 8px 8px;
    background: var(--ip-s1);
    min-height: 64px;
    padding: 9px 11px;
    font-size: 12px;
    color: var(--ip-tx3);
}

/* toggle preview */
.fb2-pv-toggle {
    width: 38px;
    height: 20px;
    border-radius: 12px;
    background: var(--ip-b2);
    position: relative;
}

    .fb2-pv-toggle::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--ip-s0);
        box-shadow: 0 1px 2px rgba(28,26,22,.2);
    }

/* file / signature placeholders */
.fb2-pv-drop {
    border: 1px dashed var(--ip-b2);
    border-radius: 8px;
    background: var(--ip-s1);
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--ip-tx2);
}

    .fb2-pv-drop span {
        color: var(--ip-tx3);
        font-size: 10px;
    }

.fb2-pv-sign {
    border: 1px dashed var(--ip-b2);
    border-radius: 8px;
    background: var(--ip-s1);
    height: 70px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--ip-tx3);
}

.fb2-pv-hiddenfield {
    font-size: 11px;
    font-style: italic;
    color: var(--ip-tx3);
    background: var(--ip-s2);
    border: 1px dashed var(--ip-b2);
    border-radius: 7px;
    padding: 7px 11px;
}

/* runtime Quill sizing (when Quill is loaded) */
.fbr-quill {
    background: var(--ip-s1);
    border-radius: 0 0 8px 8px;
}

    .fbr-quill .ql-editor {
        min-height: 110px;
        font-family: var(--ip-body);
        font-size: 13px;
    }

.fbr-field .ql-toolbar {
    border-color: var(--ip-b1);
    border-radius: 8px 8px 0 0;
    background: var(--ip-s2);
}

.fbr-field .ql-container {
    border-color: var(--ip-b1);
    border-radius: 0 0 8px 8px;
}
/* ── FB2 additions — Phase 2 (Conditional Logic editor) ─────
   Paste at the END of Inspectpro.css. */

/* rule card in the properties panel */
.fb2-rule {
    border: 1px solid var(--ip-blue-m);
    border-radius: 9px;
    background: var(--ip-blue-l);
    padding: 9px;
    margin-bottom: 9px;
}

.fb2-rule-head {
    display: grid;
    grid-template-columns: 1fr 1fr 22px;
    gap: 6px;
    align-items: center;
    margin-bottom: 7px;
}

    .fb2-rule-head select {
        font-weight: 600;
        color: var(--ip-blue);
    }

/* condition row: field / op / mode / value / × */
.fb2-cond {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-bottom: 5px;
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 7px;
    padding: 5px;
}

    .fb2-cond select,
    .fb2-cond input {
        flex: 1 1 0;
        min-width: 0;
        font-size: 11px;
        padding: 4px 6px;
    }

        .fb2-cond select:nth-child(3) {
            flex: 0 0 64px;
        }

    .fb2-cond .fb2-act {
        flex: 0 0 auto;
    }

/* rule inside a rule card uses tighter add buttons */
.fb2-rule .fb2-add-item {
    margin-bottom: 0;
    padding: 4px;
    font-size: 10px;
}

/* runtime: field disabled by a rule */
.fbr-rule-disabled {
    opacity: .55;
}

/* runtime: a section / tab read-only by its rules (e.g. a record file in a later step):
   shown as plain read-only data, not faded */
.fbr-locked .fbr-rule-disabled {
    opacity: 1;
}

    .fbr-locked .fbr-input:disabled,
    .fbr-locked select:disabled,
    .fbr-locked textarea:disabled {
        background: var(--ip-s2);
        color: var(--ip-tx);
        cursor: default;
        -webkit-text-fill-color: var(--ip-tx);
    }
/* ── FB2 additions — Phase 3 (History panel + Data Sources) ──
   Paste at the END of Inspectpro.css. */

/* dynamic-source chip in WYSIWYG previews */
.fb2-pv-dyn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--ip-blue);
    background: var(--ip-blue-l);
    border: 1px solid var(--ip-blue-m);
    border-radius: 10px;
    padding: 2px 9px;
}

/* ── Version history panel (slide-over) ──────────────────── */
.fb2-history {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100vh;
    background: var(--ip-s0);
    border-left: 1px solid var(--ip-b1);
    box-shadow: -6px 0 24px rgba(28,26,22,.12);
    z-index: 1000;
    overflow-y: auto;
    padding: 18px;
}

.fb2-history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--ip-tx);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ip-b1);
}

.fb2-hist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--ip-b1);
    border-radius: 9px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.fb2-hist-main {
    flex: 1;
    font-size: 12px;
    color: var(--ip-tx);
}

.fb2-hist-notes {
    font-size: 11px;
    color: var(--ip-tx2);
    margin-top: 3px;
}

.fb2-hist-date {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 2px;
}

.fb2-hist-published {
    background: var(--ip-acc-l);
    color: var(--ip-acc);
    border-color: var(--ip-acc-m);
}

.fb2-hist-draft {
    background: var(--ip-gold-l);
    color: var(--ip-gold);
    border-color: var(--ip-gold-m);
}

.fb2-hist-archived {
    background: var(--ip-s2);
    color: var(--ip-tx3);
    border-color: var(--ip-b1);
}

/* ── Data Sources admin screen ───────────────────────────── */
.fds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.fds-empty {
    grid-column: 1 / -1;
    color: var(--ip-tx3);
    font-size: 13px;
    text-align: center;
    border: 2px dashed var(--ip-b2);
    border-radius: var(--ip-r-lg);
    padding: 42px 20px;
}

.fds-card {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    padding: 14px 16px;
}

.fds-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.fds-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ip-tx);
}

.fds-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--ip-b1);
    color: var(--ip-tx3);
    background: var(--ip-s2);
}

.fds-type-sql {
    color: var(--ip-acc);
    background: var(--ip-acc-l);
    border-color: var(--ip-acc-m);
}

.fds-type-rest {
    color: var(--ip-blue);
    background: var(--ip-blue-l);
    border-color: var(--ip-blue-m);
}

.fds-meta {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-bottom: 10px;
}

.fds-actions {
    display: flex;
    gap: 6px;
}

.fds-test-out {
    margin-top: 10px;
    font-size: 11px;
    color: var(--ip-tx2);
    border-top: 1px dashed var(--ip-b1);
    padding-top: 8px;
    line-height: 2;
}

/* ── editor modal ────────────────────────────────────────── */
.fds-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28,26,22,.45);
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    overflow-y: auto;
}

.fds-modal {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    width: 100%;
    max-width: 520px;
    padding: 20px 22px;
    box-shadow: 0 12px 40px rgba(28,26,22,.22);
}

.fds-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ip-tx);
    margin-bottom: 16px;
}

.fds-modal-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ip-b1);
}

.fds-active-check {
    align-self: end;
    padding-bottom: 8px;
}
/* ── FB2 additions — Phase 3 Session 2 ───────────────────────
   (Repeater layout/totals + Submissions viewer)
   Paste at the END of Inspectpro.css. */

/* designer: repeater columns lay out horizontally like a table */
.fb2-c-repeater > .fb2-children {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

    .fb2-c-repeater > .fb2-children > .fb2-node {
        flex: 1 1 0;
        min-width: 150px;
        margin-bottom: 0;
    }

/* runtime: repeater totals row */
.fbr-repeater-totals {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    border-top: 1px solid var(--ip-blue-m);
    margin-top: 8px;
    padding-top: 9px;
    font-size: 12px;
    color: var(--ip-tx);
}

.fbr-total-sigma {
    font-weight: 700;
    color: var(--ip-blue);
}

.fbr-total-cell b {
    color: var(--ip-tx2);
    font-weight: 600;
}

/* ── Submissions viewer ──────────────────────────────────── */
.fbs-filter {
    width: auto;
    min-width: 130px;
}

.fbs-wrap {
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    background: var(--ip-s0);
    overflow: auto;
    max-height: calc(100vh - 170px);
}

.fbs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

    .fbs-table th {
        position: sticky;
        top: 0;
        background: var(--ip-s2);
        color: var(--ip-tx2);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .4px;
        text-align: left;
        padding: 9px 12px;
        border-bottom: 1px solid var(--ip-b1);
        white-space: nowrap;
        z-index: 2;
    }

    .fbs-table td {
        padding: 8px 12px;
        border-bottom: 1px solid var(--ip-b1);
        color: var(--ip-tx);
        white-space: nowrap;
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fbs-table tbody tr {
        cursor: pointer;
    }

        .fbs-table tbody tr:hover {
            background: var(--ip-acc-l);
        }

.fbs-loading {
    color: var(--ip-tx3);
    text-align: center;
    padding: 30px !important;
}

.fbs-dim {
    color: var(--ip-tx3);
}

.fbs-chip {
    display: inline-block;
    background: var(--ip-s2);
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    padding: 1px 9px;
    font-size: 11px;
    color: var(--ip-tx2);
    text-decoration: none;
}

a.fbs-chip:hover {
    border-color: var(--ip-acc);
    color: var(--ip-acc);
}

/* status pills */
.fbs-st {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    border: 1px solid var(--ip-b1);
    background: var(--ip-s2);
    color: var(--ip-tx3);
}

.fbs-st-approved {
    color: var(--ip-acc);
    background: var(--ip-acc-l);
    border-color: var(--ip-acc-m);
}

.fbs-st-rejected {
    color: var(--ip-red);
    background: var(--ip-red-l);
    border-color: var(--ip-red);
}

.fbs-st-inreview {
    color: var(--ip-gold);
    background: var(--ip-gold-l);
    border-color: var(--ip-gold-m);
}

.fbs-st-submitted {
    color: var(--ip-blue);
    background: var(--ip-blue-l);
    border-color: var(--ip-blue-m);
}

/* ── detail modal content ────────────────────────────────── */
.fbs-detail {
    max-width: 680px;
}

.fbs-detail-meta {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-bottom: 14px;
}

.fbs-detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ip-b1);
    font-size: 12px;
}

.fbs-detail-label {
    font-weight: 600;
    color: var(--ip-tx2);
}

.fbs-detail-value {
    color: var(--ip-tx);
    overflow-wrap: anywhere;
}

.fbs-subtable {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

    .fbs-subtable th,
    .fbs-subtable td {
        border: 1px solid var(--ip-b1);
        padding: 5px 8px;
        text-align: left;
    }

    .fbs-subtable th {
        background: var(--ip-s2);
        color: var(--ip-tx2);
    }

.fbs-sign {
    max-width: 260px;
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    background: #fff;
}

.fbs-rt {
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--ip-s1);
}
/* ════════════════════════════════════════════════════════════
   BUILDPLUS — ENTITY DESIGNER  (bp-*)
   Append to the end of Inspectpro.css
   ════════════════════════════════════════════════════════════ */

/* ── shared page chrome ── */
.bp-page {
    padding: 24px 28px;
}

.bp-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .bp-topbar h1 {
        font-family: 'Playfair Display', serif;
        font-size: 24px;
        font-weight: 600;
        margin: 0 0 4px;
        color: var(--ip-tx);
    }

    .bp-topbar p {
        font-size: 13px;
        color: var(--ip-tx3);
        margin: 0;
    }

.bp-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ── entity catalog ── */
.bp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.bp-card {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    padding: 18px;
    transition: border-color .15s, box-shadow .15s;
}

    .bp-card:hover {
        border-color: var(--ip-acc);
        box-shadow: 0 4px 16px rgba(0,0,0,.06);
    }

.bp-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.bp-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bp-card-name {
    font-family: 'DM Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--ip-tx);
    line-height: 1.3;
}

.bp-card-label {
    font-size: 12px;
    color: var(--ip-tx3);
}

.bp-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    letter-spacing: .3px;
}

.bp-pill-draft {
    background: #f5ede0;
    color: #8a6d3b;
}

.bp-pill-published {
    background: #e4f0e8;
    color: var(--ip-acc);
}

.bp-pill-pending {
    background: #fdeceb;
    color: var(--ip-red);
}

.bp-pill-app {
    background: var(--ip-s1);
    color: var(--ip-tx2);
}

.bp-card-actions {
    display: flex;
    gap: 8px;
}

.bp-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ip-tx3);
    font-size: 14px;
}

/* ── designer shell ── */
.bp-designer {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 18px;
    align-items: start;
}

.bp-panel {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    overflow: hidden;
}

.bp-panel-head {
    padding: 10px 16px;
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
    font-size: 10px;
    font-family: 'DM Mono', monospace;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--ip-tx3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bp-panel-body {
    padding: 0;
}

/* ── attribute rows ── */
.bp-attr {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ip-b1);
    cursor: pointer;
    transition: background .12s;
}

    .bp-attr:last-child {
        border-bottom: none;
    }

    .bp-attr:hover {
        background: var(--ip-s1);
    }

    .bp-attr.selected {
        background: rgba(45,106,79,.06);
        box-shadow: inset 3px 0 0 var(--ip-acc);
    }

.bp-attr-icon {
    font-size: 15px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.bp-attr-main {
    flex: 1;
    min-width: 0;
}

.bp-attr-name {
    font-family: 'DM Mono', monospace;
    font-size: 13px;
    color: var(--ip-tx);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bp-attr-label {
    font-size: 11px;
    color: var(--ip-tx3);
    margin-top: 2px;
}

.bp-attr-type {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    color: var(--ip-tx2);
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 5px;
    padding: 2px 8px;
    flex-shrink: 0;
}

.bp-attr-flags {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.bp-flag {
    font-size: 9px;
    font-family: 'DM Mono', monospace;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: .4px;
}

.bp-flag-pk {
    background: #fff3d6;
    color: #8a6d3b;
}

.bp-flag-req {
    background: #fdeceb;
    color: var(--ip-red);
}

.bp-flag-uq {
    background: #e8eef7;
    color: #1E3A6E;
}

.bp-flag-fk {
    background: #e4f0e8;
    color: var(--ip-acc);
}

.bp-flag-sys {
    background: var(--ip-s1);
    color: var(--ip-tx3);
}

/* ── properties panel ── */
.bp-props {
    padding: 16px;
}

.bp-props-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--ip-tx3);
    font-size: 13px;
}

.bp-fg {
    margin-bottom: 14px;
}

    .bp-fg label {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: var(--ip-tx2);
        margin-bottom: 5px;
    }

    .bp-fg input[type=text],
    .bp-fg input[type=number],
    .bp-fg select,
    .bp-fg textarea {
        width: 100%;
        background: var(--ip-s1);
        border: 1px solid var(--ip-b1);
        border-radius: 6px;
        padding: 8px 10px;
        font-size: 13px;
        color: var(--ip-tx);
        font-family: var(--ip-body);
        outline: none;
    }

        .bp-fg input:focus,
        .bp-fg select:focus,
        .bp-fg textarea:focus {
            border-color: var(--ip-acc);
        }

        .bp-fg input:disabled,
        .bp-fg select:disabled {
            opacity: .55;
            cursor: not-allowed;
        }

.bp-fg-hint {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

.bp-fg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bp-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.bp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ip-tx2);
    cursor: pointer;
}

    .bp-check input {
        cursor: pointer;
    }

.bp-props-actions {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--ip-b1);
}

.bp-msg {
    font-size: 11px;
    margin-top: 10px;
    line-height: 1.5;
}

.bp-msg-err {
    color: var(--ip-red);
}

.bp-msg-ok {
    color: var(--ip-acc);
}

.bp-msg-warn {
    color: #8a6d3b;
}

.bp-hidden {
    display: none !important;
}

/* ── modal ── */
.bp-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

    .bp-modal-grid .bp-fg-full {
        grid-column: 1 / -1;
    }

/* ── table name preview ── */
.bp-tablename {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--ip-tx3);
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 5px;
    padding: 4px 9px;
    display: inline-block;
}
/* ── generated SQL preview (append to Inspectpro.css) ── */
.bp-sql {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 8px;
    padding: 14px;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ip-tx);
    white-space: pre;
    overflow-x: auto;
    max-height: 420px;
    margin: 0;
}
/* ════════════════════════════════════════════════════════════
   BUILDPLUS — DATA GRID  (append to Inspectpro.css)
   ════════════════════════════════════════════════════════════ */

.bp-search {
    background: var(--ip-s1);
    border: 1px solid var(--ip-b1);
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--ip-tx);
    font-family: var(--ip-body);
    outline: none;
    min-width: 200px;
}

    .bp-search:focus {
        border-color: var(--ip-acc);
    }

.bp-table-wrap {
    overflow-x: auto;
}

.bp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .bp-table thead th {
        text-align: left;
        padding: 10px 14px;
        background: var(--ip-s1);
        border-bottom: 1px solid var(--ip-b1);
        font-size: 10px;
        font-family: 'DM Mono', monospace;
        font-weight: 700;
        letter-spacing: .6px;
        text-transform: uppercase;
        color: var(--ip-tx3);
        white-space: nowrap;
    }

    .bp-table tbody td {
        padding: 10px 14px;
        border-bottom: 1px solid var(--ip-b1);
        color: var(--ip-tx);
        vertical-align: middle;
    }

    .bp-table tbody tr:hover {
        background: var(--ip-s1);
    }

    .bp-table tbody tr:last-child td {
        border-bottom: none;
    }

.bp-col-act {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.bp-icon-btn {
    background: transparent;
    border: 1px solid var(--ip-b1);
    border-radius: 5px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    color: var(--ip-tx2);
    cursor: pointer;
    margin-left: 4px;
    transition: border-color .12s, color .12s;
}

    .bp-icon-btn:hover {
        border-color: var(--ip-acc);
        color: var(--ip-acc);
    }

.bp-null {
    color: var(--ip-tx3);
}

.bp-loading {
    padding: 32px 14px !important;
    text-align: center;
    color: var(--ip-tx3);
}

.bp-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.bp-page-info {
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    color: var(--ip-tx3);
}
/* fill page: the workflow step waiting for the user on this record */
.fbr-step-note {
    margin: 0 0 14px;
    padding: 9px 14px;
    border-radius: 8px;
    border-inline-start: 4px solid var(--ip-acc);
    background: var(--ip-s2);
    color: var(--ip-tx);
    font-size: 13px;
    font-weight: 600;
}

/* ── entity-bound fill page (append to Inspectpro.css) ── */
.fbr-edit-badge {
    display: inline-block;
    margin-inline-start: 10px;
    padding: 2px 10px;
    border-radius: 20px;
    background: #e8eef7;
    color: #1E3A6E;
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    vertical-align: middle;
}

.fbr-bound-note {
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    color: var(--ip-tx3);
    margin-top: 4px;
}
.fbr-back-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #1E3A6E;
    text-decoration: none;
}

    .fbr-back-link:hover {
        text-decoration: underline;
    }

.fbr-empty-note {
    text-align: center;
    padding: 40px;
    color: var(--ip-tx3);
}
/* ── task inbox badge, moved out of inline style ── */
.nav-inbox-badge {
    display: none;
    background: var(--ip-red);
    color: #fff;
    font-size: 9px;
    font-family: 'DM Mono', monospace;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: auto;
}
/* ════════════════════════════════════════════════════════════
   MENU BUILDER  (mb-*)  — append to Inspectpro.css
   ════════════════════════════════════════════════════════════ */

.mb-page {
    padding: 24px 28px;
}

.mb-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .mb-topbar h1 {
        font-family: 'Playfair Display', serif;
        font-size: 24px;
        font-weight: 600;
        margin: 0 0 4px;
        color: var(--ip-tx);
    }

    .mb-topbar p {
        font-size: 13px;
        color: var(--ip-tx3);
        margin: 0;
    }

.mb-topbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mb-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 18px;
    align-items: start;
}

.mb-panel {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: 12px;
    overflow: hidden;
}

.mb-panel-head {
    padding: 10px 16px;
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
    font-size: 10px;
    font-family: 'DM Mono', monospace;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--ip-tx3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mb-hint {
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.mb-panel-body {
    padding: 8px 0;
}

/* ── tree ── */
.mb-group {
    margin-bottom: 4px;
}

.mb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background .12s;
    border-inline-start: 3px solid transparent;
}

    .mb-row:hover {
        background: var(--ip-s1);
    }

    .mb-row.selected {
        background: rgba(45,106,79,.06);
        border-inline-start-color: var(--ip-acc);
    }

.mb-row-group {
    font-weight: 600;
    font-size: 13px;
    color: var(--ip-tx);
}

.mb-row-child {
    padding-inline-start: 36px;
    font-size: 13px;
    color: var(--ip-tx2);
}

.mb-row-hidden {
    opacity: .45;
}

.mb-row-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.mb-row-name {
    flex: 1;
    min-width: 0;
}

.mb-tag {
    font-size: 9px;
    font-family: 'DM Mono', monospace;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--ip-s1);
    color: var(--ip-tx3);
    letter-spacing: .4px;
}

.mb-tag-form {
    background: #e4f0e8;
    color: var(--ip-acc);
}

.mb-tag-data {
    background: #e8eef7;
    color: #1E3A6E;
}

.mb-perm {
    font-size: 10px;
    font-family: 'DM Mono', monospace;
    color: var(--ip-tx3);
}

.mb-eye {
    background: transparent;
    border: none;
    font-size: 13px;
    cursor: pointer;
    opacity: .5;
    padding: 2px 4px;
}

    .mb-eye:hover {
        opacity: 1;
    }

.mb-children {
    min-height: 8px;
}

.mb-dragging {
    opacity: .4;
}

.mb-drop-target {
    border-top: 2px solid var(--ip-acc);
}

.mb-loading,
.mb-empty-note {
    padding: 40px 20px;
    text-align: center;
    color: var(--ip-tx3);
    font-size: 13px;
}

/* ── editor ── */
.mb-editor {
    padding: 16px;
}

.mb-fg {
    margin-bottom: 14px;
}

    .mb-fg label {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: var(--ip-tx2);
        margin-bottom: 5px;
    }

    .mb-fg input[type=text],
    .mb-fg select {
        width: 100%;
        background: var(--ip-s1);
        border: 1px solid var(--ip-b1);
        border-radius: 6px;
        padding: 8px 10px;
        font-size: 13px;
        color: var(--ip-tx);
        font-family: var(--ip-body);
        outline: none;
    }

        .mb-fg input:focus,
        .mb-fg select:focus {
            border-color: var(--ip-acc);
        }

.mb-fg-hint {
    font-size: 10px;
    color: var(--ip-tx3);
    margin-top: 4px;
}

.mb-fg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ip-tx2);
    margin-bottom: 14px;
    cursor: pointer;
}

.mb-actions {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--ip-b1);
}

.mb-msg {
    font-size: 11px;
    margin-top: 10px;
    line-height: 1.5;
}

.mb-msg-err {
    color: var(--ip-red);
}

.mb-msg-ok {
    color: var(--ip-acc);
}

.mb-hidden {
    display: none !important;
}
/* ── menu builder: scope tag (append to Inspectpro.css) ── */
.mb-tag-scope {
    background: #f5ede0;
    color: #8a6d3b;
}
/* ═══════════════════════════════════════════
   RULES ENGINE DESIGNER
   ═══════════════════════════════════════════ */
.re-root {
    --re-bg: var(--ip-bg);
    --re-panel: #fff;
    --re-ink: var(--ip-tx);
    --re-tx2: #5c5648;
    --re-tx3: #8f8778;
    --re-navy: #1E3A6E;
    --re-red: #C8253A;
    --re-grn: var(--ip-acc);
    --re-gld: #b8862e;
    --re-border: #e4e0d5;
    --re-line: var(--ip-b1);
    background: var(--re-bg);
    color: var(--re-ink);
    font-family: 'DM Sans',sans-serif;
    font-size: 14px;
    min-height: 100vh
}

    .re-root h1, .re-root h2, .re-root h3 {
        font-family: 'Playfair Display',serif;
        margin: 0
    }

.re-topnav {
    position: sticky;
    top: 0;
    height: 52px;
    background: var(--ip-tx);
    border-bottom: 2px solid var(--re-navy);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    z-index: 50
}

.re-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-family: 'Playfair Display',serif;
    font-weight: 700;
    font-size: 15px
}

    .re-brand .re-logo {
        width: 28px;
        height: 28px;
        border-radius: 7px;
        background: linear-gradient(135deg,var(--re-navy),var(--re-red));
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px
    }

.re-modtitle {
    color: #e8b98c;
    font-size: 12px;
    font-family: 'DM Mono',monospace;
    letter-spacing: .4px;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,.15)
}

.re-spacer {
    flex: 1
}

.re-topbtn {
    background: none;
    border: 1px solid rgba(255,255,255,.2);
    color: #cbc4b4;
    font-family: 'DM Sans',sans-serif;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer
}

    .re-topbtn.primary {
        background: var(--re-grn);
        border-color: var(--re-grn);
        color: #fff;
        font-weight: 600
    }

    .re-topbtn:disabled {
        opacity: .4;
        cursor: not-allowed
    }

.re-shell {
    padding: 22px 24px 60px
}

.re-pagehead {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px
}

    .re-pagehead h1 {
        font-size: 26px
    }

    .re-pagehead p {
        color: var(--re-tx2);
        font-size: 13px;
        margin-top: 4px
    }

.re-kpis {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
    margin-bottom: 20px
}

.re-kpi {
    background: var(--re-panel);
    border: 1px solid var(--re-border);
    border-radius: 10px;
    padding: 14px 16px
}

    .re-kpi .re-lbl {
        font-family: 'DM Mono',monospace;
        font-size: 9px;
        letter-spacing: .8px;
        text-transform: uppercase;
        color: var(--re-tx3)
    }

    .re-kpi .re-val {
        font-family: 'Playfair Display',serif;
        font-size: 24px;
        font-weight: 700;
        margin-top: 4px
    }

        .re-kpi .re-val.grn {
            color: var(--re-grn)
        }

        .re-kpi .re-val.navy {
            color: var(--re-navy)
        }

.re-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 18px;
    align-items: start
}

.re-rail {
    background: var(--re-panel);
    border: 1px solid var(--re-border);
    border-radius: 12px;
    overflow: hidden
}

.re-rail-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--re-border);
    display: flex;
    justify-content: space-between;
    align-items: center
}

    .re-rail-head b {
        font-size: 12px
    }

.re-addbtn {
    font-family: 'DM Mono',monospace;
    font-size: 10px;
    color: var(--re-navy);
    cursor: pointer;
    background: none;
    border: none
}

.re-entity-group {
    padding: 10px 0
}

.re-entity-label {
    padding: 8px 16px 4px;
    font-family: 'DM Mono',monospace;
    font-size: 9.5px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--re-tx3)
}

.re-item {
    padding: 9px 16px 9px 30px;
    font-size: 12.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-left: 3px solid transparent
}

    .re-item:hover {
        background: var(--ip-s1)
    }

    .re-item.active {
        background: rgba(30,58,110,.06);
        border-left-color: var(--re-navy);
        font-weight: 600;
        color: var(--re-navy)
    }

.re-badge {
    font-family: 'DM Mono',monospace;
    font-size: 8.5px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #eef1f6;
    color: var(--re-tx3)
}

    .re-badge.live {
        background: #e7f3ec;
        color: var(--re-grn)
    }

    .re-badge.archived {
        background: #f0eee6;
        color: var(--re-tx3)
    }

.re-card {
    background: var(--re-panel);
    border: 1px solid var(--re-border);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 16px
}

.re-card-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--re-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start
}

    .re-card-head h2 {
        font-size: 18px
    }

    .re-card-head .re-meta {
        color: var(--re-tx2);
        font-size: 12px;
        margin-top: 3px
    }

.re-chip {
    font-family: 'DM Mono',monospace;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px
}

    .re-chip.entity {
        background: #eef1f6;
        color: var(--re-navy)
    }

    .re-chip.version {
        background: #f3eee0;
        color: var(--re-gld)
    }

.re-tabs {
    display: flex;
    gap: 2px;
    padding: 0 20px;
    border-bottom: 1px solid var(--re-border);
    background: var(--ip-s1)
}

.re-tab {
    padding: 11px 4px;
    margin-right: 22px;
    font-size: 12.5px;
    color: var(--re-tx3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500
}

    .re-tab.active {
        color: var(--re-ink);
        border-bottom-color: var(--re-red)
    }

.re-card-body {
    padding: 18px 20px
}

.re-hitpolicy {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--ip-s1);
    border: 1px solid var(--re-border);
    border-radius: 9px;
    padding: 10px 14px;
    margin-bottom: 16px
}

    .re-hitpolicy .re-hp-lbl {
        font-family: 'DM Mono',monospace;
        font-size: 9.5px;
        letter-spacing: .6px;
        text-transform: uppercase;
        color: var(--re-tx3)
    }

.re-hp-select {
    font-family: 'DM Sans',sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--re-navy);
    border: 1px solid var(--re-line);
    border-radius: 6px;
    padding: 5px 10px;
    background: #fff
}

.re-hp-desc {
    font-size: 11.5px;
    color: var(--re-tx2);
    flex: 1
}

.re-dt-wrap {
    overflow-x: auto;
    border: 1px solid var(--re-border);
    border-radius: 10px
}

.re-dt {
    border-collapse: collapse;
    width: 100%;
    font-size: 12.5px
}

    .re-dt th {
        background: var(--ip-tx);
        color: #fff;
        font-family: 'DM Mono',monospace;
        font-size: 9.5px;
        letter-spacing: .5px;
        text-transform: uppercase;
        padding: 9px 12px;
        text-align: left;
        white-space: nowrap
    }

        .re-dt th.input-col {
            background: #232019
        }

        .re-dt th.output-col {
            background: var(--re-grn)
        }

        .re-dt th .re-colsub {
            display: block;
            font-size: 8px;
            opacity: .65;
            font-weight: 400;
            text-transform: none;
            margin-top: 2px
        }

    .re-dt td {
        padding: 8px 10px;
        border-bottom: 1px solid var(--re-border);
        border-right: 1px solid #efece3;
        white-space: nowrap
    }

    .re-dt tbody tr:hover {
        background: #fbfaf7
    }

    .re-dt tbody tr.hit {
        background: rgba(45,106,79,.08)
    }

.re-cell-cond {
    display: flex;
    align-items: center;
    gap: 5px
}

    .re-cell-cond select, .re-cell-cond input {
        font-family: 'DM Mono',monospace;
        font-size: 11px;
        border: 1px solid var(--re-line);
        border-radius: 5px;
        padding: 3px 6px;
        background: #fdfcfa
    }

    .re-cell-cond select {
        color: var(--re-tx3);
        width: 70px
    }

    .re-cell-cond input {
        width: 110px;
        color: var(--re-ink)
    }

.re-out-input {
    font-family: 'DM Mono',monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid var(--re-line);
    background: #eef1f6;
    color: var(--re-navy);
    width: 100%;
    min-width: 220px
}
/* the whole formula is visible, with its plain-language reading under it */
.re-out-hint {
    font-size: 11px;
    color: var(--re-tx3);
    margin-top: 3px;
    white-space: normal
}
.re-out-hint:empty { display: none }

.re-rowdel {
    color: var(--re-tx3);
    cursor: pointer;
    font-size: 13px;
    background: none;
    border: none
}

.re-addrow {
    padding: 9px 14px;
    font-family: 'DM Mono',monospace;
    font-size: 11px;
    color: var(--re-navy);
    cursor: pointer;
    background: var(--ip-s1);
    border: none;
    width: 100%;
    text-align: left
}

    .re-addrow:hover {
        background: #f2efe6
    }

.re-test-console {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px
}

.re-tc-panel {
    border: 1px solid var(--re-border);
    border-radius: 10px;
    padding: 14px 16px
}

    .re-tc-panel h3 {
        font-size: 12px;
        font-family: 'DM Mono',monospace;
        letter-spacing: .5px;
        text-transform: uppercase;
        color: var(--re-tx3);
        margin-bottom: 12px
    }

.re-tc-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px
}

    .re-tc-field label {
        font-size: 12px;
        color: var(--re-tx2)
    }

    .re-tc-field input {
        font-family: 'DM Mono',monospace;
        font-size: 12px;
        border: 1px solid var(--re-line);
        border-radius: 5px;
        padding: 5px 8px;
        width: 140px
    }

.re-evalbtn {
    width: 100%;
    padding: 9px;
    background: var(--re-navy);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-family: 'DM Sans',sans-serif;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    margin-top: 6px
}

.re-result-box {
    background: var(--ip-s1);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12.5px;
    min-height: 74px
}

    .re-result-box .re-rtitle {
        font-family: 'DM Mono',monospace;
        font-size: 9.5px;
        letter-spacing: .5px;
        text-transform: uppercase;
        color: var(--re-tx3);
        margin-bottom: 6px
    }

.re-result-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed var(--re-line)
}

    .re-result-line:last-child {
        border-bottom: none
    }

    .re-result-line b {
        color: var(--re-grn)
    }

.re-footnote {
    color: var(--re-tx3);
    font-size: 11.5px;
    line-height: 1.6;
    margin-top: 6px
}

.re-empty {
    color: var(--re-tx3);
    padding: 40px;
    text-align: center
}

.re-inline-input {
    font-family: 'DM Sans',sans-serif;
    border: none;
    background: none;
    font-size: 18px;
    font-weight: 600;
    width: 100%
}

    .re-inline-input:disabled {
        color: var(--re-ink)
    }

.re-versionrow {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--re-border);
    font-size: 12.5px
}
/* ── LicenseTypes drawer — class-name aliases ─────────────────
   Views/LicenseTypes/Index.cshtml uses lkp-section-label / lkp-fg /
   lkp-lbl / lkp-fi, which don't exist anywhere else in the system —
   every other lookup page uses lkp-drawer-section-label / lkp-field /
   lkp-label / lkp-input. Without these aliases those fields render
   completely unstyled. Aliased here rather than renamed in the view
   so the fix is self-contained; if that view is ever rewritten to use
   the standard names, this block can be deleted.
─────────────────────────────────────────────────────────────── */
.lkp-section-label {
    font-family: var(--ip-mono);
    font-size: 9px;
    font-weight: 700;
    color: var(--ip-tx3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ip-b1);
    margin-bottom: 2px;
}

.lkp-fg {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lkp-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--ip-tx2);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--ip-mono);
}

.lkp-fi {
    height: 38px;
    padding: 0 11px;
    border: 1.5px solid var(--ip-b1);
    border-radius: var(--ip-r);
    background: var(--ip-s0);
    font-family: var(--ip-body);
    font-size: 13px;
    color: var(--ip-tx);
    outline: none;
    transition: border-color .15s;
    width: 100%;
}

    .lkp-fi:focus {
        border-color: var(--ip-acc);
    }

    .lkp-fi[dir="rtl"] {
        text-align: right;
    }

/* ── Seasons page ────────────────────────────────────────────── */
.sn-date {
    font-family: var(--ip-mono);
    font-size: 12px;
    color: var(--ip-tx);
}

.sn-past {
    margin-left: 6px;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    background: var(--ip-s2);
    color: var(--ip-tx3);
}

.sn-lunar {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 12px;
    background: var(--ip-blue-l);
    color: var(--ip-blue);
}

.sn-fixed {
    font-size: 11px;
    color: var(--ip-tx3);
}

.sn-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--ip-tx);
    cursor: pointer;
}

    .sn-check input {
        accent-color: var(--ip-acc);
    }

/* ============================================================
   SERVICE CATALOGUE (admin) — Views/ServiceCatalog/*
   ============================================================ */
.sc-btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.sc-inline-form { display: inline; margin: 0; }
.sc-alert { border: 1px solid var(--ip-b1); border-radius: var(--ip-r-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }
.sc-alert ul { margin: 6px 0 0; padding-inline-start: 18px; }
.sc-alert-ok { background: var(--ip-green-l); border-color: var(--ip-green-m); color: var(--ip-green); }
.sc-alert-err { background: var(--ip-red-l); border-color: var(--ip-red-m); color: var(--ip-red); }
.sc-form { display: flex; flex-direction: column; gap: 16px; }
.sc-card { padding: 0; }
.sc-card-head { padding: 12px 20px; border-bottom: 1px solid var(--ip-b1); background: var(--ip-s1); font-family: var(--ip-head); font-size: 14px; font-weight: 600; color: var(--ip-tx); }
.sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; padding: 20px; }
.sc-span-2 { grid-column: span 2; }
.sc-textarea { min-height: 76px; resize: vertical; }
.sc-err { color: var(--ip-red); font-size: 11px; }
.sc-err:empty { display: none; }
.sc-linked { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border: 1px dashed var(--ip-b2); border-radius: var(--ip-r-sm); background: var(--ip-s1); }
.sc-linked[hidden] { display: none; }
.sc-warn { color: var(--ip-amber); font-size: 12px; font-weight: 600; }
.sc-warn[hidden] { display: none; }
.sc-textlink { color: var(--ip-acc); font-size: 12px; font-weight: 600; text-decoration: none; }
.sc-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 760px) {
    .sc-grid { grid-template-columns: 1fr; }
    .sc-span-2 { grid-column: auto; }
}

/* ---------- Batch 6b: NexFlow designer — Business Rule Task "Rule" tab ---------- */
.nf-root [hidden] {
    display: none !important;
}

.nf-root .nf-rule-io {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

    .nf-root .nf-rule-io li {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 8px;
        border: 1px solid var(--b1, #e7e2d6);
        border-radius: 6px;
        margin-bottom: 4px;
        font-size: 12px;
        background: var(--s1, #fff);
    }

        .nf-root .nf-rule-io li .mono {
            font-size: 11.5px;
            word-break: break-all;
        }

.nf-root .nf-rule-io-type {
    color: var(--tx3, #9ca3af);
    font-size: 11px;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   APP SHELL — top navigation, dropdowns, user menu
   (Batch UI-1: moved here from the <style> block that was
   inside Views/Shared/_Layout_Admin.cshtml)
══════════════════════════════════════════════════════════ */
.admin-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ip-nav-h);
    background: var(--ip-nav-bg);
    border-bottom: 2px solid var(--ip-brand);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 4px;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav-brand img { height: 36px; width: auto; object-fit: contain; }
.nav-vsep { width: 1px; height: 28px; background: var(--ip-nav-line); margin: 0 8px; flex-shrink: 0; }
.nav-spacer { flex: 1; }
.nav-customer { margin-inline-end: 10px; }   /* development-only customer badge (NFSA / GAHAR) */

.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: var(--ip-fs-sm);
    font-weight: 500;
    font-family: var(--ip-body);
    color: var(--ip-nav-tx);
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    white-space: nowrap;
    transition: all var(--ip-ease);
    user-select: none;
}
.nav-dropdown-btn:hover { color: #fff; background: var(--ip-nav-line); }
.nav-dropdown-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ip-brand2); }
.nav-dropdown-btn.active { color: var(--ip-brand2); background: var(--ip-brand-m); border-color: rgba(194,68,10,.3); }
.nav-dropdown-btn .nav-caret { font-size: 8px; opacity: .6; margin-inline-start: 2px; transition: transform var(--ip-ease); }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown-panel { display: none; position: fixed; top: var(--ip-nav-h); padding-top: 8px; background: transparent; z-index: 1030; min-width: 200px; }
.nav-dropdown.open .nav-dropdown-panel { display: block; }
.nav-dropdown-panel-inner {
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}
.nav-dropdown-panel-head {
    padding: 8px 14px;
    font-size: var(--ip-fs-2xs);
    font-family: var(--ip-mono);
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--ip-tx3);
    background: var(--ip-s1);
    border-bottom: 1px solid var(--ip-b1);
}
.nav-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: var(--ip-fs-md);
    font-family: var(--ip-body);
    color: var(--ip-tx);
    text-decoration: none;
    transition: background var(--ip-ease);
}
.nav-dd-item:hover { background: var(--ip-bg); color: var(--ip-tx); text-decoration: none; }
.nav-dd-item.active { background: var(--ip-brand-l); color: var(--ip-brand); font-weight: 500; }
.nav-dd-item .dd-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-dd-sep { height: 1px; background: var(--ip-b1); margin: 4px 0; }

.nav-lang-form { margin: 0; display: inline; }
.nav-lang-btn { border: 1px solid rgba(255,255,255,.2); padding: 4px 10px; font-size: var(--ip-fs-xs); }

.nav-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ip-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ip-mono);
    font-size: var(--ip-fs-xs);
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--ip-brand2);
    flex-shrink: 0;
    text-decoration: none;
    position: relative;
    margin-inline-start: 8px;
}
.nav-av:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff; }
.av-dropdown {
    display: none;
    position: fixed;
    top: var(--ip-nav-h);
    background: var(--ip-s0);
    border: 1px solid var(--ip-b1);
    border-radius: var(--ip-r-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    min-width: 240px;
    z-index: 2000;
    overflow: visible;
    cursor: default;
}
.nav-av.open .av-dropdown { display: block; }
.av-dropdown-head { padding: 12px 16px; border-bottom: 1px solid var(--ip-b1); background: var(--ip-s1); border-radius: var(--ip-r-lg) var(--ip-r-lg) 0 0; }
.av-user-name { font-size: var(--ip-fs-md); font-weight: 600; color: var(--ip-tx); font-family: var(--ip-body); }
.av-user-email { font-size: var(--ip-fs-xs); color: var(--ip-tx3); margin-top: 2px; font-family: var(--ip-mono); font-weight: 400; }
.av-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: var(--ip-fs-md);
    color: var(--ip-tx2);
    text-decoration: none;
    transition: background var(--ip-ease);
    cursor: pointer;
    font-family: var(--ip-body);
    font-weight: 400;
    border: none;
    background: none;
    width: 100%;
    text-align: start;
}
.av-dropdown-item:hover { background: var(--ip-s1); color: var(--ip-tx); text-decoration: none; }
.av-dropdown-item.danger { color: var(--ip-bad); }
.av-dropdown-item.danger:hover { background: var(--ip-bad-l); }
.av-dropdown-sep { height: 1px; background: var(--ip-b1); margin: 4px 0; }
.av-logout-form { margin: 0; }

.admin-body { margin-top: var(--ip-nav-h); min-height: calc(100vh - var(--ip-nav-h)); background: var(--ip-bg); }
.ip-admin .navbar { display: none !important; }   /* old Bootstrap navbar inside legacy views — admin shell only */

/* Arabic: one font for everything — except icon fonts, which need their own glyphs */
[lang="ar"], [lang="ar"] * { font-family: var(--ip-arabic) !important; }
[lang="ar"] i.ti, [lang="ar"] .ti { font-family: 'tabler-icons' !important; }
[lang="ar"] i.bi, [lang="ar"] .bi { font-family: 'bootstrap-icons' !important; }
/* The nav row is flex and mirrors by itself under dir="rtl" — do not add row-reverse */
[dir="rtl"] .av-dropdown { right: auto; left: 0; }

/* ══════════════════════════════════════════════════════════
   UI KIT — shared components (Batch UI-1)
   Every screen should use these instead of inventing its own
   badge / button / card / table / tabs / alert / toast.
   Reference page with live examples: /UiKit
   Naming: ip-<component>, variants ip-<component>-<variant>
══════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

/* ── Buttons (base in "Buttons" above) — states + extra variants ── */
.ip-btn { transition: background var(--ip-ease), border-color var(--ip-ease), color var(--ip-ease), box-shadow var(--ip-ease); }
.ip-btn:focus-visible { outline: none; box-shadow: var(--ip-focus); }
.ip-btn:disabled, .ip-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.ip-btn-block { display: flex; width: 100%; justify-content: center; }
.ip-btn-danger { background: var(--ip-danger); color: #fff; border: none; }
.ip-btn-danger:hover { background: var(--ip-danger-hover); color: #fff; }
.ip-btn-link { background: none; border: none; color: var(--ip-acc); padding-inline: 4px; }
.ip-btn-link:hover { text-decoration: underline; color: var(--ip-acc2); }

/* ── Badges — readable size; semantic variants ── */
.ip-badge { font-family: var(--ip-body); font-size: var(--ip-fs-xs); font-weight: 600; padding: 2px 9px; line-height: 1.5; white-space: nowrap; }
.ip-badge-ok    { color: var(--ip-ok);   background: var(--ip-ok-l);   border-color: var(--ip-ok-m); }
.ip-badge-warn  { color: var(--ip-warn); background: var(--ip-warn-l); border-color: var(--ip-warn-m); }
.ip-badge-bad   { color: var(--ip-bad);  background: var(--ip-bad-l);  border-color: var(--ip-bad-m); }
.ip-badge-info  { color: var(--ip-info); background: var(--ip-info-l); border-color: var(--ip-info-m); }
.ip-badge-muted { color: var(--ip-tx2);  background: var(--ip-s2);     border-color: var(--ip-b1); }
.ip-badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ip-badge-mono { font-family: var(--ip-mono); letter-spacing: .3px; }

/* ── Stat boxes — colour variants for the top stripe ── */
.ip-stat-ok   { --ip-stat-color: var(--ip-ok); }
.ip-stat-warn { --ip-stat-color: var(--ip-warn); }
.ip-stat-bad  { --ip-stat-color: var(--ip-bad); }
.ip-stat-info { --ip-stat-color: var(--ip-info); }
.ip-stat-sub  { font-size: var(--ip-fs-xs); color: var(--ip-tx3); margin-top: 4px; }

/* ── Card extras ── */
.ip-card-title { font-weight: 600; font-size: var(--ip-fs-md); color: var(--ip-tx); flex: 1; }
.ip-card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; background: var(--ip-s1); border-top: 1px solid var(--ip-b1); }
.ip-card-flat, .ip-card-flat:hover { box-shadow: none; }

/* ── Facility hierarchy ── */
.ip-facility-hierarchy-child .ip-person {
    padding-inline-start: 18px;
}
.ip-facility-hierarchy-child {
    background: color-mix(in srgb, var(--ip-surface, #fff) 96%, var(--ip-primary, #256d57));
}

/* ── Table extras ── */
.ip-table-static tbody tr { cursor: default; }
.ip-table td.ip-num, .ip-table th.ip-num { text-align: end; font-variant-numeric: tabular-nums; }
.ip-table-compact thead th, .ip-table-compact tbody td { padding: 7px 12px; }

/* ── Form field extras ── */
.ip-fi:focus, .ip-textarea:focus, .ip-select:focus { box-shadow: var(--ip-focus); }
.ip-fi:disabled, .ip-select:disabled, .ip-textarea:disabled { background: var(--ip-s2); color: var(--ip-tx3); }
.ip-fl-req::after { content: " *"; color: var(--ip-bad); }
.ip-hint  { font-size: var(--ip-fs-xs); color: var(--ip-tx3); margin-top: 4px; }
.ip-error { font-size: var(--ip-fs-xs); color: var(--ip-bad); margin-top: 4px; }
.ip-error:empty { display: none; }
.ip-fg.is-invalid .ip-fi, .ip-fg.is-invalid .ip-select, .ip-fg.is-invalid .ip-textarea { border-color: var(--ip-bad); }
.ip-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--ip-fs-md); color: var(--ip-tx); cursor: pointer; }
.ip-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ip-acc); }

/* ── Tabs ── */
.ip-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ip-b1); margin-bottom: var(--ip-sp-4); overflow-x: auto; }
.ip-tab {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 14px;
    margin-bottom: -1px;
    font-family: var(--ip-body);
    font-size: var(--ip-fs-md);
    font-weight: 500;
    color: var(--ip-tx2);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ip-tab:hover { color: var(--ip-tx); text-decoration: none; }
.ip-tab.active, .ip-tab[aria-selected="true"] { color: var(--ip-acc); border-bottom-color: var(--ip-acc); }
.ip-tab:focus-visible { outline: none; box-shadow: var(--ip-focus); border-radius: var(--ip-r-sm) var(--ip-r-sm) 0 0; }
.ip-tab .ip-badge { padding: 0 7px; }

/* ── Alerts / notices ── */
.ip-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--ip-r);
    border: 1px solid var(--ip-info-m);
    background: var(--ip-info-l);
    color: var(--ip-tx);
    font-size: var(--ip-fs-md);
    margin-bottom: var(--ip-sp-4);
}
.ip-alert > i:first-child, .ip-alert-ico { color: var(--ip-info); font-size: 16px; line-height: 1.2; flex-shrink: 0; }
.ip-alert-title { font-weight: 600; display: block; margin-bottom: 2px; }
.ip-alert-ok   { background: var(--ip-ok-l);   border-color: var(--ip-ok-m); }
.ip-alert-ok   > i:first-child { color: var(--ip-ok); }
.ip-alert-warn { background: var(--ip-warn-l); border-color: var(--ip-warn-m); }
.ip-alert-warn > i:first-child { color: var(--ip-warn); }
.ip-alert-bad  { background: var(--ip-bad-l);  border-color: var(--ip-bad-m); }
.ip-alert-bad  > i:first-child { color: var(--ip-bad); }

/* ── Key / value list ── */
.ip-kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; margin: 0; }
.ip-kv > dt, .ip-kv > dd { padding: 9px 0; border-bottom: 1px solid var(--ip-b1); margin: 0; }
.ip-kv > dt { font-size: var(--ip-fs-xs); font-weight: 600; color: var(--ip-tx3); text-transform: uppercase; letter-spacing: .4px; padding-inline-end: 12px; }
.ip-kv > dd { font-size: var(--ip-fs-md); color: var(--ip-tx); word-break: break-word; }
.ip-kv > dt:last-of-type, .ip-kv > dd:last-of-type { border-bottom: 0; }

/* ── Avatar ── */
.ip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--ip-acc);
    color: #fff;
    font-family: var(--ip-mono);
    font-size: var(--ip-fs-xs);
    font-weight: 700;
    text-transform: uppercase;
}
.ip-avatar-sm { width: 24px; height: 24px; font-size: 9px; }
.ip-avatar-lg { width: 44px; height: 44px; font-size: var(--ip-fs-md); }

/* ── Toolbar (search + filters + actions above a list) ── */
.ip-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ip-sp-2); margin-bottom: var(--ip-sp-4); }
.ip-toolbar .ip-search { min-width: 220px; flex: 1 1 240px; max-width: 360px; }
.ip-toolbar .ip-select { width: auto; min-width: 150px; }

/* ── Menu (dropdown list inside a page) ── */
.ip-menu { background: var(--ip-s0); border: 1px solid var(--ip-b1); border-radius: var(--ip-r-lg); box-shadow: var(--ip-sh-lg); padding: 4px 0; min-width: 200px; }
.ip-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 14px; border: 0; background: none; text-align: start; font-size: var(--ip-fs-md); color: var(--ip-tx); text-decoration: none; cursor: pointer; }
.ip-menu-item:hover { background: var(--ip-hover); text-decoration: none; color: var(--ip-tx); }
.ip-menu-item-bad { color: var(--ip-bad); }
.ip-menu-sep { height: 1px; background: var(--ip-b1); margin: 4px 0; }

/* ── Empty state — compact variant for inside cards / tables ── */
.ip-empty-sm { padding: 28px 20px; }
.ip-empty-sm .ip-empty-ico { font-size: 30px; margin-bottom: 8px; }
.ip-empty-sm .ip-empty-title { font-size: var(--ip-fs-lg); }

/* ── Toast (one helper for every page: ip.toast(message, 'ok'|'bad'|'warn')) ── */
.ip-toast { z-index: 3000; pointer-events: none; transition: opacity .25s, transform .25s; opacity: 0; transform: translate(-50%, 12px); max-width: calc(100vw - 32px); white-space: normal; }
.ip-toast.show { transform: translate(-50%, 0); }
.ip-toast-ok   { background: var(--ip-ok); }
.ip-toast-bad  { background: var(--ip-bad); }
.ip-toast-warn { background: var(--ip-warn); }

/* ── Small layout utilities (use sparingly — prefer a component) ── */
.ip-row   { display: flex; align-items: center; gap: var(--ip-sp-2); flex-wrap: wrap; }
.ip-stack { display: flex; flex-direction: column; gap: var(--ip-sp-3); }
.ip-grow  { flex: 1 1 auto; min-width: 0; }
.ip-spacer { flex: 1; }
.ip-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ip-sp-4); }
.ip-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ip-sp-4); }
.ip-muted { color: var(--ip-tx3); }
.ip-text-sm { font-size: var(--ip-fs-sm); }
.ip-nowrap { white-space: nowrap; }
.ip-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
    .ip-grid-2, .ip-grid-3 { grid-template-columns: 1fr; }
    .ip-kv { grid-template-columns: 1fr; }
    .ip-kv > dt { border-bottom: 0; padding-bottom: 0; }
}

/* ── Page container + two-column split (main | side panel) — Batch UI-2 ── */
.ip-container { max-width: 90%; margin: 0 auto; padding: 24px 28px 48px; }
.ip-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.ip-split > * { min-width: 0; }
.ip-sticky { position: sticky; top: calc(var(--ip-nav-h) + 16px); max-height: calc(100vh - var(--ip-nav-h) - 32px); overflow-y: auto; }
.ip-back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ip-fs-sm); color: var(--ip-tx2); text-decoration: none; margin-bottom: var(--ip-sp-4); }
.ip-back:hover { color: var(--ip-acc); text-decoration: none; }
.ip-mb { margin-bottom: var(--ip-sp-5); }
@media (max-width: 960px) {
    .ip-split { grid-template-columns: 1fr; }
    .ip-sticky { position: static; }
}

/* ── Key / value: section heading row spanning both columns ── */
.ip-kv > .ip-kv-section { grid-column: 1 / -1; margin: 12px 0 0; padding: 8px 10px; background: var(--ip-s1); border: 0; border-radius: var(--ip-r-sm); font-size: var(--ip-fs-xs); font-weight: 700; color: var(--ip-acc); text-transform: uppercase; letter-spacing: .5px; }
.ip-kv > .ip-kv-section:first-child { margin-top: 0; }
.ip-kv a { color: var(--ip-acc); }

/* ── Timeline (history of decisions / events) ── */
.ip-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.ip-timeline::before { content: ""; position: absolute; inset-inline-start: 8px; top: 6px; bottom: 6px; width: 1px; background: var(--ip-b1); }
.ip-timeline-item { position: relative; padding-inline-start: 26px; padding-bottom: 16px; }
.ip-timeline-item:last-child { padding-bottom: 0; }
.ip-timeline-dot { position: absolute; inset-inline-start: 0; top: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--ip-acc); border: 3px solid var(--ip-s0); box-shadow: 0 0 0 1px var(--ip-acc); }
.ip-timeline-dot-ok   { background: var(--ip-ok);   box-shadow: 0 0 0 1px var(--ip-ok); }
.ip-timeline-dot-warn { background: var(--ip-warn); box-shadow: 0 0 0 1px var(--ip-warn); }
.ip-timeline-dot-bad  { background: var(--ip-bad);  box-shadow: 0 0 0 1px var(--ip-bad); }
.ip-timeline-title { font-size: var(--ip-fs-md); font-weight: 600; color: var(--ip-tx); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ip-timeline-meta { font-size: var(--ip-fs-xs); color: var(--ip-tx3); margin-top: 2px; }

/* ── Quote / note block (decision notes, comments) ── */
.ip-quote { margin: 6px 0 0; padding: 6px 10px; font-size: var(--ip-fs-sm); color: var(--ip-tx2); background: var(--ip-s1); border-inline-start: 3px solid var(--ip-b2); border-radius: 0 var(--ip-r-sm) var(--ip-r-sm) 0; white-space: pre-line; }

/* ── Choice buttons (pick one action, e.g. approve / return / reject) ── */
.ip-choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--ip-sp-4); }
.ip-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--ip-r);
    border: 1.5px solid var(--ip-b2);
    background: var(--ip-s0);
    color: var(--ip-tx);
    font-family: var(--ip-body);
    font-size: var(--ip-fs-md);
    font-weight: 600;
    text-align: start;
    cursor: pointer;
    transition: background var(--ip-ease), border-color var(--ip-ease), box-shadow var(--ip-ease);
}
.ip-choice small { font-weight: 400; font-size: var(--ip-fs-xs); color: var(--ip-tx2); }
.ip-choice:hover { background: var(--ip-s1); }
.ip-choice:focus-visible { outline: none; box-shadow: var(--ip-focus); }
.ip-choice.is-selected { box-shadow: 0 0 0 2px currentColor inset; }
.ip-choice-ok   { color: var(--ip-ok);   border-color: var(--ip-ok-m); }
.ip-choice-ok:hover, .ip-choice-ok.is-selected { background: var(--ip-ok-l); }
.ip-choice-warn { color: var(--ip-warn); border-color: var(--ip-warn-m); }
.ip-choice-warn:hover, .ip-choice-warn.is-selected { background: var(--ip-warn-l); }
.ip-choice-bad  { color: var(--ip-bad);  border-color: var(--ip-bad-m); }
.ip-choice-bad:hover, .ip-choice-bad.is-selected { background: var(--ip-bad-l); }

/* ── Text colours by meaning ── */
.ip-text-ok   { color: var(--ip-ok); }
.ip-text-warn { color: var(--ip-warn); }
.ip-text-bad  { color: var(--ip-bad); }
.ip-strong { font-weight: 600; }

/* ── Side-navigation layout (filters / sections on the side, content next to it) — Batch UI-3 ── */
.ip-layout-side { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.ip-sidenav { position: sticky; top: calc(var(--ip-nav-h) + 16px); max-height: calc(100vh - var(--ip-nav-h) - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ip-sidenav-label { font-size: var(--ip-fs-2xs); font-weight: 700; color: var(--ip-tx3); text-transform: uppercase; letter-spacing: .8px; padding: 14px 10px 6px; }
.ip-sidenav-label:first-child { padding-top: 0; }
.ip-sidenav-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border: 0; border-radius: var(--ip-r); background: none;
    font-family: var(--ip-body); font-size: var(--ip-fs-md); color: var(--ip-tx2);
    text-align: start; text-decoration: none; cursor: pointer;
}
.ip-sidenav-item:hover { background: var(--ip-s2); color: var(--ip-tx); text-decoration: none; }
.ip-sidenav-item.active { background: var(--ip-acc-l); color: var(--ip-acc); font-weight: 600; }
.ip-sidenav-item:focus-visible { outline: none; box-shadow: var(--ip-focus); }
.ip-sidenav-item > span:first-child { width: 18px; text-align: center; flex-shrink: 0; }
.ip-sidenav-item .ip-badge { margin-inline-start: auto; }
.ip-sidenav-sep { height: 1px; background: var(--ip-b1); margin: 10px 4px; }
@media (max-width: 960px) {
    .ip-layout-side { grid-template-columns: 1fr; }
    .ip-sidenav { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
    .ip-sidenav-label, .ip-sidenav-sep { display: none; }
    .ip-sidenav-item { width: auto; }
}

/* ── Section subtitle (inside cards, drawers, dialogs) ── */
.ip-subtitle { font-size: var(--ip-fs-xs); font-weight: 700; color: var(--ip-tx3); text-transform: uppercase; letter-spacing: .6px; margin: 18px 0 8px; }
.ip-subtitle:first-child { margin-top: 0; }

/* ── Progress bar (widths by class — no inline style) ── */
.ip-progress { height: 6px; border-radius: 3px; background: var(--ip-s3); overflow: hidden; flex: 1; min-width: 40px; }
.ip-progress-fill { height: 100%; border-radius: 3px; background: var(--ip-acc); }
.ip-progress-ok   { background: var(--ip-ok); }
.ip-progress-warn { background: var(--ip-warn); }
.ip-progress-bad  { background: var(--ip-bad); }
.ip-pct-0 { width: 0%; }
.ip-pct-5 { width: 5%; }
.ip-pct-10 { width: 10%; }
.ip-pct-15 { width: 15%; }
.ip-pct-20 { width: 20%; }
.ip-pct-25 { width: 25%; }
.ip-pct-30 { width: 30%; }
.ip-pct-35 { width: 35%; }
.ip-pct-40 { width: 40%; }
.ip-pct-45 { width: 45%; }
.ip-pct-50 { width: 50%; }
.ip-pct-55 { width: 55%; }
.ip-pct-60 { width: 60%; }
.ip-pct-65 { width: 65%; }
.ip-pct-70 { width: 70%; }
.ip-pct-75 { width: 75%; }
.ip-pct-80 { width: 80%; }
.ip-pct-85 { width: 85%; }
.ip-pct-90 { width: 90%; }
.ip-pct-95 { width: 95%; }
.ip-pct-100 { width: 100%; }
/* Label + bar + number on one line (workload, capacity) */
.ip-bar-row { display: flex; align-items: center; gap: 8px; font-size: var(--ip-fs-sm); padding: 4px 0; }
.ip-bar-name { width: 90px; flex-shrink: 0; color: var(--ip-tx2); }
.ip-bar-num { width: 28px; text-align: end; font-family: var(--ip-mono); font-weight: 600; }

/* ── Avatar colours (the server picks one per person) ── */
.ip-avatar-c1 { background: #1a7c3e; }
.ip-avatar-c2 { background: #1a5fc9; }
.ip-avatar-c3 { background: #c94f1a; }
.ip-avatar-c4 { background: #7c3aed; }
.ip-avatar-c5 { background: #0f7a70; }
.ip-avatar-c6 { background: #b87d14; }
.ip-avatar-c7 { background: #c41a1a; }
.ip-avatar-group { background: var(--ip-purple); }
.ip-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ip-person-name { font-size: var(--ip-fs-md); color: var(--ip-tx); font-weight: 500; }
.ip-person-sub { font-size: var(--ip-fs-xs); color: var(--ip-tx3); }

/* ── Table rows: group heading, selected, warning; real checkboxes ── */
.ip-table tr.ip-row-group td { background: var(--ip-s1); font-weight: 600; cursor: pointer; }
.ip-table tr.is-selected td { background: var(--ip-acc-l); }
.ip-table tr.ip-row-bad td { background: var(--ip-bad-l); }
.ip-table tr.ip-row-muted td { color: var(--ip-tx3); }
.ip-table th.ip-cb-cell, .ip-table td.ip-cb-cell { width: 36px; padding-inline-end: 0; }
.ip-cb { width: 16px; height: 16px; margin: 0; accent-color: var(--ip-acc); cursor: pointer; vertical-align: middle; }
.ip-chevron { display: inline-block; width: 14px; transition: transform var(--ip-ease); color: var(--ip-tx3); }
.ip-row-group.is-open .ip-chevron { transform: rotate(90deg); }
[dir="rtl"] .ip-chevron { transform: scaleX(-1); }
[dir="rtl"] .ip-row-group.is-open .ip-chevron { transform: rotate(90deg); }

/* ── Dialog (modal without Bootstrap): .ip-dialog-overlay.open > .ip-dialog ── */
.ip-dialog-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1500; display: none; align-items: center; justify-content: center; padding: 16px; }
.ip-dialog-overlay.open { display: flex; }
.ip-dialog { background: var(--ip-s0); border-radius: var(--ip-r-xl); box-shadow: var(--ip-sh-lg); width: 480px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.ip-dialog-sm { width: 400px; }
.ip-dialog-lg { width: 880px; }
.ip-dialog-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--ip-b1); background: var(--ip-s1); }
.ip-dialog-title { flex: 1; font-family: var(--ip-head); font-size: var(--ip-fs-lg); font-weight: 600; color: var(--ip-tx); }
.ip-dialog-close { width: 30px; height: 30px; border-radius: var(--ip-r-sm); border: 1px solid var(--ip-b1); background: transparent; color: var(--ip-tx2); cursor: pointer; font-size: 16px; line-height: 1; }
.ip-dialog-close:hover { background: var(--ip-s2); color: var(--ip-tx); }
.ip-dialog-body { padding: 18px; overflow-y: auto; }
.ip-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--ip-b1); background: var(--ip-s1); flex-wrap: wrap; }

/* ── Pick list (choose one person / group) ── */
.ip-pick-list { display: flex; flex-direction: column; gap: 6px; }
.ip-pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--ip-b1); border-radius: var(--ip-r); background: var(--ip-s0); font-family: var(--ip-body); font-size: var(--ip-fs-md); color: var(--ip-tx); text-align: start; cursor: pointer; }
.ip-pick:hover { background: var(--ip-s1); }
.ip-pick:focus-visible { outline: none; box-shadow: var(--ip-focus); }
.ip-pick.is-selected { border-color: var(--ip-acc); background: var(--ip-acc-l); box-shadow: 0 0 0 1px var(--ip-acc) inset; }

/* ── Bulk action bar (appears when rows are selected) ── */
.ip-bulkbar { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 140%); z-index: 900; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-radius: 30px; background: var(--ip-nav-bg); color: #fff; box-shadow: var(--ip-sh-lg); transition: transform .2s, visibility .2s; visibility: hidden; font-size: var(--ip-fs-md); }
.ip-bulkbar.visible { transform: translate(-50%, 0); visibility: visible; }
.ip-bulkbar-sep { width: 1px; height: 20px; background: var(--ip-nav-line); }
.ip-bulkbar .ip-btn { background: rgba(255,255,255,.1); color: #fff; border: 0; }
.ip-bulkbar .ip-btn:hover { background: rgba(255,255,255,.2); }

/* ── Drawer: sits under the top navigation; footer buttons wrap ── */
.ip-drawer { top: var(--ip-nav-h); }
.ip-drawer-foot { flex-wrap: wrap; }
[dir="rtl"] .ip-drawer { right: auto; left: -500px; transition: left .24s ease; border-left: 0; border-right: 1px solid var(--ip-b1); }
[dir="rtl"] .ip-drawer.open { left: 0; }

/* ── UI-4 kit: card grid and states, list, steps, chips, multi-pick ── */
.ip-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--ip-sp-4); }
.ip-card-list { display: flex; flex-direction: column; gap: 12px; }
.ip-card.is-muted { opacity: .6; }
.ip-card.is-bad { border-color: var(--ip-bad-m); }
.ip-list { list-style: none; margin: 0; padding: 0; }
.ip-list > li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--ip-b1); }
.ip-list > li:last-child { border-bottom: 0; }
.ip-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 14px 0 0; padding: 0; }
.ip-step { display: flex; align-items: center; gap: 6px; font-size: var(--ip-fs-xs); color: var(--ip-tx3); }
.ip-step + .ip-step::before { content: ""; width: 24px; height: 2px; background: var(--ip-b1); }
.ip-step.is-done + .ip-step::before { background: var(--ip-ok); }
.ip-step-dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--ip-s2); border: 1px solid var(--ip-b1); color: var(--ip-tx3); }
.ip-step.is-done .ip-step-dot { background: var(--ip-ok); border-color: var(--ip-ok); color: #fff; }
.ip-step.is-current { color: var(--ip-tx); font-weight: 600; }
.ip-step.is-current .ip-step-dot { background: var(--ip-warn-l); border-color: var(--ip-warn); color: var(--ip-warn); }
.ip-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 8px; margin-bottom: 10px; background: var(--ip-s1); border: 1px dashed var(--ip-b2); border-radius: var(--ip-r-sm); }
.ip-chip { display: inline-flex; align-items: center; gap: 5px; padding-block: 3px; padding-inline: 10px 4px; background: var(--ip-s0); border: 1px solid var(--ip-b1); border-radius: 20px; font-size: var(--ip-fs-sm); color: var(--ip-tx); }
.ip-chip-warn { border-color: var(--ip-warn-m); }
.ip-chip-x { padding: 0 5px; border: 0; border-radius: 50%; background: transparent; color: var(--ip-tx3); font-size: 15px; line-height: 1.2; cursor: pointer; }
.ip-chip-x:hover { background: var(--ip-bad-l); color: var(--ip-bad); }
.ip-scroll { max-height: 260px; overflow-y: auto; }
.ip-pick-check { margin-inline-start: auto; width: 18px; height: 18px; flex-shrink: 0; border: 2px solid var(--ip-b2); border-radius: 4px; }
.ip-pick.is-selected .ip-pick-check { background: var(--ip-acc); border-color: var(--ip-acc); }

/* ── Switch (on/off toggle): <label class="ip-switch"><input type="checkbox"><span></span> optional text</label> — Batch UI-5 ── */
.ip-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--ip-fs-md); color: var(--ip-tx); user-select: none; }
.ip-switch > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.ip-switch > input + span { position: relative; flex-shrink: 0; width: 34px; height: 20px; border-radius: 10px; background: var(--ip-b2); transition: background var(--ip-ease), box-shadow var(--ip-ease); }
.ip-switch > input + span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--ip-sh); transition: transform var(--ip-ease); }
.ip-switch > input:checked + span { background: var(--ip-acc); }
.ip-switch > input:checked + span::after { transform: translateX(14px); }
[dir="rtl"] .ip-switch > input:checked + span::after { transform: translateX(-14px); }
.ip-switch > input:focus-visible + span { box-shadow: var(--ip-focus); }
.ip-switch > input:disabled + span { opacity: .5; cursor: not-allowed; }
/* ── UI-5 kit (Facilities): clickable stat box, sortable column head, pager, map box, muted timeline dot ── */
.ip-stat-link { cursor: pointer; transition: border-color var(--ip-ease), box-shadow var(--ip-ease); }
.ip-stat-link:hover { border-color: var(--ip-b2); box-shadow: var(--ip-sh-lg); }
.ip-stat-link:focus-visible { outline: none; box-shadow: var(--ip-focus); }
.ip-table thead th.ip-th-sort { cursor: pointer; user-select: none; }
.ip-table thead th.ip-th-sort:hover { color: var(--ip-tx); }
.ip-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 14px 0; }
.ip-pager:empty { display: none; }
.ip-map { height: 280px; border-radius: var(--ip-r-lg); overflow: hidden; border: 1px solid var(--ip-b1); }
.ip-timeline-dot-muted { background: var(--ip-s3); box-shadow: 0 0 0 1px var(--ip-b2); }
/* ── UI-5 kit additions (Batch UI-5, InspectionReview) ── */
/* 4th colour band for progress bars / text (e.g. "fair" scores), next to ok / warn / bad */
.ip-progress-info { background: var(--ip-info); }
.ip-text-info { color: var(--ip-info); }
/* An image that fits its container (photo viewer in a dialog) */
.ip-img-fit { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: var(--ip-r); }
/* ── UI-5: table inside a card — the card draws the frame (no double border) ── */
.ip-card > .ip-table-wrap { border: 0; border-radius: 0; box-shadow: none; }

/* ══════════════════════════════════════════════════════════
   AUTH PAGES (Batch GS — security)
   Views/Shared/_Layout_Auth.cshtml: sign-in, two-step, password,
   access-restricted pages. Behaviour: wwwroot/js/ip-auth.js
══════════════════════════════════════════════════════════ */
.ip-auth { display: grid; grid-template-columns: minmax(0, 1fr) 480px; min-height: 100vh; background: var(--ip-bg); }
.ip-auth-hero { display: flex; flex-direction: column; justify-content: space-between; gap: var(--ip-sp-8); padding: 48px 56px; background: var(--ip-nav-bg); color: #fff; }
.ip-auth-logo { height: 64px; width: auto; max-width: 240px; object-fit: contain; align-self: flex-start; }
.ip-auth-eyebrow { font-family: var(--ip-mono); font-size: var(--ip-fs-xs); letter-spacing: 2px; text-transform: uppercase; color: var(--ip-brand2); margin-bottom: var(--ip-sp-4); }
.ip-auth-hero-title { font-family: var(--ip-head); font-size: 36px; font-weight: 700; line-height: 1.2; margin-bottom: var(--ip-sp-4); }
.ip-auth-hero-title span { color: var(--ip-brand2); }
.ip-auth-hero-desc { font-size: var(--ip-fs-md); line-height: 1.8; max-width: 380px; color: var(--ip-nav-tx); margin: 0 0 var(--ip-sp-6); }
.ip-auth-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ip-auth-feats li { display: flex; align-items: center; gap: var(--ip-sp-3); font-size: var(--ip-fs-md); font-weight: 600; }
.ip-auth-feats i { flex-shrink: 0; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; border-radius: var(--ip-r-lg); background: var(--ip-nav-line); }
.ip-auth-feats small { display: block; font-weight: 400; font-size: var(--ip-fs-xs); color: var(--ip-nav-tx); }
.ip-auth-hero-foot { font-family: var(--ip-mono); font-size: var(--ip-fs-2xs); letter-spacing: 2px; text-transform: uppercase; color: var(--ip-nav-tx); }
.ip-auth-main { position: relative; display: flex; flex-direction: column; justify-content: center; gap: var(--ip-sp-6); padding: 64px 48px 28px; background: var(--ip-s0); box-shadow: var(--ip-sh-lg); }
.ip-auth-lang { position: absolute; top: 20px; inset-inline-end: 20px; }
.ip-auth-card, .ip-auth-foot { width: 100%; max-width: 400px; margin: 0 auto; }
.ip-auth-foot { padding-top: 18px; border-top: 1px solid var(--ip-b1); text-align: center; font-size: var(--ip-fs-xs); color: var(--ip-tx3); line-height: 1.8; }
.ip-auth-foot a { color: var(--ip-acc); font-weight: 600; text-decoration: none; }
.ip-auth-foot a:hover { text-decoration: underline; }
@media (max-width: 860px) {
    .ip-auth { grid-template-columns: 1fr; }
    .ip-auth-hero { display: none; }
    .ip-auth-main { padding: 72px 20px 24px; box-shadow: none; }
}

/* Password field with a show / hide button (data-ip-pwd-toggle) */
.ip-pwd { position: relative; }
.ip-pwd .ip-fi { padding-inline-end: 40px; }
.ip-pwd-toggle { position: absolute; top: 50%; inset-inline-end: 6px; transform: translateY(-50%); background: none; color: var(--ip-tx3); }
.ip-pwd-toggle:hover { color: var(--ip-tx); }

/* One-time codes, authenticator key, recovery codes, numbered set-up steps */
.ip-code-input { font-family: var(--ip-mono); font-size: var(--ip-fs-xl); letter-spacing: 6px; text-align: center; direction: ltr; }
.ip-secret { margin-top: var(--ip-sp-2); padding: 10px 12px; font-family: var(--ip-mono); font-size: var(--ip-fs-lg); letter-spacing: 1px; word-break: break-all; background: var(--ip-s2); border: 1px solid var(--ip-b1); border-radius: var(--ip-r); direction: ltr; text-align: left; }
.ip-recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: var(--ip-sp-3) 0 0; padding: 12px 16px; list-style: none; font-family: var(--ip-mono); font-size: var(--ip-fs-md); background: var(--ip-s2); border: 1px solid var(--ip-b1); border-radius: var(--ip-r); direction: ltr; }
.ip-steps-list { margin: 0 0 var(--ip-sp-5); padding-inline-start: 20px; display: flex; flex-direction: column; gap: var(--ip-sp-3); font-size: var(--ip-fs-md); color: var(--ip-tx); }

/* ── GS-2 kit additions: slider, small image preview ── */
/* Range slider in the kit accent colour: <div class="ip-row"><input type="range" class="ip-range ip-grow"> <span class="ip-badge ip-badge-mono">500 m</span></div> */
.ip-range { width: 100%; min-width: 120px; margin: 0; accent-color: var(--ip-acc); cursor: pointer; }
.ip-range:focus-visible { outline: none; box-shadow: var(--ip-focus); border-radius: var(--ip-r-sm); }
/* Small uploaded-image preview (logo, favicon) above a file input */
.ip-thumb { display: block; width: auto; max-width: 100%; max-height: 50px; margin-bottom: var(--ip-sp-2); object-fit: contain; }
.ip-thumb-sm { max-height: 32px; }

/* ── GS-3 kit additions: clickable step, spinning icon ── */
/* A step of .ip-steps you can go back to (the JS adds role="button" + tabindex) */
.ip-step-link { cursor: pointer; border-radius: var(--ip-r-sm); }
.ip-step-link:hover { color: var(--ip-acc); }
.ip-step-link:focus-visible { outline: none; box-shadow: var(--ip-focus); }
/* Spinning icon for "working…" states: <i class="ti ti-loader-2 ip-spin"></i> */
@keyframes ip-spin { to { transform: rotate(360deg); } }
.ip-spin { display: inline-block; animation: ip-spin .8s linear infinite; }

/* ── UI-6 kit additions (Batch UI-6, inspection screen) ── */
/* Choice buttons in one row that wrap on small screens (answers, severity):
   <div class="ip-choices ip-choices-inline"><button class="ip-choice ip-choice-ok is-selected">…</button>…</div> */
.ip-choices-inline { flex-direction: row; flex-wrap: wrap; margin-bottom: 0; }
.ip-choices-inline > .ip-choice { flex: 1 1 110px; width: auto; min-height: 44px; align-items: center; justify-content: center; text-align: center; }

/* Action bar that stays at the bottom of the screen while a long form / wizard scrolls */
.ip-actionbar { position: sticky; bottom: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: var(--ip-sp-2); margin-top: var(--ip-sp-5); padding: 10px 14px; background: var(--ip-s0); border: 1px solid var(--ip-b1); border-radius: var(--ip-r-lg); box-shadow: var(--ip-sh-lg); }
.ip-actionbar .ip-btn { min-height: 40px; }

/* Media tiles (photos / files) with a remove button:
   <div class="ip-media-grid"><div class="ip-media"><a class="ip-media-img" href="…"><img src="…" alt=""></a>
   <div class="ip-media-cap">name</div><button class="ip-media-x">×</button></div></div> */
.ip-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--ip-sp-2); }
.ip-media-grid:empty { display: none; }
.ip-media { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ip-b1); border-radius: var(--ip-r); background: var(--ip-s1); overflow: hidden; }
.ip-media.is-bad { border-color: var(--ip-bad-m); }
.ip-media-img { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; font-size: 26px; color: var(--ip-tx3); background: var(--ip-s2); text-decoration: none; overflow: hidden; }
.ip-media-img > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-media-cap { padding: 4px 6px; font-size: var(--ip-fs-2xs); color: var(--ip-tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-media-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--ip-s0); color: var(--ip-bad); box-shadow: var(--ip-sh); font-size: 16px; line-height: 1; cursor: pointer; }
.ip-media-x:focus-visible { outline: none; box-shadow: var(--ip-focus); }

/* Signature pad (canvas); the pen colour is the text colour: <canvas class="ip-sign" width="800" height="150"> */
.ip-sign { display: block; width: 100%; height: 150px; border: 1.5px dashed var(--ip-b2); border-radius: var(--ip-r); background: var(--ip-s0); color: var(--ip-tx); touch-action: none; cursor: crosshair; }
/* ── UI-6B kit additions: extra-large avatar, avatar with a photo ── */
/* <label for="photoInput" class="ip-avatar ip-avatar-xl"><img src="…" alt=""></label>  (profile header) */
.ip-avatar-xl { width: 72px; height: 72px; font-size: var(--ip-fs-xl); }
.ip-avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
label.ip-avatar { cursor: pointer; }
label.ip-avatar:hover { box-shadow: var(--ip-focus); }

/* ── UI kit reference page (/UiKit) ── */
.uk-page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.uk-section { margin-bottom: 28px; }
.uk-section > h2 { font-family: var(--ip-head); font-size: var(--ip-fs-xl); color: var(--ip-tx); margin: 0 0 4px; }
.uk-section > p { font-size: var(--ip-fs-sm); color: var(--ip-tx2); margin: 0 0 12px; }
.uk-demo { background: var(--ip-s0); border: 1px solid var(--ip-b1); border-radius: var(--ip-r-lg); padding: 18px; }
.uk-code { display: block; margin-top: 10px; padding: 10px 12px; background: var(--ip-s1); border: 1px dashed var(--ip-b1); border-radius: var(--ip-r-sm); font-family: var(--ip-mono); font-size: var(--ip-fs-xs); color: var(--ip-tx2); white-space: pre-wrap; word-break: break-word; }
.uk-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.uk-swatch { border: 1px solid var(--ip-b1); border-radius: var(--ip-r); overflow: hidden; font-size: var(--ip-fs-xs); background: var(--ip-s0); }
.uk-swatch-color { height: 44px; background: var(--uk-c); border-bottom: 1px solid var(--ip-b1); }
.uk-swatch-name { padding: 6px 8px; font-family: var(--ip-mono); color: var(--ip-tx2); }

.uk-sw-bg { --uk-c: var(--ip-bg); }
.uk-sw-s0 { --uk-c: var(--ip-s0); }
.uk-sw-s1 { --uk-c: var(--ip-s1); }
.uk-sw-s2 { --uk-c: var(--ip-s2); }
.uk-sw-s3 { --uk-c: var(--ip-s3); }
.uk-sw-b1 { --uk-c: var(--ip-b1); }
.uk-sw-b2 { --uk-c: var(--ip-b2); }
.uk-sw-tx { --uk-c: var(--ip-tx); }
.uk-sw-tx2 { --uk-c: var(--ip-tx2); }
.uk-sw-tx3 { --uk-c: var(--ip-tx3); }
.uk-sw-acc { --uk-c: var(--ip-acc); }
.uk-sw-acc2 { --uk-c: var(--ip-acc2); }
.uk-sw-ok { --uk-c: var(--ip-ok); }
.uk-sw-warn { --uk-c: var(--ip-warn); }
.uk-sw-bad { --uk-c: var(--ip-bad); }
.uk-sw-info { --uk-c: var(--ip-info); }
.uk-sw-purple { --uk-c: var(--ip-purple); }
.uk-sw-teal { --uk-c: var(--ip-teal); }
.uk-sw-orange { --uk-c: var(--ip-orange); }
.uk-sw-brand { --uk-c: var(--ip-brand); }
.uk-sw-nav-bg { --uk-c: var(--ip-nav-bg); }

.nav-inbox-badge.is-visible { display: inline-block; }   /* Batch UI-1: shown by ip-ui.js */
.ip-fade-out { opacity: 0; transition: opacity .5s; }
.ip-inline-form { display: inline; margin: 0; }
.ip-num .ip-row { justify-content: flex-end; }
.ip-mt-sm { margin-top: var(--ip-sp-2); }


/* InspectPro AI logo */
.ip-ai-button { display: inline-flex; align-items: center; gap: 5px; }
.ip-ai-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAKMWlDQ1BJQ0MgUHJvZmlsZQAAeJydlndUU9kWh8+9N71QkhCKlNBraFICSA29SJEuKjEJEErAkAAiNkRUcERRkaYIMijggKNDkbEiioUBUbHrBBlE1HFwFBuWSWStGd+8ee/Nm98f935rn73P3Wfvfda6AJD8gwXCTFgJgAyhWBTh58WIjYtnYAcBDPAAA2wA4HCzs0IW+EYCmQJ82IxsmRP4F726DiD5+yrTP4zBAP+flLlZIjEAUJiM5/L42VwZF8k4PVecJbdPyZi2NE3OMErOIlmCMlaTc/IsW3z2mWUPOfMyhDwZy3PO4mXw5Nwn4405Er6MkWAZF+cI+LkyviZjg3RJhkDGb+SxGXxONgAoktwu5nNTZGwtY5IoMoIt43kA4EjJX/DSL1jMzxPLD8XOzFouEiSniBkmXFOGjZMTi+HPz03ni8XMMA43jSPiMdiZGVkc4XIAZs/8WRR5bRmyIjvYODk4MG0tbb4o1H9d/JuS93aWXoR/7hlEH/jD9ld+mQ0AsKZltdn6h21pFQBd6wFQu/2HzWAvAIqyvnUOfXEeunxeUsTiLGcrq9zcXEsBn2spL+jv+p8Of0NffM9Svt3v5WF485M4knQxQ143bmZ6pkTEyM7icPkM5p+H+B8H/nUeFhH8JL6IL5RFRMumTCBMlrVbyBOIBZlChkD4n5r4D8P+pNm5lona+BHQllgCpSEaQH4eACgqESAJe2Qr0O99C8ZHA/nNi9GZmJ37z4L+fVe4TP7IFiR/jmNHRDK4ElHO7Jr8WgI0IABFQAPqQBvoAxPABLbAEbgAD+ADAkEoiARxYDHgghSQAUQgFxSAtaAYlIKtYCeoBnWgETSDNnAYdIFj4DQ4By6By2AE3AFSMA6egCnwCsxAEISFyBAVUod0IEPIHLKFWJAb5AMFQxFQHJQIJUNCSAIVQOugUqgcqobqoWboW+godBq6AA1Dt6BRaBL6FXoHIzAJpsFasBFsBbNgTzgIjoQXwcnwMjgfLoK3wJVwA3wQ7oRPw5fgEVgKP4GnEYAQETqiizARFsJGQpF4JAkRIauQEqQCaUDakB6kH7mKSJGnyFsUBkVFMVBMlAvKHxWF4qKWoVahNqOqUQdQnag+1FXUKGoK9RFNRmuizdHO6AB0LDoZnYsuRlegm9Ad6LPoEfQ4+hUGg6FjjDGOGH9MHCYVswKzGbMb0445hRnGjGGmsVisOtYc64oNxXKwYmwxtgp7EHsSewU7jn2DI+J0cLY4X1w8TogrxFXgWnAncFdwE7gZvBLeEO+MD8Xz8MvxZfhGfA9+CD+OnyEoE4wJroRIQiphLaGS0EY4S7hLeEEkEvWITsRwooC4hlhJPEQ8TxwlviVRSGYkNimBJCFtIe0nnSLdIr0gk8lGZA9yPFlM3kJuJp8h3ye/UaAqWCoEKPAUVivUKHQqXFF4pohXNFT0VFysmK9YoXhEcUjxqRJeyUiJrcRRWqVUo3RU6YbStDJV2UY5VDlDebNyi/IF5UcULMWI4kPhUYoo+yhnKGNUhKpPZVO51HXURupZ6jgNQzOmBdBSaaW0b2iDtCkVioqdSrRKnkqNynEVKR2hG9ED6On0Mvph+nX6O1UtVU9Vvuom1TbVK6qv1eaoeajx1UrU2tVG1N6pM9R91NPUt6l3qd/TQGmYaYRr5Grs0Tir8XQObY7LHO6ckjmH59zWhDXNNCM0V2ju0xzQnNbS1vLTytKq0jqj9VSbru2hnaq9Q/uE9qQOVcdNR6CzQ+ekzmOGCsOTkc6oZPQxpnQ1df11Jbr1uoO6M3rGelF6hXrtevf0Cfos/ST9Hfq9+lMGOgYhBgUGrQa3DfGGLMMUw12G/YavjYyNYow2GHUZPTJWMw4wzjduNb5rQjZxN1lm0mByzRRjyjJNM91tetkMNrM3SzGrMRsyh80dzAXmu82HLdAWThZCiwaLG0wS05OZw2xljlrSLYMtCy27LJ9ZGVjFW22z6rf6aG1vnW7daH3HhmITaFNo02Pzq62ZLde2xvbaXPJc37mr53bPfW5nbse322N3055qH2K/wb7X/oODo4PIoc1h0tHAMdGx1vEGi8YKY21mnXdCO3k5rXY65vTW2cFZ7HzY+RcXpkuaS4vLo3nG8/jzGueNueq5clzrXaVuDLdEt71uUnddd457g/sDD30PnkeTx4SnqWeq50HPZ17WXiKvDq/XbGf2SvYpb8Tbz7vEe9CH4hPlU+1z31fPN9m31XfKz95vhd8pf7R/kP82/xsBWgHcgOaAqUDHwJWBfUGkoAVB1UEPgs2CRcE9IXBIYMj2kLvzDecL53eFgtCA0O2h98KMw5aFfR+OCQ8Lrwl/GGETURDRv4C6YMmClgWvIr0iyyLvRJlESaJ6oxWjE6Kbo1/HeMeUx0hjrWJXxl6K04gTxHXHY+Oj45vipxf6LNy5cDzBPqE44foi40V5iy4s1licvvj4EsUlnCVHEtGJMYktie85oZwGzvTSgKW1S6e4bO4u7hOeB28Hb5Lvyi/nTyS5JpUnPUp2Td6ePJninlKR8lTAFlQLnqf6p9alvk4LTduf9ik9Jr09A5eRmHFUSBGmCfsytTPzMoezzLOKs6TLnJftXDYlChI1ZUPZi7K7xTTZz9SAxESyXjKa45ZTk/MmNzr3SJ5ynjBvYLnZ8k3LJ/J9879egVrBXdFboFuwtmB0pefK+lXQqqWrelfrry5aPb7Gb82BtYS1aWt/KLQuLC98uS5mXU+RVtGaorH1futbixWKRcU3NrhsqNuI2ijYOLhp7qaqTR9LeCUXS61LK0rfb+ZuvviVzVeVX33akrRlsMyhbM9WzFbh1uvb3LcdKFcuzy8f2x6yvXMHY0fJjpc7l+y8UGFXUbeLsEuyS1oZXNldZVC1tep9dUr1SI1XTXutZu2m2te7ebuv7PHY01anVVda926vYO/Ner/6zgajhop9mH05+x42Rjf2f836urlJo6m06cN+4X7pgYgDfc2Ozc0tmi1lrXCrpHXyYMLBy994f9Pdxmyrb6e3lx4ChySHHn+b+O31w0GHe4+wjrR9Z/hdbQe1o6QT6lzeOdWV0iXtjusePhp4tLfHpafje8vv9x/TPVZzXOV42QnCiaITn07mn5w+lXXq6enk02O9S3rvnIk9c60vvG/wbNDZ8+d8z53p9+w/ed71/LELzheOXmRd7LrkcKlzwH6g4wf7HzoGHQY7hxyHui87Xe4Znjd84or7ldNXva+euxZw7dLI/JHh61HXb95IuCG9ybv56Fb6ree3c27P3FlzF3235J7SvYr7mvcbfjT9sV3qID0+6j068GDBgztj3LEnP2X/9H686CH5YcWEzkTzI9tHxyZ9Jy8/Xvh4/EnWk5mnxT8r/1z7zOTZd794/DIwFTs1/lz0/NOvm1+ov9j/0u5l73TY9P1XGa9mXpe8UX9z4C3rbf+7mHcTM7nvse8rP5h+6PkY9PHup4xPn34D94Tz+6TMXDkAAAiZSURBVHjarVdbkFTVFV37nPvsnm4mMBFBRKKCipaPjKJETc8oJj4QxdBdIhTjGAUDGLSsxA8TL9dUrCihKiSlwMREHk7UadEYrQQ1SlqTmGhQNBF8FFESiofowMx0932es/MxM0JFERD377119jpr77XXPsCBgzxAAEwA6NSLVmVPueC+dyZM/tXWcy5bOgEAmpuXm/icIT7rIwMEgH1AF1ESALgv6DkKjLEEOsqyM09fUPrl5evXz0kKhXXGFw6AAAaAnZnikWUqKwBkK2WBAJVGTFCNpnR+d8k1999YqbSmxWKXHGDq8AAwQAyI7ZiZfdOd+nQg4nf/kfvmCgCsKDayDtgwBKWp0lql2rZzS6fOWuWXyyUFbyF5nicOC8CfUJAE6NdHv3Brgxt+o4/ZPYLstu3WxMvebRy/2zUkDW8kNg0ipZVO4iCx3OwdpRtWd8D32fd9fbAgPkGXB4iFAD979AkjIIJNhnLcpj1j2RIs6hS+f0bP8+POm3Lfn0cNz00USHQ1ykjWMaRUcb6h0dJp8FTc3T29XJ5fLRa7ZLlcUofEwMkoEgEMRV5OZ/KJEZq17A4r1jBywjr+ffvM9s1jx91ACmQakjJGsEoptcWyslYQ9oam7U7OHNH03NXX3T+yXC6pgucZBw2gC5BFlPWLw0872dZWO2kTInYe3212T0gpeZU1865Mw93bF0/aFFPyuFa6+5Fft7exSM7TKnnVsXNOFPQF0rAmuA35F2beuOqUiu+nnrd/hfwfA0UQwKzsu/I6a4ap7LNgLrh063uvEOO7IRQPIdn0esNX76hcePl8yXpL8+zl5trO2Vtr0YetSRKstTN5N4rqIZE4zrLcStu81S2+37pfEGLv7YuyhLJ6ZUihxVXuFKFNiNT6WWHbm/9975iCc0b12b+ErB4DA7Hp3rblmpO46mR+9LVa6HqeJ9Z2LujVe347OYlqK1w356RJGAN6qGm4T7fN67za91vTQj8I2i8DDJBi4ycN2uV6QtsyOr/YA8T7W5AyQBaL26s6CRtIuK8PHbNozS+mP3HV1u76YNeXu7p057IZ7VFYu8t2cpbWKlU6NSwr81D7/N/cUvFb02KxS3xiVjCKEgD+lp80/c38ZN6Um8J/b5h0IwCsQ8HY95+Xh5y/ZOPQr/PLw85KK0ObJwyyN3AS9Q8jYNbczvnX37yGr7vpYX3t/Ifi2bc+yW1zH140+N+gTGlg3NJLo86xRV/mjWE6f1yPSjY213ecAUxWgM8EsDfA1tTsxKbYoo0ZyUN36+D587s3TBos38dS9tYZvt+ats3r/JZp2A8y2EmTJLKcvF2v1zrf0s+1r+/oSIrFLikGhw7XaG6DEMeHFBELvp2wPgE20uA49gHdgoI4vfbSBwpqEQPkCHFhpemUy0ooK/6YBWCw6VbeO2NNlEQXAbTLtBw7rPdEtp2dMY4u/MMVbQ80lsslRR4gWkY0D7USselLnG3qSbkysafSMnArjQEAe83Jo/UjnnKiiP6VkxjTzcE/+cOm5hZU9ABY/gQTsx84UdoNT0AY48KgHhtmzqoFtQ1xnFwlfECzjm7LmmjqpSCFVLcxQF/GB8R7fWGwVOjAU/LM7evrTPqHMYMahDwVTTuvJUCvQ0Hu21v9ne8ZKzva36rXelqTJHrbNG0zCntj03BOB+QT9OzIr4wzyXrV1I6TQqluq/vsqVu2bTjQDP/9qGOnNibZx0iTDinebio+6dyP3q7u66KDcfHFS+y1axdELVctLx8xrGmaQXEaRpo1DNOAqX9qQWXDJFLKSCwrtZ97Zvj4zVK7JFMHQtswUgdMCkoG0DJCKkOkOhhfNeuwIkfnhTxqt4huIeDOftVU0r2qKItyuRRdcvUD8xItrtyy7UM9LO9wY+NQs9rXs5LWjRnDqeZEs6AYCpINw1UZGMqFTBxI7cBQNpgYSgZIZQBlhKjLOidGoOzEVHlliypFmyft3HzSwKBhz/OE7/saAK6ctfJuTfb3q9WqrocpJ5yR+Yxe1lTKzDdSzW80GcapVa3hQgKaIDXDIIYUDMEaUqZgYgjSEAJQBEghSAnDULY2GhKgnoi/DviJKBe74PslVSwudqlx+AqGU+qr9sQgmIbpiqge/GDdo3N+jEeZDNLq0h5N1wcaQxQ0k2aSnMLQMQQIAgyiBACDkULrBJHUhiaGYtIWp3qbDHeasXMvAPxx9nJR7iglM67vGMVmrkxkndPX2xNJYdokONJJ9O3XnpnT2W/V0IQvMAZlN+M7q8+SwnwUZIyu1ashyHHCMN4RhGHp+TWzXywU1hmVSmv68cbbUigIVACgAqDwqYe/gyqNQwMvHnGCtee08XOOHjEkZ4u4+5iXlnSMdF1e3zwbHR1zkllzV0+T0l6hmbNRFIXCyDpBUN8QBPVpax+Zs3nf5J+6EX3GjkwAMU64Ozfh2IadJ4492uWoe9d/3npvdKWyMAKI2+Y/9D3TsO5JkghKpbFh5axavfZkX/DRzLWdC3oLBc+oVPx031MPfZW2hSZgV1TvHWkbCCoVPwR8ar/pkWWWlZkThb0pM5Pl5KwgqP+8fP/MBf3lYeH7lB5wJzwgA8MXZc9uzrwz+sjsSNcWHERqrmNbl2SyjVPC+p5YSGkRSURJfHPn0hlLPM8T/sKFDCI+5HfBp+9Q1b3eoJldN7/UNJ0pQW13bFqOJYTsTePwis6lM5YUPM/wfX+/yQ+xBANkyTyDmRlAqg1QGilWnDpug61U/O8kDqatXtb22qAiDutltF8oBAYsaBYAg203b6dp9KJKa+euXtb2WuEgk38+AFvfTnPZTEpkgKDZzeSNJAoe3P7ujotW3te+o1jskpWDTH6oKmAwE4gS1ynskNIcI4hkGPR5ncun39nf6Z7w/c9+iBwWA4WWhf1+r/XDQpjVNI2v61w+/c7BR+mg+RxK/A+V12P4BujEEQAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Supervisor dashboard: use the full available page width. */
.sv-full-width { max-width: 100%; }

/* ══════════════════════════════════════════════════════════
   BUILDPLUS DATA IMPORT (MOI Patch M1)
   Views/BuildPlus/Import/*. Behaviour: wwwroot/js/bp-import.js
   Uses the UI kit; only the pieces the kit did not have yet.
══════════════════════════════════════════════════════════ */
/* Collapsible card: <details class="ip-card"><summary class="ip-card-head">…</summary>…</details> */
details.ip-card > summary { cursor: pointer; list-style: none; }
details.ip-card > summary::-webkit-details-marker { display: none; }
details.ip-card > summary::after { content: "▾"; margin-inline-start: auto; padding-inline-start: 10px; color: var(--ip-tx3); }
details.ip-card:not([open]) > summary::after { content: "▸"; }
[dir="rtl"] details.ip-card:not([open]) > summary::after { content: "◂"; }
details.ip-card:not([open]) > summary { border-bottom: 0; }
/* Mapping table: dropdowns keep a readable width, value-map box under the transform */
#impMapTable .ip-select { min-width: 180px; }
#impMapTable .ip-fi { min-width: 90px; }
#impMapTable td { vertical-align: top; }

/* ══════════════════════════════════════════════════════════
   DATA IMPORT component (Form Builder)
   Designer: .fb2-import-*   ·   Runtime: .fbr-import-*
   ══════════════════════════════════════════════════════════ */
.fb2-import-codes { font-family: var(--ip-mono); font-size: 12px; margin-top: 4px; }
.fb2-import-err { color: var(--ip-red); }
.fb2-import-warn { color: var(--ip-gold); }
.fb2-imap-summary { font-size: 12px; margin-bottom: 4px; }
.fb2-imap-open { margin-top: 6px; }

/* Mapping popup: one row per table field */
.fb2-imap.ip-dialog { width: 1180px; height: calc(100vh - 48px); }
.fb2-imap-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; border-bottom: 1px solid var(--ip-b1); }
.fb2-imap-search { width: 240px; max-width: 100%; }
.fb2-imap-tools .is-active { background: var(--ip-acc-l); border-color: var(--ip-acc); color: var(--ip-acc); }
.fb2-imap-count { margin-inline-start: auto; color: var(--ip-tx2); font-size: 12px; }
.fb2-imap-body { flex: 1; padding: 0 18px; }
.fb2-imap-table { font-size: 13px; }
.fb2-imap-table thead th { position: sticky; top: 0; z-index: 1; background: var(--ip-s1); }
.fb2-imap-table td { vertical-align: top; padding-top: 6px; padding-bottom: 6px; }
.fb2-imap-table .ip-select { width: 100%; min-width: 0; }
.fb2-imap-table td:nth-child(1) { width: 22%; }
.fb2-imap-table td:nth-child(2) { width: 28%; }
.fb2-imap-table td:nth-child(4) { width: 16%; }
.fb2-imap-table tr.is-off .fb2-imap-field { color: var(--ip-tx2); }
.fb2-imap-table tr.is-bad { background: var(--ip-red-l); }
.fb2-imap-c { text-align: center; width: 8%; }
.fb2-imap-field { font-weight: 600; }
.fb2-imap-name { color: var(--ip-tx3); font-family: var(--ip-mono); font-size: 11px; }
.fb2-imap-req { color: var(--ip-red); }
.fb2-imap-empty { text-align: center; color: var(--ip-tx3); padding: 16px; }
.fb2-imap-foot-info { padding: 8px 18px; border-top: 1px solid var(--ip-b1); font-size: 12px; max-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.fb2-imap-foot-info:empty { display: none; }
.fb2-imap-unused { color: var(--ip-tx2); }

.fbr-import { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.fbr-import [hidden] { display: none !important; }
.fbr-import-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fbr-import-file { color: var(--ip-tx2); font-size: 12px; }
.fbr-import-views .is-active { background: var(--ip-acc-l); border-color: var(--ip-acc); color: var(--ip-acc); }
.fbr-import-export { display: flex; gap: 4px; margin-inline-start: auto; }
.fbr-import-counters { display: flex; flex-wrap: wrap; gap: 6px; }
.fbr-import-msg {
    color: var(--ip-red);
    background: var(--ip-red-l);
    border: 1px solid var(--ip-red-m);
    border-radius: var(--ip-r-sm);
    padding: 8px 10px;
    font-size: 13px;
}
.fbr-import-msg:empty { display: none; }
.fbr-import-extra {
    color: var(--ip-gold);
    background: var(--ip-gold-l);
    border-radius: var(--ip-r-sm);
    padding: 6px 10px;
    font-size: 12px;
}
.fbr-import-extra:empty { display: none; }
.fbr-import-grid { overflow-x: auto; max-width: 100%; }
.fbr-import-table { font-size: 12px; min-width: 100%; }
.fbr-import-table th { white-space: nowrap; }
.fbr-import-table td { vertical-align: top; }
.fbr-import-table tr.is-incomplete { background: var(--ip-red-l); }
.fbr-import-table tr.is-approved { background: var(--ip-blue-l); }
.fbr-import-table td.is-bad { box-shadow: inset 0 -2px 0 var(--ip-red); }
.fbr-import-sel { width: 28px; text-align: center; }
.fbr-import-num { color: var(--ip-tx3); font-family: var(--ip-mono); }
.fbr-import-req { color: var(--ip-red); }
.fbr-import-when { color: var(--ip-tx3); font-size: 11px; margin-top: 2px; }
.fbr-import-cell { min-width: 110px; padding: 3px 6px; font-size: 12px; }
.fbr-import-reason { min-width: 180px; }
.fbr-import-reason .is-err { color: var(--ip-red); }
.fbr-import-reason .is-warn { color: var(--ip-gold); }
.fbr-import-empty { color: var(--ip-tx3); padding: 14px; text-align: center; }
.fbr-import-pager { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; }
.fbr-import-pager:empty { display: none; }

/* Data Import grid: row edit buttons, lock, select all */
.fbr-import-act { white-space: nowrap; width: 1%; }
.fbr-import-act > .ip-btn { display: none; }
.fbr-import-table tr.is-editing .fbr-import-act > .ip-btn { display: inline-flex; }
.fbr-import-act > .ip-btn + .ip-btn { margin-inline-start: 4px; }
.fbr-import-table tr.is-editing { box-shadow: inset 3px 0 0 var(--ip-gold); }
.fbr-import-lock { color: var(--ip-tx3); cursor: help; }
.fbr-import-reason .is-lock { color: var(--ip-tx2); font-weight: 600; }

/* MOI Task 2 — Data Import: sent batch, approver's rejection, task page, on-save values, value from rule */
.fbr-import-note { padding: 8px 12px; border-radius: var(--ip-r-sm); background: var(--ip-blue-l); color: var(--ip-tx); font-size: 12px; }
.fbr-import-table tr.is-rejected { background: var(--ip-red-l); }
.fbr-import-table tr.is-rejected td { color: var(--ip-tx2); }
.fbr-import-table tr.is-rejected td:not(.fbr-import-sel):not(.fbr-import-reason) { text-decoration: line-through; }
.fbr-preview-sheet.fbr-preview-sheet-wide { max-width: none; }
.fbr-import-same { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--ip-amber-m); border-radius: var(--ip-r-sm); background: var(--ip-amber-l); font-size: 12px; }
.fbr-import-same-title { font-weight: 600; color: var(--ip-tx); }
.fbr-import-same-info { color: var(--ip-tx2); }
.fbr-import-past { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--ip-blue-m); border-radius: var(--ip-r-sm); background: var(--ip-blue-l); font-size: 12.5px; color: var(--ip-tx); }
.fbr-import-past-text { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fbr-import-hist { margin-top: 14px; border: 1px solid var(--ip-b2); border-radius: var(--ip-r-sm); background: var(--ip-s0); }
.fbr-import-hist > summary { cursor: pointer; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--ip-tx); display: flex; align-items: center; gap: 6px; }
.fbr-import-hist-n { font-size: 11px; font-weight: 600; color: var(--ip-tx2); background: var(--ip-s1); border-radius: 10px; padding: 1px 8px; }
.fbr-import-hist-body { padding: 0 12px 12px; overflow-x: auto; }
.fbr-import-hist-table { width: 100%; font-size: 12px; }
.fbr-import-hist-table tr.is-current td { background: var(--ip-blue-l); }
.fbr-import-hist-file { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbr-import-hist-bad { color: var(--ip-red); font-weight: 600; }
.fbr-import-hist-acts { display: flex; gap: 6px; white-space: nowrap; }
.fbr-import-same-acts { display: flex; flex-wrap: wrap; gap: 6px; }
/* Record Search component (Form Builder) */
.fbr-search { display: flex; flex-direction: column; gap: 10px; }
.fbr-search-title { font-weight: 700; font-size: 14px; color: var(--ip-tx); }
.fbr-search-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.fbr-search-box { display: flex; flex-direction: column; gap: 4px; }
.fbr-search-actions { display: flex; gap: 6px; }
.fbr-search-msg { font-size: 12px; color: var(--ip-tx2); }
.fbr-search-msg:empty { display: none; }
.fbr-search-results { overflow-x: auto; }
.fbr-search-table { font-size: 12px; min-width: 100%; }
.fbr-search-table th { white-space: nowrap; }
.fbr-search-open { white-space: nowrap; width: 1%; }
.fb2-search-grid { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.fb2-search-row { display: grid; grid-template-columns: 1fr 96px 40px; gap: 4px; align-items: center; }
.fb2-search-headrow { font-weight: 600; color: var(--ip-tx2); }
.fb2-filter-row { grid-template-columns: 1fr 90px 1fr auto; }
/* Form action buttons (Form settings → actions) */
.fbr-submit-bar .fbr-action-btn { margin-inline-end: 6px; }
.fbr-submit-bar[hidden], .fbr-submit-bar [hidden] { display: none !important; }
.fb2-actions { display: flex; flex-direction: column; gap: 8px; }
.fb2-action-card { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--ip-b1); border-radius: var(--ip-r-sm); background: var(--ip-s1); }
.fb2-action-head { display: flex; align-items: center; gap: 4px; }
.fb2-action-head b { margin-inline-end: auto; }
.fbr-reason-dialog { max-width: 460px; }
.fbr-reason-text { width: 100%; }
.fbr-reason-err { color: var(--ip-red); font-size: 12px; margin-top: 4px; }
/* Audit trail «سجل الرقابة» (Views/BuildPlus/Audit) */
.aud-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.aud-filter-acts { display: flex; gap: 6px; }
.aud-body { overflow-x: auto; }
.aud-table { font-size: 12px; min-width: 100%; }
.aud-table td { vertical-align: top; }
.aud-when { white-space: nowrap; font-family: var(--ip-mono); color: var(--ip-tx2); }
.aud-rec { white-space: nowrap; font-family: var(--ip-mono); }
.aud-batch { color: var(--ip-tx3); font-size: 11px; font-family: inherit; }
.aud-summary { margin-bottom: 4px; }
.aud-details summary { cursor: pointer; color: var(--ip-acc); }
.aud-changes { margin-top: 6px; font-size: 11px; }
.aud-old { color: var(--ip-red); }
.aud-new { color: var(--ip-green); }
.aud-pager { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px; font-size: 12px; }
/* Print label (QR) — Views/Forms/Label.cshtml */
.lbl-page { background: var(--ip-s1); padding: 20px; }
.lbl-tools { display: flex; gap: 8px; margin-bottom: 16px; }
.lbl-sheet { display: inline-flex; flex-direction: column; gap: 8px; }
.lbl-label { display: flex; align-items: center; gap: 12px; width: 90mm; min-height: 40mm; padding: 3mm; background: #fff; border: 1px dashed var(--ip-b2); }
.lbl-qr { width: 34mm; height: 34mm; image-rendering: pixelated; }
.lbl-lines { display: flex; flex-direction: column; gap: 2px; font-size: 10pt; color: #000; }
.lbl-line-big { font-size: 12pt; font-weight: 700; }
.lbl-key { color: #444; }
.lbl-qrtext { font-size: 11px; color: var(--ip-tx3); max-width: 90mm; word-break: break-word; }
.fbr-print-label.is-disabled { opacity: .5; pointer-events: none; }
@media print {
    .lbl-page { background: #fff; padding: 0; }
    .lbl-tools, .lbl-qrtext { display: none; }
    .lbl-label { border: 0; }
    @page { margin: 2mm; }
}
/* Data Import progress gauge */
.fbr-import-gauge { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border: 1px solid var(--ip-b1); border-radius: var(--ip-r-sm); background: var(--ip-s1); }
.fbr-import-gauge-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.fbr-import-gauge-step { font-weight: 600; color: var(--ip-tx); }
.fbr-import-gauge-num { color: var(--ip-tx2); font-variant-numeric: tabular-nums; }
.fbr-import-gauge-track { height: 10px; border-radius: 5px; background: var(--ip-s2); overflow: hidden; }
.fbr-import-gauge-bar { height: 100%; width: 0; border-radius: 5px; background: var(--ip-acc); transition: width .3s ease; }
.fbr-import-gauge.is-busy .fbr-import-gauge-bar { background: linear-gradient(90deg, var(--ip-acc-l) 0%, var(--ip-acc) 50%, var(--ip-acc-l) 100%); background-size: 200% 100%; animation: fbr-gauge-move 1.2s linear infinite; }
@keyframes fbr-gauge-move { from { background-position: 200% 0; } to { background-position: 0 0; } }
.td-import .ip-card-body { overflow-x: auto; }
.td-import-token { display: none; }
.fbr-calc .fbr-input[readonly], .fbr-calc select:disabled { background: var(--ip-s2); color: var(--ip-tx); cursor: default; }
.fb2-onsave { display: flex; flex-direction: column; gap: 6px; }
.fb2-onsave-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 4px; align-items: center; }

/* Mapping popup: Checks column, rule editor, combined duplicate keys */
.fb2-imap-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.fb2-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 10px; font-size: 11px; line-height: 1.6; background: var(--ip-acc-l); color: var(--ip-acc); border: 1px solid var(--ip-acc-m); white-space: nowrap; }
.fb2-chip.is-db { background: var(--ip-s2); color: var(--ip-tx2); border-color: var(--ip-b1); }
.fb2-chip-x { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 2px; font-size: 13px; line-height: 1; }
.fb2-imap-table tr.fb2-imap-detail > td { background: var(--ip-s1); padding: 10px 14px; }
.fb2-imap-rules { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.fb2-imap-dbrules { color: var(--ip-tx2); }
.fb2-imap-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.fb2-imap-rule { border: 1px solid var(--ip-b1); border-radius: var(--ip-r-sm); padding: 6px 8px; background: var(--ip-s0); }
.fb2-imap-rule.is-on { border-color: var(--ip-acc-m); }
.fb2-imap-rule-head { display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; margin: 0; }
.fb2-imap-rule-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.fb2-imap-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin: 0; }
.fb2-imap-num { width: 110px; }
.fb2-imap-regex { flex: 1; min-width: 160px; font-family: var(--ip-mono); }
.fb2-imap-allowed { width: 100%; font-family: var(--ip-mono); font-size: 12px; }
.fb2-imap-level { width: auto; min-width: 0; }
.fb2-imap-keys { margin: 12px 0 16px; padding-top: 10px; border-top: 1px solid var(--ip-b1); display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.fb2-imap-keys-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fb2-imap-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--ip-b1); border-radius: var(--ip-r-sm); }
.fb2-imap-addfield { width: auto; min-width: 140px; }
.fb2-imap-legend { margin-inline-end: auto; font-size: 11px; color: var(--ip-tx2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ── Low Code Platform → Code Formats (bp-codeformats.js) ── */
.cf-editor { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cf-list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-list-code { font-family: var(--ip-mono); font-size: 11px; color: var(--ip-tx3); }
.cf-mono { font-family: var(--ip-mono); }
.cf-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cf-inline .ip-fi, .cf-inline .ip-select { width: auto; flex: 1; min-width: 110px; }
.cf-table td { vertical-align: top; }
.cf-table .cf-key { min-width: 90px; }
.cf-table .cf-num { width: 70px; }
.cf-opts { min-width: 240px; }
.cf-center { text-align: center; }
.cf-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cf-errors .cf-err, .cf-test-out .cf-err { color: var(--ip-red); font-size: 13px; }
.cf-test-out .cf-warn { color: var(--ip-gold); font-size: 13px; }
.cf-test-out { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.cf-test-verdict { font-weight: 600; }
.cf-test-verdict.is-ok { color: var(--ip-green); }
.cf-test-verdict.is-bad { color: var(--ip-red); }
.cf-test-table { max-width: 520px; margin-top: 6px; }
.cf-test-table th { width: 40%; text-align: start; color: var(--ip-tx2); font-weight: 500; }
/* Mapping popup: Structured code rule (full width) */
.fb2-imap-rule[data-rule="code"] { grid-column: 1 / -1; }
.fb2-imap-fmt { width: auto; min-width: 260px; }
.fb2-imap-cmp { font-size: 12px; margin: 4px 0; width: 100%; }
.fb2-imap-cmp td, .fb2-imap-cmp th { padding: 4px 6px; vertical-align: middle; }
.fb2-imap-cmp .ip-select, .fb2-imap-cmp .ip-fi { width: 100%; min-width: 0; font-size: 12px; }

/* Workflow designer — service task "Handler settings" (name = value per line) */
.nf-root .nf-service-params { font-family: var(--ip-mono, ui-monospace, monospace); font-size: 11px; line-height: 1.5; white-space: pre; resize: vertical; min-height: 96px; }

/* Workflow designer — visual settings of the record steps (nexflow-handler-editors.js) */
.nf-root .nfh-editor { display: flex; flex-direction: column; gap: 2px; }
.nf-root .nfh-title { font-size: 13px; font-weight: 600; color: var(--tx); margin-bottom: 8px; }
.nf-root .nfh-sub { font-size: 12px; font-weight: 600; color: var(--tx2); margin: 10px 0 6px; }
.nf-root .nfh-note { font-size: 11.5px; color: var(--tx3); background: var(--s1); border-radius: var(--r); padding: 8px 10px; margin-bottom: 8px; }
.nf-root .nfh-inline { display: flex; flex-direction: column; gap: 0; padding-inline-start: 10px; border-inline-start: 2px solid var(--b2); margin-bottom: 6px; }
.nf-root .nfh-row { border: 1px solid var(--b2); border-radius: var(--r); padding: 8px 10px 4px; margin-bottom: 8px; background: var(--s0); }
.nf-root .nfh-row .fg { margin-bottom: 8px; }
.nf-root .nfh-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.nf-root .nfh-row-num { font-size: 10px; font-weight: 700; color: var(--acc); background: var(--acc-l); border-radius: 10px; min-width: 20px; padding: 1px 6px; text-align: center; }
.nf-root .nfh-del { border: 0; background: transparent; color: var(--tx3); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.nf-root .nfh-del:hover { color: var(--red); }
.nf-root .nfh-add { border: 1px dashed var(--b3); background: transparent; color: var(--acc); border-radius: var(--r); padding: 7px 10px; font-size: 12px; font-weight: 600; cursor: pointer; width: 100%; }
.nf-root .nfh-add:hover:not(:disabled) { background: var(--acc-l); }
.nf-root .nfh-add:disabled { color: var(--tx3); cursor: not-allowed; }
.nf-root .nfh-other { margin-top: 6px; }
.nf-root .nfh-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tx2); margin-bottom: 6px; }
.nf-root .nfh-message { min-height: 90px; resize: vertical; line-height: 1.6; }
.nf-root .nfh-insert { margin-top: 6px; }
.nf-root .nfh-more { margin-bottom: 10px; }
.nf-root .nfh-more summary { font-size: 12px; color: var(--tx2); cursor: pointer; margin-bottom: 6px; }
.nf-root .nfh-summary { font-size: 12px; line-height: 1.6; color: var(--tx); background: var(--acc-l); border-radius: var(--r); padding: 8px 10px; margin-top: 10px; }
.nf-root .nfh-advanced > summary { cursor: pointer; }


/* Admin home (built from the menu) — stat colours and group icon tints, no inline styles */
.admin-shell .stat-c1 { --stat-c: var(--acc); }
.admin-shell .stat-c2 { --stat-c: var(--teal); }
.admin-shell .stat-c3 { --stat-c: var(--gold); }
.admin-shell .stat-c4 { --stat-c: var(--blue); }
.admin-shell .stat-c5 { --stat-c: var(--purple); }
.admin-shell .dg-ico-c1 { background: rgba(26, 82, 118, .1); color: var(--blue); }
.admin-shell .dg-ico-c2 { background: rgba(168, 122, 10, .1); color: var(--gold); }
.admin-shell .dg-ico-c3 { background: rgba(15, 122, 112, .1); color: var(--teal); }
.admin-shell .dg-ico-c4 { background: rgba(112, 72, 160, .1); color: var(--purple); }
.admin-shell .dg-ico-c5 { background: rgba(200, 90, 40, .1); color: var(--acc); }
.admin-shell .dg-ico-c6 { background: rgba(60, 60, 60, .08); color: var(--tx2); }

/* Forms list — archived forms (left the lists and the menu, nothing deleted) */
.fe-archived {
    margin-top: 24px;
}

    .fe-archived > summary {
        cursor: pointer;
        font-weight: 600;
        color: var(--ip-tx2);
        padding: 8px 0;
    }

.fe-archived-card {
    opacity: .8;
}

/* Workflow designer — Actions tab: the start event's settings, an action's key */
.nf-root .action-key {
    font-size: 10px;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--ip-s2);
    color: var(--ip-tx3);
}

.nf-root .pp-start-settings {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--ip-acc);
    border-radius: 8px;
    background: var(--ip-s2);
}

.nf-root .nfh-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 8px;
}

/* Workflow designer — action editor: two fields side by side, the page part, the fields it needs */
.nf-field-row {
    display: flex;
    gap: 10px;
}

    .nf-field-row > .nf-field {
        flex: 1 1 0;
        min-width: 0;
    }

.nf-sub-lbl {
    margin: 14px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ip-tx3);
}

.ae-required {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    max-height: 150px;
    overflow-y: auto;
    padding: 6px 8px;
    border: 1px solid var(--ip-b1);
    border-radius: 6px;
    font-size: 12px;
}

    .ae-required label {
        display: flex;
        align-items: center;
        gap: 4px;
    }

.ae-required-empty {
    color: var(--ip-tx3);
}

/* Form designer — Settings → Workflow: where the page's buttons come from (read only) */
.fb2-wf-summary {
    margin-top: 8px;
    font-size: 12px;
    color: var(--ip-tx2);
}

.fb2-wf-title {
    font-weight: 600;
    color: var(--ip-tx);
    margin-bottom: 4px;
}

.fb2-wf-row {
    padding: 3px 0;
    border-bottom: 1px dashed var(--ip-b1);
}

.fb2-wf-who {
    color: var(--ip-tx3);
}

.fb2-wf-link {
    display: inline-block;
    margin-top: 6px;
}

/* Form designer — Settings → page background */
.fb2-bg-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fb2-bg-color {
    flex: 0 0 56px;
    padding: 2px;
}

.fb2-bg-clear {
    padding: 6px 12px;
    border: 1px solid var(--ip-b2, #ccc);
    border-radius: 6px;
    background: var(--ip-s0, #fff);
    cursor: pointer;
    font-size: 12px;
}

/* Entity designer — table rules («قواعد الجدول») */
.bp-rules-panel {
    margin-top: 18px;
}

.bp-rules-hint {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--ip-tx3);
    border-bottom: 1px solid var(--ip-b1);
}

.bp-rules-empty {
    padding: 16px;
    font-size: 12px;
    color: var(--ip-tx3);
}

.bp-rule {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ip-b1);
}

    .bp-rule:last-child {
        border-bottom: none;
    }

.bp-rule-is-removed {
    opacity: .6;
}

.bp-rule-main {
    flex: 1;
    min-width: 0;
}

.bp-rule-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.bp-rule-kind {
    font-size: 11px;
    color: var(--ip-tx3);
}

.bp-rule-state {
    font-size: 10px;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--ip-s2);
}

.bp-rule-live {
    color: #1a7f37;
}

.bp-rule-pending {
    color: #b45309;
}

.bp-rule-removed {
    color: #b42318;
}

.bp-rule-words {
    margin-top: 4px;
    font-size: 13px;
}

.bp-rule-message {
    margin-top: 2px;
    font-size: 12px;
    color: var(--ip-tx2);
}

.bp-rule-sql {
    margin-top: 4px;
    font-size: 11px;
    color: var(--ip-tx3);
}

    .bp-rule-sql pre {
        white-space: pre-wrap;
        font-size: 11px;
        margin: 4px 0 0;
    }

.bp-rule-actions {
    display: flex;
    gap: 6px;
}

.bp-rule-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.bp-fg-row3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.bp-rule-where,
.bp-rule-messages {
    margin-top: 10px;
}

.bp-rule-msg {
    flex: 1;
    margin: 0;
}

/* Form designer — "Compare with another field" */
.fb2-compare-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}


/* ══════════════════════════════════════════════════════════
   COMMAND CENTER  (Views/CommandCenter/Index.cshtml)
   The design «InspectPlus Command Center» value for value: colours,
   glass panels, edges, radii, glow, lines, fonts and sizes are the
   design's own. Classes are prefixed cc-, tokens --cc-*.
   Grid: gridstack.js, 120 columns, rows of 8 px, 8 px around each
   portlet (= the design's 16 px gaps): the design's panels to a few
   pixels, and the main board fits 1920 × 1080 without scrolling.
══════════════════════════════════════════════════════════ */
@property --cc-a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

html:has(body.cc-body) {
    scrollbar-color: #1F3F86 #040A1C;
    background: #040A1C;
}

body.cc-body {
    --cc-bg: #040A1C;
    --cc-card: rgba(10,26,64,.72);
    --cc-edge: #1F3F86;
    --cc-cyan: #45D4FF;
    --cc-gold: #FFC93C;
    --cc-red: #FF3D5E;
    --cc-amber: #FF9F2E;
    --cc-green: #2EE59D;
    --cc-fg: #EAF2FF;
    --cc-muted: #8EA4D2;
    --cc-dim: #5E77A8;
    --cc-display: 'Exo 2','Trebuchet MS',Arial,sans-serif;
    --cc-body: 'IBM Plex Sans','Segoe UI',Arial,sans-serif;
    --cc-arabic: 'Cairo','Segoe UI',Tahoma,sans-serif;
    /* one scale for every text (--cc-fs) and for the bar, buttons and menu (--cc-ui):
       the design is drawn for a large wall screen; on desks it reads better smaller */
    --cc-fs: .82;
    --cc-ui: .8;
    color-scheme: dark;
    display: block;
    height: auto;
    min-height: 100vh;
    margin: 0;
    background: var(--cc-bg);
    color: var(--cc-fg);
    font-family: var(--cc-body);
    font-size: max(10px, calc(16px * var(--cc-fs)));
    line-height: normal;
    padding-left: max(0px,env(safe-area-inset-left,0px));
    padding-right: max(0px,env(safe-area-inset-right,0px));
}

body.cc-body.cc-rtl {
    --cc-display: 'Cairo','Segoe UI',Tahoma,sans-serif;
    --cc-body: 'Cairo','Segoe UI',Tahoma,sans-serif;
}

/* background: the stage's gradients + the particle canvas, fixed behind the page */
.cc-vp {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 15% 100%,rgba(43,108,255,.22),transparent 55%),radial-gradient(ellipse at 95% 0%,rgba(255,61,94,.14),transparent 45%),linear-gradient(180deg,#071433,#040A1C);
    pointer-events: none;
}

.cc-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cc-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* the icon set (Views/CommandCenter/_CcIcons.cshtml) */
.cc-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ── panel (the design's .card) ── */
.cc-card {
    position: absolute;
    background: var(--cc-card);
    border: 1px solid var(--cc-edge);
    border-radius: 16px;
    box-shadow: inset 0 0 40px rgba(43,108,255,.12);
}

.grid-stack > .grid-stack-item > .grid-stack-item-content.cc-card,
.grid-stack > .grid-stack-item > .grid-stack-item-content.cc-bare,
.grid-stack > .grid-stack-item > .grid-stack-item-content.cc-infra {
    overflow: hidden;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content.cc-bare {
    background: transparent;
    border: none;
    box-shadow: none;
}

.cc-card .cc-h3 {
    margin: 0;
    position: absolute;
    inset-inline-start: 18px;
    top: 12px;
    font: 700 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #DCE8FF;
    white-space: nowrap;
}

    .cc-card .cc-h3 em {
        font-style: normal;
        font: 600 max(10px, calc(14px * var(--cc-fs))) var(--cc-body);
        color: var(--cc-gold);
        border: 1px solid rgba(255,201,60,.5);
        border-radius: 999px;
        padding: 1px 9px;
    }

    .cc-card .cc-h3 .cc-live {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: var(--cc-green);
        box-shadow: 0 0 10px var(--cc-green);
        animation: cc-bl 1.2s infinite;
    }

.cc-card .cc-live.cc-off {
    background: var(--cc-dim);
    box-shadow: none;
    animation: none;
}

@keyframes cc-bl {
    50% {
        opacity: .25;
    }
}

.cc-glow::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    padding: 1px;
    background: conic-gradient(from var(--cc-a,0deg),transparent 0 75%,#45D4FF 85%,#fff 87%,#45D4FF 89%,transparent 95%);
    -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: cc-spin 7s linear infinite;
    pointer-events: none;
}

@keyframes cc-spin {
    to {
        --cc-a: 360deg;
    }
}

/* ── top bar ── */
.cc-topbar {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(16px * var(--cc-ui));
    height: calc(72px * var(--cc-ui));
    display: flex;
    align-items: center;
    gap: 22px;
}

.cc-chip {
    background: #F6F8FC;
    border-radius: 12px;
    height: calc(64px * var(--cc-ui));
    display: grid;
    place-items: center;
    padding: 0 calc(14px * var(--cc-ui));
    flex: none;
}

    .cc-chip img {
        height: calc(50px * var(--cc-ui));
        width: auto;
        max-width: none;
    }

.cc-tt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

    .cc-tt b,
    .cc-tt span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cc-tt b {
        font: 800 max(10px, calc(34px * var(--cc-fs))) var(--cc-display);
        letter-spacing: .5px;
        background: linear-gradient(90deg,#BFE9FF,#fff 50%,#BFE9FF);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        white-space: nowrap;
    }

    .cc-tt span {
        font-size: max(10px, calc(18px * var(--cc-fs)));
        color: var(--cc-muted);
        white-space: nowrap;
    }

.cc-rtl .cc-tt b {
    letter-spacing: 0;
}

.cc-tb-r {
    flex: none;
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}

.cc-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(8px * var(--cc-ui)) calc(16px * var(--cc-ui));
    border-radius: 999px;
    border: 1px solid var(--cc-edge);
    background: rgba(10,26,64,.8);
    font: 600 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
    white-space: nowrap;
}

    .cc-pill i {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--cc-green);
        box-shadow: 0 0 12px var(--cc-green);
        animation: cc-bl 1.2s infinite;
    }

.cc-clock {
    font: 700 max(10px, calc(26px * var(--cc-fs))) var(--cc-display);
    font-variant-numeric: tabular-nums;
    color: var(--cc-cyan);
}

/* buttons (the design's .navbtns) */
.cc-navbtns {
    display: flex;
    gap: 10px;
}

.cc-lang-form {
    display: contents;
}

.cc-btn,
.cc-navbtns a,
.cc-navbtns button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 700 max(10px, calc(17px * var(--cc-fs))) var(--cc-display);
    color: #EAF2FF;
    text-decoration: none;
    cursor: pointer;
    padding: calc(8px * var(--cc-ui)) calc(16px * var(--cc-ui));
    border-radius: calc(10px * var(--cc-ui));
    border: 1px solid #45D4FF;
    background: linear-gradient(180deg,rgba(26,75,176,.85),rgba(14,42,106,.85));
    box-shadow: 0 0 16px rgba(69,212,255,.35);
    white-space: nowrap;
}

    .cc-btn:hover,
    .cc-navbtns a:hover,
    .cc-navbtns button:hover {
        box-shadow: 0 0 26px rgba(69,212,255,.7);
        color: #EAF2FF;
    }

    .cc-btn:focus-visible,
    .cc-navbtns a:focus-visible,
    .cc-navbtns button:focus-visible {
        outline: 3px solid #FFC93C;
        outline-offset: 2px;
    }

.cc-navbtns .cc-vid,
.cc-btn.cc-vid {
    border-color: #FF3D5E;
    background: linear-gradient(180deg,rgba(193,31,61,.85),rgba(110,16,36,.85));
    box-shadow: 0 0 16px rgba(255,61,94,.4);
}

.cc-navbtns .cc-lang,
.cc-btn.cc-lang {
    border-color: #FFC93C;
    background: linear-gradient(180deg,rgba(120,90,10,.85),rgba(60,44,4,.85));
    box-shadow: 0 0 16px rgba(255,201,60,.4);
    font-family: 'Cairo','Exo 2',Arial,sans-serif;
    min-width: calc(96px * var(--cc-ui));
    justify-content: center;
}

.cc-navbtns .cc-pp,
.cc-btn.cc-pp {
    border-color: #2EE59D;
    background: linear-gradient(180deg,rgba(14,110,80,.85),rgba(6,60,44,.85));
    box-shadow: 0 0 16px rgba(46,229,157,.4);
}

    .cc-navbtns .cc-pp.cc-on {
        box-shadow: 0 0 26px rgba(46,229,157,.9);
    }

.cc-btn:disabled {
    opacity: .5;
    cursor: default;
}

/* ── page body: left menu + grid ── */
.cc-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: calc(104px * var(--cc-ui)) 24px 24px;
    direction: ltr;
}

/* left menu (the design's .side) */
.cc-side {
    position: sticky;
    top: 16px;
    width: max(200px, calc(226px * var(--cc-ui)));
    flex: none;
    height: calc(100vh - calc(128px * var(--cc-ui)));
    min-height: 560px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-rtl .cc-side,
.cc-rtl .grid-stack-item-content,
.cc-rtl .cc-panel,
.cc-rtl .cc-empty {
    direction: rtl;
}

.cc-side-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    min-height: 0;
    max-height: calc(100% - 138px);
}

.cc-rtl .cc-side,
.cc-rtl .cc-side-list {
    gap: 2px;
}

.cc-nav {
    display: flex;
    align-items: center;
    gap: calc(12px * var(--cc-ui));
    padding: calc(8px * var(--cc-ui)) calc(12px * var(--cc-ui));
    border-radius: 10px;
    font: 600 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
    color: #C4D4F4;
    text-decoration: none;
}

a.cc-nav:hover {
    color: #fff;
    background: rgba(69,212,255,.08);
}

.cc-rtl .cc-nav {
    font-size: max(10px, calc(16px * var(--cc-fs)));
    padding: 5px 12px;
    line-height: 1.25;
}

.cc-nav svg {
    width: calc(22px * var(--cc-ui));
    height: calc(22px * var(--cc-ui));
    flex: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cc-nav .cc-n {
    margin-inline-start: auto;
    font: 600 max(10px, calc(14px * var(--cc-fs))) var(--cc-body);
    color: var(--cc-muted);
    background: #0D2559;
    border-radius: 999px;
    padding: 1px 8px;
}

    .cc-nav .cc-n:empty {
        display: none;
    }

.cc-nav.cc-on {
    background: linear-gradient(90deg,rgba(69,212,255,.25),rgba(69,212,255,.05));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--cc-cyan);
}

.cc-nav.cc-ai {
    color: #FFE9A8;
}

    .cc-nav.cc-ai .cc-n {
        background: rgba(255,201,60,.18);
        color: var(--cc-gold);
    }

.cc-side .cc-sep {
    height: 1px;
    background: #1A3470;
    margin: 6px 6px;
    flex: none;
}

/* Pause / Full screen and the line under them sit where the design puts them */
.cc-side-ctl {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 52px;
    flex-direction: column;
    gap: 8px;
}

    .cc-side-ctl button {
        width: 100%;
        justify-content: center;
    }

.cc-side .cc-ver {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 10px;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: var(--cc-dim);
    padding: 0 12px;
}

/* grid area: -8 px so the portlets' edges line up with the menu and the top bar */
.cc-main {
    flex: 1;
    min-width: 0;
    margin: -8px;
}

.cc-empty {
    margin: 8px;
    padding: 48px 24px;
    text-align: center;
    color: var(--cc-muted);
    font: 600 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
    border: 1px dashed var(--cc-edge);
    border-radius: 16px;
}

/* ── KPI tile (the design's .kpi) ── */
.cc-kpi {
    container-type: inline-size;
}

    .cc-kpi .cc-lab {
        position: absolute;
        inset-inline-start: 18px;
        top: 14px;
        font: 600 max(10px, calc(17px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 36px);
    }

.cc-rtl .cc-kpi .cc-lab {
    font-size: max(10px, calc(16px * var(--cc-fs)));
}

.cc-kpi .cc-val {
    position: absolute;
    inset-inline-start: 18px;
    top: 40px;
    font: 800 max(10px, calc(44px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-gold);
    text-shadow: 0 0 18px rgba(255,201,60,.4);
    font-variant-numeric: tabular-nums;
}

    .cc-kpi .cc-val small {
        font-size: max(10px, calc(22px * var(--cc-fs)));
    }

    .cc-kpi .cc-val.cc-amber {
        color: var(--cc-amber);
        text-shadow: 0 0 18px rgba(255,159,46,.4);
    }

    .cc-kpi .cc-val.cc-red {
        color: var(--cc-red);
        text-shadow: 0 0 18px rgba(255,61,94,.4);
    }

    .cc-kpi .cc-val.cc-na {
        color: var(--cc-dim);
        text-shadow: none;
    }

.cc-kpi .cc-d {
    position: absolute;
    inset-inline-start: 20px;
    bottom: 10px;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: var(--cc-green);
    white-space: nowrap;
}

    .cc-kpi .cc-d.cc-down {
        color: var(--cc-red);
    }

    .cc-kpi .cc-d.cc-na {
        color: var(--cc-dim);
    }

.cc-kpi canvas {
    position: absolute;
    inset-inline-end: 14px;
    top: 42px;
    width: 104px;
    height: 38px;
}

@container (max-width: 270px) {
    .cc-kpi .cc-val {
        font-size: max(10px, calc(36px * var(--cc-fs)));
        top: 44px;
    }

    .cc-kpi canvas {
        width: 72px;
    }
}

/* ── live field map (the design's #map) ── */
.cc-map svg.cc-m {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.cc-map .cc-h3 {
    z-index: 1;
}

.cc-legend {
    position: absolute;
    inset-inline-end: 16px;
    top: 12px;
    display: flex;
    gap: 14px;
    font-size: max(10px, calc(15px * var(--cc-fs)));
    color: var(--cc-muted);
    z-index: 1;
}

    .cc-legend i {
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin-right: 6px;
        vertical-align: middle;
    }

.cc-dot-green {
    background: #2EE59D;
}

.cc-dot-gold {
    background: #FFC93C;
}

.cc-dot-red {
    background: #FF3D5E;
}

.cc-dot-cyan {
    background: #45D4FF;
}

.cc-dot-amber {
    background: #FF9F2E;
}

.cc-mapstat {
    position: absolute;
    inset-inline-start: 16px;
    bottom: 14px;
    display: flex;
    gap: 10px;
    z-index: 1;
}

    .cc-mapstat div {
        background: rgba(4,12,34,.85);
        border: 1px solid var(--cc-edge);
        border-radius: 10px;
        padding: 6px 12px;
        font-size: max(10px, calc(15px * var(--cc-fs)));
        color: var(--cc-muted);
    }

    .cc-mapstat b {
        display: block;
        font: 700 max(10px, calc(22px * var(--cc-fs))) var(--cc-display);
        color: #fff;
    }

/* ── live inspection: the phone (the design's #phone) ── */
.cc-ph {
    position: absolute;
    left: 50%;
    top: 0;
    width: 272px;
    height: 450px;
    margin-left: -136px;
    border-radius: 36px;
    background: #0B1124;
    border: 3px solid #34477A;
    box-shadow: 0 0 40px rgba(69,212,255,.25),inset 0 0 0 6px #050916;
    overflow: hidden;
    direction: ltr;
    transform-origin: 50% 0;
}

    .cc-ph .cc-notch {
        position: absolute;
        left: 50%;
        top: 10px;
        transform: translateX(-50%);
        width: 90px;
        height: 20px;
        border-radius: 12px;
        background: #050916;
    }

    .cc-ph .cc-scr {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 38px;
        bottom: 14px;
        border-radius: 22px;
        background: linear-gradient(180deg,#0D1E48,#081333);
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 9px;
        overflow: hidden;
    }

.cc-rtl .cc-ph .cc-scr {
    direction: rtl;
    gap: 6px;
    padding: 10px;
}

.cc-ph .cc-ah {
    font: 700 16px var(--cc-display);
}

.cc-rtl .cc-ph .cc-ah {
    font-size: 15px;
}

.cc-ph .cc-as {
    font-size: 12.5px;
    color: var(--cc-muted);
}

.cc-steps {
    display: flex;
    gap: 4px;
}

    .cc-steps i {
        flex: 1;
        height: 5px;
        border-radius: 3px;
        background: #22386E;
    }

        .cc-steps i.cc-d {
            background: var(--cc-cyan);
        }

        .cc-steps i.cc-c {
            background: var(--cc-gold);
        }

.cc-recrow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cc-rec {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle,#FF5A76,#C11F3D);
    box-shadow: 0 0 18px rgba(255,61,94,.7);
    display: grid;
    place-items: center;
    flex: none;
    animation: cc-pulse 1.4s infinite;
}

@keyframes cc-pulse {
    50% {
        box-shadow: 0 0 30px rgba(255,61,94,1);
    }
}

.cc-rec svg {
    width: 22px;
    height: 22px;
}

.cc-recrow canvas {
    flex: 1;
    height: 40px;
    min-width: 0;
}

.cc-tx {
    font-family: var(--cc-arabic);
    font-size: 15px;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    min-height: 74px;
    background: rgba(4,12,34,.6);
    border-radius: 10px;
    padding: 8px 10px;
}

.cc-rtl .cc-tx {
    font-size: 14px;
    line-height: 1.5;
    min-height: 0;
}

.cc-fc {
    --cc-c: #FFC93C;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 9px;
    background: rgba(10,30,76,.95);
    border-left: 4px solid var(--cc-c);
    font-size: max(10px, calc(13.5px * var(--cc-fs)));
    opacity: 0;
    transform: translateX(20px);
    transition: all .4s;
}

    .cc-fc.cc-critical {
        --cc-c: #FF3D5E;
    }

    .cc-fc.cc-major {
        --cc-c: #FF9F2E;
    }

    .cc-fc.cc-minor {
        --cc-c: #FFC93C;
    }

    .cc-fc.cc-s {
        opacity: 1;
        transform: none;
    }

    .cc-fc b {
        font: 700 max(10px, calc(11px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-c);
        text-transform: uppercase;
        letter-spacing: .5px;
    }

.cc-rtl .cc-fc {
    padding: 5px 9px;
    font-size: max(10px, calc(13px * var(--cc-fs)));
}

.cc-phlab {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-phlab .cc-cap {
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* ── activity feed (the design's #feed) ── */
.cc-fl {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 44px;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}

.cc-fi {
    --cc-c: #45D4FF;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    grid-template-areas: "ic t a" "m m a";
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(4,12,34,.7);
    border: 1px solid #17306A;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    line-height: 1.3;
    animation: cc-in .5s ease;
    flex: none;
}

@keyframes cc-in {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }
}

/* the tag: a small label beside the text (the space under it is used by the line below) */
.cc-fi .cc-ic {
    grid-area: ic;
    min-width: 30px;
    height: 20px;
    padding: 0 5px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font: 700 10px var(--cc-display);
    letter-spacing: .3px;
    white-space: nowrap;
    background: color-mix(in srgb, var(--cc-c) 13%, transparent);
    color: var(--cc-c);
    border: 1px solid color-mix(in srgb, var(--cc-c) 53%, transparent);
}

.cc-fi .cc-fi-t {
    grid-area: t;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cc-fi small {
    grid-area: m;
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cc-dim);
    font-size: max(10px, calc(12.5px * var(--cc-fs)));
}

.cc-fi > .cc-play,
.cc-fi > .cc-fi-wait {
    grid-area: a;
}

.cc-fi > .cc-play {
    width: 28px;
    height: 28px;
}

    .cc-fi > .cc-play svg {
        width: 13px;
        height: 13px;
    }

.cc-c-red {
    --cc-c: #FF3D5E;
}

.cc-c-cyan {
    --cc-c: #45D4FF;
}

.cc-c-gold {
    --cc-c: #FFC93C;
}

.cc-c-green {
    --cc-c: #2EE59D;
}

.cc-c-amber {
    --cc-c: #FF9F2E;
}

/* ── workflow: the figures of one process (number tiles, waiting at each step) ── */
.cc-wfn-bd {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(48px * var(--cc-ui));
    bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.cc-wfn .cc-h3 em {
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cc-wfn-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(118px,1fr));
    gap: 5px;
    flex: none;
}

/* a number tile: the value and its name side by side, on one short row */
.cc-wfn-tile {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(4,12,34,.7);
    border: 1px solid #17306A;
    border-inline-start: 3px solid var(--cc-c, #45D4FF);
    min-width: 0;
}

    .cc-wfn-tile b {
        font: 800 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-c, #45D4FF);
        line-height: 1.1;
        font-variant-numeric: tabular-nums;
    }

    .cc-wfn-tile span {
        font-size: max(10px, calc(11.5px * var(--cc-fs)));
        line-height: 1.2;
        color: var(--cc-muted);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .cc-wfn-tile.cc-wfn-alert {
        border-color: color-mix(in srgb, var(--cc-red) 60%, transparent);
        box-shadow: 0 0 12px rgba(255,61,94,.35);
    }

.cc-wfn-go {
    cursor: pointer;
}

.cc-editing .cc-wfn-go {
    cursor: inherit;
}

.cc-wfn-per {
    margin-top: -4px;
    font-size: max(10px, calc(11.5px * var(--cc-fs)));
    color: var(--cc-dim);
    text-align: end;
}

.cc-wfn-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    overflow: hidden;
}

.cc-wfn-sh {
    font: 700 max(10px, calc(12px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-dim);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cc-wfn-step {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(40px,2fr) auto minmax(52px,auto);
    align-items: center;
    gap: 8px;
    font-size: max(10px, calc(13px * var(--cc-fs)));
}

.cc-wfn-sl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #C4D4F4;
}

.cc-wfn-bar {
    height: 8px;
    border-radius: 999px;
    background: #0D2559;
    overflow: hidden;
}

    .cc-wfn-bar i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg,#2B6CFF,#45D4FF);
        box-shadow: 0 0 8px rgba(69,212,255,.6);
    }

    .cc-wfn-bar.cc-wfn-hot i {
        background: linear-gradient(90deg,#FF9F2E,#FF3D5E);
        box-shadow: 0 0 8px rgba(255,61,94,.6);
    }

.cc-wfn-step b {
    font: 700 max(10px, calc(14px * var(--cc-fs))) var(--cc-display);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.cc-wfn-step em {
    font-style: normal;
    font-size: max(10px, calc(11.5px * var(--cc-fs)));
    color: var(--cc-red);
    white-space: nowrap;
}

/* the process flow: start ● → step → step → … → ● end, in the designer's order */
.cc-wfn-bd.cc-wfn-only {
    justify-content: center;
}

    .cc-wfn-bd.cc-wfn-only .cc-wfn-node {
        padding: 9px 6px;
    }

.cc-wfn-flow {
    display: flex;
    align-items: center;
    gap: 0;
    flex: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 6px;
    scrollbar-width: thin;
}

.cc-wfn-end {
    width: 14px;
    height: 14px;
    flex: none;
    border-radius: 50%;
    border: 3px solid #FF3D5E;
}

    .cc-wfn-end.cc-wfn-start {
        border-color: #2EE59D;
    }

.cc-wfn-arrow {
    flex: 1 0 14px;
    max-width: 34px;
    height: 2px;
    background: #3E63B8;
    position: relative;
}

    .cc-wfn-arrow::after {
        content: "";
        position: absolute;
        inset-inline-end: -1px;
        top: -4px;
        border: 5px solid transparent;
        border-inline-start: 7px solid #3E63B8;
        border-inline-end: 0;
    }

.cc-wfn-node {
    flex: 0 1 104px;
    min-width: 60px;
    display: grid;
    justify-items: center;
    gap: 1px;
    padding: 5px 6px;
    border-radius: 8px;
    background: #0D2559;
    border: 1px solid #45D4FF;
    text-align: center;
}

    .cc-wfn-node.cc-wfn-busy {
        box-shadow: 0 0 10px rgba(69,212,255,.35);
    }

    .cc-wfn-node.cc-wfn-hot {
        border-color: #FF3D5E;
        box-shadow: 0 0 12px rgba(255,61,94,.45);
    }

.cc-wfn-nl {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 700 max(10px, calc(12px * var(--cc-fs))) var(--cc-display);
    color: #EAF2FF;
}

.cc-wfn-node b {
    font: 800 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-cyan);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.cc-wfn-node.cc-wfn-hot b {
    color: var(--cc-red);
}

.cc-wfn-node small {
    font-size: max(10px, calc(10.5px * var(--cc-fs)));
    color: var(--cc-dim);
    white-space: nowrap;
}

.cc-wfn-node.cc-wfn-hot small {
    color: var(--cc-red);
}

.cc-wfn-none {
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-dim);
}

/* ── rule engine (the design's #rules) ── */
.cc-rl {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-r {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: max(10px, calc(15.5px * var(--cc-fs)));
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(4,12,34,.6);
}

    .cc-r small {
        color: var(--cc-muted);
        font-size: max(10px, calc(13.5px * var(--cc-fs)));
    }

    .cc-r b {
        font: 700 max(10px, calc(15px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-gold);
    }

.cc-tg {
    width: 34px;
    height: 18px;
    border-radius: 9px;
    background: var(--cc-green);
    position: relative;
    box-shadow: 0 0 8px rgba(46,229,157,.5);
}

    .cc-tg::after {
        content: "";
        position: absolute;
        right: 2px;
        top: 2px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #fff;
    }

    .cc-tg.cc-off {
        background: #22386E;
        box-shadow: none;
    }

        .cc-tg.cc-off::after {
            right: auto;
            left: 2px;
        }

.cc-next {
    position: absolute;
    inset-inline-end: 16px;
    top: 10px;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-next b {
        font: 700 max(10px, calc(17px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-cyan);
        font-variant-numeric: tabular-nums;
    }

/* ── AI services (the design's #aisvc) ── */
.cc-svc {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 52px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.cc-sv {
    display: grid;
    grid-template-columns: 150px 1fr 92px;
    align-items: center;
    gap: 12px;
    font-size: max(10px, calc(15.5px * var(--cc-fs)));
}

    .cc-sv span small {
        display: block;
        color: var(--cc-muted);
        font-size: max(10px, calc(13px * var(--cc-fs)));
    }

    .cc-sv canvas {
        width: 100%;
        height: 40px;
        min-width: 0;
    }

    .cc-sv b {
        font: 700 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-gold);
        text-align: right;
        font-variant-numeric: tabular-nums;
        direction: ltr;
        unicode-bidi: isolate;
    }

.cc-npu {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: max(10px, calc(14.5px * var(--cc-fs)));
    color: #FFC7D1;
}

    .cc-npu .cc-bar {
        flex: 1;
        height: 10px;
        border-radius: 5px;
        background: #2A1630;
        overflow: hidden;
    }

        .cc-npu .cc-bar i {
            display: block;
            height: 100%;
            width: 60%;
            background: linear-gradient(90deg,#C11F3D,#FF5A76);
            box-shadow: 0 0 10px #FF3D5E;
            transition: width 1s;
        }

    .cc-npu b {
        font: 700 max(10px, calc(16px * var(--cc-fs))) var(--cc-display);
        color: #FFB3C0;
        width: 44px;
        text-align: right;
    }

/* ── platform strip (the design's .infra) ── */
.cc-infra {
    position: absolute;
    border-radius: 16px;
    border: 1px solid rgba(255,61,94,.55);
    background: linear-gradient(90deg,rgba(255,61,94,.16),rgba(10,26,64,.7) 40%);
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 18px;
}

    .cc-infra .cc-lead {
        display: flex;
        align-items: center;
        gap: 12px;
        padding-inline-end: 20px;
        border-inline-end: 1px solid rgba(255,61,94,.4);
        margin-inline-end: 6px;
        flex: none;
    }

        .cc-infra .cc-lead img {
            height: 46px;
            background: #F6F8FC;
            border-radius: 8px;
            padding: 4px 8px;
        }

        .cc-infra .cc-lead b {
            display: block;
            font: 700 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
        }

        .cc-infra .cc-lead span {
            font-size: max(10px, calc(13.5px * var(--cc-fs)));
            color: #FFC7D1;
        }

.cc-hw {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-inline-end: 1px solid rgba(255,255,255,.07);
    min-width: 0;
}

    .cc-hw:last-child {
        border-inline-end: none;
    }

    .cc-hw i {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--cc-green);
        box-shadow: 0 0 10px var(--cc-green);
        flex: none;
    }

    .cc-hw b {
        display: block;
        font: 700 max(10px, calc(17px * var(--cc-fs))) var(--cc-display);
        white-space: nowrap;
    }

    .cc-hw span {
        font-size: max(10px, calc(13.5px * var(--cc-fs)));
        color: var(--cc-muted);
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

/* ── portlet states ── */
.cc-state {
    position: absolute;
    inset: 48px 16px 16px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--cc-dim);
    font: 600 max(10px, calc(16px * var(--cc-fs))) var(--cc-display);
}

.cc-demo-tag {
    font: 600 max(10px, calc(11px * var(--cc-fs))) var(--cc-body);
    color: var(--cc-dim);
    border: 1px solid var(--cc-edge);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
}

.cc-kpi .cc-demo-tag {
    position: absolute;
    inset-inline-end: 14px;
    bottom: 10px;
}

.cc-phlab .cc-demo-tag {
    margin-inline-start: 8px;
    flex: none;
}

.cc-infra .cc-lead .cc-demo-tag {
    display: inline-block;
    margin-top: 3px;
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-dim);
}

a.cc-drill {
    color: inherit;
    text-decoration: none;
}

.cc-clickable {
    cursor: pointer;
}

.cc-editing .cc-clickable {
    cursor: inherit;
}

/* ── pause (the design's .halt) ── */
.cc-halt *,
.cc-halt *::before,
.cc-halt *::after {
    animation-play-state: paused !important;
}

/* ── architecture video (the design's .vbox) ── */
.cc-vbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #000;
    display: grid;
    place-items: center;
}

    .cc-vbox[hidden] {
        display: none;
    }

    .cc-vbox video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
        background: #000;
    }

    .cc-vbox .cc-x {
        position: absolute;
        top: max(16px,env(safe-area-inset-top,0px));
        right: max(16px,env(safe-area-inset-right,0px));
        font: 700 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
        color: #fff;
        background: rgba(255,255,255,.12);
        border: 1px solid rgba(255,255,255,.4);
        border-radius: 10px;
        padding: 8px 16px;
        cursor: pointer;
    }

    .cc-vbox .cc-msg {
        position: absolute;
        bottom: 40px;
        left: 0;
        right: 0;
        text-align: center;
        color: #93A9D6;
        font: max(10px, calc(16px * var(--cc-fs))) var(--cc-body);
    }

/* ── edit mode: outlines, resize corner, drop place ── */
.cc-editing .grid-stack > .grid-stack-item > .grid-stack-item-content {
    outline: 1px dashed rgba(69,212,255,.55);
    outline-offset: 2px;
    cursor: move;
}

.cc-editing .grid-stack > .grid-stack-item.cc-selected > .grid-stack-item-content {
    outline: 2px solid var(--cc-gold);
}

.cc-editing .grid-stack-item-content * {
    pointer-events: none;
}

.cc-body .grid-stack-item > .ui-resizable-se {
    background: none;
    transform: none;
    width: 16px;
    height: 16px;
    right: calc(var(--gs-item-margin-right) + 4px);
    bottom: calc(var(--gs-item-margin-bottom) + 4px);
    border-right: 2px solid var(--cc-cyan);
    border-bottom: 2px solid var(--cc-cyan);
    border-bottom-right-radius: 6px;
    z-index: 5;
}

.cc-body .grid-stack-placeholder > .placeholder-content {
    background: rgba(69,212,255,.08);
    border: 1px dashed var(--cc-cyan);
    border-radius: 16px;
}

.cc-editing .cc-wrap {
    padding-right: 444px;
}

.cc-editing .cc-topbar {
    right: 444px;
}

/* ── edit panel (right side) ── */
.cc-panel {
    position: fixed;
    top: 104px;
    right: 24px;
    bottom: 24px;
    width: 404px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: rgba(7,20,51,.97);
    border: 1px solid var(--cc-edge);
    border-radius: 16px;
    box-shadow: inset 0 0 40px rgba(43,108,255,.12), 0 0 40px rgba(0,0,0,.55);
    font-size: max(10px, calc(15px * var(--cc-fs)));
}

    .cc-panel[hidden] {
        display: none;
    }

.cc-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
    font: 700 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
    color: #DCE8FF;
}

    .cc-panel-head .cc-x {
        margin-inline-start: auto;
        background: none;
        border: 1px solid var(--cc-edge);
        border-radius: 8px;
        color: var(--cc-muted);
        font: 600 max(10px, calc(14px * var(--cc-fs))) var(--cc-body);
        padding: 4px 10px;
        cursor: pointer;
    }

.cc-tabs {
    display: flex;
    gap: 6px;
    padding: 0 14px 10px;
    border-bottom: 1px solid #1A3470;
}

    .cc-tabs button {
        flex: 1;
        padding: 7px 6px;
        border-radius: 10px;
        border: 1px solid transparent;
        background: none;
        color: #C4D4F4;
        font: 600 max(10px, calc(15px * var(--cc-fs))) var(--cc-display);
        cursor: pointer;
        white-space: nowrap;
    }

        .cc-tabs button.cc-on {
            background: linear-gradient(90deg,rgba(69,212,255,.25),rgba(69,212,255,.05));
            color: #fff;
            box-shadow: inset 3px 0 0 var(--cc-cyan);
        }

.cc-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cc-panel-foot {
    display: flex;
    gap: 10px;
    padding: 12px 14px 14px;
    border-top: 1px solid #1A3470;
}

    .cc-panel-foot .cc-btn {
        flex: 1;
        justify-content: center;
    }

.cc-hint {
    color: var(--cc-muted);
    font-size: max(10px, calc(13.5px * var(--cc-fs)));
    line-height: 1.45;
}

.cc-sub {
    font: 700 max(10px, calc(16px * var(--cc-fs))) var(--cc-display);
    color: #DCE8FF;
    margin-top: 6px;
}

/* the portlet types / placed portlets lists (styled like the design's feed items) */
.cc-item {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(4,12,34,.7);
    border: 1px solid #17306A;
    line-height: 1.35;
    cursor: pointer;
    color: var(--cc-fg);
    text-align: start;
    font: inherit;
    width: 100%;
}

    .cc-item:hover,
    .cc-item.cc-on {
        border-color: var(--cc-cyan);
        box-shadow: 0 0 14px rgba(69,212,255,.25);
    }

    .cc-item .cc-ic {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        display: grid;
        place-items: center;
        background: rgba(69,212,255,.13);
        color: var(--cc-cyan);
        border: 1px solid rgba(69,212,255,.53);
    }

        .cc-item .cc-ic svg {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            fill: none;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

    .cc-item b {
        display: block;
        font: 600 max(10px, calc(15px * var(--cc-fs))) var(--cc-display);
    }

    .cc-item small {
        display: block;
        color: var(--cc-dim);
        font-size: max(10px, calc(12.5px * var(--cc-fs)));
    }

    .cc-item .cc-tag {
        font: 600 max(10px, calc(11px * var(--cc-fs))) var(--cc-body);
        color: var(--cc-gold);
        border: 1px solid rgba(255,201,60,.5);
        border-radius: 999px;
        padding: 1px 8px;
        white-space: nowrap;
    }

        .cc-item .cc-tag.cc-dim {
            color: var(--cc-dim);
            border-color: var(--cc-edge);
        }

.cc-item.grid-stack-item {
    position: relative;
}

/* settings form */
.cc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .cc-field label,
    .cc-lbl {
        font-size: max(10px, calc(13px * var(--cc-fs)));
        color: var(--cc-muted);
    }

.cc-in {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--cc-edge);
    background: #061230;
    color: var(--cc-fg);
    padding: 0 12px;
    font: max(10px, calc(15px * var(--cc-fs))) var(--cc-body);
}

textarea.cc-in {
    height: auto;
    min-height: 70px;
    padding: 8px 12px;
}

.cc-in:focus {
    outline: none;
    border-color: var(--cc-cyan);
    box-shadow: 0 0 0 3px rgba(69,212,255,.2);
}

.cc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: var(--cc-fg);
    cursor: pointer;
}

    .cc-check input {
        width: 16px;
        height: 16px;
        accent-color: var(--cc-cyan);
    }

.cc-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cc-list-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #17306A;
    background: rgba(4,12,34,.55);
}

.cc-list-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font: 600 max(10px, calc(14px * var(--cc-fs))) var(--cc-display);
    color: #DCE8FF;
}

    .cc-list-head span {
        margin-inline-end: auto;
    }

.cc-mini {
    background: none;
    border: 1px solid var(--cc-edge);
    border-radius: 8px;
    color: var(--cc-muted);
    font: 600 max(10px, calc(13px * var(--cc-fs))) var(--cc-body);
    padding: 3px 9px;
    cursor: pointer;
}

    .cc-mini:hover {
        color: #fff;
        border-color: var(--cc-cyan);
    }

    .cc-mini.cc-danger:hover {
        border-color: var(--cc-red);
        color: #FFB3C0;
    }

.cc-btn.cc-small {
    font-size: max(10px, calc(14px * var(--cc-fs)));
    padding: 6px 12px;
}

.cc-btn.cc-danger {
    border-color: #FF3D5E;
    background: linear-gradient(180deg,rgba(193,31,61,.55),rgba(110,16,36,.55));
    box-shadow: none;
}

.cc-error {
    color: #FFB3C0;
    font-size: max(10px, calc(13.5px * var(--cc-fs)));
}

.cc-icon-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

    .cc-icon-pick button {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        display: grid;
        place-items: center;
        background: #061230;
        border: 1px solid var(--cc-edge);
        color: #C4D4F4;
        cursor: pointer;
    }

        .cc-icon-pick button.cc-on {
            border-color: var(--cc-cyan);
            color: var(--cc-cyan);
            box-shadow: 0 0 10px rgba(69,212,255,.35);
        }

        .cc-icon-pick button svg {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            fill: none;
            stroke-width: 1.8;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

.cc-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    z-index: 120;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid var(--cc-cyan);
    background: rgba(7,20,51,.97);
    color: var(--cc-fg);
    font: 600 max(10px, calc(16px * var(--cc-fs))) var(--cc-display);
    box-shadow: 0 0 26px rgba(69,212,255,.35);
}

    .cc-toast.cc-bad {
        border-color: var(--cc-red);
        box-shadow: 0 0 26px rgba(255,61,94,.35);
    }

    .cc-toast[hidden] {
        display: none;
    }

/* ── live feed (cc_ActivityEvents) ── */
.cc-fi .cc-late {
    color: var(--cc-amber);
}

.cc-fi.cc-fi-critical {
    border-color: rgba(255,61,94,.7);
    box-shadow: 0 0 14px rgba(255,61,94,.35);
}

.cc-fl .cc-empty-feed {
    position: static;
    padding: 40px 10px;
}

/* ── alerts: SOS, on every open board until acknowledged ── */
.cc-alerts {
    position: fixed;
    left: 50%;
    top: 96px;
    transform: translateX(-50%);
    z-index: 90;
    width: min(760px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .cc-alerts[hidden] {
        display: none;
    }

.cc-alert {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #FF3D5E;
    background: linear-gradient(180deg,rgba(193,31,61,.94),rgba(110,16,36,.94));
    box-shadow: 0 0 30px rgba(255,61,94,.6);
    animation: cc-pulse 1.4s infinite;
    color: #fff;
}

.cc-alert-ic {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font: 800 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.45);
}

.cc-alert-tx b {
    display: block;
    font: 700 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
}

.cc-alert-tx span {
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: #FFC7D1;
}

@media (max-width: 900px) {
    .cc-alert {
        grid-template-columns: 48px 1fr;
    }

    .cc-alert-ic {
        width: 48px;
        height: 48px;
    }
}

/* ── voice notes: one round play / pause button everywhere (cc-details.js CC.audio) ── */
.cc-play {
    width: 34px;
    height: 34px;
    flex: none;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #FF5A76;
    background: radial-gradient(circle,rgba(255,90,118,.35),rgba(193,31,61,.25));
    color: #fff;
    cursor: pointer;
}

    .cc-play svg,
    .cc-rec-play svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
    }

    .cc-play svg + svg,
    .cc-play.cc-playing svg:first-child,
    .cc-rec-play svg + svg,
    .cc-rec-play.cc-playing svg:first-child {
        display: none;
    }

    .cc-play.cc-playing svg + svg,
    .cc-rec-play.cc-playing svg + svg {
        display: block;
    }

    .cc-play:hover,
    .cc-play.cc-playing {
        box-shadow: 0 0 14px rgba(255,61,94,.8);
    }

    .cc-play:focus-visible,
    .cc-rec-play:focus-visible,
    .cc-h3-btn:focus-visible,
    .cc-fi-open:focus-visible,
    .cc-dt-tab:focus-visible,
    .cc-dt-per:focus-visible,
    .cc-dt-person:focus-visible,
    .cc-lm-fit:focus-visible {
        outline: 3px solid #FFC93C;
        outline-offset: 2px;
    }

.cc-atime {
    font: 600 max(10px, calc(12px * var(--cc-fs))) var(--cc-body);
    color: var(--cc-cyan);
    direction: ltr;
}

    .cc-atime:empty {
        display: none;
    }

/* ── live field activity: the buttons beside the title, a line that opens or plays ── */
/* the title stops before the two buttons */
.cc-feed .cc-h3 {
    inset-inline-end: calc(84px * var(--cc-ui));
    overflow: hidden;
}

    .cc-feed .cc-h3 span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

.cc-h3-acts {
    position: absolute;
    inset-inline-end: 12px;
    top: 10px;
    display: flex;
    gap: 6px;
    z-index: 1;
}

.cc-h3-btn {
    width: calc(32px * var(--cc-ui));
    height: calc(32px * var(--cc-ui));
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 9px;
    border: 1px solid var(--cc-edge);
    background: rgba(4,12,34,.7);
    color: var(--cc-cyan);
    cursor: pointer;
}

    .cc-h3-btn svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .cc-h3-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .cc-h3-btn:hover {
        border-color: var(--cc-cyan);
        box-shadow: 0 0 12px rgba(69,212,255,.5);
    }

.cc-fi.cc-fi-open {
    cursor: pointer;
}

    .cc-fi.cc-fi-open:hover {
        border-color: color-mix(in srgb, var(--cc-c) 60%, transparent);
    }

.cc-fi-wait {
    color: var(--cc-amber);
}

/* ── live inspection: the phone plays the newest voice note ── */
.cc-rec.cc-rec-play {
    border: 0;
    padding: 0;
    color: #fff;
    cursor: pointer;
    animation: none;
}

    .cc-rec.cc-rec-play.cc-playing {
        animation: cc-pulse 1.4s infinite;
    }

    .cc-rec.cc-rec-play svg {
        width: 20px;
        height: 20px;
    }

.cc-ph .cc-scr > * {
    flex: none;
}

.cc-tx.cc-tx-live {
    font-family: var(--cc-body);
    direction: inherit;
    text-align: start;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-tx.cc-tx-live b {
        color: var(--cc-fg);
        font: 600 max(10px, calc(13.5px * var(--cc-fs))) var(--cc-body);
    }

.cc-rtl .cc-tx.cc-tx-live {
    font-family: var(--cc-arabic);
}

.cc-ph-empty {
    margin: auto;
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
    color: var(--cc-dim);
    font: 600 14px var(--cc-display);
}

    .cc-ph-empty svg {
        width: 42px;
        height: 42px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round;
    }

.cc-phlab {
    gap: 8px;
}

    .cc-phlab .cc-btn.cc-small {
        font-size: max(10px, calc(12px * var(--cc-fs)));
        padding: 3px 9px;
        box-shadow: none;
    }

/* ── live field map: a real map (Leaflet) under the design's title, legend and counters ── */
.cc-dot-dim {
    background: #5E77A8;
}

.cc-lmap {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
    isolation: isolate;
    z-index: 0;
    background-color: #071433;
    background-image: linear-gradient(#0F2457 1px,transparent 1px),linear-gradient(90deg,#0F2457 1px,transparent 1px);
    background-size: 38px 38px;
}

    .cc-lmap::after {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: 64px;
        background: linear-gradient(180deg,rgba(4,10,28,.9),rgba(4,10,28,0));
        pointer-events: none;
        z-index: 450;
    }

.cc-map .cc-legend,
.cc-map .cc-mapstat,
.cc-map .cc-h3 {
    z-index: 2;
}

.cc-map .cc-legend {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 62%;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    row-gap: 2px;
}

.cc-lmap.leaflet-container {
    font: max(10px, calc(13px * var(--cc-fs))) var(--cc-body);
    background-color: #071433;
}

/* OpenStreetMap turned into a night map: inverted, toned down, the board's navy shows through */
.cc-lmap.cc-lm-osm .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(1.15) saturate(.35);
    opacity: .82;
}

.cc-lmap .leaflet-control-attribution {
    background: rgba(4,10,28,.7);
    color: var(--cc-dim);
    font-size: max(10px, calc(10px * var(--cc-fs)));
}

    .cc-lmap .leaflet-control-attribution a {
        color: var(--cc-muted);
    }

.cc-lmap .leaflet-bar a {
    background: rgba(4,12,34,.9);
    color: var(--cc-fg);
    border-color: var(--cc-edge);
}

    .cc-lmap .leaflet-bar a:hover {
        background: #0D2559;
    }

.cc-lmap .leaflet-bar {
    border: 1px solid var(--cc-edge);
    margin-bottom: 64px;
}

.cc-lmap .leaflet-popup-content-wrapper,
.cc-lmap .leaflet-popup-tip {
    background: #0A1A40;
    color: var(--cc-fg);
    border: 1px solid var(--cc-edge);
    box-shadow: 0 0 20px rgba(69,212,255,.25);
}

.cc-lmap .leaflet-popup-close-button {
    color: var(--cc-muted);
}

.cc-lm-pop {
    display: grid;
    gap: 4px;
    min-width: 160px;
    font: max(10px, calc(13px * var(--cc-fs))) var(--cc-body);
}

    .cc-lm-pop b {
        font: 700 max(10px, calc(14px * var(--cc-fs))) var(--cc-display);
    }

    .cc-lm-pop span {
        color: var(--cc-muted);
    }

    .cc-lm-pop .cc-lm-now {
        color: var(--cc-cyan);
    }

    .cc-lm-pop .cc-btn {
        justify-self: start;
        margin-top: 4px;
        font-size: max(10px, calc(12px * var(--cc-fs)));
        padding: 4px 10px;
        box-shadow: none;
    }

.cc-rtl .cc-lm-pop {
    font-family: var(--cc-arabic);
    direction: rtl;
}

/* an inspector: the design's cyan dot with its halo, and the name */
.cc-lm-insp {
    position: relative;
}

    .cc-lm-insp i {
        position: absolute;
        left: -7px;
        top: -7px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #45D4FF;
        border: 2px solid #fff;
        box-shadow: 0 0 0 7px rgba(69,212,255,.25),0 0 14px rgba(69,212,255,.9);
        animation: cc-lm-halo 1.8s infinite;
    }

    .cc-lm-insp b {
        position: absolute;
        left: 12px;
        top: -10px;
        padding: 1px 7px;
        border-radius: 6px;
        background: rgba(4,12,34,.85);
        border: 1px solid rgba(69,212,255,.5);
        font: 600 max(10px, calc(12px * var(--cc-fs))) var(--cc-body);
        color: #EAF2FF;
        white-space: nowrap;
    }

    .cc-lm-insp.cc-stale i {
        background: #5E77A8;
        box-shadow: none;
        animation: none;
    }

    .cc-lm-insp.cc-stale b {
        color: var(--cc-muted);
        border-color: var(--cc-edge);
    }

@keyframes cc-lm-halo {
    50% {
        box-shadow: 0 0 0 11px rgba(69,212,255,.08),0 0 18px rgba(69,212,255,1);
    }
}

.cc-mapstat[hidden] {
    display: none;
}

/* inspector marker styles (Edit board → the map → «Inspector marker») */
.cc-lm-s-dot i {
    left: -5px;
    top: -5px;
    width: 10px;
    height: 10px;
    border-width: 1.5px;
    box-shadow: 0 0 0 4px rgba(69,212,255,.22),0 0 10px rgba(69,212,255,.9);
}

.cc-lm-av {
    position: absolute;
    left: -15px;
    top: -15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #0D2559;
    border: 2px solid #45D4FF;
    box-shadow: 0 0 0 4px rgba(69,212,255,.2),0 0 14px rgba(69,212,255,.8);
    font: 700 11px var(--cc-display);
    color: #EAF2FF;
}

    /* (Leaflet sets every marker image to its own size: width auto) */
    .cc-lmap .leaflet-marker-pane .cc-lm-av img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.cc-lm-s-avatar b {
    left: 19px;
    top: -10px;
}

.cc-lm-insp.cc-stale .cc-lm-av {
    border-color: #5E77A8;
    box-shadow: none;
    filter: grayscale(1);
    opacity: .7;
}

/* a street violation, a new registration, an SOS */
.cc-lm-pin div {
    position: absolute;
    left: 0;
    bottom: 0;
    transform: translate(-50%,-4px);
    padding: 2px 7px;
    border-radius: 7px 7px 7px 0;
    background: color-mix(in srgb, var(--cc-c) 22%, #040A1C);
    border: 1px solid var(--cc-c);
    color: var(--cc-c);
    font: 700 max(10px, calc(11px * var(--cc-fs))) var(--cc-display);
    white-space: nowrap;
    box-shadow: 0 0 10px color-mix(in srgb, var(--cc-c) 60%, transparent);
}

.cc-lm-pin.cc-lm-sos div {
    animation: cc-pulse 1.4s infinite;
    font-size: max(10px, calc(13px * var(--cc-fs)));
}

.cc-lmap .cc-lm-busy {
    animation: cc-lm-blink 1.6s infinite;
}

@keyframes cc-lm-blink {
    50% {
        stroke-opacity: .25;
    }
}

.cc-lmap .cc-lm-ring {
    animation: cc-lm-blink .8s infinite;
}

.cc-lm-fit {
    position: absolute;
    inset-inline-end: 16px;
    top: 52px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 9px;
    border: 1px solid var(--cc-edge);
    background: rgba(4,12,34,.85);
    color: var(--cc-fg);
    cursor: pointer;
}

    .cc-lm-fit svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

.cc-lm-none {
    position: absolute;
    inset-inline-start: 16px;
    top: 52px;
    z-index: 2;
    max-width: 60%;
    padding: 6px 12px;
    border-radius: 10px;
    background: rgba(4,12,34,.85);
    border: 1px solid var(--cc-edge);
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-lm-none[hidden] {
        display: none;
    }

/* ── details: voice notes and non-compliance, over the board (cc-details.js) ── */
.cc-dt {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    padding: calc(96px * var(--cc-ui)) 24px 24px;
    background: rgba(2,6,18,.6);
    backdrop-filter: blur(3px);
}

    .cc-dt[hidden] {
        display: none;
    }

body.cc-dt-open {
    overflow: hidden;
}

.cc-card.cc-dt-box {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
    width: min(1500px,100%);
    justify-self: center;
    background: rgba(8,20,52,.96);
    box-shadow: inset 0 0 40px rgba(43,108,255,.12),0 0 40px rgba(0,0,0,.6);
}

.cc-dt-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--cc-edge);
}

.cc-dt-tabs,
.cc-dt-periods {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.cc-dt-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--cc-edge);
    background: rgba(4,12,34,.7);
    color: var(--cc-muted);
    font: 700 max(10px, calc(17px * var(--cc-fs))) var(--cc-display);
    cursor: pointer;
}

    .cc-dt-tab svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .cc-dt-tab.cc-on {
        color: #fff;
        border-color: var(--cc-cyan);
        background: linear-gradient(180deg,rgba(26,75,176,.85),rgba(14,42,106,.85));
        box-shadow: 0 0 16px rgba(69,212,255,.35);
    }

.cc-dt-per {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--cc-edge);
    background: transparent;
    color: var(--cc-muted);
    font: 600 max(10px, calc(14px * var(--cc-fs))) var(--cc-body);
    cursor: pointer;
}

    .cc-dt-per.cc-on {
        color: #1A1200;
        background: var(--cc-gold);
        border-color: var(--cc-gold);
    }

.cc-dt-x {
    margin-inline-start: auto;
    font: 700 max(10px, calc(16px * var(--cc-fs))) var(--cc-display);
    color: #fff;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 10px;
    padding: 7px 16px;
    cursor: pointer;
}

.cc-dt-bd {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 0;
}

.cc-dt-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-inline-end: 1px solid var(--cc-edge);
    overflow: auto;
}

.cc-dt-side-h {
    font: 700 max(10px, calc(13px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-dim);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 4px;
}

.cc-dt-person {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(4,12,34,.55);
    color: var(--cc-fg);
    text-align: start;
    cursor: pointer;
    font: inherit;
}

    .cc-dt-person:hover {
        border-color: var(--cc-edge);
    }

    .cc-dt-person.cc-on {
        border-color: var(--cc-cyan);
        box-shadow: 0 0 12px rgba(69,212,255,.3);
    }

.cc-dt-av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(69,212,255,.15);
    border: 1px solid rgba(69,212,255,.5);
    color: var(--cc-cyan);
    font: 700 max(10px, calc(13px * var(--cc-fs))) var(--cc-display);
}

.cc-dt-pn {
    display: grid;
    min-width: 0;
}

    .cc-dt-pn b {
        font: 600 max(10px, calc(14px * var(--cc-fs))) var(--cc-body);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cc-dt-pn small {
        font-size: max(10px, calc(12px * var(--cc-fs)));
        color: var(--cc-dim);
    }

.cc-dt-person em {
    font: 700 max(10px, calc(15px * var(--cc-fs))) var(--cc-display);
    font-style: normal;
    color: var(--cc-gold);
}

.cc-dt-clear {
    margin-top: 8px;
    align-self: flex-start;
}

.cc-dt-list {
    position: relative;
    overflow: auto;
    padding: 14px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 240px;
}

    .cc-dt-list > .cc-state {
        position: static;
        padding: 60px 10px;
    }

.cc-dt-day {
    margin: 10px 0 2px;
    font: 700 max(10px, calc(14px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-muted);
}

.cc-dt-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(4,12,34,.7);
    border: 1px solid #17306A;
}

    .cc-dt-row.cc-dt-nc {
        grid-template-columns: 1fr;
        gap: 8px;
        background: rgba(4,12,34,.5);
    }

    .cc-dt-row.cc-dt-focus {
        border-color: var(--cc-gold);
        box-shadow: 0 0 18px rgba(255,201,60,.35);
    }

.cc-dt-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

    .cc-dt-main b {
        font: 700 max(10px, calc(16px * var(--cc-fs))) var(--cc-display);
    }

.cc-dt-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-muted);
}

.cc-dt-sub {
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-gold);
}

.cc-dt-acts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

    .cc-dt-acts .cc-btn.cc-small {
        font-size: max(10px, calc(13px * var(--cc-fs)));
        padding: 4px 10px;
        box-shadow: none;
    }

.cc-dt-chip {
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--cc-c, #45D4FF) 60%, transparent);
    background: color-mix(in srgb, var(--cc-c, #45D4FF) 14%, transparent);
    color: var(--cc-c, #45D4FF);
    font: 600 max(10px, calc(12px * var(--cc-fs))) var(--cc-body);
}

.cc-dt-sum {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin-bottom: 6px;
}

.cc-dt-tile {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(4,12,34,.7);
    border: 1px solid #17306A;
    border-top: 3px solid var(--cc-c, #45D4FF);
}

    .cc-dt-tile b {
        display: block;
        font: 800 max(10px, calc(28px * var(--cc-fs))) var(--cc-display);
        color: var(--cc-c, #45D4FF);
    }

    .cc-dt-tile span {
        font-size: max(10px, calc(13px * var(--cc-fs)));
        color: var(--cc-muted);
    }

.cc-dt-grp {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--cc-edge);
    background: rgba(10,26,64,.5);
}

.cc-dt-grp-h {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

    .cc-dt-grp-h b {
        font: 700 max(10px, calc(17px * var(--cc-fs))) var(--cc-display);
    }

.cc-dt-count {
    font: 700 max(10px, calc(13px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-red);
}

.cc-dt-q {
    display: grid;
    gap: 3px;
}

    .cc-dt-q small {
        font-size: max(10px, calc(12px * var(--cc-fs)));
        color: var(--cc-dim);
        text-transform: uppercase;
        letter-spacing: .4px;
    }

    .cc-dt-q b {
        font: 600 max(10px, calc(15px * var(--cc-fs))) var(--cc-body);
    }

.cc-rtl .cc-dt-q b {
    font-family: var(--cc-arabic);
}

.cc-dt-note {
    margin: 0;
    padding: 6px 10px;
    border-inline-start: 3px solid var(--cc-cyan);
    background: rgba(69,212,255,.06);
    border-radius: 6px;
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: #DCE8FF;
}

.cc-fc.cc-dt-fc {
    font-size: max(10px, calc(14px * var(--cc-fs)));
}

    .cc-fc.cc-dt-fc b {
        font-size: max(10px, calc(11.5px * var(--cc-fs)));
    }

    .cc-fc.cc-dt-fc p {
        margin: 3px 0 0;
        color: #C7D6F5;
    }

    .cc-fc.cc-dt-fc .cc-dt-capa {
        color: var(--cc-green);
    }

    .cc-fc.cc-dt-fc small {
        display: block;
        color: var(--cc-dim);
        margin-top: 2px;
    }

.cc-rtl .cc-fc.cc-dt-fc {
    border-left: 0;
    border-right: 4px solid var(--cc-c);
}

.cc-dt-media {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cc-dt-ph {
    display: block;
    width: 84px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--cc-edge);
}

    .cc-dt-ph img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.cc-dt-more {
    text-align: center;
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-dim);
    padding: 10px;
}

@media (max-width: 900px) {
    .cc-dt {
        padding: 12px 8px 8px;
    }

    .cc-dt-bd {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .cc-dt-side {
        flex-direction: row;
        overflow-x: auto;
        border-inline-end: 0;
        border-bottom: 1px solid var(--cc-edge);
    }

    .cc-dt-side-h {
        display: none;
    }

    .cc-dt-person {
        flex: none;
        width: 220px;
    }

    .cc-dt-row {
        grid-template-columns: auto 1fr;
    }

        .cc-dt-row .cc-dt-acts {
            grid-column: 1 / -1;
        }

    .cc-dt-sum {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

/* ── designed portlets (cc-designer.js CC.visual): tile, columns, bars, line, donut, table ── */
.cc-cust-bd {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(48px * var(--cc-ui));
    bottom: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cc-v {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.cc-v-go .cc-v-tl,
.cc-v-go .cc-v-col,
.cc-v-go .cc-v-hrow,
.cc-v-go .cc-v-dot,
.cc-v-go .cc-v-seg,
.cc-v-go .cc-v-li,
.cc-v-go .cc-v-table tbody tr {
    cursor: pointer;
}

.cc-editing .cc-v-go * {
    cursor: inherit;
}

.cc-v-err {
    color: var(--cc-amber);
}

.cc-v-more {
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-dim);
}

/* the palette of the donut (and of anything with several colours) */
.cc-pal-0 { --cc-p: #45D4FF; }
.cc-pal-1 { --cc-p: #FFC93C; }
.cc-pal-2 { --cc-p: #2EE59D; }
.cc-pal-3 { --cc-p: #FF3D5E; }
.cc-pal-4 { --cc-p: #FF9F2E; }
.cc-pal-5 { --cc-p: #9B7BFF; }
.cc-pal-6 { --cc-p: #FF7AC8; }
.cc-pal-7 { --cc-p: #2ED3C6; }
.cc-pal-8 { --cc-p: #5B8CFF; }
.cc-pal-9 { --cc-p: #8EA4D2; }

/* tile */
.cc-v-tl {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cc-v-num {
    font: 800 max(10px, calc(40px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-c, #45D4FF);
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 18px color-mix(in srgb, var(--cc-c, #45D4FF) 40%, transparent);
}

.cc-v-lab {
    font-size: max(10px, calc(13px * var(--cc-fs)));
    color: var(--cc-muted);
}

.cc-v-cmp {
    font: 600 max(10px, calc(12.5px * var(--cc-fs))) var(--cc-body);
    color: var(--cc-muted);
}

    .cc-v-cmp span {
        color: var(--cc-dim);
        font-weight: 400;
    }

    .cc-v-cmp.cc-v-good {
        color: var(--cc-green);
    }

    .cc-v-cmp.cc-v-bad {
        color: var(--cc-red);
    }

.cc-v-per {
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-dim);
}

.cc-v-spark {
    width: 100%;
    flex: 1;
    min-height: 24px;
    max-height: 70px;
    margin-top: auto;
}

.cc-v-area {
    fill: color-mix(in srgb, var(--cc-c, #45D4FF) 18%, transparent);
    stroke: none;
}

.cc-v-stroke {
    fill: none;
    stroke: var(--cc-c, #45D4FF);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cc-c, #45D4FF) 70%, transparent));
}

/* columns */
.cc-v-cols {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.cc-v-col {
    flex: 1 0 26px;
    max-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

    .cc-v-col b {
        font: 700 max(10px, calc(11.5px * var(--cc-fs))) var(--cc-display);
        font-variant-numeric: tabular-nums;
    }

    .cc-v-col small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: max(10px, calc(10.5px * var(--cc-fs)));
        color: var(--cc-muted);
    }

.cc-v-colbar {
    flex: 1;
    width: 70%;
    display: flex;
    align-items: flex-end;
    background: rgba(13,37,89,.55);
    border-radius: 6px 6px 2px 2px;
    overflow: hidden;
}

    .cc-v-colbar i {
        display: block;
        width: 100%;
        border-radius: inherit;
        background: linear-gradient(180deg, var(--cc-c, #45D4FF), color-mix(in srgb, var(--cc-c, #45D4FF) 45%, #0D2559));
        box-shadow: 0 0 10px color-mix(in srgb, var(--cc-c, #45D4FF) 55%, transparent);
    }

/* horizontal bars */
.cc-v-hbar-box,
.cc-v.cc-v-hbar {
    overflow-y: auto;
    scrollbar-width: thin;
}

.cc-v-hrow {
    display: grid;
    grid-template-columns: minmax(0,1.1fr) minmax(40px,2fr) auto;
    align-items: center;
    gap: 8px;
    font-size: max(10px, calc(13px * var(--cc-fs)));
}

.cc-v-hl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #C4D4F4;
}

.cc-v-htrack {
    height: 9px;
    border-radius: 999px;
    background: #0D2559;
    overflow: hidden;
}

    .cc-v-htrack i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, color-mix(in srgb, var(--cc-c, #45D4FF) 50%, #2B6CFF), var(--cc-c, #45D4FF));
        box-shadow: 0 0 8px color-mix(in srgb, var(--cc-c, #45D4FF) 55%, transparent);
    }

.cc-v-hrow b {
    font: 700 max(10px, calc(13.5px * var(--cc-fs))) var(--cc-display);
    font-variant-numeric: tabular-nums;
    text-align: end;
}

/* line */
.cc-v-linebox {
    position: relative;
    flex: 1;
    min-height: 40px;
}

.cc-v-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cc-v-grid {
    stroke: #17306A;
    stroke-width: 1;
    stroke-dasharray: 3 4;
    vector-effect: non-scaling-stroke;
}

.cc-v-dot {
    position: absolute;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #071433;
    background: var(--cc-c, #45D4FF);
    box-shadow: 0 0 6px var(--cc-c, #45D4FF);
}

    .cc-v-dot:hover,
    .cc-v-dot:focus-visible {
        transform: scale(1.5);
        outline: none;
    }

.cc-v-axis {
    display: flex;
    justify-content: space-between;
    font-size: max(10px, calc(10.5px * var(--cc-fs)));
    color: var(--cc-dim);
}

.cc-rtl .cc-v-axis {
    flex-direction: row-reverse;
}

.cc-v-max {
    position: absolute;
    top: -2px;
    inset-inline-start: 0;
    font-size: max(10px, calc(10.5px * var(--cc-fs)));
    color: var(--cc-dim);
}

/* donut */
.cc-v.cc-v-donut {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.cc-v-dwrap {
    position: relative;
    height: 100%;
    max-height: 100%;
    aspect-ratio: 1;
    flex: none;
    max-width: 50%;
}

svg.cc-v-donut {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.cc-v-ring {
    fill: none;
    stroke: #0D2559;
    stroke-width: 14;
}

.cc-v-seg {
    fill: none;
    stroke: var(--cc-p);
    stroke-width: 14;
    filter: drop-shadow(0 0 3px var(--cc-p));
}

    .cc-v-seg:hover {
        stroke-width: 17;
    }

.cc-v-mid {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
    padding: 18%;
}

    .cc-v-mid b {
        font: 800 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
        font-variant-numeric: tabular-nums;
    }

    .cc-v-mid span {
        font-size: max(10px, calc(10px * var(--cc-fs)));
        color: var(--cc-dim);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

.cc-v-legend {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: thin;
}

.cc-v-li {
    display: grid;
    grid-template-columns: 10px minmax(0,1fr) auto 38px;
    align-items: center;
    gap: 6px;
    font-size: max(10px, calc(12.5px * var(--cc-fs)));
}

    .cc-v-li i {
        width: 10px;
        height: 10px;
        border-radius: 3px;
        background: var(--cc-p);
    }

    .cc-v-li span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #C4D4F4;
    }

    .cc-v-li b {
        font-variant-numeric: tabular-nums;
    }

    .cc-v-li em {
        font-style: normal;
        color: var(--cc-dim);
        text-align: end;
    }

/* table (also the records behind a number) */
.cc-v-tscroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
}

.cc-v-table {
    width: 100%;
    border-collapse: collapse;
    font-size: max(10px, calc(12.5px * var(--cc-fs)));
}

    .cc-v-table th {
        position: sticky;
        top: 0;
        background: #0A1A40;
        color: var(--cc-dim);
        font: 700 max(10px, calc(11px * var(--cc-fs))) var(--cc-display);
        text-transform: uppercase;
        letter-spacing: .4px;
        text-align: start;
        padding: 5px 8px;
        border-bottom: 1px solid var(--cc-edge);
    }

    .cc-v-table td {
        padding: 5px 8px;
        border-bottom: 1px solid #12285C;
        color: #DCE8FF;
    }

        .cc-v-table td.cc-c-cyan, .cc-v-table td.cc-c-gold, .cc-v-table td.cc-c-green,
        .cc-v-table td.cc-c-red, .cc-v-table td.cc-c-amber {
            color: var(--cc-c);
            font-weight: 700;
            font-variant-numeric: tabular-nums;
        }

    .cc-v-table tbody tr:hover td {
        background: rgba(69,212,255,.06);
    }

/* the records behind a number */
.cc-dr {
    position: fixed;
    inset: 0;
    z-index: 88;
    display: grid;
    padding: calc(96px * var(--cc-ui)) 24px 24px;
    background: rgba(2,6,18,.6);
    backdrop-filter: blur(3px);
}

    .cc-dr[hidden] {
        display: none;
    }

.cc-card.cc-dr-box {
    position: relative;
    width: min(1200px,100%);
    justify-self: center;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
    background: rgba(8,20,52,.97);
}

.cc-dr-hd {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--cc-edge);
}

    .cc-dr-hd b {
        font: 700 max(10px, calc(18px * var(--cc-fs))) var(--cc-display);
    }

.cc-dr-bd {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px 16px;
    min-height: 0;
}

    .cc-dr-bd > .cc-state {
        position: static;
        padding: 40px 0;
    }

.cc-dr-count {
    font-size: max(10px, calc(12px * var(--cc-fs)));
    color: var(--cc-dim);
}

.cc-dr-table td.cc-dr-num {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

/* ── the Portlet Designer ── */
.cc-ds {
    position: fixed;
    inset: 0;
    z-index: 84;
    display: grid;
    padding: calc(84px * var(--cc-ui)) 20px 20px;
    background: rgba(2,6,18,.62);
    backdrop-filter: blur(3px);
}

    .cc-ds[hidden] {
        display: none;
    }

.cc-card.cc-ds-box {
    width: min(1500px,100%);
}

.cc-ds-title {
    font: 800 max(10px, calc(20px * var(--cc-fs))) var(--cc-display);
}

.cc-ds-acts {
    margin-inline-start: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

    .cc-ds-acts .cc-dt-x {
        margin-inline-start: 0;
    }

.cc-ds-bd {
    display: grid;
    grid-template-columns: minmax(330px, 420px) minmax(0,1fr);
    min-height: 0;
}

.cc-ds-form {
    overflow-y: auto;
    padding: 12px 14px 24px;
    border-inline-end: 1px solid var(--cc-edge);
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
}

.cc-ds-sec {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(4,12,34,.55);
    border: 1px solid #17306A;
}

    .cc-ds-sec h4 {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        font: 700 max(10px, calc(14px * var(--cc-fs))) var(--cc-display);
        color: #EAF2FF;
    }

        .cc-ds-sec h4 i {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            font: 700 11px var(--cc-display);
            font-style: normal;
            color: #1A1200;
            background: var(--cc-gold);
        }

.cc-ds-lab {
    font-size: max(10px, calc(12px * var(--cc-fs)));
    color: var(--cc-muted);
}

.cc-ds-filter {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.2fr) auto;
    gap: 5px;
    align-items: center;
}

    .cc-ds-filter datalist {
        display: none;
    }

.cc-ds-vis {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 6px;
}

.cc-ds-vbtn {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1px solid var(--cc-edge);
    background: rgba(4,12,34,.7);
    color: var(--cc-muted);
    font: 600 max(10px, calc(12px * var(--cc-fs))) var(--cc-body);
    cursor: pointer;
}

    .cc-ds-vbtn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

    .cc-ds-vbtn.cc-on {
        color: #fff;
        border-color: var(--cc-cyan);
        box-shadow: 0 0 12px rgba(69,212,255,.35);
    }

    /* a small drawing of each visual */
    .cc-ds-vbtn i {
        width: 36px;
        height: 22px;
        display: block;
        border-radius: 4px;
        background-repeat: no-repeat;
    }

.cc-ds-v-tile i {
    background: linear-gradient(#45D4FF,#45D4FF) 4px 4px / 18px 8px no-repeat, linear-gradient(#5E77A8,#5E77A8) 4px 15px / 26px 3px no-repeat;
}

.cc-ds-v-bar i {
    background: linear-gradient(#45D4FF,#45D4FF) 4px 10px / 6px 12px no-repeat, linear-gradient(#45D4FF,#45D4FF) 13px 4px / 6px 18px no-repeat, linear-gradient(#45D4FF,#45D4FF) 22px 13px / 6px 9px no-repeat;
}

.cc-ds-v-hbar i {
    background: linear-gradient(#45D4FF,#45D4FF) 2px 3px / 30px 4px no-repeat, linear-gradient(#45D4FF,#45D4FF) 2px 9px / 20px 4px no-repeat, linear-gradient(#45D4FF,#45D4FF) 2px 15px / 12px 4px no-repeat;
}

.cc-ds-v-line i {
    background: linear-gradient(160deg, transparent 45%, #45D4FF 46%, #45D4FF 54%, transparent 55%) 0 0 / 18px 22px no-repeat, linear-gradient(20deg, transparent 45%, #45D4FF 46%, #45D4FF 54%, transparent 55%) 18px 0 / 18px 22px no-repeat;
}

.cc-ds-v-donut i {
    width: 22px;
    border-radius: 50%;
    background: conic-gradient(#45D4FF 0 45%, #FFC93C 0 75%, #2EE59D 0);
    -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px);
    mask: radial-gradient(circle, transparent 5px, #000 6px);
}

.cc-ds-v-table i {
    background: repeating-linear-gradient(#5E77A8 0 2px, transparent 2px 6px) 2px 2px / 32px 18px no-repeat;
}

.cc-ds-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
    min-height: 0;
    overflow: auto;
}

/* the designer's messages sit in the column, not over the whole window */
.cc-ds-right > .cc-state,
.cc-ds-form > .cc-state {
    position: static;
    padding: 40px 10px;
}

.cc-ds-right {
    position: relative;
}

.cc-ds-read {
    font-size: max(10px, calc(14px * var(--cc-fs)));
    color: #DCE8FF;
    padding: 8px 12px;
    border-radius: 10px;
    border-inline-start: 3px solid var(--cc-gold);
    background: rgba(255,201,60,.06);
}

/* the preview: a portlet of about a third of the board */
.cc-card.cc-ds-pv {
    position: relative;
    width: min(100%, 520px);
    height: 330px;
    flex: none;
}

    .cc-card.cc-ds-pv .cc-h3 em {
        max-width: 50%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.cc-ds-subh {
    margin: 8px 0 0;
    font: 700 max(10px, calc(13px * var(--cc-fs))) var(--cc-display);
    color: var(--cc-dim);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cc-ds-regform {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 1000px;
}

.cc-ds-mono {
    font-family: Consolas,'Courier New',monospace;
    direction: ltr;
    unicode-bidi: isolate;
}

.cc-ds-ctable .cc-in {
    min-width: 110px;
}

.cc-ds-ctable td {
    vertical-align: middle;
}

.cc-ds-cols {
    max-height: 46vh;
    display: flex;
}

/* the edit panel */
.cc-btn.cc-ds-openbtn {
    align-self: flex-start;
    margin-bottom: 4px;
}

.cc-ds-sum {
    font-size: max(10px, calc(12.5px * var(--cc-fs)));
}

.cc-ds-trow {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    align-items: center;
    gap: 5px;
}

.cc-ds-bhead {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto auto;
    align-items: center;
    gap: 5px;
}

    .cc-ds-bhead > span {
        display: grid;
        min-width: 0;
    }

    .cc-ds-bhead small {
        color: var(--cc-dim);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* the boards switcher (top bar), when the user may open several boards */
.cc-boardsel {
    font: 600 max(10px, calc(15px * var(--cc-fs))) var(--cc-display);
    color: #EAF2FF;
    background: rgba(10,26,64,.85);
    border: 1px solid var(--cc-edge);
    border-radius: 999px;
    padding: calc(6px * var(--cc-ui)) calc(14px * var(--cc-ui));
    max-width: 220px;
}

@media (max-width: 900px) {
    .cc-ds-bd {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .cc-ds-form {
        border-inline-end: 0;
        overflow: visible;
    }

    .cc-ds-filter {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── designer phase 2: gauge ── */
.cc-v.cc-v-gauge {
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.cc-v-gwrap {
    position: relative;
    width: 100%;
    max-width: 260px;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cc-v-go .cc-v-gwrap {
    cursor: pointer;
}

.cc-v-gsvg {
    width: 100%;
    max-height: 100%;
    overflow: visible;
}

.cc-v-gtrack {
    fill: none;
    stroke: #0D2559;
    stroke-width: 11;
    stroke-linecap: round;
}

.cc-v-gval {
    fill: none;
    stroke: var(--cc-c, #45D4FF);
    stroke-width: 11;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cc-c, #45D4FF) 60%, transparent));
    transition: stroke-dasharray .6s ease;
}

.cc-v-gmark {
    stroke: var(--cc-c);
    stroke-width: 2;
}

.cc-v-gmid {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: grid;
    justify-items: center;
    line-height: 1;
}

    .cc-v-gmid .cc-v-num {
        font-size: max(10px, calc(30px * var(--cc-fs)));
    }

.cc-v-gof {
    font-size: max(10px, calc(10.5px * var(--cc-fs)));
    color: var(--cc-dim);
}

.cc-v-gfoot {
    display: grid;
    justify-items: center;
    gap: 2px;
    text-align: center;
}

/* ── designer phase 2: funnel ── */
.cc-v.cc-v-funnel {
    overflow-y: auto;
    scrollbar-width: thin;
    gap: 5px;
}

.cc-v-fs {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(40px,2fr) auto 34px 44px;
    align-items: center;
    gap: 6px;
    font-size: max(10px, calc(12.5px * var(--cc-fs)));
}

.cc-v-go .cc-v-fs {
    cursor: pointer;
}

.cc-v-fl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cc-muted);
}

.cc-v-fbar {
    height: 14px;
    display: flex;
    justify-content: center;
}

    .cc-v-fbar i {
        display: block;
        height: 100%;
        border-radius: 4px;
        background: var(--cc-p);
        box-shadow: 0 0 8px color-mix(in srgb, var(--cc-p) 50%, transparent);
    }

.cc-v-fs b {
    font-variant-numeric: tabular-nums;
}

.cc-v-fs em {
    font-style: normal;
    color: var(--cc-dim);
    font-variant-numeric: tabular-nums;
}

.cc-v-fs small {
    font-size: max(9px, calc(10.5px * var(--cc-fs)));
    color: var(--cc-dim);
}

    .cc-v-fs small.cc-v-bad {
        color: var(--cc-amber);
    }

/* ── designer phase 2: map ── */
.cc-v.cc-v-map {
    min-height: 120px;
}

.cc-v-mapbox.cc-lmap {
    border-radius: 12px;
}

.cc-v-mpt {
    fill: var(--cc-p);
    fill-opacity: .85;
    stroke: #fff;
    stroke-opacity: .7;
    filter: drop-shadow(0 0 3px var(--cc-p));
}

.cc-v-mtip {
    display: grid;
    gap: 1px;
    font-size: 11px;
}

    .cc-v-mtip small {
        color: #5E77A8;
    }

.cc-v-minfo {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(4,12,34,.82);
    border: 1px solid var(--cc-edge);
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-v-minfo b {
        font: 800 max(10px, calc(15px * var(--cc-fs))) var(--cc-display);
        color: #EAF2FF;
    }

    .cc-v-minfo.cc-v-go1 {
        cursor: pointer;
    }

.cc-v-mleg {
    position: absolute;
    bottom: 8px;
    inset-inline-start: 8px;
    z-index: 1;
    max-width: 60%;
    max-height: 55%;
    overflow-y: auto;
    display: grid;
    gap: 3px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(4,12,34,.82);
    border: 1px solid var(--cc-edge);
}

    .cc-v-mleg .cc-v-li {
        grid-template-columns: 10px minmax(0,1fr) auto;
        font-size: max(10px, calc(11px * var(--cc-fs)));
    }

.cc-v-mnone {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: var(--cc-dim);
    pointer-events: none;
}

.cc-v-map .cc-v-more {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 1;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(4,12,34,.82);
}

/* the visual buttons of the designer: gauge, funnel, map */
.cc-ds-v-gauge i {
    width: 30px;
    height: 16px;
    margin-top: 6px;
    border-radius: 15px 15px 0 0;
    background: conic-gradient(from -90deg at 50% 100%, #45D4FF 0 110deg, #0D2559 0 180deg, transparent 0);
    -webkit-mask: radial-gradient(circle at 50% 100%, transparent 8px, #000 9px);
    mask: radial-gradient(circle at 50% 100%, transparent 8px, #000 9px);
}

.cc-ds-v-funnel i {
    background: linear-gradient(#45D4FF,#45D4FF) 3px 3px / 30px 4px no-repeat, linear-gradient(#45D4FF,#45D4FF) 8px 9px / 20px 4px no-repeat, linear-gradient(#45D4FF,#45D4FF) 13px 15px / 10px 4px no-repeat;
}

.cc-ds-v-map i {
    background: radial-gradient(circle, #FFC93C 0 2px, transparent 3px) 6px 5px / 8px 8px no-repeat, radial-gradient(circle, #45D4FF 0 2px, transparent 3px) 18px 10px / 8px 8px no-repeat, radial-gradient(circle, #2EE59D 0 2px, transparent 3px) 26px 3px / 8px 8px no-repeat, linear-gradient(#0D2559,#0D2559);
}

/* the board's period (top bar) */
.cc-periodsel {
    font: 600 max(10px, calc(13px * var(--cc-fs))) var(--cc-display);
    color: #EAF2FF;
    background: rgba(10,26,64,.85);
    border: 1px solid var(--cc-edge);
    border-radius: 999px;
    padding: calc(5px * var(--cc-ui)) calc(10px * var(--cc-ui));
    max-width: 170px;
}

/* while editing, the board's period is not needed (and the edit panel takes the room) */
.cc-editing .cc-periodsel {
    display: none;
}

/* while editing the board is narrower (the edit panel): the top bar keeps to the essentials */
.cc-editing .cc-tb-r {
    gap: 8px;
}

    .cc-editing .cc-tb-r .cc-pill {
        display: none;
    }

.cc-ds-bp {
    color: var(--cc-gold);
}

/* ── designer phase 3: describe the portlet ── */
.cc-ds-ai {
    border: 1px solid color-mix(in srgb, var(--cc-gold) 45%, var(--cc-edge));
    background: linear-gradient(135deg, rgba(255,201,60,.07), rgba(69,212,255,.04));
    border-radius: 12px;
    padding: 10px 12px;
}

    .cc-ds-ai h4 i svg {
        width: 12px;
        height: 12px;
    }

.cc-ds-desc {
    width: 100%;
    resize: vertical;
    min-height: 48px;
    font: inherit;
}

.cc-ds-airow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.cc-ds-said {
    display: grid;
    gap: 2px;
    margin-top: 6px;
}

.cc-ds-said-ok {
    color: var(--cc-green);
    font-weight: 600;
}

    .cc-ds-said-ok.cc-ds-said-ai {
        color: var(--cc-gold);
    }

.cc-ds-said-err {
    color: var(--cc-amber);
}

.cc-ds-wait {
    animation: cc-ds-pulse 1.2s ease-in-out infinite;
}

@keyframes cc-ds-pulse {
    50% { opacity: .45; }
}

/* ── rule engine (live) ── */
.cc-next-off span {
    color: var(--cc-dim);
}

.cc-r-go {
    cursor: pointer;
}

    .cc-r-go:hover {
        background: rgba(69,212,255,.06);
    }

.cc-rnone {
    padding: 10px 4px;
    color: var(--cc-dim);
    font-size: max(10px, calc(12.5px * var(--cc-fs)));
}

/* the live portlet has a footer: the list stops above it and scrolls when there are more rules */
.cc-rl:has(~ .cc-rfoot) {
    bottom: 32px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.cc-rfoot {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── platform health (live): the light of each item ── */
.cc-hw.cc-hw-warn i {
    background: var(--cc-amber);
    box-shadow: 0 0 10px var(--cc-amber);
}

.cc-hw.cc-hw-bad i {
    background: var(--cc-red);
    box-shadow: 0 0 10px var(--cc-red);
    animation: cc-hw-blink 1s steps(2, start) infinite;
}

@keyframes cc-hw-blink {
    to { visibility: hidden; }
}

.cc-lead-warn span {
    color: var(--cc-amber);
}

.cc-lead-bad span {
    color: var(--cc-red);
}

/* ── governorates of Egypt (offline background, or borders over the street map) ── */
.cc-gov-fill {
    fill: #0C2250;
    fill-opacity: .9;
    stroke: #2E5FB0;
    stroke-opacity: .9;
}

    .cc-gov-fill:hover {
        fill: #12306B;
    }

.cc-gov-line {
    fill: none;
    stroke: #45D4FF;
    stroke-opacity: .35;
    stroke-dasharray: 3 3;
}

.cc-gov-hl.cc-gov-fill {
    fill: #143A7E;
    stroke: #45D4FF;
    stroke-opacity: 1;
    filter: drop-shadow(0 0 6px rgba(69,212,255,.55));
}

.cc-gov-hl.cc-gov-line {
    stroke-opacity: .9;
    stroke-dasharray: none;
}

.cc-lmap.cc-lm-offline {
    background-color: #050E26;
}

.cc-lmap .leaflet-tooltip.cc-gov-tip {
    background: rgba(4,12,34,.92);
    color: #EAF2FF;
    border: 1px solid var(--cc-edge);
    box-shadow: none;
    font-size: 11px;
}

    .cc-lmap .leaflet-tooltip.cc-gov-tip::before {
        display: none;
    }

/* a record that opens (e.g. a workflow task) */
.cc-dr-table tr.cc-dr-go {
    cursor: pointer;
}

    .cc-dr-table tr.cc-dr-go:hover td {
        background: rgba(69,212,255,.08);
    }

/* designed portlets: known values keep their colour (passed green, late red…) */
.cc-tone-green { --cc-p: #2EE59D; }
.cc-tone-gold { --cc-p: #FFC93C; }
.cc-tone-amber { --cc-p: #FF9F2E; }
.cc-tone-red { --cc-p: #FF3D5E; }
.cc-tone-crit { --cc-p: #B5173A; }
.cc-tone-cyan { --cc-p: #45D4FF; }

/* ── designed portlets, BI: a second dimension (Legend), several values, cross-filtering ── */
.cc-v-colbar i[class*="cc-pal-"], .cc-v-colbar i[class*="cc-tone-"],
.cc-v-htrack i[class*="cc-pal-"], .cc-v-htrack i[class*="cc-tone-"] {
    --cc-c: var(--cc-p);
}

.cc-v-stack .cc-v-colbar {
    flex-direction: column-reverse;
    justify-content: flex-start;
    align-items: stretch;
}

    .cc-v-stack .cc-v-colbar i {
        border-radius: 0;
        box-shadow: none;
        flex: none;
    }

        .cc-v-stack .cc-v-colbar i:last-child {
            border-radius: 6px 6px 0 0;
        }

.cc-v-grp .cc-v-colbar {
    width: 86%;
    gap: 1px;
    background: transparent;
}

    .cc-v-grp .cc-v-colbar i {
        flex: 1 1 0;
        min-width: 2px;
        border-radius: 3px 3px 1px 1px;
        box-shadow: none;
    }

.cc-v-multi .cc-v-colbar i,
.cc-v-multi .cc-v-htrack i,
.cc-v-matrix td.cc-v-mc {
    cursor: inherit;
}

.cc-v-go.cc-v-multi .cc-v-colbar i,
.cc-v-go.cc-v-multi .cc-v-htrack i,
.cc-v-go .cc-v-matrix td.cc-v-mc {
    cursor: pointer;
}

.cc-v-multi .cc-v-colbar i:hover,
.cc-v-multi .cc-v-htrack i:hover {
    filter: brightness(1.25);
}

.cc-v-hstack {
    display: flex;
}

    .cc-v-hstack i {
        flex: none;
        border-radius: 0;
        box-shadow: none;
    }

.cc-v-hgrp {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: transparent;
    border-radius: 0;
}

    .cc-v-hgrp i {
        height: 5px;
        border-radius: 999px;
        box-shadow: none;
    }

.cc-v-msvg .cc-v-stroke {
    stroke: var(--cc-p);
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--cc-p) 60%, transparent));
}

.cc-v-sdot {
    width: 7px;
    height: 7px;
    margin: -3.5px 0 0 -3.5px;
    background: var(--cc-p);
}

/* the series' legend under the visual */
.cc-v-slg {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: max(10px, calc(11.5px * var(--cc-fs)));
}

    .cc-v-slg .cc-v-li {
        display: inline-flex;
        gap: 5px;
    }

    .cc-v-slg .cc-v-go1 {
        cursor: pointer;
    }

.cc-editing .cc-v-slg .cc-v-go1 {
    cursor: inherit;
}

/* the matrix */
.cc-v-matrix th .cc-v-key {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-inline-end: 5px;
    background: var(--cc-p);
}

.cc-v-matrix td.cc-v-mc,
.cc-v-matrix td.cc-v-mt,
.cc-v-matrix tfoot td {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.cc-v-matrix td.cc-v-m0 {
    color: var(--cc-dim);
}

.cc-v-matrix td.cc-v-mt,
.cc-v-matrix tfoot td {
    font-weight: 700;
}

.cc-v-matrix tfoot td {
    border-top: 1px solid #1E3A78;
}

/* a selection on this portlet's own field: the others dim */
.cc-v-dim {
    opacity: .32;
    transition: opacity .2s;
}

.cc-v-seg.cc-v-dim {
    opacity: .25;
}

/* «filtered by the board's selection» on a portlet that follows it */
.cc-v-selby {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: max(10px, calc(10.5px * var(--cc-fs)));
    color: var(--cc-gold, #FFC93C);
}

    .cc-v-selby svg {
        width: 12px;
        height: 12px;
        flex: none;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .cc-v-selby span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* the bar of the viewer's selections, above the board */
.cc-selbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 8px;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, #FFC93C 45%, transparent);
    border-radius: 10px;
    background: rgba(255,201,60,.07);
    font-size: max(11px, calc(13px * var(--cc-ui, 1)));
    color: #E8EEFC;
}

    .cc-selbar[hidden] {
        display: none;
    }

.cc-selbar-t {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #FFC93C;
    font-weight: 700;
}

    .cc-selbar-t svg {
        width: 14px;
        height: 14px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

.cc-selbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px 2px 10px;
    border-radius: 999px;
    background: #0D2559;
    border: 1px solid #1E3A78;
}

    .cc-selbar-chip .cc-x {
        padding: 0 6px;
    }

/* the slicer portlet (placed under the title, like the designed portlet's body) */
.cc-sl-bd {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(48px * var(--cc-ui));
    bottom: 10px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
    scrollbar-width: thin;
}

.cc-sl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cc-sl-chip {
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid #1E3A78;
    background: #0D2559;
    color: #C4D4F4;
    font: 600 max(10px, calc(12.5px * var(--cc-fs))) var(--cc-body);
    cursor: pointer;
}

    .cc-sl-chip:hover {
        border-color: #45D4FF;
    }

    .cc-sl-chip.cc-on {
        background: color-mix(in srgb, #45D4FF 22%, #0D2559);
        border-color: #45D4FF;
        color: #fff;
        box-shadow: 0 0 10px rgba(69,212,255,.35);
    }

.cc-editing .cc-sl-chip {
    cursor: inherit;
}

.cc-sl-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cc-sl-dd {
    width: 100%;
}

.cc-sl-clear {
    align-self: flex-start;
}

/* the designer: the fields and the four wells */
.cc-ds-flist {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 170px;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: thin;
}

.cc-ds-fitem {
    display: inline-flex;
    align-items: center;
}

.cc-ds-fchip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 7px;
    border: 1px solid #1E3A78;
    background: #0B1E4A;
    color: #C4D4F4;
    font: 500 12px var(--cc-body);
    cursor: grab;
}

    .cc-ds-fchip i {
        min-width: 14px;
        font: 700 11px var(--cc-display);
        font-style: normal;
        color: #45D4FF;
        text-align: center;
    }

    .cc-ds-fchip:hover,
    .cc-ds-fchip.cc-on {
        border-color: #45D4FF;
        color: #fff;
    }

    .cc-ds-fchip.cc-drag {
        opacity: .5;
    }

    .cc-ds-fchip.cc-ds-fcalc i {
        color: #FFC93C;
    }

.cc-ds-fedit {
    margin-inline-start: 2px;
}

.cc-ds-newcalc {
    border-style: dashed;
}

.cc-ds-pick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(69,212,255,.07);
}

.cc-ds-wells {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cc-ds-well {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-height: 62px;
    padding: 7px 8px;
    border: 1px dashed #2A4A8E;
    border-radius: 9px;
    background: rgba(7,20,51,.6);
    transition: border-color .15s, background .15s;
}

    .cc-ds-well.cc-over,
    .cc-ds-well.cc-ds-wtap:hover {
        border-color: #45D4FF;
        border-style: solid;
        background: rgba(69,212,255,.08);
    }

    .cc-ds-well.cc-ds-wtap {
        cursor: copy;
    }

.cc-ds-wt {
    font: 700 11px var(--cc-body);
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cc-muted);
}

.cc-ds-wbody {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cc-ds-wempty {
    font-size: 12px;
    color: var(--cc-dim);
}

.cc-ds-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    padding: 2px 3px 2px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, #45D4FF 18%, #0D2559);
    border: 1px solid color-mix(in srgb, #45D4FF 50%, transparent);
    font-size: 12px;
    color: #fff;
}

    .cc-ds-pill > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cc-ds-pill .cc-x {
        padding: 0 5px;
    }

/* the calculated field editor (over the designer) */
.cc-ds-calc {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(3,10,28,.7);
}

.cc-ds-calcbox {
    width: min(720px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-ds-calcbd {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px;
    overflow-y: auto;
}

.cc-ds-formula {
    font-family: ui-monospace, Consolas, monospace;
    direction: ltr;
}

.cc-ds-calcf {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

    .cc-ds-calcf .cc-ds-fchip {
        cursor: pointer;
    }

.cc-ds-op {
    font-family: ui-monospace, Consolas, monospace;
    direction: ltr;
}

.cc-ds-calcout:empty {
    display: none;
}

@media (max-width: 700px) {
    .cc-ds-wells {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── laptop screens: the scale a little smaller again ── */
@media (max-width: 1600px) {
    body.cc-body {
        --cc-fs: .78;
        --cc-ui: .76;
    }
}

@media (max-width: 1400px) {
    body.cc-body {
        --cc-fs: .74;
        --cc-ui: .72;
    }
}

/* ── smaller screens: the menu shrinks to its icons, then sits on top ── */
@media (max-width: 1500px) {
    .cc-side {
        width: 72px;
    }

    .cc-nav {
        justify-content: center;
        padding: 9px 0;
        position: relative;
    }

        .cc-nav > span:not(.cc-n) {
            display: none;
        }

        .cc-nav .cc-n {
            position: absolute;
            top: 0;
            right: 0;
            font-size: max(10px, calc(10px * var(--cc-fs)));
            padding: 0 5px;
        }

    .cc-side-ctl button {
        padding: 8px 0;
        font-size: 0;
    }

        .cc-side-ctl button::before {
            content: attr(data-icon);
            font-size: max(10px, calc(17px * var(--cc-fs)));
        }

    .cc-side .cc-ver {
        display: none;
    }
}

@media (max-width: 900px) {
    .cc-topbar {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        height: auto;
        flex-wrap: wrap;
        padding: 16px 16px 0;
        gap: 12px;
    }

    .cc-tt b {
        font-size: max(10px, calc(24px * var(--cc-fs)));
        white-space: normal;
    }

    .cc-tt span {
        font-size: max(10px, calc(14px * var(--cc-fs)));
        white-space: normal;
    }

    .cc-tb-r {
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: 10px;
        margin-inline-start: 0;
    }

    .cc-navbtns {
        flex-wrap: wrap;
    }

    .cc-wrap {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .cc-side {
        position: relative;
        top: auto;
        width: auto;
        height: auto;
        min-height: 0;
    }

    .cc-side-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cc-side .cc-sep {
        display: none;
    }

    .cc-side-list {
        max-height: none;
    }

    .cc-side-ctl,
    .cc-side .cc-ver {
        position: static;
        flex-direction: row;
        margin-top: 10px;
    }

    .cc-panel {
        left: 8px;
        right: 8px;
        top: 8px;
        bottom: 8px;
        width: auto;
    }

    .cc-editing .cc-wrap {
        padding-right: 16px;
    }

    .cc-editing .cc-topbar {
        right: auto;
    }
}

/* ── inspector panel: message the phone, listen live (cc-field.js) ── */
.cc-fd-back {
    position: fixed;
    inset: 0;
    z-index: 92;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2,6,18,.6);
    backdrop-filter: blur(3px);
}

.cc-card.cc-fd {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(620px,100%);
    max-height: calc(100vh - 48px);
    padding: 16px;
    overflow: auto;
    background: rgba(8,20,52,.97);
    box-shadow: inset 0 0 40px rgba(43,108,255,.12),0 0 40px rgba(0,0,0,.6);
}

.cc-fd-hd {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .cc-fd-hd .cc-dt-x {
        margin-inline-start: auto;
    }

.cc-fd-who {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

    .cc-fd-who > div {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

.cc-fd-av,
.cc-fc-av {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid var(--cc-edge);
    background: #0b1e4a;
    color: var(--cc-cyan);
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
}

    .cc-fd-av.cc-on {
        border-color: var(--cc-green);
        box-shadow: 0 0 12px rgba(46,230,140,.45);
    }

    .cc-fd-av img,
    .cc-fc-av img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.cc-fd-name {
    font-size: max(13px, calc(17px * var(--cc-fs)));
}

.cc-fd-st,
.cc-fd-at {
    font-size: max(10px, calc(12px * var(--cc-fs)));
    color: var(--cc-muted);
}

.cc-fd-st {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .cc-fd-st i {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--cc-muted);
    }

    .cc-fd-st.cc-on {
        color: var(--cc-green);
    }

        .cc-fd-st.cc-on i {
            background: var(--cc-green);
            animation: cc-pulse 1.6s infinite;
        }

.cc-fd-at {
    color: var(--cc-gold);
}

.cc-fd-bd {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cc-fd-sec {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--cc-edge);
    border-radius: 12px;
    background: rgba(4,12,34,.55);
}

    .cc-fd-sec .cc-sub {
        margin: 0;
    }

.cc-fd-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cc-btn.cc-fd-listen {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .cc-btn.cc-fd-listen svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .cc-btn.cc-fd-listen.cc-on {
        border-color: var(--cc-red);
        color: #fff;
        background: rgba(255,90,118,.25);
        box-shadow: 0 0 14px rgba(255,90,118,.45);
    }

.cc-fd-lstate {
    flex: 1;
    min-width: 160px;
    font-size: max(10px, calc(12px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-fd-lstate.cc-fd-s-live {
        color: var(--cc-green);
        font-weight: 600;
    }

    .cc-fd-lstate.cc-fd-s-paused,
    .cc-fd-lstate.cc-fd-s-offline {
        color: var(--cc-amber);
    }

    .cc-fd-lstate.cc-fd-s-failed,
    .cc-fd-lstate.cc-fd-s-error {
        color: var(--cc-red);
    }

.cc-fd-live {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cc-fd-live[hidden] {
        display: none;
    }

.cc-fd-meter {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}

    .cc-fd-meter i {
        display: block;
        height: 100%;
        background: linear-gradient(90deg,var(--cc-green),var(--cc-gold),var(--cc-red));
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .12s linear;
    }

.cc-fd-time {
    font-variant-numeric: tabular-nums;
    color: var(--cc-fg);
    font-size: max(10px, calc(12px * var(--cc-fs)));
}

.cc-fd-vol {
    width: 90px;
    accent-color: var(--cc-cyan);
}

.cc-in.cc-fd-text {
    width: 100%;
    resize: vertical;
    min-height: 64px;
    font-family: inherit;
}

.cc-fd-count {
    margin-inline-start: auto;
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-muted);
}

.cc-fd-urgent {
    color: var(--cc-amber);
}

.cc-fd-msgs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow: auto;
}

.cc-fd-msg {
    padding: 8px 10px;
    border-radius: 10px;
    border-inline-start: 3px solid var(--cc-cyan);
    background: rgba(69,212,255,.07);
}

    .cc-fd-msg.cc-fd-urg {
        border-inline-start-color: var(--cc-red);
        background: rgba(255,90,118,.08);
    }

.cc-fd-mtext {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: max(11px, calc(13px * var(--cc-fs)));
}

.cc-fd-mmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-fd-mmeta b {
        color: var(--cc-red);
    }

.cc-fd-tick {
    margin-inline-start: auto;
}

.cc-fd-isread .cc-fd-tick {
    color: var(--cc-green);
}

/* the phone's camera: live view and photo requests */
.cc-fd-screen {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .cc-fd-screen[hidden] {
        display: none;
    }

.cc-fd-cam {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--cc-edge);
    background: #000;
}

.cc-fd-screen .cc-btn.cc-small {
    margin-inline-start: auto;
}

.cc-fd-ask .cc-in {
    flex: 1;
    min-width: 160px;
}

.cc-fd-photos {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow: auto;
}

.cc-fd-photo {
    display: flex;
    gap: 10px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(69,212,255,.06);
    border-inline-start: 3px solid var(--cc-cyan);
}

    .cc-fd-photo.cc-fd-p-done {
        border-inline-start-color: var(--cc-green);
    }

    .cc-fd-photo.cc-fd-p-declined,
    .cc-fd-photo.cc-fd-p-expired {
        border-inline-start-color: var(--cc-muted);
        opacity: .75;
    }

.cc-fd-ph {
    flex: none;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: #061230;
    color: var(--cc-muted);
}

    .cc-fd-ph img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.cc-fd-ptxt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: max(10px, calc(12px * var(--cc-fs)));
    color: var(--cc-muted);
}

    .cc-fd-ptxt b {
        color: var(--cc-fg);
        overflow-wrap: anywhere;
    }

    .cc-fd-ptxt .cc-fd-tick {
        margin-inline-start: 0;
    }

.cc-fd-p-done .cc-fd-tick,
.cc-fd-ev {
    color: var(--cc-green);
}

.cc-fd-where {
    color: var(--cc-cyan);
}

/* «Inspectors online» */
.cc-fc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.cc-fc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(4,12,34,.45);
    opacity: .6;
}

    .cc-fc-row.cc-on {
        opacity: 1;
    }

    .cc-fc-row.cc-fc-go {
        cursor: pointer;
    }

        .cc-fc-row.cc-fc-go:hover,
        .cc-fc-row.cc-fc-go:focus-visible {
            border-color: var(--cc-cyan);
            outline: none;
        }

    .cc-fc-row .cc-fc-av {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

.cc-fc-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

    .cc-fc-txt b,
    .cc-fc-txt span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cc-fc-txt b {
        font-size: max(11px, calc(13px * var(--cc-fs)));
    }

    .cc-fc-txt span {
        font-size: max(10px, calc(11px * var(--cc-fs)));
        color: var(--cc-muted);
    }

.cc-fc-ear svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--cc-red);
    stroke-width: 2;
}

.cc-fc-dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cc-muted);
}

.cc-fc-row.cc-on .cc-fc-dot {
    background: var(--cc-green);
    box-shadow: 0 0 8px var(--cc-green);
}

/* ── Board settings: a picture / video / page with «Choose…» (cc-edit.js mediaInput) ── */
.cc-media {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .cc-media .cc-in {
        flex: 1;
        min-width: 0;
    }

.cc-media-thumb {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--cc-edge);
    background: #061230;
    overflow: hidden;
}

    .cc-media-thumb[hidden] {
        display: none;
    }

    .cc-media-thumb img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.cc-media-ic {
    color: var(--cc-cyan);
    font-size: 16px;
}

/* the media library (choose or upload) */
.cc-mp-back {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2,6,18,.65);
    backdrop-filter: blur(3px);
}

.cc-card.cc-mp {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(860px,100%);
    max-height: calc(100vh - 48px);
    padding: 16px;
    background: rgba(8,20,52,.97);
    box-shadow: inset 0 0 40px rgba(43,108,255,.12),0 0 40px rgba(0,0,0,.6);
}

.cc-mp-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

    .cc-mp-hd .cc-sub {
        margin: 0;
    }

    .cc-mp-hd .cc-dt-x {
        margin-inline-start: 0;
    }

.cc-mp-up {
    margin-inline-start: auto;
    cursor: pointer;
}

.cc-mp-file {
    display: none;
}

.cc-mp-err {
    color: var(--cc-red, #ff5b6e);
}

.cc-mp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    overflow: auto;
    min-height: 120px;
    padding: 2px;
}

.cc-mp-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--cc-edge);
    background: rgba(4,12,34,.7);
    color: var(--cc-fg);
    text-align: start;
    cursor: pointer;
}

    .cc-mp-item:hover,
    .cc-mp-item:focus-visible {
        border-color: var(--cc-cyan);
        outline: none;
    }

    .cc-mp-item.cc-on {
        border-color: var(--cc-gold);
        box-shadow: 0 0 12px rgba(255,200,80,.35);
    }

.cc-mp-pic {
    display: grid;
    place-items: center;
    height: 90px;
    border-radius: 8px;
    background: #061230;
    color: var(--cc-cyan);
    font-size: 28px;
    overflow: hidden;
}

    .cc-mp-pic img,
    .cc-mp-pic video {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.cc-mp-name {
    font-size: max(10px, calc(13px * var(--cc-fs)));
    overflow-wrap: anywhere;
}

.cc-mp-size {
    font-size: max(10px, calc(11px * var(--cc-fs)));
    color: var(--cc-muted);
}

/* who can see / edit a board */
.cc-roles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px 12px;
    padding: 8px 10px;
    border: 1px solid var(--cc-edge);
    border-radius: 10px;
}

    .cc-roles .cc-roles-list .cc-check {
        color: var(--cc-fg);
    }

/* ── Arabic: the menu on the right, the edit panel on the left (the portlets keep their places) ── */
body.cc-rtl .cc-wrap {
    flex-direction: row-reverse;
}

body.cc-rtl .cc-panel {
    right: auto;
    left: 24px;
}

body.cc-rtl.cc-editing .cc-wrap {
    padding-right: 24px;
    padding-left: 444px;
}

body.cc-rtl.cc-editing .cc-topbar {
    right: 24px;
    left: 444px;
}

@media (max-width: 900px) {
    body.cc-rtl .cc-wrap {
        flex-direction: column;
    }

    body.cc-rtl .cc-panel {
        left: 8px;
        right: 8px;
    }

    body.cc-rtl.cc-editing .cc-wrap {
        padding-left: 16px;
    }

    body.cc-rtl.cc-editing .cc-topbar {
        left: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cc-body * {
        animation: none !important;
        transition: none !important;
    }
}


/* ══════════════════════════════════════════════════════════════════
   Admin home — operations overview (Views/Admin/Index.cshtml)
   Design A «bold light»: navy hero band, solid colour KPI tiles,
   white cards with a colour edge. Colours have one meaning:
   red = critical · amber = late · green = compliant · cyan = action.
   ══════════════════════════════════════════════════════════════════ */
.admin-shell .main.ah {
    --ah-navy: #0B1F4B;
    --ah-navy-2: #12306B;
    --ah-cyan: #45D4FF;
    --ah-cyan-ink: #04122E;
    --ah-teal: #0E7490;
    --ah-indigo: #4338CA;
    --ah-green: #059669;
    --ah-red: #E11D48;
    --ah-amber: #F59E0B;
    --ah-amber-ink: #3B2300;
    --ah-canvas: #EEF2F8;
    --ah-tx: #0B1B3F;
    --ah-tx2: #44557A;
    --ah-tx3: #6B7A99;
    --ah-line: #E6EBF3;
    padding: 0 24px 48px;
    background: var(--ah-canvas);
    color: var(--ah-tx);
}

/* Hero band */
.ah-hero { background: var(--ah-navy); margin: 0 -24px; padding: 20px 24px 64px; }
.ah-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ah-date { font-size: 12px; color: #8EA4D2; }
.ah-hello { font-family: var(--ip-head); font-size: 28px; font-weight: 700; color: #fff; line-height: 1.25; }
.ah-sys { font-size: 12.5px; color: var(--ah-cyan); margin-top: 2px; }
.ah-filters { display: flex; gap: 8px; }
.ah-select { height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-size: 12.5px; min-width: 130px; cursor: pointer; }
.ah-select:last-child { background: var(--ah-cyan); color: var(--ah-cyan-ink); border-color: var(--ah-cyan); font-weight: 600; }
.ah-select option { color: var(--ah-tx); background: #fff; }
.ah-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(69,212,255,.35); }

/* KPI tiles: solid colours over the hero edge */
.ah-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: -44px 0 16px; position: relative; }
.ah-kpi { display: block; border-radius: 12px; padding: 13px 15px; color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(11,31,75,.18); transition: transform .15s, box-shadow .15s; }
a.ah-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(11,31,75,.24); color: #fff; }
.ah-kpi-lbl { font-size: 11.5px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.ah-kpi-lbl .ti { font-size: 15px; }
.ah-kpi-val { font-family: var(--ip-mono); font-size: 30px; font-weight: 500; line-height: 1.15; margin: 5px 0 2px; }
.ah-kpi-sub { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.ah-k-teal { background: var(--ah-teal); }
.ah-k-indigo { background: var(--ah-indigo); }
.ah-k-green { background: var(--ah-green); }
.ah-k-red { background: var(--ah-red); }
.ah-k-amber { background: var(--ah-amber); color: var(--ah-amber-ink); }
.ah-k-calm { background: var(--ah-navy-2); }
.ah-k-outline { background: #fff; color: var(--ah-tx); border: 2px solid var(--ah-cyan); }
a.ah-k-outline:hover { color: var(--ah-tx); }
.ah-k-outline .ah-kpi-lbl { color: var(--ah-tx2); }
.ah-k-outline .ah-kpi-lbl .ti { color: #006E9C; }
.ah-kpi .ah-trend-up, .ah-kpi .ah-trend-down, .ah-kpi .ah-trend-flat { color: inherit; }
.ah-live { color: #0B7D55; opacity: 1; }
.ah-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #12A873; margin-inline-end: 5px; animation: ah-pulse 1.6s ease-in-out infinite; }
@keyframes ah-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Rows and cards */
.ah-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.ah-row-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.ah-card { background: #fff; border: 1px solid var(--ah-line); border-top: 4px solid var(--ah-cyan); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; box-shadow: 0 1px 3px rgba(11,31,75,.06); }
.ah-acc-cyan { border-top-color: var(--ah-cyan); }
.ah-acc-red { border-top-color: var(--ah-red); }
.ah-acc-indigo { border-top-color: var(--ah-indigo); }
.ah-acc-teal { border-top-color: var(--ah-teal); }
.ah-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ah-card-title { font-size: 14px; font-weight: 700; color: var(--ah-tx); display: flex; align-items: center; gap: 6px; }
.ah-card-title .ti { font-size: 18px; }
.ah-acc-cyan .ah-card-title .ti { color: #006E9C; }
.ah-acc-red .ah-card-title .ti { color: var(--ah-red); }
.ah-acc-indigo .ah-card-title .ti { color: var(--ah-indigo); }
.ah-acc-teal .ah-card-title .ti { color: var(--ah-teal); }
.ah-card-link { font-size: 12px; font-weight: 600; color: #006E9C; text-decoration: none; }
.ah-card-link:hover { text-decoration: underline; }
.ah-empty { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 120px; font-size: 12.5px; color: var(--ah-tx3); text-align: center; }
.ah-empty .ti { font-size: 18px; color: var(--ah-green); }

/* Map */
.ah-map { height: 340px; border-radius: 8px; border: 1px solid var(--ah-line); z-index: 0; }
.ah-legend { display: flex; gap: 10px; font-size: 11px; color: var(--ah-tx2); flex-wrap: wrap; }
.ah-lg::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 4px; vertical-align: -1px; }
.ah-lg-ok::before { background: var(--ah-green); }
.ah-lg-cond::before { background: var(--ah-amber); }
.ah-lg-bad::before { background: var(--ah-red); }
.ah-lg-none::before { background: #94A3B8; }
.ah-pt { fill-opacity: .9; stroke: #fff; }
.ah-pt-ok { fill: var(--ah-green); }
.ah-pt-cond { fill: var(--ah-amber); }
.ah-pt-bad { fill: var(--ah-red); }
.ah-pt-none { fill: #94A3B8; }
.ah-pop { font-family: var(--ip-body); font-size: 12px; min-width: 150px; }
.ah-pop-name { font-weight: 700; color: var(--ah-tx); margin-bottom: 2px; }
.ah-pop-score { color: var(--ah-tx2); margin-bottom: 4px; }
.ah-pop a { color: #006E9C; font-weight: 600; }

/* Needs attention */
.ah-list { display: flex; flex-direction: column; }
.ah-alert { display: flex; align-items: flex-start; gap: 9px; padding: 9px 6px; border-bottom: 1px solid var(--ah-line); color: var(--ah-tx); text-decoration: none; border-radius: 6px; }
.ah-alert:last-child { border-bottom: 0; }
.ah-alert:hover { background: #F5F7FB; color: var(--ah-tx); }
.ah-alert-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.ah-alert-bad .ah-alert-dot { background: var(--ah-red); box-shadow: 0 0 0 3px rgba(225,29,72,.18); }
.ah-alert-warn .ah-alert-dot { background: var(--ah-amber); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.ah-alert-info .ah-alert-dot { background: var(--ah-indigo); box-shadow: 0 0 0 3px rgba(67,56,202,.15); }
.ah-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ah-alert-title { font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.ah-alert-bad .ah-alert-title { color: #C2183A; }
.ah-alert-warn .ah-alert-title { color: #8F5600; }
.ah-alert-sub { font-size: 11px; color: var(--ah-tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-alert-go { color: var(--ah-tx3); font-size: 14px; margin-top: 3px; }
[dir="ltr"] .ah-alert-go { transform: scaleX(-1); }

/* Compliance per branch */
.ah-bars { display: flex; flex-direction: column; gap: 11px; }
.ah-bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 46px; align-items: center; gap: 10px; }
.ah-bar-name { display: flex; flex-direction: column; font-size: 12.5px; font-weight: 600; color: var(--ah-tx); min-width: 0; }
.ah-bar-meta { font-size: 10.5px; font-weight: 400; color: var(--ah-tx3); }
.ah-bar-track { height: 10px; background: #EEF2F8; border-radius: 5px; overflow: hidden; }
.ah-bar-fill { height: 100%; width: 0; border-radius: 5px; transition: width .7s ease; }
.ah-band-ok { background: var(--ah-green); }
.ah-band-cond { background: var(--ah-amber); }
.ah-band-bad { background: var(--ah-red); }
.ah-band-none { background: transparent; }
.ah-bar-val { font-family: var(--ip-mono); font-size: 13px; font-weight: 600; text-align: end; }
.ah-band-txt-ok { color: var(--ah-green); }
.ah-band-txt-cond { color: #B45309; }
.ah-band-txt-bad { color: var(--ah-red); }
.ah-band-txt-none { color: var(--ah-tx3); }

/* Live field activity */
.ah-feed { display: flex; flex-direction: column; }
.ah-feed-row { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--ah-line); font-size: 12.5px; }
.ah-feed-row:last-child { border-bottom: 0; }
.ah-feed-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--ah-cyan); }
.ah-c-green { background: var(--ah-green); }
.ah-c-red { background: var(--ah-red); }
.ah-c-amber, .ah-c-gold { background: var(--ah-amber); }
.ah-c-cyan { background: var(--ah-cyan); }
.ah-feed-text { flex: 1; min-width: 0; color: var(--ah-tx); line-height: 1.5; }
.ah-feed-text b { font-weight: 700; color: var(--ah-indigo); }
.ah-feed-fac { color: var(--ah-tx3); }
.ah-feed-time { font-family: var(--ip-mono); font-size: 11px; color: var(--ah-tx3); flex-shrink: 0; }

@media (max-width: 1200px) {
    .ah-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .ah-row, .ah-row-wide { grid-template-columns: minmax(0, 1fr); }
    .ah-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ah-bar-row { grid-template-columns: 110px minmax(0, 1fr) 40px; }
}

/* ══════════════════════════════════════════════════════════════════
   SOS on every page (wwwroot/js/sos-watch.js, _Layout_Admin #ipSos)
   A red bar under the menu while an SOS waits to be acknowledged.
   ══════════════════════════════════════════════════════════════════ */
.ip-sos { position: fixed; top: 62px; inset-inline: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ip-sos[hidden] { display: none; }
.ip-sos-row { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px;
    background: #C8102E; color: #fff; box-shadow: 0 10px 30px rgba(200,16,46,.35); animation: ip-sos-in .25s ease-out, ip-sos-glow 1.4s ease-in-out infinite; }
.ip-sos-tag { flex-shrink: 0; font-family: var(--ip-mono); font-weight: 700; font-size: 13px; letter-spacing: .5px; background: #fff; color: #C8102E; border-radius: 6px; padding: 4px 9px; }
.ip-sos-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ip-sos-tx b { font-size: 14px; font-weight: 700; }
.ip-sos-tx span { font-size: 12px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-sos-acts { display: flex; gap: 6px; flex-shrink: 0; }
.ip-sos-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
    border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; text-decoration: none; cursor: pointer; }
.ip-sos-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.ip-sos-ack { background: #fff; color: #C8102E; border-color: #fff; }
.ip-sos-ack:hover { background: #FDE7EB; color: #C8102E; }
.ip-sos-ack:disabled { opacity: .6; cursor: wait; }
@keyframes ip-sos-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ip-sos-glow { 0%, 100% { box-shadow: 0 10px 30px rgba(200,16,46,.35); } 50% { box-shadow: 0 10px 34px rgba(200,16,46,.7); } }
@media (max-width: 700px) { .ip-sos-row { flex-wrap: wrap; } .ip-sos-acts { width: 100%; justify-content: flex-end; } }
@media (prefers-reduced-motion: reduce) { .ip-sos-row { animation: none; } }

/* ============================================================
   PUBLIC GRADE — the QR grade sticker (P21)
   pg-*   the public page /f/{code} (Views/PublicFacility/Index.cshtml)
          and the grade shared by the sticker and the facility tab
   pc-*   public complaints (inbox + facility tab)
   stk-*  the stickers to print (Views/Facilities/Stickers.cshtml)
   ============================================================ */
:root {
    --pg-navy: #0B1E4A;
    --pg-A: #12A150;
    --pg-B: #5BB33B;
    --pg-C: #D99A00;
    --pg-D: #E5484D;
    --pg-none: #8A97AD;
    --pg-bg: #F3F6FA;
    --pg-line: #E1E6EF;
    --pg-tx: #1D2B44;
    --pg-tx2: #5B6B85;
}

/* the grade colours (letter disc, scale, text) */
.pg-g-A { --pg-c: var(--pg-A); }
.pg-g-B { --pg-c: var(--pg-B); }
.pg-g-C { --pg-c: var(--pg-C); }
.pg-g-D { --pg-c: var(--pg-D); }
.pg-g-none { --pg-c: var(--pg-none); }
.pg-t-A { color: var(--pg-A); }
.pg-t-B { color: var(--pg-B); }
.pg-t-C { color: var(--pg-C); }
.pg-t-D { color: var(--pg-D); }
.pg-t-none { color: var(--pg-none); }

.pg-letter {
    width: 96px;
    height: 96px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--pg-c, var(--pg-none));
    color: #fff;
    font: 900 58px/1 'Cairo', system-ui, sans-serif;
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--pg-c, var(--pg-none)) 16%, #fff);
}

.pg-scale {
    display: flex;
    gap: 6px;
    margin: 12px 0 4px;
}

    .pg-scale i {
        flex: 1;
        height: 22px;
        border-radius: 6px;
        background: var(--pg-c);
        color: #fff;
        font: 800 13px/22px 'Cairo', system-ui, sans-serif;
        font-style: normal;
        text-align: center;
        opacity: .32;
    }

        .pg-scale i.pg-on {
            opacity: 1;
            outline: 2px solid var(--pg-navy);
            outline-offset: 2px;
        }

.pg-mono {
    font-family: var(--ip-mono, monospace);
    letter-spacing: .08em;
    direction: ltr;
    unicode-bidi: isolate;
}

.pg-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ── the public page ── */
body.pg-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--pg-bg);
    color: var(--pg-tx);
    font-family: 'Cairo', system-ui, sans-serif;
}

.pg-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--pg-navy);
    color: #fff;
}

.pg-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    padding: 3px;
}

.pg-auth {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.3;
}

.pg-lang {
    color: #CFE0FF;
    border: 1px solid #3B5CA0;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

    .pg-lang:hover,
    .pg-lang:focus-visible {
        color: #fff;
        border-color: #CFE0FF;
    }

.pg-main {
    flex: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 16px 28px;
    box-sizing: border-box;
}

.pg-name {
    margin: 0;
    font: 800 22px/1.3 'Cairo', system-ui, sans-serif;
    color: var(--pg-navy);
}

.pg-addr {
    margin-top: 2px;
    font-size: 14px;
    color: var(--pg-tx2);
}

.pg-card {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--pg-c) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--pg-c) 35%, #fff);
}

    .pg-card .pg-letter {
        background: var(--pg-c);
        box-shadow: 0 0 0 6px color-mix(in srgb, var(--pg-c) 16%, #fff);
    }

.pg-gname {
    margin: 0;
    font: 800 20px/1.3 'Cairo', system-ui, sans-serif;
    color: var(--pg-c);
}

.pg-gsub {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--pg-tx2);
}

.pg-rows {
    margin: 14px 0 0;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 14px;
}

    .pg-rows > div {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 11px 14px;
        border-bottom: 1px solid var(--pg-line);
        font-size: 14px;
    }

        .pg-rows > div:last-child {
            border-bottom: 0;
        }

    .pg-rows dt {
        color: var(--pg-tx2);
    }

    .pg-rows dd {
        margin: 0;
        font-weight: 700;
        text-align: end;
    }

.pg-ok { color: var(--pg-A); }
.pg-bad { color: var(--pg-D); }
.pg-dim { color: var(--pg-tx2); font-weight: 400 !important; }

.pg-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 0;
    font: 800 16px 'Cairo', system-ui, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.pg-btn-report {
    background: var(--pg-D);
    color: #fff;
}

    .pg-btn-report:hover { background: #CF3A3F; }
    .pg-btn-report:disabled { opacity: .6; cursor: wait; }

.pg-btn-ghost {
    background: #fff;
    color: var(--pg-navy);
    border: 1px solid var(--pg-line);
}

.pg-btn:focus-visible {
    outline: 3px solid #7FB0FF;
    outline-offset: 2px;
}

.pg-note {
    margin: 8px 0 0;
    font-size: 12.5px;
    color: var(--pg-tx2);
    line-height: 1.5;
}

.pg-form {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.pg-fh {
    margin: 0 0 6px;
    font: 800 18px 'Cairo', system-ui, sans-serif;
    color: var(--pg-navy);
}

.pg-fl {
    margin: 12px 0 5px;
    font-size: 14px;
    font-weight: 600;
}

.pg-in {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #C9D2E0;
    border-radius: 10px;
    font: 16px 'Cairo', system-ui, sans-serif;   /* 16px: phones do not zoom in */
    color: var(--pg-tx);
    background: #fff;
}

    .pg-in:focus {
        outline: none;
        border-color: #3B6FD9;
        box-shadow: 0 0 0 3px rgba(59,111,217,.18);
    }

.pg-in-short {
    max-width: 120px;
}

/* a field only robots fill: off the screen, not hidden (some robots skip hidden fields) */
.pg-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pg-err {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #FDECEC;
    color: #B42318;
    font-size: 14px;
}

.pg-done {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #E8F7EE;
    border: 1px solid #B9E5C9;
    color: #0E6B37;
    font-weight: 700;
    line-height: 1.6;
}

.pg-msg {
    margin-top: 40px;
    padding: 24px 18px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--pg-line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .pg-msg span {
        color: var(--pg-tx2);
        font-size: 14px;
    }

.pg-ft {
    padding: 14px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--pg-tx2);
}

/* ── the facility page's tab ── */
.pg-mini {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}

    .pg-mini .pg-letter {
        width: 72px;
        height: 72px;
        font-size: 42px;
    }

.pg-qrrow {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

    .pg-qrrow .pg-qr {
        width: 132px;
        flex: none;
        padding: 6px;
        background: #fff;
        border: 1px solid var(--ip-b1, #E1E6EF);
        border-radius: 10px;
    }

.pg-code {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pg-link {
    word-break: break-all;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ── public complaints (inbox and tab) ── */
.pc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pc-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--ip-b1, #E1E6EF);
    border-radius: 12px;
    background: var(--ip-s1, #fff);
}

.pc-photo {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--ip-s2, #F3F6FA);
}

    .pc-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.pc-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pc-head {
    flex-wrap: wrap;
    gap: 8px;
}

.pc-fac {
    font-weight: 600;
    text-decoration: none;
}

.pc-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.pc-acts {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.pc-note {
    flex: 1 1 240px;
    min-width: 0;
}

    .pc-note.ip-fi-err {
        border-color: var(--ip-bad);
    }

.pc-decision {
    color: var(--ip-tx2, #5B6B85);
}

.gs-cat-order {
    max-width: 90px;
}

@media (max-width: 640px) {
    .pc-item { flex-direction: column; }
    .pc-photo { width: 100%; height: 180px; }
    .pg-qrrow { flex-direction: column; }
}

/* ── the stickers to print ── */
body.stk-body {
    margin: 0;
    background: #E9EDF3;
    font-family: 'Cairo', system-ui, sans-serif;
    color: var(--pg-tx);
}

.stk-bar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--pg-navy);
    color: #fff;
}

.stk-sp { flex: 1; }
.stk-warn { color: #FFD27A; font-size: 13px; }

.stk-btn {
    padding: 7px 16px;
    border-radius: 8px;
    border: 0;
    background: #fff;
    color: var(--pg-navy);
    font: 700 14px 'Cairo', system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.stk-btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid #6B83B8;
}

.stk-none {
    padding: 40px;
    text-align: center;
}

.stk-sheet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 20px;
}

.stk {
    width: 105mm;
    height: 148mm;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #D8DFEA;
    border-radius: 6mm;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
    direction: ltr;
}

.stk-top {
    display: flex;
    align-items: center;
    gap: 3mm;
    padding: 4mm 5mm;
    background: var(--pg-navy);
    color: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

    .stk-top b {
        display: block;
        font-size: 3.6mm;
        line-height: 1.3;
    }

    .stk-top small {
        font-size: 2.8mm;
        opacity: .85;
    }

.stk-logo {
    width: 11mm;
    height: 11mm;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: .6mm;
}

.stk-body-in {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 3mm 5mm 0;
}

.stk-g {
    display: flex;
    align-items: center;
    gap: 4mm;
}

    .stk-g .pg-letter {
        width: 30mm;
        height: 30mm;
        font-size: 20mm;
        box-shadow: 0 0 0 2mm color-mix(in srgb, var(--pg-c) 16%, #fff);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

.stk-gl {
    font-weight: 800;
    font-size: 4.2mm;
    line-height: 1.35;
    max-width: 45mm;
}

.stk-qr {
    display: flex;
    align-items: center;
    gap: 4mm;
}

    .stk-qr .pg-qr {
        width: 34mm;
        flex: none;
    }

    .stk-qr p {
        margin: 0;
        font-size: 3mm;
        line-height: 1.45;
        color: #3B4A63;
    }

.stk-scale {
    margin: 2mm 5mm 3mm;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

    .stk-scale i {
        height: 5mm;
        line-height: 5mm;
        font-size: 3mm;
    }

.stk-foot {
    display: flex;
    justify-content: space-between;
    gap: 3mm;
    padding: 2.5mm 5mm 3.5mm;
    border-top: 1px dashed #C9D2E0;
    font-size: 2.8mm;
    color: #3B4A63;
}

/* A4: four stickers a page */
.stk-a4 .stk-sheet {
    display: grid;
    grid-template-columns: repeat(2, 105mm);
    gap: 0;
    justify-content: center;
}

.stk-a4 .stk {
    border-radius: 0;
    border-style: dashed;
}

@media print {
    body.stk-body { background: #fff; }
    .stk-bar { display: none; }
    .stk-sheet { padding: 0; gap: 0; }
    .stk-a6 .stk { border: 0; border-radius: 0; break-after: page; page-break-after: always; }
    .stk-a6 .stk:last-child { break-after: auto; page-break-after: auto; }
    .stk-a4 .stk:nth-child(4n) { break-after: page; page-break-after: always; }
}

/* named pages: only the stickers print without margins, on A6 or A4 */
.stk-a6 .stk { page: stkA6; }
.stk-a4 .stk-sheet { page: stkA4; }
@page stkA6 { size: 105mm 148mm; margin: 0; }
@page stkA4 { size: A4; margin: 0; }

/* ══════════════════════════════════════════════════════════
   LICENCE (IL1): License page (Views/License), licence banner on
   every page (Views/Shared/_LicenseBanner). Ported from BuildPlus.
══════════════════════════════════════════════════════════ */
.ip-lic-page { max-width: 900px; }
.ip-lic-card { margin-top: var(--ip-sp-4); }
.ip-lic-state { margin: 0 0 var(--ip-sp-3); font-size: var(--ip-fs-md); color: var(--ip-tx); }
.ip-lic-detail { display: block; margin-top: 2px; color: var(--ip-tx3); font-family: var(--ip-mono); font-size: var(--ip-fs-xs); word-break: break-word; }
.ip-lic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--ip-sp-2); }
.ip-lic-actions .ip-fi { flex: 1; min-width: 200px; }
.ip-lic-online { margin-bottom: var(--ip-sp-4); padding-bottom: var(--ip-sp-4); border-bottom: 1px solid var(--ip-b1); }
.ip-lic-online .ip-hint { margin-top: 6px; }
.ip-lic-key { font-family: var(--ip-mono); font-size: var(--ip-fs-xs); word-break: break-all; direction: ltr; text-align: left; }
.ip-lic-rule { display: block; margin-top: 2px; }
.ip-lic-banner { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--ip-b1); font-size: var(--ip-fs-sm); color: var(--ip-tx); }
.ip-lic-banner > i { font-size: 16px; flex-shrink: 0; }
.ip-lic-banner > span { flex: 1; }
.ip-lic-banner-warn { background: var(--ip-warn-l); border-bottom-color: var(--ip-warn-m); }
.ip-lic-banner-warn > i { color: var(--ip-warn); }
.ip-lic-banner-bad { background: var(--ip-bad-l); border-bottom-color: var(--ip-bad-m); }
.ip-lic-banner-bad > i { color: var(--ip-bad); }
.ip-lic-banner-link { font-weight: 600; color: var(--ip-acc); text-decoration: none; white-space: nowrap; }
.ip-lic-banner-link:hover { text-decoration: underline; }
