/* ── Design tokens — PVGT brand palette ──────────────────────────────────── */
:root {
    /* Primary brand colours (PVGT brand manual) */
    --red:      #AB1921;   /* PVGT Red — accent only, 15% usage */
    --red-dark: #861419;
    --blue:     #0868B2;   /* PVGT Blue — primary, 25% with navy */
    --blue-dark:#055891;
    --navy:     #0E2A47;   /* PVGT Navy Blue */

    /* Status accents (kept for badges/charts; harmonised with PVGT palette) */
    --yellow:   #F5B400;
    --green:    #16A34A;
    --orange:   #EA580C;
    --purple:   #7C3AED;

    --dark:     #0E2A47;   /* Use navy where DHL used near-black */
    --sidebar:  #0E2A47;   /* PVGT navy sidebar */
    --surface:  #F2F4F7;   /* PVGT Light Grey — 60% canvas */
    --surface2: #E8EBF0;
    --card:     #FFFFFF;
    --border:   #DDE2EA;
    --text:     #0E2A47;
    --muted:    #6B7280;

    --sidebar-w: 230px;
    --topbar-h:  56px;
    --radius:    10px;
    --shadow:    0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --mono:      'SF Mono', 'Fira Code', monospace;
}

/* ── Dark mode token overrides ───────────────────────────────────────────── */
[data-dark="true"] {
    --dark:     #020617;
    --surface:  #0F172A;
    --surface2: #1E293B;
    --card:     #1E293B;
    --border:   #334155;
    --text:     #F1F5F9;
    --muted:    #94A3B8;
    --shadow:   0 1px 4px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}
[data-dark="true"] body { background: var(--surface); color: var(--text); }
[data-dark="true"] .dhl-input,
[data-dark="true"] input[type="text"],
[data-dark="true"] input[type="number"],
[data-dark="true"] input[type="date"],
[data-dark="true"] input[type="datetime-local"],
[data-dark="true"] textarea,
[data-dark="true"] select {
    background: #0F172A;
    border-color: #334155;
    color: #F1F5F9;
    color-scheme: dark;
}
[data-dark="true"] .dhl-input::placeholder { color: #64748B; }
[data-dark="true"] .data-row:hover,
[data-dark="true"] .data-row.selected { background: rgba(255,255,255,.05); }
[data-dark="true"] .e-sidebar,
[data-dark="true"] .dhl-sf-sidebar { background: #111827 !important; }

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; /* margin: 0; padding: 0; */ }
html, body { height: 100%; overflow: hidden; }
body { font-family: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
       background: var(--surface); color: var(--text); font-size: 14px; }

/* ── Shell — SfSidebar manages its own column; shell is flex ──────────────── */
.dhl-shell { height: 100vh; display: flex; overflow: hidden; position: relative; }
.dhl-main  { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); min-width: 0; }

/* ── Sidebar inner content (rendered inside SfSidebar) ────────────────────── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}

/* PVGT logo block: transparent brand logo on white pill */
.sidebar-logo-block {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 8px;
    padding: 5px 8px;
}
.sidebar-logo-img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 70px;
}

.sidebar-title {
    color: deepskyblue;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}
.sidebar-sub {
    color: cornflowerblue;
    font-size: 11px;
}

.sidebar-section {
    padding: 12px 8px 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 5px; }

.nav-item-dhl { display: block; margin-bottom: 1px; }
.nav-link-dhl {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 6px;
    /* color: rgba(255,255,255,.6); */
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav-link-dhl:hover  { background: rgba(255,255,255,.08); color: #fff; }
.nav-link-dhl.active {
    background: var(--red);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212,5,17,.35);
}
.nav-icon { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }

/* Collapsible nav groups (parent menus with children) */
.nav-group { margin-bottom: 1px; }
.nav-group > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    /*color: rgba(255,255,255,.85);*/
    transition: background .15s;
    user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::marker { content: ""; }
.nav-group > summary:hover { background: rgba(255,255,255,.08); }
.nav-group[open] > summary { background: rgba(255,255,255,.04); /*color: #fff; */}
.nav-group .nav-caret {
    margin-left: auto;
    font-size: 9px;
    transition: transform .15s;
}
.nav-group[open] .nav-caret { transform: rotate(90deg); }
.nav-group-body {
    padding: 2px 0 4px 18px;
    border-left: 1px solid rgba(255,255,255,.06);
    margin-left: 14px;
}
.nav-group-body .nav-link-dhl {
    font-size: 11px;
    padding: 5px 8px;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 8px;
}
.avatar {
    width: 32px; height: 32px;
    background: var(--red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sidebar-user-name  { /* font-size: 12px; */ font-weight: 600; /* color: #fff; */ color: blue; }
.sidebar-user-role  { font-size: 10px; color: rgba(255,255,255,.4); }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.dhl-topbar {
    height: var(--topbar-h);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    gap: 12px;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.live-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px; font-size: 11px;
    font-family: var(--mono); font-weight: 600;
}
.live-badge.live    { background: rgba(22,163,74,.12); border: 1px solid rgba(22,163,74,.3); color: var(--green); }
.live-badge.offline { background: rgba(212,5,17,.10);  border: 1px solid rgba(212,5,17,.25); color: var(--red); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.5s infinite; }
@@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.dhl-page {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ── KPI cards ────────────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
}
.kpi-card.red    { border-color: var(--red); }
.kpi-card.green  { border-color: var(--green); }
.kpi-card.yellow { border-color: var(--yellow); }
.kpi-card.blue   { border-color: var(--blue); }
.kpi-card.orange { border-color: var(--orange); }
.kpi-card.purple { border-color: var(--purple); }

.kpi-icon { font-size: 28px; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-label { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.kpi-delta { font-size: 11px; margin-top: 4px; font-weight: 600; }
.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: var(--red); }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* overflow: hidden removed — allows Syncfusion dialog popups to escape card bounds */
}
.card-head {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
}
.card-body { padding: 16px 18px; }

/* ── Grid helpers ─────────────────────────────────────────────────────────── */
.two-col   { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.equal-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* ── Status pills ─────────────────────────────────────────────────────────── */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pending   { background: #fef9c3; color: #854d0e; }
.pill-assigned  { background: #dbeafe; color: #1e40af; }
.pill-transit   { background: #ede9fe; color: #5b21b6; }
.pill-pickedup  { background: #dcfce7; color: #166534; }
.pill-stored    { background: #f0fdf4; color: #15803d; }
.pill-cancelled { background: #fee2e2; color: #991b1b; }
.pill-available { background: #d1fae5; color: #065f46; }
.pill-inuse     { background: #dbeafe; color: #1e40af; }
.pill-maint     { background: #fef3c7; color: #92400e; }
.pill-admin     { background: #fce7f3; color: #9d174d; }
.pill-manager   { background: #e0f2fe; color: #075985; }
.pill-executive { background: #ede9fe; color: #5b21b6; }
.pill-viewer    { background: #f3f4f6; color: #374151; }
.pill-active    { background: #d1fae5; color: #065f46; }
.pill-inactive  { background: #fee2e2; color: #991b1b; }

/* ── Data rows ────────────────────────────────────────────────────────────── */
.data-row {
    display: flex;
    align-items: center;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    transition: background .12s;
    cursor: pointer;
}
.data-row:last-child { border-bottom: none; }
.data-row:hover { background: var(--surface2); }
.data-row.selected { background: rgba(212,5,17,.06); border-left: 3px solid var(--red); }

/* ── Vehicle cards ────────────────────────────────────────────────────────── */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.vehicle-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--border);
    transition: border-color .2s;
}
.vehicle-card.on-route { border-color: var(--blue); }
.vehicle-card.available { border-color: var(--green); }
.vehicle-card.inactive  { border-color: var(--muted); opacity: .6; }
.vehicle-plate { font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--text); }
.vehicle-type  { font-size: 11px; color: var(--muted); margin: 3px 0 10px; text-transform: uppercase; letter-spacing: .5px; }

/* ── Activity timeline ────────────────────────────────────────────────────── */
.timeline { padding: 8px 0; }
.timeline-item {
    display: flex;
    gap: 12px;
    padding: 8px 16px;
}
.timeline-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    margin-top: 5px;
    flex-shrink: 0;
}
.timeline-dot.green  { background: var(--green); }
.timeline-dot.blue   { background: var(--blue); }
.timeline-dot.yellow { background: var(--yellow); }
.timeline-text  { font-size: 12px; color: var(--text); line-height: 1.4; }
.timeline-time  { font-size: 10px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }

/* ── GPS log ──────────────────────────────────────────────────────────────── */
.gps-log-row {
    display: grid;
    grid-template-columns: 70px 90px 1fr 70px;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    padding: 4px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.gps-log-row .ts { color: var(--green); }

/* ── Exec cards (tracking page) ───────────────────────────────────────────── */
.exec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.exec-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}
.exec-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.exec-name { font-size: 13px; font-weight: 600; }
.exec-job  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.exec-speed{ font-family: var(--mono); font-size: 12px; color: var(--blue); margin-top: 4px; }

/* ── Page header ──────────────────────────────────────────────────────────── */
.page-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.page-hdr h1 { font-size: 20px; font-weight: 800; }
.page-hdr .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    border: 1.5px solid var(--border); background: var(--card); color: var(--muted);
    cursor: pointer; transition: all .15s;
}
.filter-btn:hover  { border-color: var(--red); color: var(--red); }
.filter-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ── Cargo stat bar ───────────────────────────────────────────────────────── */
.stat-bar { display: flex; gap: 20px; margin-bottom: 20px; }
.stat-item { background: var(--card); border-radius: var(--radius); padding: 14px 20px; flex: 1; box-shadow: var(--shadow); }
.stat-num  { font-size: 28px; font-weight: 800; }
.stat-lbl  { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ── Container cards ──────────────────────────────────────────────────────── */
.container-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.container-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}
.container-num  { font-family: var(--mono); font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.container-type { font-size: 11px; color: var(--muted); margin-bottom: 10px; }

/* ── Utility ──────────────────────────────────────────────────────────────── */
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.bold  { font-weight: 700; }
.mb16  { margin-bottom: 16px; }
.mb20  { margin-bottom: 20px; }
.scroll-y { overflow-y: auto; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600; background: var(--surface2); color: var(--muted);
}

/* ── Loading / empty ──────────────────────────────────────────────────────── */
.loading-wrap, .empty-state {
    display: flex; align-items: center; justify-content: center;
    padding: 60px; color: var(--muted); font-size: 14px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@@media (max-width: 1100px) {
    .two-col   { grid-template-columns: 1fr; }
    .three-col { grid-template-columns: repeat(2, 1fr); }
}
@@media (max-width: 768px) {
    /* SfSidebar auto-collapses via MediaQuery prop — no extra CSS needed */
    .three-col { grid-template-columns: 1fr; }
    .kpi-grid  { grid-template-columns: repeat(2, 1fr); }
    .stat-bar  { flex-direction: column; }
    .equal-col { grid-template-columns: 1fr; }
    .dhl-page  { padding: 16px; }
}
@@media (max-width: 480px) {
    .kpi-grid  { grid-template-columns: 1fr; }
    .exec-grid { grid-template-columns: 1fr; }
    .vehicle-grid { grid-template-columns: 1fr; }
    .container-grid { grid-template-columns: repeat(2, 1fr); }
    .dhl-page  { padding: 12px; }
}

/* ── Bootstrap-like utility grid (subset used by master pages) ───────────── */
.row { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.row > [class*="col-"] { padding: 0 6px; box-sizing: border-box; }
.col-md-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-md-3  { flex: 0 0 25%;       max-width: 25%; }
.col-md-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-6  { flex: 0 0 50%;       max-width: 50%; }
.col-md-12 { flex: 0 0 100%;     max-width: 100%; }
@@media (max-width: 768px) {
    .col-md-2, .col-md-3, .col-md-4, .col-md-6 { flex: 0 0 100%; max-width: 100%; }
}
.mb-3 { margin-bottom: 14px; }
.me-2 { margin-right: 8px; }
.gap-1 { gap: 6px; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.form-Custom-label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--muted); margin-bottom: 4px;
}

/* Sample-spec grid styling (matches Sample_OrganizationList) */
.e-grid .e-rowcell {
    font-size: 12px; padding: 2px 6px; vertical-align: middle;
    white-space: nowrap;
}
.e-grid .e-headercelldiv {
    font-size: 12px; font-weight: 700; height: 18px; line-height: 18px;
}
.e-grid .e-altrow { background-color: rgba(198, 238, 253, .15); }
.delete-btn .e-icons.e-delete { color: #c40000; }

/* ── CBM-style list card header (teal) ────────────────────────────────────── */
/* Used by all master/list pages: <div class="card"><div class="card-header">...</div></div> */
.card > .card-header {
    background: linear-gradient(135deg, #198781 0%, #14706b 100%);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    border-bottom: 1px solid rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.04);
}
.card > .card-header b { font-weight: 700; }

/* Grid header band — tint to harmonise with the teal card header */
.e-grid .e-gridheader,
.e-grid .e-gridheader .e-headercell,
.e-grid .e-gridheader .e-headercell .e-headercelldiv,
.e-grid .e-gridheader .e-filterbarcell {
   /* background-color: #e6f4f3 !important;*/
    color: #0E2A47 !important;
}
.e-grid .e-gridheader .e-sortfilterdiv { color: #198781; }

/* Grid toolbar surface */
.e-grid .e-toolbar {
    background: #f4faf9 !important;
    border-bottom: 1px solid #d8ece9 !important;
    padding: 4px 6px !important;
}

/* ── Grid toolbar — "Add New" button glow-up ──────────────────────────────── */
/* Targets the Syncfusion grid toolbar item carrying the e-add prefix icon
   (used by every master list's "Add New X" toolbar item). */
.e-grid .e-toolbar .e-toolbar-item .e-tbar-btn:has(.e-icons.e-add),
.e-grid .e-toolbar .e-toolbar-item.e-add .e-tbar-btn {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%) !important;
    color: #fff !important;
    border: 1px solid var(--red-dark) !important;
    border-radius: 6px !important;
    padding: 4px 12px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    box-shadow: 0 2px 6px rgba(171,25,33,.28), inset 0 1px 0 rgba(255,255,255,.18) !important;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease !important;
}
.e-grid .e-toolbar .e-toolbar-item .e-tbar-btn:has(.e-icons.e-add) .e-tbar-btn-text,
.e-grid .e-toolbar .e-toolbar-item .e-tbar-btn:has(.e-icons.e-add) .e-icons,
.e-grid .e-toolbar .e-toolbar-item.e-add .e-tbar-btn .e-tbar-btn-text,
.e-grid .e-toolbar .e-toolbar-item.e-add .e-tbar-btn .e-icons {
    color: #fff !important;
}
.e-grid .e-toolbar .e-toolbar-item .e-tbar-btn:has(.e-icons.e-add):hover,
.e-grid .e-toolbar .e-toolbar-item.e-add .e-tbar-btn:hover {
    background: linear-gradient(135deg, #c01e28 0%, var(--red) 100%) !important;
    box-shadow: 0 4px 12px rgba(171,25,33,.38), inset 0 1px 0 rgba(255,255,255,.22) !important;
    transform: translateY(-1px);
}
.e-grid .e-toolbar .e-toolbar-item .e-tbar-btn:has(.e-icons.e-add):active,
.e-grid .e-toolbar .e-toolbar-item.e-add .e-tbar-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(171,25,33,.3), inset 0 1px 2px rgba(0,0,0,.18) !important;
}

/* Search input inside grid toolbar — round it to match Add button */
.e-grid .e-toolbar .e-search-wrapper .e-input-group,
.e-grid .e-toolbar .e-search {
    border-radius: 6px !important;
    background: #fff !important;
    border: 1px solid #d8ece9 !important;
}

/* Dark mode adjustments */
[data-dark="true"] .card > .card-header {
    background: linear-gradient(135deg, #0f5d59 0%, #0a4541 100%);
    border-bottom-color: rgba(255,255,255,.06);
}
[data-dark="true"] .e-grid .e-gridheader,
[data-dark="true"] .e-grid .e-gridheader .e-headercell,
[data-dark="true"] .e-grid .e-gridheader .e-headercell .e-headercelldiv,
[data-dark="true"] .e-grid .e-gridheader .e-filterbarcell {
    background-color: #143b3a !important;
    color: #E2F5F3 !important;
}
[data-dark="true"] .e-grid .e-toolbar {
    background: #102b2a !important;
    border-bottom-color: #1f4d4b !important;
}

/* Status pills à la sample */
.statustemp {
    position: relative; height: 22px; border-radius: 5px; text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 6px;
}
.statustemp.e-activecolor   { background-color: #ccffcc; }
.statustemp.e-inactivecolor { background-color: #ffd7cc; }
.statustemp.e-pendingcolor  { background-color: #cfe9ff; }
.statustemp.e-disablecolor  { background-color: #e5e7eb; }
.statustemp.e-approvedcolor { background-color: #ccffcc; }
.statustemp.e-rejectedcolor { background-color: #ffd7cc; }
.statustxt {
    padding: 2px 8px; border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: 600; font-size: 12px;
}
.statustxt.e-activecolor   { color: #007d00; }
.statustxt.e-inactivecolor { color: #c40000; }
.statustxt.e-pendingcolor  { color: #1d4ed8; }
.statustxt.e-disablecolor  { color: #374151; }
.statustxt.e-approvedcolor { color: #007d00; }
.statustxt.e-rejectedcolor { color: #c40000; }

/* Modal-like popup wrapper used inside SfDialog content */
.modal-dialog.modal-lg { max-width: none; width: 100%; }
.modal-contentnew { background: transparent; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0 10px; border-bottom: 1px solid var(--border); margin-bottom: 12px;
}
.modal-title { font-size: 15px; font-weight: 700; margin: 0; }
.btn-close {
    background: none; border: none; font-size: 18px; cursor: pointer;
    color: var(--muted); line-height: 1;
}
.btn-close::before { content: "\00d7"; }
.modal-body { padding: 4px 2px; }

/* ── Shared Master-page styles ────────────────────────────────────────────── */
.master-alert {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(192,57,43,.18); border: 1px solid #c0392b;
    border-radius: 6px; padding: .65rem 1rem;
    margin: 0 0 1rem; font-size: .9rem;
}
.master-alert-close {
    background: none; border: none; cursor: pointer;
    color: inherit; font-size: 1rem; padding: 0 .25rem;
}
.btn-add-master {
    margin-left: auto;
    padding: .45rem 1rem;
    background: var(--red); color: #fff;
    border: none; border-radius: 6px;
    font-weight: 600; cursor: pointer; font-size: .85rem;
    transition: background .15s;
}
.btn-add-master:hover { background: var(--red-dark); }
.master-filter-row {
    display: flex; flex-wrap: wrap; gap: 12px;
    padding: 14px 24px; align-items: flex-end;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}
.mfr-field { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.mfr-field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.mfr-actions { display: flex; gap: 8px; margin-left: auto; }
.btn-show, .btn-clear {
    padding: 7px 18px; border-radius: 6px; font-size: 13px;
    font-weight: 600; cursor: pointer; border: 1.5px solid var(--border);
    transition: border-color .15s, background .15s;
}
.btn-show {
    background: var(--red); color: #fff; border-color: var(--red);
}
.btn-show:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-clear {
    background: transparent; color: var(--text);
}
.btn-clear:hover { border-color: var(--red); background: var(--surface2); }
.btn-action {
    background: none; border: 1px solid transparent; border-radius: 4px;
    cursor: pointer; padding: .15rem .4rem; font-size: .95rem;
    transition: background .15s;
}
.btn-action:hover { background: rgba(255,255,255,.08); }
.btn-action-del:hover { background: rgba(192,57,43,.2); }
.manage-cell { display: flex; gap: .4rem; justify-content: center; }
.master-form {
    display: flex; flex-direction: column;
    gap: 1rem; padding: .25rem 0 .5rem;
}
.master-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.master-field { display: flex; flex-direction: column; gap: .35rem; }
.master-field label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.master-field .e-input, .master-field select.e-input {
    width: 100%; box-sizing: border-box;
}
.master-field-check { flex-direction: row; align-items: center; gap: .5rem; }
.req { color: #e74c3c; }
.form-error {
    background: rgba(192,57,43,.18); border: 1px solid #c0392b;
    border-radius: 5px; padding: .5rem .75rem; font-size: .85rem;
}
