/* ============================================================
   Focal Point Shipment Tracker — application theme
   Matches the approved design reference: navy sidebar, white
   top bar, light blue-grey page, soft white cards, one colour
   per shipment status. Loaded after Bootstrap and app.scss.
   ============================================================ */

:root {
    --brand:      #0B5ED7;
    --brand-dk:   #0949A8;
    --brand-lt:   #E8F0FC;
    --brand-rgb:  11, 94, 215;
    --navy:       #0B3A78;
    --navy-dk:    #082C5C;
    --navy-lt:    #2F6FD1;

    --accent:     #82B927;
    --accent-tx:  #3F7D1C;
    --accent-lt:  #ECF6DF;

    --heading:    #14213D;
    --body-text:  #4B5563;
    --muted:      #8A94A6;
    --page:       #F3F6FB;
    --surface:    #FFFFFF;
    --line:       #E4EAF2;
    --line-soft:  #F5F7FB;

    --success:    #2F7A12;  --success-lt: #DCF3D2;
    --danger:     #C62828;  --danger-lt:  #FDE4E4;
    --warning:    #B7700A;  --warning-lt: #FFF4E0;
    --info:       #0891A6;  --info-lt:    #E0F7FA;
    --purple:     #6F3DBE;  --purple-lt:  #EFE6FB;
    --teal:       #0E8A6E;  --teal-lt:    #E0F5F1;

    --r-surface: 10px;
    --r-control: 7px;
    --shadow-card: 0 1px 2px rgba(16, 36, 70, .04), 0 6px 20px -8px rgba(16, 36, 70, .10);
    --shadow-pop:  0 12px 32px -8px rgba(16, 36, 70, .22);

    --topbar-h: 60px;
    --sidebar-w: 218px;

    --bs-primary: #0B5ED7;
    --bs-primary-rgb: 11, 94, 215;
    --bs-link-color: #0B5ED7;
    --bs-link-hover-color: #0949A8;
    --bs-body-color: #4B5563;
    --bs-body-bg: #F3F6FB;
    --bs-border-color: #E4EAF2;
    --bs-font-sans-serif: 'Inter', ui-sans-serif, 'Segoe UI', Roboto, Arial, sans-serif;
    --bs-border-radius: 8px;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--bs-font-sans-serif);
    background: var(--page);
    color: var(--body-text);
    font-size: 13.5px;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, h5, h6 { color: var(--heading); font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand); }
a:hover { color: var(--brand-dk); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .92em; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.text-secondary { color: var(--muted) !important; }
.small, small { font-size: 12px; }
.fw-semibold { font-weight: 600 !important; }

/* ---------- shell ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-body  { display: flex; flex: 1 1 auto; min-height: 0; }

.app-topbar {
    position: sticky; top: 0; z-index: 1040;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 14px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 0 18px;
}
.topbar-brand img { height: 36px; width: auto; display: block; }
.topbar-search { flex: 1 1 auto; max-width: 480px; position: relative; margin-left: 8px; }
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.topbar-search input {
    width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px;
    padding: 0 12px 0 34px; background: #F8FAFD; font-size: 13px; color: var(--heading);
}
.topbar-search input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .10); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sidebar-toggle { display: none; border: 0; background: transparent; font-size: 22px; color: var(--heading); width: 36px; height: 36px; border-radius: 8px; }
.sidebar-toggle:hover { background: var(--line-soft); }

.rate-pill {
    display: inline-flex; align-items: center; gap: 7px; height: 34px;
    border: 1px solid var(--line); border-radius: 8px; background: #F8FAFD;
    color: var(--heading); padding: 0 12px; font-size: 12px; text-decoration: none; white-space: nowrap;
}
.rate-pill .rp-lbl { color: var(--muted); font-weight: 500; }
.rate-pill strong { color: var(--heading); font-weight: 700; font-size: 13px; }
.rate-pill .rp-src { color: var(--accent-tx); font-weight: 600; font-size: 11px; }
.rate-pill:hover { border-color: var(--brand); color: var(--heading); }

.topbar-bell {
    position: relative; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
    color: var(--heading); font-size: 16px; border: 1px solid var(--line); background: #fff;
}
.topbar-bell:hover { background: var(--line-soft); color: var(--heading); }
.bell-badge {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
    display: grid; place-items: center; border: 2px solid #fff;
}
.topbar-user {
    display: inline-flex; align-items: center; gap: 9px; height: 40px; border: 0; background: transparent;
    padding: 0 8px; border-radius: 8px; color: var(--heading);
}
.topbar-user:hover { background: var(--line-soft); }
.topbar-user .tu-text { flex-direction: column; align-items: flex-start; line-height: 1.15; }
.topbar-user .tu-name { font-size: 13px; font-weight: 600; }
.topbar-user .tu-role { font-size: 11px; color: var(--muted); }
.topbar-new { height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; font-weight: 600; }

.avatar {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
    background: var(--brand-lt); color: var(--brand);
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

/* ---------- sidebar ---------- */
.app-sidebar {
    flex: 0 0 var(--sidebar-w); width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dk) 100%);
    display: flex; flex-direction: column;
    position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    z-index: 1030;
}
.sidebar-brand { display: block; margin: 14px 14px 6px; background: #fff; border-radius: 10px; padding: 10px 12px; text-align: center; }
.sidebar-brand img { max-width: 100%; height: auto; max-height: 46px; object-fit: contain; }
.sidebar-nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 12px 12px; }
.sidebar-nav .nav-section { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(219, 233, 248, .5); padding: 14px 12px 6px; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: 11px; color: #D9E6F7; font-weight: 500;
    font-size: 13.5px; padding: 9px 12px; margin-bottom: 3px; border-radius: 8px; text-decoration: none;
    transition: background .12s, color .12s;
}
.sidebar-nav .nav-link i { font-size: 15px; width: 18px; text-align: center; opacity: .9; }
.sidebar-nav .nav-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--navy-lt); color: #fff; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5); font-weight: 600; }
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .12); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.sidebar-foot .avatar { background: rgba(255, 255, 255, .16); color: #fff; }
.sidebar-foot .sf-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sidebar-foot .sf-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .sf-role { font-size: 11px; color: #AFC7DF; }
.sidebar-foot .sf-out { border: 0; background: transparent; color: #AFC7DF; font-size: 16px; padding: 4px 6px; border-radius: 6px; }
.sidebar-foot .sf-out:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(6, 31, 57, .45); z-index: 1029; }

.app-content { flex: 1 1 auto; min-width: 0; padding: 20px 22px 24px; display: flex; flex-direction: column; }
.app-footer { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 20px; margin: 0 0 2px; }
.page-head .ph-sub { font-size: 12.5px; color: var(--muted); }
.page-head .ph-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-surface); box-shadow: var(--shadow-card); background: var(--surface); }
.card-body { padding: 18px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--heading); margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.card-head .view-all { font-size: 12.5px; font-weight: 600; }

/* ---------- controls ---------- */
.btn { --bs-btn-border-radius: var(--r-control); font-size: 13px; font-weight: 600; padding: .48rem .9rem; }
.btn-sm { font-size: 12.5px; padding: .36rem .7rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dk); --bs-btn-hover-border-color: var(--brand-dk); --bs-btn-active-bg: var(--brand-dk); --bs-btn-active-border-color: var(--brand-dk); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: #B9CFF3; --bs-btn-hover-bg: var(--brand-lt); --bs-btn-hover-color: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); }
.btn-outline-secondary { --bs-btn-color: var(--heading); --bs-btn-border-color: var(--line); --bs-btn-bg: #fff; --bs-btn-hover-bg: var(--line-soft); --bs-btn-hover-color: var(--heading); --bs-btn-hover-border-color: #CBD5E1; --bs-btn-active-bg: var(--line-soft); --bs-btn-active-color: var(--heading); --bs-btn-active-border-color: #CBD5E1; }
.btn-success { --bs-btn-bg: #2F7A12; --bs-btn-border-color: #2F7A12; --bs-btn-hover-bg: #27650F; --bs-btn-hover-border-color: #27650F; }
.btn-light { --bs-btn-bg: var(--line-soft); --bs-btn-border-color: var(--line-soft); --bs-btn-color: var(--heading); --bs-btn-hover-bg: var(--line); --bs-btn-hover-border-color: var(--line); }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }

.form-control, .form-select { font-size: 13px; border-radius: var(--r-control); border-color: var(--line); color: var(--heading); padding: .46rem .7rem; background-color: #fff; }
.form-control-sm, .form-select-sm { padding: .32rem .6rem; font-size: 12.5px; }
.form-control::placeholder { color: var(--muted); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .10); }
.form-label { font-size: 12px; font-weight: 600; color: var(--heading); margin-bottom: .3rem; }
.form-text { font-size: 11.5px; color: var(--muted); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-group-text { background: var(--line-soft); border-color: var(--line); font-size: 12.5px; color: var(--body-text); }
.form-control[readonly], .form-control-plaintext.bg-light { background: var(--line-soft) !important; color: var(--heading); }
.required::after { content: " *"; color: var(--danger); }
.form-label .party-manage, .form-label .airport-manage, .form-label .person-add { float: right; font-weight: 500; }

.dropdown-menu { border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); font-size: 13px; padding: 6px; }
.dropdown-item { border-radius: 6px; padding: 7px 10px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--brand-lt); color: var(--brand); }
.modal-content { border: 0; border-radius: 12px; box-shadow: var(--shadow-pop); }
.modal-header { border-color: var(--line); padding: 14px 18px; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-body { padding: 18px; }
.modal-footer { border-color: var(--line); padding: 12px 18px; }

.alert { border: 0; border-radius: 8px; font-size: 13px; padding: .7rem 1rem; font-weight: 500; }
.alert-success { background: var(--success-lt); color: var(--success); }
.alert-danger  { background: var(--danger-lt);  color: var(--danger); }
.alert-warning { background: var(--warning-lt); color: var(--warning); }
.alert-info    { background: var(--brand-lt);   color: var(--brand-dk); }

/* ---------- filter bar ---------- */
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--r-surface); padding: 12px 14px; margin-bottom: 14px; }
.filter-bar .form-select, .filter-bar .form-control { height: 36px; font-size: 12.5px; }
.filter-bar .search-wrap { position: relative; }
.filter-bar .search-wrap i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.filter-bar .search-wrap input { padding-left: 30px; }
.filter-grid { display: grid; gap: 8px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.filter-grid > * { min-width: 0; }
.filter-more { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--body-text); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.chip:not(.active) .n { background: var(--line-soft); color: var(--muted); }

/* ---------- tables ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; color: var(--body-text); }
.table > thead th {
    background: #F8FAFD; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700;
    color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; white-space: nowrap;
}
.table > tbody td { border-bottom: 1px solid var(--line); padding: 9px 10px; vertical-align: middle; font-size: 12.5px; }
.table > tbody tr:last-child td { border-bottom: 0; }
.table > tfoot td { border-top: 1px solid var(--line); background: #F8FAFD; font-weight: 700; color: var(--heading); padding: 10px 12px; font-size: 13px; }
.table-hover > tbody > tr:hover > td { background: #F6F9FE; }
.table-compact > tbody td { padding: 7px 10px; }
.table-compact > thead th { padding: 8px 10px; }
.card > .table-responsive { border-radius: var(--r-surface); max-height: none; }
.table .sno { color: var(--muted); font-size: 11.5px; width: 40px; text-align: center; padding-left: 6px; padding-right: 6px; }
.table .cell-main { font-weight: 600; color: var(--heading); white-space: nowrap; }
.table .cell-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.table .cell-sub .lbl { font-weight: 600; letter-spacing: .02em; }
.th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.th-sort:hover { color: var(--brand); }
.th-sort i { font-size: 10px; opacity: .6; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions .btn { padding: .28rem .55rem; font-size: 12px; }
.pending { color: var(--muted); font-style: italic; }
.est { color: var(--warning); font-size: 11px; font-weight: 600; margin-left: 3px; }
.card > .table-responsive > .table > thead th { position: sticky; top: 0; z-index: 2; }

/* pinned Actions column so Send update / Open stay visible at any width */
.table th.sticky-end, .table td.sticky-end { position: sticky; right: 0; background: #fff; z-index: 1; box-shadow: -8px 0 10px -8px rgba(16,36,70,.18); }
.table th.sticky-end { background: #F8FAFD; z-index: 3; }
.table-hover > tbody > tr:hover > td.sticky-end { background: #F6F9FE; }

/* status badge — one colour per status, always with the text */
.badge.status { font-weight: 600; font-size: 11px; padding: .38em .7em; border-radius: 6px; letter-spacing: .01em; white-space: nowrap; }
.badge.soft { font-weight: 600; font-size: 11px; padding: .38em .7em; border-radius: 6px; }
.badge.soft-blue   { background: var(--brand-lt);   color: var(--brand); }
.badge.soft-green  { background: var(--success-lt); color: var(--success); }
.badge.soft-red    { background: var(--danger-lt);  color: var(--danger); }
.badge.soft-amber  { background: var(--warning-lt); color: var(--warning); }
.badge.soft-grey   { background: var(--line-soft);  color: var(--body-text); }
.badge.soft-purple { background: var(--purple-lt);  color: var(--purple); }
.badge.soft-teal   { background: var(--teal-lt);    color: var(--teal); }

.tbl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pagination { gap: 4px; margin: 0; }
.page-link { color: var(--body-text); border: 1px solid var(--line); font-size: 12.5px; background: #fff; border-radius: 6px !important; min-width: 32px; text-align: center; padding: .3rem .5rem; }
.page-link:hover { background: var(--brand-lt); color: var(--brand); border-color: var(--brand-lt); }
.page-item.active .page-link { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-item.disabled .page-link { color: #C3CBD8; background: #fff; }

/* ---------- KPI cards ---------- */
.kpi-card { text-decoration: none; color: inherit; display: block; height: 100%; }
.kpi-card .card { height: 100%; transition: transform .12s, box-shadow .12s; }
.kpi-card:hover .card { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.kpi-card .card-body { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.kpi-ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; flex: 0 0 44px; }
.kpi-ico.blue { background: var(--brand-lt); color: var(--brand); }
.kpi-ico.amber { background: var(--warning-lt); color: var(--warning); }
.kpi-ico.purple { background: var(--purple-lt); color: var(--purple); }
.kpi-ico.green { background: var(--success-lt); color: var(--success); }
.kpi-ico.red { background: var(--danger-lt); color: var(--danger); }
.kpi-ico.teal { background: var(--teal-lt); color: var(--teal); }
.kpi-n { font-size: 24px; font-weight: 800; line-height: 1.05; color: var(--heading); }
.kpi-t { font-size: 12px; color: var(--body-text); font-weight: 500; margin-top: 2px; }
.kpi-d { font-size: 11px; font-weight: 600; margin-top: 3px; }
.kpi-d.up { color: var(--success); } .kpi-d.down { color: var(--danger); } .kpi-d.flat { color: var(--muted); }

/* ---------- lists (attention / arrivals) ---------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; margin-bottom: 6px; border-radius: 8px; background: var(--line-soft); text-decoration: none; color: inherit; }
.list-row:hover { background: var(--brand-lt); color: inherit; }
.list-row > * { min-width: 0; }
.list-row > .btn { flex: 0 0 auto; white-space: nowrap; }
.list-row strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .row-right { text-align: right; font-size: 11.5px; font-weight: 600; color: var(--danger); flex: 0 0 auto; max-width: 42%; white-space: normal; line-height: 1.3; }
.list-row.is-arrival .row-right { color: var(--brand); }
.list-row .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 30px; font-size: 14px; }

/* ---------- tabs ---------- */
.nav-tabs.app-tabs { border-bottom: 1px solid var(--line); gap: 4px; }
.nav-tabs.app-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--body-text); font-weight: 600; font-size: 13px; padding: 10px 14px; border-radius: 0; }
.nav-tabs.app-tabs .nav-link:hover { color: var(--brand); }
.nav-tabs.app-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }
.seg-tabs { display: inline-flex; background: var(--line-soft); border-radius: 8px; padding: 3px; gap: 2px; }
.seg-tabs a, .seg-tabs button { border: 0; background: transparent; color: var(--body-text); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 6px; text-decoration: none; }
.seg-tabs .active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- shipment detail ---------- */
.detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.detail-head h1 { font-size: 22px; margin: 0; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.detail-meta .sep { color: #C3CBD8; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.info-grid .ig { background: var(--line-soft); border-radius: 8px; padding: 8px 10px; }
.info-grid .ig b { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.info-grid .ig span { font-size: 13px; color: var(--heading); font-weight: 600; word-break: break-word; }

/* milestone timeline (vertical, like the reference) */
.ms-vert { position: relative; padding-left: 4px; }
.ms-item { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.ms-item:last-child { padding-bottom: 0; }
.ms-item::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: -2px; width: 2px; background: var(--line); }
.ms-item:last-child::before { display: none; }
.ms-item.done::before { background: var(--success); }
.ms-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; flex: 0 0 28px; font-size: 13px; color: var(--muted); z-index: 1; }
.ms-item.done .ms-dot { background: var(--success); border-color: var(--success); color: #fff; }
.ms-item.current .ms-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-lt); }
.ms-body { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ms-title { font-weight: 700; color: var(--heading); font-size: 13px; }
.ms-item:not(.done) .ms-title { color: var(--muted); font-weight: 600; }
.ms-sub { font-size: 11.5px; color: var(--muted); }
.ms-body .btn { white-space: nowrap; }

/* doc tiles */
.doc-tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; height: 100%; }
.doc-tile .dt-lbl { font-size: 12px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.doc-tile .dt-file { font-size: 12px; }
.doc-tile .dt-file i { color: var(--danger); }

/* quotation cards */
.q-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-surface); box-shadow: var(--shadow-card); padding: 16px; margin-bottom: 14px; }

/* pipeline strip */
.pipeline-track { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line-soft); }
.pipeline-track i { display: block; height: 100%; }
.pipeline-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12px; color: var(--body-text); }
.pipeline-key span { display: inline-flex; align-items: center; gap: 6px; }
.pipeline-key b { width: 9px; height: 9px; border-radius: 50%; }
.pipeline-key em { font-style: normal; color: var(--heading); font-weight: 700; }

/* bars (weight by client) */
.hbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.hbar .hb-lbl { color: var(--heading); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .hb-track { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.hbar .hb-track i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.hbar .hb-val { color: var(--body-text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* people / roles */
.role-box, .perm-box { display: block; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.role-box input, .perm-box input { position: absolute; opacity: 0; }
.role-box:hover, .perm-box:hover { border-color: var(--brand); }
.role-box:has(input:checked), .perm-box:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .10); }
.role-box { padding: 12px 14px; margin-bottom: 8px; }
.role-box span { display: block; font-weight: 700; font-size: 13px; color: var(--heading); }
.role-box small { display: block; color: var(--muted); }
.perm-group { border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--line-soft); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.perm-box { padding: 9px 11px; }
.perm-box span { display: block; font-size: 12.5px; font-weight: 600; color: var(--heading); }
.perm-box small { display: block; font-size: 11px; color: var(--muted); font-family: monospace; }
.kpi-ico.slate { background: #EDEFF3; color: #5E5873; }
/* customer update composer */
.cu-preview { background: var(--line-soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.cu-files .fi { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 5px; font-size: 12.5px; background: #fff; }
.cu-files .fi i.bi-file-earmark-pdf { color: var(--danger); }
.cu-files .fi .fi-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-files .fi .fi-rm { border: 0; background: transparent; color: var(--muted); }
.cu-files .fi .fi-rm:hover { color: var(--danger); }

/* misc */
.bg-light { background-color: var(--line-soft) !important; }
.doc-box { border: 1px solid var(--line) !important; border-radius: 8px; background: #fff !important; }
.text-brand { color: var(--brand) !important; }
.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty-state i { font-size: 28px; display: block; margin-bottom: 6px; color: #C3CBD8; }
.tooltip { font-size: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
    .filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .filter-grid > * { grid-column: span 3 !important; }
}
@media (max-width: 991.98px) {
    :root { --sidebar-w: 236px; }
    .app-sidebar { position: fixed; top: var(--topbar-h); left: 0; height: calc(100vh - var(--topbar-h)); transform: translateX(-100%); transition: transform .22s ease; }
    .app-shell.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-shell.sidebar-open .sidebar-backdrop { display: block; }
    .sidebar-toggle { display: inline-grid; place-items: center; }
    .topbar-brand { display: none; }
    .app-content { padding: 14px 14px 20px; }
    .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .rate-pill .rp-src { display: none; }
}
@media (max-width: 767.98px) {
    .app-topbar { padding: 0 12px; gap: 8px; }
    .topbar-search { max-width: none; margin-left: 0; }
    .rate-pill { display: none; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid > * { grid-column: 1 / -1 !important; }
    .page-head h1 { font-size: 18px; }
    .card-body { padding: 14px; }
    .kpi-n { font-size: 20px; }
    .table > tbody td, .table > thead th { padding: 8px 8px; }
}
@media (max-width: 575.98px) {
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .topbar-search { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
    .app-topbar, .app-sidebar, .sidebar-backdrop, .no-print, .app-footer, .filter-bar, .pagination, .row-actions, .tbl-foot { display: none !important; }
    .app-content { padding: 0; }
    body { background: #fff; font-size: 11px; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .card > .table-responsive { max-height: none; overflow: visible; }
    .table > thead th { position: static; }
    .table > thead { display: table-header-group; }
    tr { page-break-inside: avoid; }
    .print-only { display: block !important; }
}
.print-only { display: none; }
