/* =============================================================================
   OTR UI — design system for the admin shell (UserFrosting 6 legacy layer)
   -----------------------------------------------------------------------------
   Foundation ported from the TRS design system (trs-* component layer) and
   restyled after the OTR mockups: dark charcoal sidebar, orange accent,
   soft grey canvas, white rounded cards.

   This file sits ON TOP of AdminLTE 2.4 / Bootstrap 3 and overrides them.
   It must be loaded after AdminLTE.css (bundle css/otradmin).
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    --otr-font: "Plus Jakarta Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

    --otr-orange: #f47a1f;
    --otr-orange-hover: #e06b12;
    --otr-orange-soft: #fdeedd;
    --otr-orange-ink: #b45408;

    --otr-red: #dc2626;      --otr-red-soft: #fde5e5;   --otr-red-ink: #b91c1c;
    --otr-green: #16a34a;    --otr-green-soft: #e3f6ec; --otr-green-ink: #128240;
    --otr-blue: #2563eb;     --otr-blue-soft: #e5edfd;  --otr-blue-ink: #1d4fc4;
    --otr-purple: #7c3aed;   --otr-purple-soft: #efe9fd;--otr-purple-ink: #6427c9;
    --otr-yellow: #d97706;   --otr-yellow-soft: #fdf3e2;--otr-yellow-ink: #935f10;
    --otr-gray-soft: #eef0f4; --otr-gray-ink: #51607e;
    --otr-row-alt: #e9e9e9;   --otr-row-hover: #dedede;

    --otr-bg: #f4f5f8;
    --otr-surface: #ffffff;
    --otr-surface-muted: #f8f9fb;
    --otr-border: #e5e7ec;
    --otr-border-strong: #cdd2dc;
    --otr-text: #1f2430;
    --otr-text-muted: #6b7280;
    --otr-heading: #14161c;

    --otr-sidebar-bg: #1b1e25;
    --otr-sidebar-bg-end: #15171d;
    --otr-sidebar-text: rgba(240, 242, 247, 0.82);
    --otr-sidebar-muted: rgba(240, 242, 247, 0.42);
    --otr-sidebar-hover: rgba(255, 255, 255, 0.06);
    --otr-sidebar-active: rgba(244, 122, 31, 0.16);
    --otr-sidebar-line: rgba(255, 255, 255, 0.07);

    --otr-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
    --otr-shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.14);
    --otr-shadow-focus: 0 0 0 3px rgba(244, 122, 31, 0.18);

    --otr-radius-card: 14px;
    --otr-radius-ctl: 10px;
    --otr-radius-sm: 8px;

    --otr-sidebar-w: 248px;
    /* Collapsed rail width: AdminLTE forces .main-sidebar/.content-wrapper to 50px (!important) */
    --otr-sidebar-mini-w: 50px;
    /* Shared collapse/expand motion for sidebar, logo bar, header and content */
    --otr-sidebar-motion: 0.3s ease-in-out;
    --otr-header-h: 64px;
}

/* -----------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
html { font-size: 14px; }
body.otr-shell,
body.otr-auth {
    font-family: var(--otr-font);
    color: var(--otr-text);
    background: var(--otr-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.otr-shell h1, body.otr-shell h2, body.otr-shell h3, body.otr-shell h4, body.otr-shell h5,
body.otr-auth h1, body.otr-auth h2, body.otr-auth h3, body.otr-auth h4 {
    font-family: var(--otr-font);
    color: var(--otr-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}
body.otr-shell a { color: var(--otr-blue-ink); }
body.otr-shell a:hover { color: var(--otr-orange-hover); text-decoration: none; }
body.otr-shell ::selection { background: var(--otr-orange-soft); }

/* Component display rules (e.g. .alert { display:flex }) must never un-hide [hidden] elements */
.otr-shell [hidden], .otr-auth [hidden] { display: none !important; }
.wrapper { background: var(--otr-bg) !important; }
.wrapper:before, .wrapper:after { content: none; }

/* -----------------------------------------------------------------------------
   3. Shell layout — header
   -------------------------------------------------------------------------- */
.otr-shell .main-header { position: relative; z-index: 1030; box-shadow: none; max-height: none; }
.otr-shell .main-header .navbar {
    background: var(--otr-surface) !important;
    border-bottom: 1px solid var(--otr-border);
    min-height: var(--otr-header-h);
    margin-left: var(--otr-sidebar-w);
    padding: 0 1.25rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: margin-left var(--otr-sidebar-motion);
}

/* Logo bar (top of the sidebar column): logo left, collapse chevron right */
.otr-shell .main-header .logo.otr-logo-bar {
    width: var(--otr-sidebar-w);
    height: var(--otr-header-h);
    line-height: normal;
    background: var(--otr-sidebar-bg) !important;
    border-bottom: 1px solid var(--otr-sidebar-line);
    padding: 0 0 0 1.1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    transition: width var(--otr-sidebar-motion);
}
.otr-shell .main-header .logo.otr-logo-bar:hover { background: var(--otr-sidebar-bg) !important; }
.otr-logo-link { display: inline-flex; align-items: center; flex: 0 0 auto; transition: opacity var(--otr-sidebar-motion); }
.otr-logo-img { display: block; height: 44px; width: auto; max-width: 100%; }
.otr-sidebar-chevron {
    position: absolute; top: 50%; right: 0.75rem; margin-top: -1rem; transition: right var(--otr-sidebar-motion), background .15s, color .15s;
    flex: 0 0 auto; width: 2rem; height: 2rem; border: 0; border-radius: 8px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--otr-sidebar-muted); font-size: 0.8rem; cursor: pointer;
}
.otr-sidebar-chevron:hover, .otr-sidebar-chevron:focus-visible { background: var(--otr-sidebar-hover); color: #fff; outline: none; }
.otr-sidebar-chevron .otr-chevron-icon { transition: transform var(--otr-sidebar-motion); }
.otr-sidebar-chevron .otr-burger-icon, .otr-sidebar-chevron .otr-close-icon { display: none; }

.otr-shell .navbar-custom-menu { float: none; margin-left: auto; display: flex; align-items: center; }
.otr-shell .navbar-custom-menu > .navbar-nav { float: none; display: flex; align-items: center; gap: 0.25rem; margin: 0; }
.otr-shell .navbar-custom-menu > .navbar-nav > li { float: none; }
.otr-shell .navbar-nav > li > a { padding: 0; color: var(--otr-text) !important; background: transparent !important; }
.otr-shell .navbar-nav > li > a:hover, .otr-shell .navbar-nav > .open > a { background: transparent !important; }

/* Icon buttons (bell) */
.otr-navbtn {
    position: relative; width: 2.6rem; height: 2.6rem; border-radius: 999px;
    display: inline-flex !important; align-items: center; justify-content: center;
    color: var(--otr-text-muted) !important; font-size: 1.05rem; transition: background .15s, color .15s;
}
.otr-navbtn:hover, .open > .otr-navbtn { background: var(--otr-gray-soft) !important; color: var(--otr-heading) !important; }
.otr-navbtn .otr-navbtn-count {
    position: absolute; top: 0.25rem; right: 0.2rem; min-width: 1.05rem; height: 1.05rem; padding: 0 0.3rem;
    border-radius: 999px; background: var(--otr-orange); color: #fff; font-size: 0.62rem; font-weight: 800;
    line-height: 1.05rem; text-align: center; box-shadow: 0 0 0 2px var(--otr-surface);
}

/* Global search (table pages) */
.otr-global-search { position: relative; margin: 0; flex: 0 1 26rem; display: none; }
.otr-shell.has-table-search .otr-global-search { display: block; }
.otr-global-search input {
    width: 100%; height: 2.6rem; border: 1px solid var(--otr-border); border-radius: 999px;
    padding: 0 2.4rem 0 2.5rem; font: inherit; font-size: 0.9rem; color: var(--otr-text); background: var(--otr-surface-muted);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.otr-global-search input:focus { outline: none; border-color: var(--otr-orange); background: #fff; box-shadow: var(--otr-shadow-focus); }
.otr-global-search > i { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--otr-text-muted); pointer-events: none; }
.otr-global-search .otr-global-search-clear { position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%); width: 1.6rem; height: 1.6rem; border: 0; border-radius: 999px; background: transparent; color: var(--otr-text-muted); cursor: pointer; display: none; }
.otr-global-search.has-value .otr-global-search-clear { display: inline-flex; align-items: center; justify-content: center; }
.otr-global-search .otr-global-search-clear:hover { background: var(--otr-gray-soft); color: var(--otr-heading); }

/* User chip */
.otr-userchip { display: inline-flex !important; align-items: center; gap: 0.6rem; padding: 0.3rem 0.6rem 0.3rem 0.3rem !important; border-radius: 999px; }
.otr-userchip:hover, .open > .otr-userchip { background: var(--otr-gray-soft) !important; }
.otr-userchip .otr-avatar { width: 2.1rem; height: 2.1rem; font-size: 0.8rem; }
.otr-userchip-name { font-weight: 600; font-size: 0.9rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otr-userchip .fa-chevron-down { font-size: 0.65rem; color: var(--otr-text-muted); }

/* Dropdowns (navbar) */
.otr-shell .navbar-nav > li > .dropdown-menu,
.otr-shell .dropdown-menu {
    border: 1px solid var(--otr-border); border-radius: 12px; box-shadow: var(--otr-shadow-pop); padding: 0.4rem; margin-top: 0.4rem;
}
.otr-shell .dropdown-menu > li > a { border-radius: var(--otr-radius-sm); padding: 0.5rem 0.75rem; color: var(--otr-text); font-weight: 500; }
.otr-shell .dropdown-menu > li > a:hover, .otr-shell .dropdown-menu > li > a:focus { background: var(--otr-surface-muted); color: var(--otr-heading); }
.otr-shell .dropdown-menu > .divider { margin: 0.35rem 0; background: var(--otr-border); }
.otr-shell .dropdown-menu-right { right: 0; left: auto; }

.otr-usermenu { width: 17rem; padding: 0.5rem !important; }
.otr-usermenu-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.6rem 0.75rem; border-bottom: 1px solid var(--otr-border); margin-bottom: 0.35rem; }
.otr-usermenu-head .otr-avatar { width: 2.6rem; height: 2.6rem; font-size: 0.95rem; }
.otr-usermenu-name { font-weight: 700; color: var(--otr-heading); line-height: 1.2; }
.otr-usermenu-sub { font-size: 0.78rem; color: var(--otr-text-muted); overflow: hidden; text-overflow: ellipsis; }
.otr-usermenu a.otr-usermenu-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem; border-radius: var(--otr-radius-sm); color: var(--otr-text); font-weight: 500; }
.otr-usermenu a.otr-usermenu-item:hover { background: var(--otr-surface-muted); color: var(--otr-heading); }
.otr-usermenu a.otr-usermenu-item i { width: 1.1rem; text-align: center; color: var(--otr-text-muted); }
.otr-usermenu a.otr-usermenu-item.is-danger { color: var(--otr-red-ink); }
.otr-usermenu a.otr-usermenu-item.is-danger i { color: var(--otr-red-ink); }

/* Notifications dropdown */
.otr-notif-menu { width: 22rem; padding: 0 !important; overflow: hidden; }
.otr-notif-head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; border-bottom: 1px solid var(--otr-border); }
.otr-notif-head strong { font-size: 0.9rem; color: var(--otr-heading); }
.otr-notif-head button { border: 0; background: none; color: var(--otr-blue-ink); font-weight: 600; font-size: 0.78rem; padding: 0; cursor: pointer; }
.otr-notif-head button:hover { color: var(--otr-orange-hover); }
.otr-notif-list { list-style: none; margin: 0; padding: 0.3rem; max-height: 22rem; overflow-y: auto; }
.otr-notif-list li + li { border-top: 1px solid var(--otr-surface-muted); }
.otr-notif-item { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.65rem 0.7rem; border-radius: var(--otr-radius-sm); color: var(--otr-text); white-space: normal; }
.otr-notif-item:hover { background: var(--otr-surface-muted); color: var(--otr-heading); }
.otr-notif-icon { flex: 0 0 auto; width: 2rem; height: 2rem; border-radius: 999px; background: var(--otr-orange-soft); color: var(--otr-orange); display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.otr-notif-body { min-width: 0; flex: 1; }
.otr-notif-msg { font-size: 0.86rem; line-height: 1.35; font-weight: 500; }
.otr-notif-time { display: block; margin-top: 0.15rem; color: var(--otr-text-muted); font-size: 0.74rem; }
.otr-notif-dismiss { flex: 0 0 auto; border: 0; background: none; color: var(--otr-border-strong); padding: 0.2rem; cursor: pointer; border-radius: 999px; }
.otr-notif-dismiss:hover { color: var(--otr-red-ink); background: var(--otr-red-soft); }
.otr-notif-empty { padding: 1.5rem 1rem; text-align: center; color: var(--otr-text-muted); font-size: 0.85rem; }
.otr-notif-empty i { display: block; font-size: 1.4rem; margin-bottom: 0.4rem; color: var(--otr-border-strong); }
.otr-notif-foot { padding: 0.6rem 1rem; border-top: 1px solid var(--otr-border); text-align: center; font-size: 0.8rem; }
.otr-notif-viewall { display: inline-flex; align-items: center; gap: 0.4rem; border: 0; background: none; padding: 0.15rem 0.4rem; border-radius: var(--otr-radius-sm); color: var(--otr-blue-ink); font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.otr-notif-viewall:hover { color: var(--otr-orange-hover); background: var(--otr-surface-muted); }
/* "View all" dialog */
.otr-shell .otr-notif-modal .modal-title small { display: inline-block; margin-left: 0.5rem; font-size: 0.78rem; font-weight: 600; color: var(--otr-text-muted); }
.otr-shell .otr-notif-modal .modal-body { padding: 0; background: #fff; }
.otr-notif-toolbar { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.75rem 1rem; border-bottom: 1px solid var(--otr-border); background: var(--otr-surface-muted); }
.otr-notif-search { position: relative; flex: 1 1 14rem; margin: 0; min-width: 0; }
.otr-notif-search i { position: absolute; top: 50%; left: 0.7rem; transform: translateY(-50%); color: var(--otr-text-muted); font-size: 0.8rem; pointer-events: none; }
.otr-shell .otr-notif-search input.form-control { padding-left: 2rem; height: 2.1rem; }
.otr-notif-list-full { max-height: min(60vh, 34rem); padding: 0.3rem 0.5rem; }
.otr-notif-list-full li + li { border-top: 0; }
.otr-notif-list-full .otr-notif-row + .otr-notif-row { border-top: 1px solid var(--otr-surface-muted); }
.otr-notif-day { position: sticky; top: 0; z-index: 1; margin: 0.35rem 0 0.1rem; padding: 0.3rem 0.7rem; background: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--otr-text-muted); }
.otr-notif-list-full .otr-notif-row:not(.is-unread) .otr-notif-icon { background: var(--otr-gray-soft); color: var(--otr-text-muted); }
.otr-notif-list-full .otr-notif-row:not(.is-unread) .otr-notif-msg { font-weight: 400; color: var(--otr-text); }
.otr-notif-list-full .otr-notif-row.is-unread .otr-notif-msg { font-weight: 600; color: var(--otr-heading); }
.otr-notif-readmark { flex: 0 0 auto; padding: 0.2rem; color: var(--otr-border-strong); font-size: 0.8rem; }
.otr-notif-more { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 1rem; border-top: 1px solid var(--otr-border); font-size: 0.8rem; }
@media (max-width: 767px) {
    .otr-shell .otr-notif-modal .otr-notif-list-full { max-height: none; }
}

/* -----------------------------------------------------------------------------
   4. Shell layout — sidebar
   Every element here has a fixed height; only expanding/collapsing a section
   changes the menu height (hover never does).
   -------------------------------------------------------------------------- */
.otr-shell .main-sidebar, .otr-shell .left-side {
    width: var(--otr-sidebar-w);
    padding-top: var(--otr-header-h);
    background: linear-gradient(180deg, var(--otr-sidebar-bg) 0%, var(--otr-sidebar-bg-end) 100%) !important;
    box-shadow: inset -1px 0 0 var(--otr-sidebar-line);
}
.otr-shell .content-wrapper, .otr-shell .main-footer, .otr-shell .right-side { margin-left: var(--otr-sidebar-w); background: var(--otr-bg) !important; transition: margin-left var(--otr-sidebar-motion); }
.otr-shell .main-sidebar, .otr-shell .left-side { transition: width var(--otr-sidebar-motion), transform var(--otr-sidebar-motion); }
.otr-shell .sidebar { padding-bottom: 2rem; }


/* AdminLTE toggles .sidebar-menu overflow hidden↔visible on hover, which lets the
   first item's margin collapse and shifts the whole menu by ~1.4px. Pin it and use
   gap-based spacing so no margin can collapse. */
.otr-shell .sidebar-menu, .otr-shell .sidebar-menu:hover { overflow: visible !important; }
.otr-shell .sidebar-menu.otr-nav { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; padding: 0.85rem 0.7rem 0; list-style: none; }
.otr-nav-section { margin: 0; padding: 0; list-style: none; }

.otr-nav-section-toggle {
    display: flex; align-items: center; gap: 0.5rem; width: 100%; height: 2rem; margin: 0; padding: 0 0.55rem;
    border: 0; border-radius: 8px; background: transparent; cursor: pointer; text-align: left;
    color: var(--otr-sidebar-muted); font: inherit; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
    transition: color .12s, background .12s;
}
.otr-nav-section-toggle:hover, .otr-nav-section-toggle:focus-visible { color: #fff; background: var(--otr-sidebar-hover); outline: none; }
.otr-nav-section-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.otr-nav-section-caret { flex: 0 0 auto; font-size: 0.6rem; transition: transform .2s ease; transform: rotate(-90deg); }
.otr-nav-section.is-open .otr-nav-section-caret { transform: rotate(0deg); }
.otr-nav-section-count {
    flex: 0 0 auto; min-width: 1.2rem; height: 1.2rem; padding: 0 0.35rem; border-radius: 999px; line-height: 1.2rem; text-align: center;
    background: rgba(244, 122, 31, 0.22); color: var(--otr-orange); font-size: 0.62rem; letter-spacing: 0; transition: opacity .15s;
}
.otr-nav-section.is-open .otr-nav-section-count { opacity: 0; }

/* Smooth, height-agnostic collapse */
.otr-nav-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.otr-nav-section.is-open > .otr-nav-collapse { grid-template-rows: 1fr; }
.otr-nav-collapse > .otr-nav-items { min-height: 0; overflow: hidden; }
.otr-nav-items { display: flex; flex-direction: column; gap: 0.1rem; margin: 0; padding: 0.15rem 0 0; list-style: none; }
/* Flat section (Dashboard): plain links above the collapsible sections */
.otr-nav-section.is-flat > .otr-nav-items { padding-top: 0; }
.otr-nav-item { margin: 0; padding: 0; position: relative; }
.otr-shell .otr-nav-item > a { position: relative; }

.otr-shell .otr-nav-item > a {
    display: flex; align-items: center; gap: 0.7rem; height: 2.25rem; padding: 0 0.7rem; border-radius: 9px; border: 0;
    color: var(--otr-sidebar-text); font-weight: 500; font-size: 0.9rem; line-height: 1; white-space: nowrap;
    transition: background .12s, color .12s;
}
.otr-shell .otr-nav-item > a > i { width: 1.1rem; text-align: center; font-size: 0.9rem; color: var(--otr-sidebar-muted); flex: 0 0 auto; transition: color .12s; }
.otr-shell .otr-nav-item > a > .otr-nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; } /* the link's line-height: 1 would clip g / q / y under overflow: hidden */
.otr-shell .otr-nav-item > a:hover, .otr-shell .otr-nav-item > a:focus-visible { background: var(--otr-sidebar-hover); color: #fff; outline: none; }
.otr-shell .otr-nav-item > a:hover > i { color: #fff; }
/* Active item: same box metrics as normal items (no weight/border change) */
.otr-shell .otr-nav-item.active > a { background: var(--otr-sidebar-active); color: var(--otr-orange); font-weight: 600; }
.otr-shell .otr-nav-item.active > a > i { color: var(--otr-orange); }

/* Count badges in the sidebar */
span.menuCountFlag {
    margin-left: auto; flex: 0 0 auto; min-width: 1.35rem; height: 1.35rem; padding: 0 0.4rem; border-radius: 999px;
    background: var(--otr-orange); color: #fff; font-size: 0.68rem; font-weight: 800; line-height: 1.35rem; text-align: center; display: inline-block;
}
.menuSubCounts { color: var(--otr-sidebar-muted); font-size: 0.72rem; line-height: 1.35rem; padding: 0.05rem 0.7rem 0.3rem 2.5rem; }
.menuSubCounts > span { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; height: 1.35rem; }
span.menuCountFlagSmall { min-width: 1.15rem; height: 1.15rem; line-height: 1.15rem; font-size: 0.62rem; padding: 0 0.3rem; margin-left: 0; }
span.menuCountFlagNeutral { background: rgba(255, 255, 255, 0.12); color: var(--otr-sidebar-text); }
.hideAdminMenuItem { display: none !important; }

/* Mini (collapsed) sidebar on desktop */
@media (min-width: 768px) {
    /* One width for the whole collapsed rail: logo bar, menu, and the content/header offsets */
    .otr-shell.sidebar-mini.sidebar-collapse .main-sidebar, .otr-shell.sidebar-mini.sidebar-collapse .left-side { width: var(--otr-sidebar-mini-w) !important; }
    .otr-shell.sidebar-mini.sidebar-collapse .content-wrapper, .otr-shell.sidebar-mini.sidebar-collapse .main-footer, .otr-shell.sidebar-mini.sidebar-collapse .right-side { margin-left: var(--otr-sidebar-mini-w) !important; }
    .otr-shell.sidebar-mini.sidebar-collapse .main-header .navbar { margin-left: var(--otr-sidebar-mini-w) !important; }
    .otr-shell.sidebar-mini.sidebar-collapse .main-header .logo.otr-logo-bar { width: var(--otr-sidebar-mini-w) !important; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-logo-link { opacity: 0; pointer-events: none; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-sidebar-chevron { right: calc((var(--otr-sidebar-mini-w) - 2rem) / 2); }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-sidebar-chevron .otr-chevron-icon { transform: rotate(180deg); }
    .otr-shell.sidebar-mini.sidebar-collapse .sidebar-menu.otr-nav { padding: 0.85rem 0.35rem 0; gap: 0; }
    /* Section headers become thin dividers; every section shows its icons */
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-section-toggle { height: 1px; padding: 0; margin: 0.55rem 0.25rem; background: var(--otr-sidebar-line); pointer-events: none; overflow: hidden; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-section-toggle > * { display: none; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-section:first-child .otr-nav-section-toggle { margin-top: 0; background: transparent; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-collapse { grid-template-rows: 1fr; transition: none; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-collapse > .otr-nav-items { overflow: visible; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-item > a { justify-content: center; padding: 0; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-item > a > .otr-nav-label,
    .otr-shell.sidebar-mini.sidebar-collapse .menuSubCounts { display: none; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-item > a > i { font-size: 1rem; width: auto; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-item > a > span.menuCountFlag { position: absolute; top: 0.1rem; right: 0.2rem; min-width: 1rem; height: 1rem; line-height: 1rem; font-size: 0.58rem; padding: 0 0.25rem; }
    .otr-shell.sidebar-mini.sidebar-collapse .otr-nav-item:hover > a > .otr-nav-label {
        display: block; position: absolute; left: calc(100% + 1rem); top: 50%; transform: translateY(-50%); margin: 0; padding: 0.45rem 0.8rem; border-radius: 8px;
        background: var(--otr-heading); color: #fff; font-size: 0.82rem; font-weight: 600; box-shadow: var(--otr-shadow-pop); z-index: 1050; overflow: visible;
    }
}
/* Phones: see section 14 (one-row header + off-canvas drawer) */

/* -----------------------------------------------------------------------------
   5. Content area, page header (breadcrumb = title), footer
   -------------------------------------------------------------------------- */
.otr-shell .content-wrapper { min-height: calc(100vh - var(--otr-header-h)); }
.otr-shell .content-header { padding: 1.4rem 1.75rem 0.3rem; position: relative; }
.otr-shell .content { padding: 0.8rem 1.75rem 2.2rem; }
.otr-page-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; min-height: 2.6rem; }
.otr-page-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }
.otr-page-actions:empty { display: none; }
.otr-page-title { margin: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); font-weight: 800; letter-spacing: -0.02em; color: var(--otr-heading); line-height: 1.2; }
.otr-page-sub { margin: 0.3rem 0 0; color: var(--otr-text-muted); font-size: 0.9rem; }

.otr-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.55rem; min-width: 0; margin: 0; padding: 0; background: none; list-style: none; font-size: 0.95rem; color: var(--otr-text-muted); }
.otr-shell .otr-breadcrumb a { color: var(--otr-text-muted); font-weight: 600; }
.otr-shell .otr-breadcrumb a:hover { color: var(--otr-heading); }
.otr-breadcrumb-section { font-weight: 600; }
.otr-breadcrumb .otr-breadcrumb-sep { color: var(--otr-border-strong); font-size: 0.62rem; }
.otr-shell .otr-breadcrumb .otr-breadcrumb-current {
    display: inline-block; margin: 0; font-size: inherit; font-weight: 700; letter-spacing: normal; line-height: inherit; color: var(--otr-orange);
}
.otr-shell .otr-breadcrumb .otr-breadcrumb-current::first-letter { text-transform: uppercase; }
.otr-shell .breadcrumb { display: none; }

/* Context strip (detail pages: owner, status and type pills) */
.otr-page-context { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; color: var(--otr-text-muted); font-size: 0.9rem; }
.otr-page-context .otr-title-pills { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-left: 0.25rem; }
.otr-page-context a { font-weight: 600; }

.otr-shell .main-footer { padding: 0.75rem 1.75rem; border-top: 1px solid var(--otr-border); background: transparent !important; color: var(--otr-text-muted); font-size: 0.78rem; }
.otr-shell .main-footer img { display: none; }

/* -----------------------------------------------------------------------------
   6. Components (ported from trs-* layer)
   -------------------------------------------------------------------------- */
.otr-card { background: var(--otr-surface); border: 1px solid var(--otr-border); border-radius: var(--otr-radius-card); box-shadow: var(--otr-shadow-card); padding: 1.1rem 1.25rem; min-width: 0; margin-bottom: 1.1rem; }
.otr-card.is-flush { padding: 0; overflow: hidden; }
.otr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.85rem; flex-wrap: wrap; }
.otr-card.is-flush > .otr-card-head { padding: 0.95rem 1.25rem; margin: 0; border-bottom: 1px solid var(--otr-border); }
.otr-card-head-main { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.otr-card-title { margin: 0; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; color: var(--otr-heading); }
.otr-card-sub { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--otr-text-muted); }
.otr-card-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.otr-card-icon { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; background: var(--otr-orange-soft); color: var(--otr-orange); }
.otr-card-icon.is-blue { background: var(--otr-blue-soft); color: var(--otr-blue); }
.otr-card-icon.is-green { background: var(--otr-green-soft); color: var(--otr-green); }
.otr-card-icon.is-red { background: var(--otr-red-soft); color: var(--otr-red); }
.otr-card-icon.is-purple { background: var(--otr-purple-soft); color: var(--otr-purple); }
.otr-card-icon.is-gray { background: var(--otr-gray-soft); color: var(--otr-gray-ink); }
.otr-card-icon.is-orange { background: var(--otr-orange-soft); color: var(--otr-orange); }

.otr-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; margin-bottom: 1.1rem; }
.otr-kpi { display: flex; align-items: center; gap: 0.85rem; background: var(--otr-surface); border: 1px solid var(--otr-border); border-left-width: 4px; border-left-color: var(--otr-orange); border-radius: 12px; box-shadow: var(--otr-shadow-card); padding: 0.95rem 1.05rem; min-width: 0; }
.otr-kpi-icon { flex: 0 0 auto; width: 2.7rem; height: 2.7rem; border-radius: 0.85rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; background: var(--otr-orange-soft); color: var(--otr-orange); }
.otr-kpi.is-blue { border-left-color: var(--otr-blue); } .otr-kpi.is-blue .otr-kpi-icon { background: var(--otr-blue-soft); color: var(--otr-blue); }
.otr-kpi.is-green { border-left-color: var(--otr-green); } .otr-kpi.is-green .otr-kpi-icon { background: var(--otr-green-soft); color: var(--otr-green); }
.otr-kpi.is-red { border-left-color: var(--otr-red); } .otr-kpi.is-red .otr-kpi-icon { background: var(--otr-red-soft); color: var(--otr-red); }
.otr-kpi.is-purple { border-left-color: var(--otr-purple); } .otr-kpi.is-purple .otr-kpi-icon { background: var(--otr-purple-soft); color: var(--otr-purple); }
.otr-kpi-label { margin: 0; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--otr-text-muted); }
.otr-kpi-value { margin: 0.05rem 0; font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--otr-heading); }
.otr-kpi-sub { margin: 0; font-size: 0.75rem; color: var(--otr-text-muted); }

.otr-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.62rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; background: var(--otr-gray-soft); color: var(--otr-gray-ink); border: 1px solid transparent; line-height: 1.4; }
.otr-pill.is-green { background: var(--otr-green-soft); color: var(--otr-green-ink); }
.otr-pill.is-blue { background: var(--otr-blue-soft); color: var(--otr-blue-ink); }
.otr-pill.is-orange { background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-pill.is-red { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.otr-pill.is-purple { background: var(--otr-purple-soft); color: var(--otr-purple-ink); }
.otr-pill.is-yellow { background: var(--otr-yellow-soft); color: var(--otr-yellow-ink); }
.otr-pill.is-outline { background: #fff; border-color: var(--otr-border); color: var(--otr-text-muted); }
.otr-pill.is-solid { background: var(--otr-orange); color: #fff; }
.otr-pill .otr-pill-x { border: 0; background: none; padding: 0; margin-left: 0.15rem; color: inherit; opacity: 0.6; cursor: pointer; line-height: 1; }
.otr-pill .otr-pill-x:hover { opacity: 1; }

.otr-avatar { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; background: var(--otr-orange); color: #fff; text-transform: uppercase; letter-spacing: 0.02em; overflow: hidden; }
.otr-avatar img { width: 100%; height: 100%; object-fit: cover; }
.otr-avatar.is-soft { background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-avatar.is-blue { background: var(--otr-blue-soft); color: var(--otr-blue-ink); }

.otr-row-list { display: flex; flex-direction: column; }
.otr-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--otr-surface-muted); min-width: 0; }
.otr-row:last-child { border-bottom: 0; }
.otr-detail-list { margin: 0; }
/* Label column + left-aligned value right next to it (driver / company / engagement pages, modals) */
.otr-detail-row { display: flex; align-items: baseline; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--otr-surface-muted); font-size: 0.88rem; }
.otr-detail-row:last-child { border-bottom: 0; }
.otr-detail-row dt { color: var(--otr-text-muted); font-weight: 500; flex: 0 0 var(--otr-detail-label-w, 10.5rem); max-width: 45%; }
.otr-detail-row dd { color: var(--otr-heading); font-weight: 600; text-align: left; margin: 0; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }

.otr-tabbar { display: flex; align-items: stretch; gap: 0.2rem; overflow-x: auto; border-bottom: 1px solid var(--otr-border); margin-bottom: 1.1rem; }
.otr-tabbar .otr-tab { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.65rem 0.95rem; font-size: 0.88rem; font-weight: 700; color: var(--otr-text-muted); border: 0; border-bottom: 2.5px solid transparent; background: none; white-space: nowrap; cursor: pointer; margin-bottom: -1px; }
.otr-tabbar .otr-tab:hover { color: var(--otr-heading); }
.otr-tabbar .otr-tab.is-active, .otr-tabbar .otr-tab.active { color: var(--otr-orange); border-bottom-color: var(--otr-orange); }

.otr-banner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; background: var(--otr-surface); border: 1px solid var(--otr-border); border-radius: var(--otr-radius-card); box-shadow: var(--otr-shadow-card); padding: 0.95rem 1.2rem; margin-bottom: 1.1rem; }
.otr-banner-main { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.otr-banner-title { margin: 0; font-weight: 800; color: var(--otr-heading); font-size: 0.95rem; }
.otr-banner-sub { margin: 0.1rem 0 0; color: var(--otr-text-muted); font-size: 0.85rem; }

.otr-empty { padding: 3rem 1rem; text-align: center; color: var(--otr-text-muted); }
.otr-empty-icon { width: 5.5rem; height: 5.5rem; border-radius: 999px; background: var(--otr-gray-soft); color: var(--otr-border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1rem; }
.otr-empty-title { margin: 0; font-weight: 700; color: var(--otr-heading); font-size: 1rem; }
.otr-empty-sub { margin: 0.35rem 0 0; font-size: 0.88rem; }
.otr-empty > .btn, .otr-empty > .otr-empty-actions { margin-top: 1.25rem; }
.otr-empty-strip { border: 1px dashed var(--otr-border-strong); border-radius: 0.7rem; background: var(--otr-surface-muted); color: var(--otr-text-muted); padding: 0.7rem 0.9rem; font-size: 0.85rem; }
.otr-warn-strip { display: flex; align-items: center; gap: 0.5rem; border: 1px solid #f4cf8f; border-radius: 0.7rem; background: var(--otr-yellow-soft); color: var(--otr-yellow-ink); padding: 0.55rem 0.8rem; font-size: 0.82rem; font-weight: 600; }

/* Filters card (mockup: Filters panel with Apply / Reset) */
.otr-filters { margin-bottom: 1.1rem; }
.otr-filters-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; color: var(--otr-heading); font-size: 0.98rem; margin: 0 0 1rem; }
.otr-filters-title i { color: var(--otr-text-muted); }
.otr-filters-grid { display: flex; flex-wrap: wrap; gap: 1.25rem 1.5rem; align-items: flex-start; }
.otr-filters-group { display: flex; flex-direction: column; gap: 0.35rem; min-width: 11rem; }
.otr-filters-group.is-sep { padding-left: 1.5rem; border-left: 1px solid var(--otr-border); }
.otr-filters-actions { display: flex; gap: 0.5rem; margin-top: 1.1rem; }
.otr-field-label { font-size: 0.78rem; font-weight: 700; color: var(--otr-heading); margin: 0 0 0.15rem; }

.otr-section-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--otr-heading); margin: 0 0 0.85rem; }
.otr-section-title i { color: var(--otr-orange); }
.otr-inner-card { border: 1px solid var(--otr-border); border-radius: 12px; background: #fff; padding: 1rem 1.1rem; min-width: 0; margin-bottom: 1rem; }
.otr-inner-card > .otr-section-title { margin-bottom: 0.9rem; }
.otr-inner-card > .row + .row { margin-top: 0.2rem; }
.otr-required { color: var(--otr-orange); margin-left: 0.15rem; }

/* -----------------------------------------------------------------------------
   7. Bootstrap / AdminLTE overrides
   -------------------------------------------------------------------------- */
/* Buttons */
.otr-shell .btn, .otr-auth .btn {
    border-radius: var(--otr-radius-ctl); font-weight: 600; font-family: inherit; padding: 0.5rem 0.95rem; font-size: 0.875rem; line-height: 1.35;
    border-width: 1px; box-shadow: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.otr-shell .btn:focus, .otr-shell .btn:active:focus { outline: none; box-shadow: var(--otr-shadow-focus); }
.otr-shell .btn-primary, .otr-shell .btn-success, .otr-shell .btn-warning, .otr-shell .btn-info, .otr-auth .btn-primary {
    background: var(--otr-orange) !important; border-color: var(--otr-orange) !important; color: #fff !important;
}
.otr-shell .btn-primary:hover, .otr-shell .btn-success:hover, .otr-shell .btn-warning:hover, .otr-shell .btn-info:hover, .otr-auth .btn-primary:hover { background: var(--otr-orange-hover) !important; border-color: var(--otr-orange-hover) !important; }
.otr-shell .btn-default, .otr-shell .btn-secondary, .otr-shell .btn-outline { background: #fff; border-color: var(--otr-border-strong); color: var(--otr-heading); }
.otr-shell .btn-default:hover, .otr-shell .btn-outline:hover { background: var(--otr-surface-muted); border-color: var(--otr-heading); color: var(--otr-heading); }
.otr-shell .btn-danger { background: var(--otr-red-soft); border-color: #f3c0c0; color: var(--otr-red-ink); }
.otr-shell .btn-danger:hover { background: var(--otr-red); border-color: var(--otr-red); color: #fff; }
.otr-shell .btn-ghost, .otr-shell .btn-link { background: transparent; border-color: transparent; color: var(--otr-text-muted); box-shadow: none; }
.otr-shell .btn-ghost:hover, .otr-shell .btn-link:hover { background: var(--otr-gray-soft); color: var(--otr-heading); text-decoration: none; }
.otr-shell .btn-dark { background: var(--otr-heading); border-color: var(--otr-heading); color: #fff; }
.otr-shell .btn-dark:hover { background: #000; }
.otr-shell .btn-xs { padding: 0.25rem 0.55rem; font-size: 0.75rem; border-radius: 7px; }
.otr-shell .btn-sm { padding: 0.38rem 0.75rem; font-size: 0.8rem; border-radius: 8px; }
.otr-shell .btn-lg { padding: 0.65rem 1.25rem; font-size: 0.95rem; border-radius: 12px; }
.otr-shell .btn-flat { border-radius: var(--otr-radius-ctl); }
.otr-shell .btn-block + .btn-block { margin-top: 0.5rem; }
.otr-shell .btn.disabled, .otr-shell .btn[disabled] { opacity: 0.5; }
.otr-shell .btn-group > .btn { border-radius: var(--otr-radius-ctl); }
.otr-shell .btn-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.otr-shell .btn-group > .btn:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.otr-shell .btn-group > .btn.dropdown-toggle:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* Forms */
.otr-shell .form-control, .otr-auth .form-control,
.otr-shell select.form-control, .otr-shell textarea.form-control {
    height: 2.5rem; border: 1px solid var(--otr-border-strong); border-radius: var(--otr-radius-ctl); box-shadow: none; font-family: inherit; font-size: 0.88rem; color: var(--otr-text); padding: 0.4rem 0.75rem; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.otr-shell textarea.form-control { height: auto; min-height: 5rem; }
.otr-shell .form-control:focus, .otr-auth .form-control:focus { border-color: var(--otr-orange); box-shadow: var(--otr-shadow-focus); outline: none; }
.otr-shell .form-control::placeholder { color: #a3a9b6; }
.otr-shell .form-control[disabled], .otr-shell .form-control[readonly] { background: var(--otr-surface-muted); color: var(--otr-text-muted); }
.otr-shell .input-sm, .otr-shell .form-control.input-sm { height: 2.1rem; font-size: 0.82rem; border-radius: 8px; }
.otr-shell label, .otr-shell .control-label { font-weight: 600; font-size: 0.82rem; color: var(--otr-heading); margin-bottom: 0.3rem; }
.otr-shell .form-group { margin-bottom: 0.9rem; }
.otr-shell .help-block { color: var(--otr-text-muted); font-size: 0.78rem; }
.otr-shell .has-error .form-control { border-color: var(--otr-red); }
.otr-shell .has-error .help-block, .otr-shell .has-error .control-label { color: var(--otr-red-ink); }
.otr-shell .input-group-addon { border-color: var(--otr-border-strong); background: var(--otr-surface-muted); color: var(--otr-text-muted); border-radius: var(--otr-radius-ctl); }
.otr-shell .form-control-icon { top: 0.75rem; }
.otr-shell select.form-control:not([multiple]) {
    -webkit-appearance: none; appearance: none; padding-right: 2.2rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center;
}
/* Bootstrap gives select.input-sm a fixed 30px line-height, which pushes the text below the box */
.otr-shell select.form-control, .otr-shell select.input-sm { line-height: normal; padding-top: 0; padding-bottom: 0; }
.otr-shell input[type="checkbox"], .otr-shell input[type="radio"] { accent-color: var(--otr-orange); width: 1rem; height: 1rem; }
.otr-shell .checkbox label, .otr-shell .radio label { font-weight: 500; font-size: 0.88rem; }
.otr-shell .checkbox input[type="checkbox"], .otr-shell .radio input[type="radio"] { margin-top: 0.2rem; }
.otr-shell input[type="date"].form-control, .otr-shell input[type="datetime-local"].form-control { padding-right: 0.5rem; }

/* select2 */
.otr-shell .select2-container--default .select2-selection--single, .otr-shell .select2-container--default .select2-selection--multiple {
    height: 2.5rem; border: 1px solid var(--otr-border-strong); border-radius: var(--otr-radius-ctl); font-size: 0.88rem;
}
.otr-shell .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 2.4rem; padding-left: 0.75rem; color: var(--otr-text); }
.otr-shell .select2-container--default .select2-selection--single .select2-selection__arrow { height: 2.4rem; right: 0.4rem; }
.otr-shell .select2-container--default.select2-container--focus .select2-selection--single, .otr-shell .select2-container--default.select2-container--open .select2-selection--single,
.otr-shell .select2-container--default.select2-container--focus .select2-selection--multiple { border-color: var(--otr-orange); box-shadow: var(--otr-shadow-focus); }
.otr-shell .select2-dropdown { border: 1px solid var(--otr-border); border-radius: 12px; box-shadow: var(--otr-shadow-pop); overflow: hidden; }
.otr-shell .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-shell .select2-container--default .select2-results__option[aria-selected=true] { background: var(--otr-gray-soft); }
.otr-shell .select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid var(--otr-border-strong); border-radius: 8px; padding: 0.35rem 0.6rem; }
.otr-shell .select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--otr-orange-soft); border: 0; color: var(--otr-orange-ink); border-radius: 999px; padding: 0.1rem 0.6rem; font-weight: 600; margin-top: 0.35rem; }
.otr-shell .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: inherit; margin-right: 0.3rem; }
.otr-shell .select2-container--default .select2-selection--multiple { height: auto; min-height: 2.5rem; padding-bottom: 0.2rem; }

/* Labels and badges */
.otr-shell .label { border-radius: 999px; font-weight: 700; padding: 0.25em 0.7em; font-size: 0.72rem; }
.otr-shell .label-danger, .otr-shell .badge.bg-red { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.otr-shell .label-success { background: var(--otr-green-soft); color: var(--otr-green-ink); }
.otr-shell .label-warning { background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-shell .label-info, .otr-shell .label-primary { background: var(--otr-blue-soft); color: var(--otr-blue-ink); }
.otr-shell .label-default { background: var(--otr-gray-soft); color: var(--otr-gray-ink); }
.otr-shell .badge { border-radius: 999px; font-weight: 700; background: var(--otr-gray-soft); color: var(--otr-gray-ink); }

/* AdminLTE boxes → cards */
.otr-shell .box { background: var(--otr-surface); border: 1px solid var(--otr-border); border-top: 1px solid var(--otr-border); border-radius: var(--otr-radius-card); box-shadow: var(--otr-shadow-card); margin-bottom: 1.1rem; }
.otr-shell .box.box-primary, .otr-shell .box.box-info, .otr-shell .box.box-success, .otr-shell .box.box-warning, .otr-shell .box.box-danger, .otr-shell .box.box-default { border-top-color: var(--otr-border); }
.otr-shell .box-header { padding: 0.95rem 1.25rem; border-bottom: 1px solid var(--otr-border); display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.otr-shell .box-header.with-border { border-bottom: 1px solid var(--otr-border); }
.otr-shell .box-header > .box-title, .otr-shell .box-header .box-title { font-size: 1rem; font-weight: 800; color: var(--otr-heading); }
.otr-shell .box-header > .fa, .otr-shell .box-header > .fas, .otr-shell .box-header > .far { color: var(--otr-text-muted); }
.otr-shell .box-header .pull-left, .otr-shell .box-header .pull-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.otr-shell .box-header .pull-right { margin-left: auto; }
.otr-shell .box-header .box-tools { position: static; float: none; margin-left: auto; }
.otr-shell .box-body { padding: 1.1rem 1.25rem; }
.otr-shell .box-footer { border-top: 1px solid var(--otr-border); background: var(--otr-surface-muted); padding: 0.85rem 1.25rem; border-radius: 0 0 var(--otr-radius-card) var(--otr-radius-card); }
.otr-shell .box.box-solid > .box-header { background: transparent; color: var(--otr-heading); }
.otr-shell .box.box-solid > .box-header .btn { color: inherit; }
.otr-shell .box .btn-box-tool { color: var(--otr-text-muted); }
.otr-shell .box .overlay { border-radius: var(--otr-radius-card); background: rgba(255, 255, 255, 0.6); }
.otr-shell .small-box { border-radius: var(--otr-radius-card); box-shadow: var(--otr-shadow-card); }
.otr-shell .info-box { border-radius: var(--otr-radius-card); box-shadow: var(--otr-shadow-card); background: var(--otr-surface); }
.otr-shell .info-box-icon { border-radius: var(--otr-radius-card) 0 0 var(--otr-radius-card); }
.otr-shell .callout { border-radius: var(--otr-radius-ctl); }

/* Nav tabs */
.otr-shell .nav-tabs { border-bottom: 1px solid var(--otr-border); }
.otr-shell .nav-tabs > li > a { border: 0; border-bottom: 2.5px solid transparent; border-radius: 0; margin: 0; padding: 0.65rem 0.95rem; font-weight: 700; color: var(--otr-text-muted); font-size: 0.88rem; }
.otr-shell .nav-tabs > li > a:hover { background: transparent; color: var(--otr-heading); border-color: transparent; }
.otr-shell .nav-tabs > li.active > a, .otr-shell .nav-tabs > li.active > a:hover, .otr-shell .nav-tabs > li.active > a:focus { border: 0; border-bottom: 2.5px solid var(--otr-orange); color: var(--otr-orange); background: transparent; }
.otr-shell .nav-tabs-custom { border-radius: var(--otr-radius-card); box-shadow: var(--otr-shadow-card); border: 1px solid var(--otr-border); }
.otr-shell .nav-tabs-custom > .nav-tabs > li.active { border-top: 0; }
.otr-shell .nav-tabs-custom > .nav-tabs > li.active > a { border-top: 0; }
.otr-shell .nav-pills > li > a { border-radius: 999px; font-weight: 600; color: var(--otr-text-muted); }
.otr-shell .nav-pills > li.active > a, .otr-shell .nav-pills > li.active > a:hover { background: var(--otr-orange); color: #fff; }

/* Bootstrap pagination */
.otr-shell .pagination > li > a, .otr-shell .pagination > li > span { border-color: var(--otr-border); color: var(--otr-text); border-radius: 8px; margin: 0 0.15rem; padding: 0.35rem 0.7rem; font-weight: 600; }
.otr-shell .pagination > .active > a, .otr-shell .pagination > .active > a:hover, .otr-shell .pagination > .active > span { background: var(--otr-orange); border-color: var(--otr-orange); color: #fff; }
.otr-shell .pagination > .disabled > a, .otr-shell .pagination > .disabled > span { color: var(--otr-border-strong); }

/* Modals */
.otr-shell .modal-content { border: 1px solid var(--otr-border); border-radius: 18px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28); overflow: hidden; }
.otr-shell .modal-header { border-bottom: 1px solid var(--otr-border); padding: 1.15rem 1.5rem 0.9rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.otr-shell .modal-header .close { margin: 0 0 0 auto; order: 2; opacity: 1; width: 2.1rem; height: 2.1rem; border-radius: 999px; color: var(--otr-text-muted); font-size: 1.3rem; font-weight: 400; line-height: 1; display: inline-flex; align-items: center; justify-content: center; text-shadow: none; transition: background .15s, color .15s; }
.otr-shell .modal-header .close:hover { background: var(--otr-gray-soft); color: var(--otr-heading); }
.otr-shell .modal-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--otr-heading); line-height: 1.25; }
.otr-shell .modal-subtitle { display: block; margin-top: 0.2rem; font-size: 0.85rem; font-weight: 400; color: var(--otr-text-muted); }
.otr-shell .modal-body { padding: 1.25rem 1.5rem; background: var(--otr-surface-muted); }
.otr-shell .modal-body > .row:last-child, .otr-shell .modal-body > form > .row:last-child { margin-bottom: 0; }
.otr-shell .modal-footer { border-top: 1px solid var(--otr-border); padding: 0.95rem 1.5rem; background: #fff; display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.otr-shell .modal-footer .btn + .btn { margin-left: 0; }
.otr-shell .modal-backdrop { background: #070c18; }
.otr-shell .modal-backdrop.in { opacity: 0.55; }
.otr-shell .modal-dialog { margin-top: 2.5rem; }
.otr-shell .modal-lg { width: min(1100px, 94vw); }
.otr-shell .modal-body .box { box-shadow: none; }
.otr-shell .btn-group-action { display: flex; gap: 0.5rem; margin-top: 1rem; }
.otr-shell .btn-group-action .btn-block { margin-top: 0; width: auto; flex: 1; }
.otr-shell .modal .alerts-modal:empty, .otr-shell .js-form-alerts:empty { display: none; }

/* Alerts → toasts */
.otr-shell #alerts-page { position: fixed; top: calc(var(--otr-header-h) + 0.75rem); right: 1.25rem; z-index: 1080; width: min(24rem, calc(100vw - 2.5rem)); display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.otr-shell #alerts-page .alert { pointer-events: auto; margin: 0; }
.otr-shell .alert {
    border: 1px solid var(--otr-border); border-left-width: 4px; border-radius: 12px; background: #fff; color: var(--otr-text); box-shadow: var(--otr-shadow-pop);
    padding: 0.8rem 2.4rem 0.8rem 0.95rem; font-size: 0.86rem; font-weight: 500; display: flex; align-items: flex-start; gap: 0.6rem; position: relative; animation: otr-toast-in .2s ease-out;
}
.otr-shell .alert > .icon { margin-top: 0.1rem; }
.otr-shell .alert .uf-alert-message-container { flex: 1; min-width: 0; }
.otr-shell .alert .close { position: absolute; right: 0.6rem; top: 0.55rem; opacity: 0.5; text-shadow: none; font-size: 1.15rem; color: var(--otr-heading); }
.otr-shell .alert .close:hover { opacity: 1; }
.otr-shell .alert-success { border-left-color: var(--otr-green); } .otr-shell .alert-success > .icon { color: var(--otr-green); }
.otr-shell .alert-danger, .otr-shell .alert-error { border-left-color: var(--otr-red); } .otr-shell .alert-danger > .icon, .otr-shell .alert-error > .icon { color: var(--otr-red); }
.otr-shell .alert-warning { border-left-color: var(--otr-yellow); } .otr-shell .alert-warning > .icon { color: var(--otr-yellow); }
.otr-shell .alert-info { border-left-color: var(--otr-blue); } .otr-shell .alert-info > .icon { color: var(--otr-blue); }
.otr-shell .alert-dismissible { padding-right: 2.4rem; }
/* Inline alerts inside forms/modals keep the same look but flow normally */
.otr-shell .js-form-alerts .alert, .otr-shell .alerts-modal .alert { box-shadow: none; margin-bottom: 0.85rem; animation: none; }
@keyframes otr-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Progress, wells, misc */
.otr-shell .well { background: var(--otr-surface-muted); border: 1px solid var(--otr-border); border-radius: 12px; box-shadow: none; }
.otr-shell hr { border-top-color: var(--otr-border); }
.otr-shell .progress { border-radius: 999px; box-shadow: none; background: var(--otr-gray-soft); }
.otr-shell .progress-bar { background: var(--otr-orange); }
.otr-shell .text-muted { color: var(--otr-text-muted) !important; }
.otr-shell .bg-orange, .otr-shell .bg-yellow { background: var(--otr-orange) !important; }
.otr-shell code { background: var(--otr-gray-soft); color: var(--otr-red-ink); border-radius: 6px; }

/* -----------------------------------------------------------------------------
   8. Tables (base look; the table shell/toolbar/pager live in otr-table.css)
   -------------------------------------------------------------------------- */
.otr-shell .table { margin-bottom: 0; font-size: 0.86rem; }
.otr-shell .table > thead > tr > th {
    background: var(--otr-surface-muted); color: var(--otr-text-muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    border-bottom: 1px solid var(--otr-border); border-top: 0; padding: 0.75rem 0.9rem; vertical-align: middle; white-space: nowrap;
}
.otr-shell .table > tbody > tr > td { padding: 0.7rem 0.9rem; border-top: 1px solid var(--otr-surface-muted); vertical-align: middle; color: var(--otr-text); }
.otr-shell .table-bordered, .otr-shell .table-bordered > thead > tr > th, .otr-shell .table-bordered > tbody > tr > td { border-color: var(--otr-border); }
.otr-shell .table-bordered > tbody > tr > td { border-left: 0; border-right: 0; }
.otr-shell .table-bordered > thead > tr > th { border-left: 0; border-right: 0; }
/* Data tables: alternating rows, set on the cells so cell backgrounds never hide them
   (phones turn .otr-grid rows into cards, see otr-table.css). */
.otr-shell .table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
.otr-shell .table-striped > tbody > tr:nth-of-type(even) > td,
.otr-shell .otr-grid > tbody > tr:nth-of-type(even) > td { background-color: var(--otr-row-alt); }
.otr-shell .table-hover > tbody > tr:hover > td { background-color: var(--otr-row-hover); }
.otr-shell .table > tbody > tr > td a { font-weight: 600; }
.otr-shell .table .btn-group .btn.dropdown-toggle { padding: 0.32rem 0.7rem; font-size: 0.78rem; }
.otr-shell .tablesorter-bootstrap .tablesorter-header { background: var(--otr-surface-muted) !important; padding: 0.75rem 1.6rem 0.75rem 0.9rem; }
.otr-shell .tablesorter-bootstrap .tablesorter-header .tablesorter-header-inner { padding: 0; }
.otr-shell .tablesorter-bootstrap thead .tablesorter-header:not(.sorter-false) { cursor: pointer; }
.otr-shell .tablesorter-bootstrap .tablesorter-header.tablesorter-headerAsc, .otr-shell .tablesorter-bootstrap .tablesorter-header.tablesorter-headerDesc { color: var(--otr-orange) !important; }
.otr-shell .tablesorter-bootstrap .tablesorter-header.sorter-false .tablesorter-header-inner { padding-right: 0; }
.otr-shell .tablesorter-bootstrap .tablesorter-filter-row, .otr-shell .tablesorter-filter-row td { background: #fff; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--otr-border); }
.otr-shell .tablesorter-bootstrap .tablesorter-filter { border: 1px solid var(--otr-border-strong); border-radius: 8px; height: 2rem; font-size: 0.8rem; padding: 0 0.5rem; background: #fff; }
.otr-shell .tablesorter-bootstrap .tablesorter-filter:focus { border-color: var(--otr-orange); box-shadow: var(--otr-shadow-focus); outline: none; }
.otr-shell .table > tbody > tr > td .btn.status, .otr-shell .table > tbody > tr > td p.btn { border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.72rem; font-weight: 700; color: #fff; margin: 0; cursor: default; }

/* Pager (tablesorter) */
.otr-shell .pager.tablesorter-pager { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.85rem 1.25rem; border-top: 1px solid var(--otr-border); background: var(--otr-surface); font-size: 0.82rem; color: var(--otr-text-muted); border-radius: 0 0 var(--otr-radius-card) var(--otr-radius-card); }
.otr-shell .pager .gotoPage, .otr-shell .pager .pagesize { height: 2rem; border: 1px solid var(--otr-border-strong); border-radius: 8px; background: #fff; padding: 0 0.4rem; font: inherit; color: var(--otr-text); }
.otr-shell .pager .pagedisplay { min-width: 6rem; text-align: center; font-weight: 600; color: var(--otr-text); border: 0; background: none; }
.otr-shell .pager .pager-control, .otr-shell .pager .first, .otr-shell .pager .prev, .otr-shell .pager .next, .otr-shell .pager .last {
    display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid var(--otr-border); border-radius: 999px; color: var(--otr-text-muted); cursor: pointer; background: #fff; margin: 0 0.1rem; transition: background .12s, color .12s;
}
.otr-shell .pager .first:hover, .otr-shell .pager .prev:hover, .otr-shell .pager .next:hover, .otr-shell .pager .last:hover { background: var(--otr-surface-muted); color: var(--otr-heading); }
.otr-shell .pager .disabled { opacity: 0.4; cursor: default; }
.otr-shell .uf-table-info { color: var(--otr-text-muted); font-size: 0.85rem; padding: 0.5rem 1.25rem; }
.otr-shell .uf-table-search { max-width: 22rem; }
.otr-shell .uf-table-search .form-control { padding-left: 2.2rem; border-radius: 999px; }
.otr-shell .uf-table-search .form-control-icon { left: 0.8rem; top: 0.75rem; color: var(--otr-text-muted); }

/* -----------------------------------------------------------------------------
   9. Utilities
   -------------------------------------------------------------------------- */
.otr-flex { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.otr-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.otr-grow { flex: 1 1 auto; min-width: 0; }
.otr-muted { color: var(--otr-text-muted); }
.otr-strong { font-weight: 700; color: var(--otr-heading); }
.otr-small { font-size: 0.8rem; }
.otr-mb-0 { margin-bottom: 0 !important; }
.otr-mt-1 { margin-top: 1rem; }
.otr-gap-1 { gap: 1rem; }
.nopadding { padding: 0 !important; }
.nomargin { margin: 0 !important; }
.space-between { display: flex; justify-content: space-between; }
.otr-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Legacy leftovers kept for page-specific templates */
.btn-available-recruiters-wa { margin: 10px; }
.available-recruiters-list { height: 400px; overflow-y: scroll; }
.available-recruiters__title { margin-left: 10px; }

/* Print */
@media print {
    .otr-shell .main-sidebar, .otr-shell .main-header, .otr-shell .main-footer, .otr-shell #alerts-page, .no-print { display: none !important; }
    .otr-shell .content-wrapper { margin-left: 0 !important; background: #fff !important; }
    .otr-shell .otr-card, .otr-shell .box { box-shadow: none; border-color: #ccc; }
}

/* -----------------------------------------------------------------------------
   10. Forms inside modals (forms/create.html.twig)
   -------------------------------------------------------------------------- */
.otr-form-context { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.otr-form-context-name { font-weight: 700; color: var(--otr-heading); }
.otr-form-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
.otr-form-layout.has-dynamic { grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .otr-form-layout.has-dynamic { grid-template-columns: 1fr; } }
.otr-form-section { margin-bottom: 1rem; }
.otr-form-section > .row { margin-left: -0.5rem; margin-right: -0.5rem; }
.otr-form-section > .row > .form-group { padding-left: 0.5rem; padding-right: 0.5rem; margin-bottom: 0.85rem; }
.otr-form-section > .row > .form-group:last-child { margin-bottom: 0.2rem; }
.otr-field-link { margin: 0; font-size: 0.88rem; }
/* Live switch in table cells (tables/list.html.twig column_template "toggle") */
.otr-toggle { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--otr-text-muted); cursor: pointer; user-select: none; white-space: nowrap; }
.otr-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.otr-toggle-track { position: relative; flex: 0 0 auto; width: 2.1rem; height: 1.2rem; border-radius: 999px; background: var(--otr-border-strong); transition: background .15s; }
.otr-toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.2rem - 4px); height: calc(1.2rem - 4px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25); transition: transform .15s; }
.otr-toggle input:checked + .otr-toggle-track { background: var(--otr-green); }
.otr-toggle input:checked + .otr-toggle-track::after { transform: translateX(0.9rem); }
.otr-toggle input:focus-visible + .otr-toggle-track { outline: 2px solid var(--otr-orange); outline-offset: 2px; }
.otr-toggle.is-on .otr-toggle-label { color: var(--otr-green-ink); }
.otr-toggle.is-busy { opacity: 0.55; pointer-events: none; }
.otr-toggle .otr-toggle-label { text-transform: capitalize; }
.otr-cell-toggle { white-space: nowrap; }

.otr-check { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.88rem; cursor: pointer; margin: 0.35rem 0 0; }
.otr-check input { margin: 0; }
.otr-radio-group { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.otr-form-footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; padding-top: 1rem; margin-top: 0.25rem; border-top: 1px solid var(--otr-border); }
.otr-shell .modal .otr-form-footer .btn { min-width: 6.5rem; }
.otr-shell .modal-body .otr-inner-card:last-child { margin-bottom: 0; }
.otr-shell .modal .btn-group-action { justify-content: flex-end; }
.otr-shell .modal .btn-group-action .btn-block { flex: 0 0 auto; min-width: 8rem; }
.otr-shell .modal h4:not(.modal-title):not(.otr-card-title) { font-size: 1rem; margin: 0 0 0.75rem; }
.otr-check-list { display: flex; flex-direction: column; gap: 0.15rem; max-height: 14rem; overflow-y: auto; padding: 0.35rem 0.5rem; border: 1px solid var(--otr-border); border-radius: 10px; background: var(--otr-surface-muted); }
.otr-check-list .otr-check { margin: 0; padding: 0.2rem 0; }
.otr-file-preview { margin-bottom: 0.5rem; }
.otr-file-preview img { max-width: 100%; max-height: 12rem; border-radius: 10px; border: 1px solid var(--otr-border); }
.otr-shell input.otr-file-input.form-control { height: auto; padding: 0.35rem 0.5rem; }
/* Large modals: short fields flow three per row (textareas keep col-sm-12) */
@media (min-width: 992px) {
    .otr-shell .modal-lg .otr-form-section > .row > .col-sm-6 { width: 33.3333%; }
    .otr-shell .modal-lg .otr-form-section > .row > .col-sm-4 { width: 25%; }
}
.otr-shell .modal-header .modal-title { display: flex; flex-direction: column; }
/* Dashboard lists */
.otr-dash-list { padding: 0.25rem 1.25rem 0.5rem; }
.otr-dash-list .otr-row { padding: 0.7rem 0; }
.otr-dash-row-text { font-size: 0.86rem; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.otr-dash-update .otr-avatar { width: 2rem; height: 2rem; font-size: 0.75rem; }
a.otr-kpi { color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s; }
a.otr-kpi:hover { transform: translateY(-1px); box-shadow: var(--otr-shadow-pop); color: inherit; }
.otr-kpi-grid + .row > [class*="col-"] > .otr-card:first-child { margin-top: 0; }

/* -----------------------------------------------------------------------------
   11. Detail pages (info_driver / info_engagement / info_company / info / updates)
   -------------------------------------------------------------------------- */
.otr-page-sub .otr-title-pills { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-left: 0.5rem; vertical-align: middle; }
.otr-page-sub .otr-title-pills:first-child { margin-left: 0; }
.otr-kpi-value.otr-kpi-value-sm { font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.otr-note { white-space: pre-line; overflow-wrap: anywhere; font-size: 0.9rem; line-height: 1.55; color: var(--otr-text); background: var(--otr-surface-muted); border: 1px solid var(--otr-border); border-radius: 0.7rem; padding: 0.75rem 0.9rem; margin-bottom: 0.4rem; }
.otr-comment-image { display: inline-block; }
.otr-comment-image img { max-width: 100%; height: auto; max-height: 14rem; border-radius: 10px; border: 1px solid var(--otr-border); }
.otr-doc-actions { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem; }
.otr-doc-value { font-weight: 600; color: var(--otr-heading); font-size: 0.86rem; }
.otr-mt-05 { margin-top: 0.5rem; }
.otr-mb-1 { margin-bottom: 1rem; }
.otr-detail-row.is-block { flex-direction: column; align-items: stretch; gap: 0.2rem; }
.otr-detail-row.is-block dt { flex: 0 0 auto; max-width: none; } /* the label's flex basis is a width in a row, not a height in a column */
.otr-detail-row.is-block dd { text-align: left; font-weight: 500; white-space: pre-line; }
.otr-detail-row dd .otr-pill { vertical-align: middle; }
.otr-detail-row dd .otr-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.otr-detail-list:empty { display: none; }
.otr-lead-history { list-style: none; margin: 0; padding: 0; }
.otr-lead-history li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.5rem 0; border-bottom: 1px solid var(--otr-surface-muted); font-size: 0.86rem; }
.otr-lead-history li:last-child { border-bottom: 0; }
.otr-lead-history-date { flex: 0 0 6.5rem; color: var(--otr-text-muted); font-weight: 500; }
.otr-lead-history-main { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.otr-lead-history-lead { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; font-weight: 600; color: var(--otr-heading); }
.otr-lead-history-lead a { color: var(--otr-orange); }
.otr-lead-history-kind { color: var(--otr-text-muted); }
.otr-review-lead { margin-bottom: 1rem; }
.otr-convert-outcome-note { margin: 0.9rem 0 0; font-size: 0.86rem; color: var(--otr-text-muted); }
.otr-convert-outcome-note i { color: var(--otr-orange); margin-right: 0.3rem; }
.otr-detail-grid > [class*="col-"] > .otr-card { height: calc(100% - 1.1rem); }
.otr-detail-grid.is-masonry { display: flex; align-items: flex-start; }
.otr-detail-grid.is-masonry > .otr-masonry-col { flex: 1 1 0; min-width: 0; padding: 0 15px; }
.otr-detail-grid.is-masonry .otr-card { height: auto; }
/* otr-tabbar rendered as a Bootstrap 3 nav (ul > li > a[data-toggle=tab]) */
ul.otr-tabbar { padding: 0; margin: 0 0 1.1rem; list-style: none; }
.otr-tabbar > li { margin: 0; float: none; }
.otr-tabbar > li > .otr-tab:hover, .otr-tabbar > li > .otr-tab:focus { background: transparent; color: var(--otr-heading); }
.otr-tabbar > li.active > .otr-tab, .otr-tabbar > li.active > .otr-tab:hover, .otr-tabbar > li.active > .otr-tab:focus { color: var(--otr-orange); border-bottom-color: var(--otr-orange); background: transparent; }
.otr-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.4rem; border-radius: 999px; background: var(--otr-gray-soft); color: var(--otr-gray-ink); font-size: 0.68rem; font-weight: 800; }
.otr-tabbar > li.active .otr-tab-count { background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-shell .tab-content > .tab-pane { display: none; }
.otr-shell .tab-content > .active { display: block; }
.otr-card-foot { padding: 0.85rem 1.25rem; border-top: 1px solid var(--otr-border); background: var(--otr-surface-muted); }
.otr-inline-filter { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--otr-text-muted); }
.otr-shell .otr-inline-filter select.form-control { width: auto; min-width: 11rem; }
.otr-card-actions .otr-check { margin: 0; }
.otr-group-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.9rem 0 0.35rem; font-size: 0.86rem; color: var(--otr-heading); border-bottom: 1px solid var(--otr-border); }
.otr-group-head + .otr-row { border-top: 0; }
.otr-dash-list .otr-empty-strip { margin: 0.5rem 0; }
/* Driver page: documents striped like a table, engagements with filters + pages */
.otr-dash-list.otr-doc-list, .otr-dash-list.otr-eng-list { padding: 0; }
.otr-dash-list.otr-doc-list .otr-row, .otr-dash-list.otr-eng-list .otr-row { padding: 0.65rem 1.25rem; border-bottom: 1px solid var(--otr-border); }
.otr-dash-list.otr-doc-list .otr-row:nth-of-type(even) { background: var(--otr-row-alt); }
.otr-dash-list.otr-doc-list .otr-row:hover { background: var(--otr-row-hover); }
.otr-dash-list.otr-doc-list .otr-row:last-child, .otr-dash-list.otr-eng-list .otr-row:last-child { border-bottom: 0; }
.otr-dash-list.otr-doc-list .otr-empty, .otr-dash-list.otr-eng-list .otr-empty { margin: 0.5rem 1.25rem; }
.otr-eng-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin: 0; flex: 1 1 100%; }
.otr-eng-search { position: relative; flex: 1 1 11rem; max-width: 18rem; margin: 0; min-width: 0; }
.otr-eng-search i { position: absolute; top: 50%; left: 0.65rem; transform: translateY(-50%); color: var(--otr-text-muted); font-size: 0.78rem; pointer-events: none; }
.otr-shell .otr-eng-search input.form-control { padding-left: 1.9rem; height: 2rem; }
.otr-shell .otr-eng-tools select.form-control { width: auto; height: 2rem; }
.otr-eng-tools .otr-check { margin: 0; font-size: 0.82rem; }
.otr-eng-footer { border-top: 1px solid var(--otr-border); }
.otr-eng-row[hidden] { display: none; }
@media (min-width: 992px) {
    .otr-card.is-flush > .otr-card-head .otr-eng-tools { flex: 0 1 auto; justify-content: flex-end; }
}
a.otr-cell-link { font-weight: 700; color: var(--otr-heading); }
a.otr-cell-link:hover { color: var(--otr-orange-hover); }
.otr-info-list .otr-detail-row.is-block dd { display: flex; align-items: flex-start; gap: 0.5rem; }
.otr-info-list .otr-copy-trigger { flex: 0 0 auto; margin-top: 0.15rem; color: var(--otr-border-strong); cursor: pointer; transition: color .12s; }
.otr-info-list .otr-copy-trigger:hover { color: var(--otr-orange); }
.otr-info-list .js-copy-target { min-width: 0; overflow-wrap: anywhere; }
.otr-shell .otr-dash-list .otr-row .otr-warn-strip a { color: var(--otr-yellow-ink); text-decoration: underline; }
@media (max-width: 767px) {
    .otr-row { flex-wrap: wrap; }
    .otr-doc-actions { width: 100%; justify-content: flex-start; }
}
ul.otr-tabbar, .otr-tabbar { overflow-y: hidden; }
.otr-detail-row.is-block dd { font-size: 0.86rem; }
.otr-shell .otr-inline-filter select.form-control { display: inline-block; height: 2.1rem; margin: 0; }
.otr-shell label.otr-inline-filter { margin-bottom: 0; }

/* -----------------------------------------------------------------------------
   11. Modal forms: notices, check rows, call logs, request cards, invoice editor
       (forms/*.html.twig, modals/*.html.twig)
   -------------------------------------------------------------------------- */
.otr-ml-auto { margin-left: auto; }
.otr-notice { display: flex; align-items: flex-start; gap: 0.6rem; border: 1px solid var(--otr-border); border-radius: 0.7rem; background: #fff; color: var(--otr-heading); padding: 0.65rem 0.9rem; font-size: 0.85rem; margin-bottom: 0.9rem; }
.otr-notice > i { flex: 0 0 auto; margin-top: 0.15rem; }
.otr-notice p { margin: 0; }
.otr-notice p + p { margin-top: 0.3rem; }
.otr-notice a { color: inherit; font-weight: 700; text-decoration: underline; }
.otr-notice.is-danger { border-color: #f3b4b4; background: var(--otr-red-soft); color: var(--otr-red-ink); }
.otr-notice.is-warning { border-color: #f4cf8f; background: var(--otr-yellow-soft); color: var(--otr-yellow-ink); }
.otr-notice.is-info { border-color: #b9d4f5; background: var(--otr-blue-soft); color: var(--otr-blue-ink); }
.otr-notice.is-success { border-color: #b7e0c4; background: var(--otr-green-soft); color: var(--otr-green-ink); }
/* Lead form: drivers that already use the lead's email / phone (otr-lead-driver-transfer.js). */
.otr-notice > div { flex: 1 1 auto; min-width: 0; }
.otr-driver-match-list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.otr-driver-match-list li { padding: 0.35rem 0; border-top: 1px solid rgba(0, 0, 0, 0.08); overflow-wrap: anywhere; }
.otr-driver-match-list li:first-child { border-top: 0; }
.otr-driver-match-meta { display: block; font-size: 0.8rem; opacity: 0.85; }
.otr-notice .otr-driver-match-list + p, .otr-driver-match-for { margin-top: 0.5rem; }
/* Convert-lead form: existing-driver notice + "update driver from this lead" dialog */
.otr-notice > .otr-convert-body { flex: 1 1 auto; min-width: 0; }
.otr-convert-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.otr-driver-match-list .otr-pill { margin-left: 0.35rem; vertical-align: middle; }
.otr-convert-intro { margin: 0 0 0.5rem; font-size: 0.85rem; }
.otr-convert-table { width: 100%; border-collapse: collapse; margin: 0.4rem 0 0.8rem; font-size: 0.83rem; }
.otr-convert-table th, .otr-convert-table td { padding: 0.45rem 0.5rem; border-top: 1px solid var(--otr-border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.otr-convert-table th { border-top: 0; padding-top: 0; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--otr-text-muted); }
.otr-convert-table td.is-check { width: 2.2rem; padding-right: 0; }
.otr-convert-table td.is-check input { margin: 0.15rem 0 0; }
.otr-convert-table td.is-label { width: 9rem; font-weight: 700; color: var(--otr-heading); }
.otr-convert-table .otr-convert-old { color: var(--otr-text-muted); }
.otr-convert-table .otr-convert-new { font-weight: 600; color: var(--otr-heading); }
.otr-convert-table tr.is-off .otr-convert-new { font-weight: 400; color: var(--otr-text-muted); text-decoration: line-through; }
.otr-convert-table tr.is-off .otr-convert-old { color: var(--otr-heading); }
.otr-convert-tag { display: inline-block; margin-left: 0.35rem; padding: 0 0.4rem; border-radius: 999px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.otr-convert-tag.is-fill { background: var(--otr-green-soft); color: var(--otr-green-ink); }
.otr-convert-tag.is-replace { background: var(--otr-yellow-soft); color: var(--otr-yellow-ink); }
.otr-convert-same { margin: 0 0 0.6rem; font-size: 0.8rem; color: var(--otr-text-muted); }
.otr-convert-outcome { margin: 0.6rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--otr-border); }
.otr-convert-outcome > span { display: block; margin-bottom: 0.3rem; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--otr-text-muted); }
.otr-convert-outcome label { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0 0 0.25rem; font-size: 0.83rem; font-weight: 500; }
.otr-convert-outcome label input { margin: 0.2rem 0 0; }
.otr-convert-cdl { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--otr-text-muted); }
@media (max-width: 600px) {
    .otr-convert-table td.is-label { width: auto; }
}
/* Driver page CDL card: differences between the file and the CDL document. */
.otr-cdl-card > .otr-notice, .otr-cdl-card > .otr-warn-strip { margin: 0 1.25rem 1rem; }
.otr-cdl-conflict-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.otr-cdl-conflict-list li { display: grid; grid-template-columns: minmax(7rem, 9rem) 1fr auto; align-items: center; gap: 0.35rem 0.85rem; padding: 0.45rem 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.otr-cdl-conflict-list li:first-child { border-top: 0; }
.otr-cdl-conflict-label { font-weight: 700; }
.otr-cdl-conflict-values { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; overflow-wrap: anywhere; }
.otr-cdl-conflict-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.otr-cdl-conflict-bulk { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; padding-top: 0.55rem; border-top: 1px solid rgba(0, 0, 0, 0.15); }
.otr-card-title .otr-pill { margin-left: 0.4rem; vertical-align: middle; }
@media (max-width: 767px) {
    .otr-cdl-conflict-list li { grid-template-columns: 1fr; }
    .otr-cdl-conflict-actions, .otr-cdl-conflict-bulk { justify-content: flex-start; }
}
.otr-static-text { margin: 0; font-size: 0.88rem; color: var(--otr-heading); white-space: pre-line; overflow-wrap: anywhere; }
.otr-static-text.is-muted { color: var(--otr-text-muted); }
.otr-check-list.is-inline { flex-direction: row; flex-wrap: wrap; gap: 0.35rem 1.1rem; max-height: none; }
.otr-check-list.is-tall { max-height: 26rem; }
.otr-check-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.2rem 0; }
.otr-check-row .otr-check { margin: 0; }
.otr-check-row .otr-check-muted { color: var(--otr-text-muted); font-weight: 500; }
.otr-check-row input[type="number"].form-control { width: 6rem; height: 2rem; padding: 0.2rem 0.5rem; }
.otr-detail-row dd a { color: var(--otr-orange); }
.otr-inner-card .otr-detail-list + .otr-section-title, .otr-inner-card .otr-static-text + .otr-section-title, .otr-inner-card .otr-empty-strip + .otr-section-title { margin-top: 1rem; }
.otr-lead-data { font-size: 0.85rem; color: var(--otr-heading); max-height: 16rem; overflow-y: auto; }
.otr-lead-data p { margin: 0 0 0.3rem; }
.otr-call-log { display: flex; flex-direction: column; gap: 0.55rem; max-height: 22rem; overflow-y: auto; padding-right: 0.2rem; }
.otr-call { border: 1px solid var(--otr-border); border-radius: 10px; background: var(--otr-surface-muted); padding: 0.6rem 0.8rem; font-size: 0.85rem; }
.otr-call-head { display: flex; align-items: center; gap: 0.5rem; }
.otr-call-index { font-weight: 800; color: var(--otr-heading); }
.otr-call-date { margin-left: auto; font-size: 0.78rem; color: var(--otr-text-muted); }
.otr-call-comment { margin: 0.4rem 0 0; color: var(--otr-heading); white-space: pre-line; overflow-wrap: anywhere; }
.otr-call-by { margin: 0.3rem 0 0; font-size: 0.78rem; color: var(--otr-text-muted); font-style: italic; }
.otr-call-new { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--otr-border); }
.otr-call-new .otr-warn-strip { margin-bottom: 0.75rem; }
.otr-request-panel { margin-bottom: 1rem; }
.otr-request-steps-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.75rem; }
.otr-request-card { border: 1px solid var(--otr-border); border-radius: 12px; background: #fff; padding: 0.85rem 1rem; margin-bottom: 0.75rem; }
.otr-request-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.otr-request-title { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 800; color: var(--otr-heading); }
.otr-request-title i { color: var(--otr-orange); }
.otr-request-date { font-size: 0.78rem; color: var(--otr-text-muted); }
.otr-request-meta { margin: 0.4rem 0 0; font-size: 0.83rem; color: var(--otr-text-muted); }
.otr-request-meta strong { color: var(--otr-heading); }
.otr-request-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--otr-surface-muted); }
.otr-request-actions form { display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0; }
.otr-request-actions form .js-form-alerts { flex-basis: 100%; }
.otr-request-actions form .js-form-alerts:empty { display: none; }
.otr-request-actions .otr-check { margin: 0; }
.otr-inline-edit { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; min-width: 0; }
.otr-inline-edit.is-block { display: block; }
.otr-inline-edit input.form-control { display: inline-block; width: auto; min-width: 12rem; height: 2rem; padding: 0.2rem 0.5rem; }
.otr-inline-edit textarea.form-control { width: 100%; }
.otr-inline-edit pre { margin: 0; background: transparent; border: 0; padding: 0; font-family: inherit; font-size: 0.88rem; color: var(--otr-heading); white-space: pre-wrap; cursor: pointer; }
.otr-inline-edit .otr-static-text { cursor: pointer; }
.otr-shell .modal .edit-label { color: var(--otr-orange); cursor: pointer; margin-left: 0.35rem; font-size: 0.85rem; }
.otr-shell .modal .table.modal-table { margin-bottom: 0.5rem; font-size: 0.85rem; }
.otr-shell .modal .table.modal-table .form-control { height: 2rem; padding: 0.2rem 0.5rem; font-size: 0.83rem; }
.otr-shell .modal .table.modal-table tr.deleted td { background: var(--otr-gray-soft); color: var(--otr-text-muted); text-decoration: line-through; }
.otr-shell .modal .table.modal-table tr.deleted td .btn, .otr-shell .modal .table.modal-table tr.deleted td .form-control { text-decoration: none; }
.otr-shell .modal input.otr-inline-input.form-control { display: inline-block; width: 4rem; height: 2rem; padding: 0.2rem 0.5rem; text-align: center; margin: 0 0.35rem; }
.otr-send-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
/* Invoice editor: every section is a card with its own header band */
.otr-invoice-form .otr-inner-card { position: relative; margin-bottom: 1.1rem; padding: 1rem 1.1rem 1.1rem; border-color: var(--otr-border-strong); border-top: 0; border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); overflow: hidden; }
.otr-invoice-form .otr-inner-card > .otr-section-title { margin: -1rem -1.1rem 1rem; padding: 0.7rem 1.1rem 0.7rem 1.4rem; background: linear-gradient(180deg, #f6f7fa 0%, #eef0f4 100%); border-top: 3px solid var(--otr-orange); border-bottom: 1px solid var(--otr-border); color: var(--otr-heading); letter-spacing: 0.08em; }
.otr-invoice-form .otr-inner-card > .otr-section-title::after { display: none; }
.otr-invoice-form .otr-inner-card > .otr-section-title i { color: var(--otr-orange); width: 1.1rem; text-align: center; }
.otr-invoice-form .otr-inner-card > .otr-section-title:not(:first-child) { margin-top: 1.1rem; border-top: 1px solid var(--otr-border); }
.otr-invoice-form .otr-inner-card.otr-danger-zone { border-color: #f3b4b4; background: #fffafa; }
.otr-invoice-form .otr-inner-card.otr-danger-zone > .otr-section-title { background: linear-gradient(180deg, #fff1f1 0%, #fde5e5 100%); border-top-color: var(--otr-red); border-bottom-color: #f3b4b4; color: var(--otr-red-ink); }
.otr-invoice-form .otr-inner-card.otr-danger-zone > .otr-section-title i { color: var(--otr-red); }
.otr-invoice-form .otr-inner-card > .table-responsive { margin: 0 -0.35rem; }
/* Sub-sections inside one invoice card: small heading with a rule running to the right */
.otr-invoice-form .otr-section-subtitle { display: flex; align-items: center; gap: 0.5rem; margin: 1.35rem 0 0.75rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--otr-text-muted); }
.otr-invoice-form .otr-section-subtitle::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--otr-border); margin-left: 0.4rem; }
.otr-invoice-form .otr-section-subtitle i { color: var(--otr-orange); width: 1.1rem; text-align: center; font-size: 0.78rem; }
.otr-invoice-form .otr-section-subtitle i.edit-label { width: auto; color: var(--otr-text-muted); }
.otr-invoice-form .otr-section-title + .otr-section-subtitle { margin-top: 0; }
.otr-invoice-form .otr-inner-card .table-responsive + .otr-section-subtitle, .otr-invoice-form .otr-inner-card .btn + .otr-section-subtitle { margin-top: 1.5rem; }
.otr-danger-zone { border-color: #f3b4b4; }
.otr-danger-zone .otr-section-title i { color: var(--otr-red); }
.otr-danger-row { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 0; font-size: 0.85rem; color: var(--otr-text-muted); }
.otr-danger-row + .otr-danger-row { border-top: 1px solid var(--otr-surface-muted); }
.otr-danger-row .btn { flex: 0 0 auto; min-width: 6rem; }
.otr-confirm-text { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--otr-heading); }
.otr-confirm-note { margin: 0.35rem 0 0; font-size: 0.83rem; color: var(--otr-text-muted); }
.otr-shell .modal .otr-history-table { margin-bottom: 0; }

/* -----------------------------------------------------------------------------
   12. My account
   -------------------------------------------------------------------------- */
.otr-account-identity-head { display: flex; align-items: center; gap: 0.9rem; padding-bottom: 1rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--otr-border); }
.otr-account-avatar { width: 3.4rem; height: 3.4rem; font-size: 1.15rem; }
.otr-shell .otr-account-name { margin: 0; font-size: 1.15rem; font-weight: 800; color: var(--otr-heading); overflow-wrap: anywhere; }
.otr-account-identity .otr-card-sub { overflow-wrap: anywhere; }
.otr-account-identity .otr-detail-row dd .otr-pill { margin: 0 0 0.2rem 0.2rem; }
.otr-account-readonly { margin-bottom: 1.1rem; }
.otr-account-form > .row > .form-group:last-child { margin-bottom: 0.9rem; }
.otr-account-form .otr-form-footer { margin-top: 0.15rem; }
.otr-account-form .otr-account-show { margin: 0 auto 0 0; }

/* -----------------------------------------------------------------------------
   13. Alert + validation state overrides
   AdminLTE paints alerts with solid !important colours and turns valid
   labels green; keep the OTR toast / inline-notice look instead.
   -------------------------------------------------------------------------- */
.otr-shell .alert.alert-success, .otr-shell .alert.alert-danger, .otr-shell .alert.alert-error,
.otr-shell .alert.alert-warning, .otr-shell .alert.alert-info,
.otr-auth .alert.alert-success, .otr-auth .alert.alert-danger, .otr-auth .alert.alert-error,
.otr-auth .alert.alert-warning, .otr-auth .alert.alert-info {
    background-color: #fff !important; color: var(--otr-text) !important;
}
.otr-shell .js-form-alerts .alert.alert-danger, .otr-shell .alerts-modal .alert.alert-danger { background-color: var(--otr-red-soft) !important; border-color: #f3c0c0; color: var(--otr-red-ink) !important; }
.otr-shell .js-form-alerts .alert.alert-success, .otr-shell .alerts-modal .alert.alert-success { background-color: var(--otr-green-soft) !important; border-color: #bfe6cf; color: var(--otr-green-ink) !important; }
.otr-shell .js-form-alerts .alert.alert-warning, .otr-shell .alerts-modal .alert.alert-warning { background-color: var(--otr-yellow-soft) !important; border-color: #f4cf8f; color: var(--otr-yellow-ink) !important; }
.otr-shell .js-form-alerts .alert.alert-info, .otr-shell .alerts-modal .alert.alert-info { background-color: var(--otr-blue-soft) !important; border-color: #c6d8f6; color: var(--otr-blue-ink) !important; }
.otr-shell .alert .close { color: currentColor; }
.otr-shell .has-success label, .otr-shell .has-success .control-label, .otr-shell .has-success .help-block { color: inherit; }
.otr-shell .has-success label { color: var(--otr-heading); }
.otr-shell .has-success .help-block { color: var(--otr-text-muted); }
.otr-shell .has-success .form-control, .otr-shell .has-success .form-control:focus { border-color: var(--otr-border-strong); box-shadow: none; }
.otr-shell .has-success .form-control:focus { border-color: var(--otr-orange); box-shadow: var(--otr-shadow-focus); }
.otr-shell .has-success .form-control-feedback { color: var(--otr-green); }
.otr-shell .has-error .form-control-feedback { color: var(--otr-red); }
.otr-shell .alert > .icon, .otr-auth .alert > .icon { float: none !important; margin: 0.12rem 0 0 !important; width: auto; flex: 0 0 auto; }

/* Lead recycling modal footer: explanation left, actions right */
.otr-recycle-footer { flex-wrap: wrap; }
.otr-recycle-note { flex: 1 1 100%; margin: 0 0 0.35rem; font-size: 0.8rem; color: var(--otr-text-muted); line-height: 1.4; }
.otr-recycle-note i { color: var(--otr-blue); margin-right: 0.2rem; }

/* No collapse/expand motion while the page loads (AdminLTE removes .hold-transition after load),
   so a remembered collapsed menu does not animate on every page view. */
.otr-shell.hold-transition .main-header .navbar, .otr-shell.hold-transition .main-header .logo,
.otr-shell.hold-transition .main-sidebar, .otr-shell.hold-transition .left-side,
.otr-shell.hold-transition .content-wrapper, .otr-shell.hold-transition .main-footer, .otr-shell.hold-transition .right-side,
.otr-shell.hold-transition .otr-sidebar-chevron, .otr-shell.hold-transition .otr-sidebar-chevron i, .otr-shell.hold-transition .otr-logo-link {
    transition: none !important;
}

/* -----------------------------------------------------------------------------
   14. Phones (< 768px)
   One dark header row (menu button, logo, bell, avatar), the sidebar as an
   off-canvas drawer with a backdrop, compact page chrome, two-up KPI tiles,
   16px form text (no iOS focus zoom) and bottom-sheet modals.
   Card-style tables live in otr-table.css.
   -------------------------------------------------------------------------- */
.otr-nav-backdrop { display: none; }

@media (max-width: 767px) {
    :root { --otr-mobile-header-h: 56px; }

    /* Header */
    .otr-shell .main-header {
        position: fixed; top: 0; left: 0; right: 0; z-index: 1040;
        display: flex; align-items: center; height: var(--otr-mobile-header-h);
        background: var(--otr-sidebar-bg); box-shadow: 0 1px 0 var(--otr-sidebar-line), 0 4px 14px rgba(7, 12, 24, 0.18);
    }
    .otr-shell .wrapper { padding-top: var(--otr-mobile-header-h); }
    .otr-shell .main-header .logo.otr-logo-bar {
        float: none; flex: 0 0 auto; width: auto !important; height: 100%; padding: 0 0.25rem 0 0.4rem; gap: 0.2rem;
        border: 0; background: transparent !important; overflow: visible;
    }
    .otr-shell .main-header .logo.otr-logo-bar:hover { background: transparent !important; }
    .otr-shell .otr-logo-img { height: 30px; }
    .otr-shell .otr-sidebar-chevron {
        position: static; order: -1; margin: 0; width: 2.75rem; height: 2.75rem; border-radius: 10px;
        color: #fff; font-size: 1.15rem; transition: background .15s;
    }
    .otr-shell .otr-sidebar-chevron .otr-chevron-icon { display: none; }
    .otr-shell .otr-sidebar-chevron .otr-burger-icon { display: inline-block; }
    .otr-shell.sidebar-open .otr-sidebar-chevron .otr-burger-icon { display: none; }
    .otr-shell.sidebar-open .otr-sidebar-chevron .otr-close-icon { display: inline-block; }
    .otr-shell .main-header .navbar {
        float: none; flex: 1 1 auto; width: auto; min-width: 0; height: 100%; min-height: 0; margin: 0 !important;
        padding: 0 0.45rem 0 0; background: transparent !important; border: 0;
    }
    .otr-shell .navbar-custom-menu { float: none; margin-left: auto; }
    .otr-shell .navbar-custom-menu > .navbar-nav { gap: 0.15rem; }
    .otr-shell .navbar-custom-menu > .navbar-nav > li { position: static; }
    .otr-shell .navbar-nav > li > a.otr-navbtn { color: rgba(240, 242, 247, 0.85) !important; }
    .otr-shell .navbar-nav > li > a.otr-navbtn:hover, .otr-shell .navbar-nav > .open > a.otr-navbtn { background: rgba(255, 255, 255, 0.08) !important; color: #fff !important; }
    .otr-shell .otr-navbtn .otr-navbtn-count { box-shadow: 0 0 0 2px var(--otr-sidebar-bg); }
    .otr-shell .navbar-nav > li > a.otr-userchip { padding: 0.2rem !important; }
    .otr-shell .navbar-nav > li > a.otr-userchip:hover, .otr-shell .navbar-nav > .open > a.otr-userchip { background: rgba(255, 255, 255, 0.08) !important; }
    .otr-shell .otr-userchip-name, .otr-shell .otr-userchip .fa-chevron-down { display: none; }
    .otr-shell .otr-userchip .otr-avatar { width: 2.2rem; height: 2.2rem; }
    .otr-shell .otr-global-search { display: none !important; }

    /* Header dropdowns (notifications, user menu) open as full-width sheets */
    .otr-shell .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
        position: fixed !important; top: calc(var(--otr-mobile-header-h) + 0.4rem); left: 0.5rem !important; right: 0.5rem !important;
        width: auto !important; max-height: calc(100vh - var(--otr-mobile-header-h) - 1rem); overflow-y: auto; margin: 0; float: none;
        background: #fff !important; border: 1px solid var(--otr-border) !important; box-shadow: var(--otr-shadow-pop) !important;
    }
    .otr-shell .otr-notif-list { max-height: none; }

    /* Off-canvas drawer */
    .otr-shell .main-sidebar, .otr-shell .left-side {
        position: fixed; top: var(--otr-mobile-header-h); bottom: 0; left: 0; z-index: 1035;
        width: min(86vw, 20rem) !important; min-height: 0; padding-top: 0;
        overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
        transform: translateX(-100%); visibility: hidden; box-shadow: none;
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
    }
    .otr-shell.sidebar-open .main-sidebar, .otr-shell.sidebar-open .left-side {
        transform: none; visibility: visible; box-shadow: 14px 0 36px rgba(7, 12, 24, 0.35);
        transition: transform 0.25s ease, visibility 0s;
    }
    .otr-shell.sidebar-open .content-wrapper, .otr-shell.sidebar-open .main-footer, .otr-shell.sidebar-open .right-side { transform: none; }
    .otr-shell .content-wrapper, .otr-shell .main-footer, .otr-shell .right-side { margin-left: 0 !important; }
    .otr-nav-backdrop {
        display: block; position: fixed; top: var(--otr-mobile-header-h); left: 0; right: 0; bottom: 0; z-index: 1034;
        background: rgba(7, 12, 24, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    }
    .otr-shell.sidebar-open .otr-nav-backdrop { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
    body.otr-shell.sidebar-open { overflow: hidden; }
    .otr-shell .sidebar { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
    .otr-shell .sidebar-menu.otr-nav { padding: 0.75rem 0.6rem 0; gap: 0.3rem; }
    .otr-shell .otr-nav-section-toggle { height: 2.5rem; font-size: 0.7rem; }
    .otr-shell .otr-nav-item > a { height: 2.75rem; font-size: 0.95rem; }
    .otr-shell .otr-nav-item > a > i { font-size: 1rem; }

    /* Page chrome */
    .otr-shell .content-wrapper { min-height: calc(100vh - var(--otr-mobile-header-h)); }
    .otr-shell .content-header { padding: 0.85rem 0.85rem 0.1rem; }
    .otr-shell .content { padding: 0.6rem 0.75rem 1.5rem; }
    .otr-page-head { gap: 0.6rem; min-height: 0; }
    .otr-breadcrumb { font-size: 0.9rem; }
    .otr-breadcrumb .otr-breadcrumb-root, .otr-breadcrumb .otr-breadcrumb-root + .otr-breadcrumb-sep { display: none; }
    /* Page actions: one swipeable row instead of a pile of wrapped buttons */
    .otr-page-actions {
        width: 100%; margin: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .otr-page-actions::-webkit-scrollbar { display: none; }
    .otr-page-actions > * { flex: 0 0 auto; }
    .otr-page-actions .btn { white-space: nowrap; }
    .otr-page-actions.is-overflowing:not(.is-at-end) {
        -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent);
    }
    .otr-page-context { font-size: 0.85rem; margin-bottom: 0.75rem; }
    .otr-shell .main-footer { padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom)); text-align: center; }

    /* Cards and boxes */
    .otr-card { padding: 0.9rem 0.95rem; border-radius: 12px; margin-bottom: 0.85rem; }
    .otr-card.is-flush > .otr-card-head { padding: 0.8rem 0.95rem; }
    .otr-card-foot { padding: 0.75rem 0.95rem; }
    .otr-shell .box { border-radius: 12px; margin-bottom: 0.85rem; }
    .otr-shell .box-header { padding: 0.8rem 0.95rem; }
    .otr-shell .box-body { padding: 0.9rem 0.95rem; }
    .otr-shell .box-footer { padding: 0.75rem 0.95rem; border-radius: 0 0 12px 12px; }
    .otr-banner { padding: 0.85rem 0.95rem; }
    .otr-dash-list { padding: 0.15rem 0.95rem 0.4rem; }

    /* KPI tiles two-up */
    .otr-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-bottom: 0.85rem; }
    .otr-kpi { flex-direction: column; align-items: flex-start; gap: 0.55rem; padding: 0.8rem 0.85rem; }
    .otr-kpi-grid > .otr-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; align-items: center; }
    .otr-kpi-icon { width: 2.1rem; height: 2.1rem; font-size: 0.9rem; border-radius: 0.7rem; }
    .otr-kpi-label { font-size: 0.62rem; letter-spacing: 0.06em; }
    .otr-kpi-value { font-size: 1.35rem; }
    .otr-kpi-sub { font-size: 0.72rem; }

    /* Detail rows, tabs, filters */
    .otr-detail-row { flex-wrap: wrap; gap: 0.15rem 1rem; }
    .otr-detail-row dt { flex-basis: 100%; max-width: none; }
    .otr-detail-row dd { margin-left: 0; }
    .otr-tabbar, ul.otr-tabbar { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .otr-tabbar::-webkit-scrollbar { display: none; }
    .otr-tabbar .otr-tab { padding: 0.65rem 0.8rem; }
    .otr-filters-grid { flex-direction: column; gap: 1rem; }
    .otr-filters-group { min-width: 0; width: 100%; }
    .otr-filters-group.is-sep { padding: 1rem 0 0; border-left: 0; border-top: 1px solid var(--otr-border); }
    .otr-filters-actions .btn { flex: 1 1 0; }
    .otr-shell .otr-inline-filter { flex-wrap: wrap; }
    .otr-shell .otr-inline-filter select.form-control { min-width: 0; width: 100%; }
    .otr-inline-edit input.form-control { min-width: 0; width: 100%; }

    /* Forms: 16px text stops iOS from zooming into focused fields */
    .otr-shell .form-control, .otr-auth .form-control,
    .otr-shell .input-sm, .otr-shell .form-control.input-sm,
    .otr-shell select, .otr-shell textarea,
    .otr-shell .select2-container--default .select2-selection--single,
    .otr-shell .select2-container .select2-search__field,
    .otr-shell .select2-results__option { font-size: 16px; }
    .otr-shell .form-control { height: 2.75rem; }
    .otr-shell .input-sm, .otr-shell .form-control.input-sm { height: 2.5rem; }
    .otr-shell textarea.form-control { height: auto; }
    .otr-shell .select2-container--default .select2-selection--single { height: 2.75rem; }
    .otr-shell .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 2.65rem; }
    .otr-shell .select2-container--default .select2-selection--single .select2-selection__arrow { height: 2.65rem; }
    .otr-shell .select2-container { max-width: 100%; }
    .otr-shell .btn { min-height: 2.5rem; }
    .otr-shell .btn-xs { min-height: 0; }
    .otr-shell .btn-sm { min-height: 2.25rem; }
    .otr-form-footer { flex-wrap: wrap; }
    .otr-form-footer .btn { flex: 1 1 auto; }
    .otr-shell .modal .otr-form-footer .btn { min-width: 0; }
    .otr-check-row, .otr-danger-row { flex-wrap: wrap; }
    .otr-shell .modal .btn-group-action { flex-wrap: wrap; }
    .otr-shell .modal .btn-group-action .btn-block { flex: 1 1 auto; min-width: 0; }

    /* Modals as bottom sheets */
    .otr-shell .modal-dialog, .otr-shell .modal-lg, .otr-shell .modal-sm,
    .otr-shell .otr-filter-modal .modal-dialog, .otr-shell .otr-filter-modal.is-combined .modal-dialog {
        position: absolute; left: 0; right: 0; bottom: 0; width: 100% !important; max-width: none; margin: 0;
    }
    .otr-shell .modal.fade .modal-dialog { transform: translate(0, 100%); transition: transform 0.25s ease-out; }
    .otr-shell .modal.in .modal-dialog { transform: none; }
    .otr-shell .modal-content {
        display: flex; flex-direction: column; max-height: calc(100vh - 1.25rem); max-height: calc(100dvh - 1.25rem);
        border-radius: 18px 18px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    }
    .otr-shell .modal-content > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
    .otr-shell .modal-header { position: relative; flex: 0 0 auto; padding: 1.15rem 1rem 0.8rem; }
    .otr-shell .modal-header::before {
        content: ""; position: absolute; top: 0.45rem; left: 50%; width: 2.5rem; height: 4px; margin-left: -1.25rem;
        border-radius: 999px; background: var(--otr-border-strong);
    }
    .otr-shell .modal-title { font-size: 1.1rem; }
    .otr-shell .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 1rem 0.9rem; }
    .otr-shell .modal-footer { flex: 0 0 auto; flex-wrap: wrap; padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom)); }
    .otr-shell .modal-footer .btn { flex: 1 1 auto; }
    .otr-shell .modal-body .row { margin-left: -0.5rem; margin-right: -0.5rem; }
    .otr-shell .modal-body .row > [class*="col-"] { padding-left: 0.5rem; padding-right: 0.5rem; }
    .otr-inner-card { padding: 0.85rem; }
    .otr-shell .modal .table.modal-table { display: block; overflow-x: auto; }

    /* Toasts */
    .otr-shell #alerts-page { top: calc(var(--otr-mobile-header-h) + 0.5rem); left: 0.6rem; right: 0.6rem; width: auto; }

    /* Media and wide content never push the page sideways */
    .otr-shell .content img, .otr-shell .modal img { max-width: 100%; height: auto; }
    .otr-shell .content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* Filters cards: collapsible on phones (otr-shell.js adds the caret + count) */
.otr-filters-caret, .otr-filters-count { display: none; }
@media (max-width: 767px) {
    .otr-filters-title.js-otr-filters-toggle { cursor: pointer; user-select: none; }
    .otr-filters-count:not(:empty) { display: inline-flex; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--otr-orange-soft); color: var(--otr-orange-ink); font-size: 0.7rem; font-weight: 700; }
    .otr-filters-caret { display: inline-block; margin-left: auto; font-size: 0.8rem; color: var(--otr-text-muted); transition: transform 0.2s ease; }
    .otr-filters.is-collapsed .otr-filters-caret { transform: rotate(-90deg); }
    .otr-filters.is-collapsed { padding-bottom: 0.9rem; }
    .otr-filters.is-collapsed .otr-filters-title { margin-bottom: 0; }
    .otr-filters.is-collapsed > :not(.otr-filters-title) { display: none !important; }
}

/* Touch screens keep :hover after a tap: don't leave menu rows, the menu button
   or outline buttons highlighted once the finger lifts. */
@media (hover: none) {
    .otr-nav-section-toggle:hover { background: transparent; color: var(--otr-sidebar-muted); }
    .otr-shell .otr-nav-item:not(.active) > a:hover { background: transparent; color: var(--otr-sidebar-text); }
    .otr-shell .otr-nav-item:not(.active) > a:hover > i { color: var(--otr-sidebar-muted); }
    .otr-sidebar-chevron:hover { background: transparent; }
    .otr-shell .btn-default:hover, .otr-shell .btn-outline:hover { background: #fff; border-color: var(--otr-border-strong); }
    .otr-shell .otr-navbtn:hover { background: transparent !important; }
}

/* ===========================================================================
   Dialogs (js/widgets/otr-dialog.js): modal confirm / alert / prompt
   =========================================================================== */
.otr-dialog .modal-dialog { width: min(30rem, 94vw); }
.otr-dialog .modal-dialog.modal-sm { width: min(24rem, 94vw); }
.otr-dialog .modal-dialog.modal-lg { width: min(52rem, 96vw); }
.otr-dialog .modal-body { background: #fff; }
.otr-dialog-main { display: flex; gap: 0.9rem; align-items: flex-start; }
.otr-dialog-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-dialog-icon.is-danger { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.otr-dialog-content { flex: 1 1 auto; min-width: 0; }
.otr-dialog-content > * + * { margin-top: 0.85rem; }
.otr-dialog-message { margin: 0; padding-top: 0.45rem; color: var(--otr-text); line-height: 1.55; overflow-wrap: anywhere; }
.otr-dialog-label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--otr-heading); margin-bottom: 0.35rem; }
.otr-dialog-check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; padding: 0.7rem 0.85rem; border: 1px solid var(--otr-border); border-radius: var(--otr-radius-ctl); font-weight: 600; color: var(--otr-heading); cursor: pointer; }
.otr-dialog-check input { margin: 0.15rem 0 0; width: 1rem; height: 1rem; accent-color: var(--otr-orange); flex: 0 0 auto; }
.otr-dialog-check small { display: block; font-weight: 500; color: var(--otr-text-muted); margin-top: 0.15rem; }
.otr-dialog-summary { margin: 0; padding: 0.65rem 0.85rem; border-radius: var(--otr-radius-ctl); background: var(--otr-surface-muted); font-size: 0.88rem; color: var(--otr-text); }
.otr-dialog-error { margin: 0.9rem 0 0; padding: 0.6rem 0.85rem; border-radius: var(--otr-radius-ctl); background: var(--otr-red-soft); color: var(--otr-red-ink); font-weight: 600; font-size: 0.88rem; }
.otr-dialog-error[hidden] { display: none; }
.otr-shell .otr-dialog .modal-footer .btn-danger { background: var(--otr-red); border-color: var(--otr-red); color: #fff; }
.otr-shell .otr-dialog .modal-footer .btn-danger:hover { background: var(--otr-red-ink); border-color: var(--otr-red-ink); }
@media (max-width: 767px) {
    .otr-dialog .modal-footer { display: flex; flex-direction: column-reverse; gap: 0.5rem; }
    .otr-dialog .modal-footer .btn { width: 100%; margin: 0 !important; }
}

/* ===========================================================================
   Condensed filter bar (summary chips + "Filters" dialog), e.g. BC requests
   =========================================================================== */
.otr-filterbar { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem 0.6rem 1rem; margin-bottom: 1rem; }
.otr-filterbar-icon { color: var(--otr-text-muted); flex: 0 0 auto; }
.otr-filterbar.is-inline { margin: 0; border: 0; border-top: 1px solid var(--otr-border); border-bottom: 1px solid var(--otr-border); border-radius: 0; box-shadow: none; background: var(--otr-surface-muted); }
.otr-filterbar-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1 1 auto; min-width: 0; }
.otr-filterbar-chip { display: inline-flex; align-items: center; gap: 0.45rem; max-width: 22rem; padding: 0.35rem 0.75rem; border: 1px solid var(--otr-border); border-radius: 999px; background: var(--otr-surface-muted); color: var(--otr-text); font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: border-color .15s, background .15s; }
.otr-filterbar-chip i { color: var(--otr-text-muted); font-size: 0.8rem; }
.otr-filterbar-chip:hover { border-color: var(--otr-border-strong); background: #fff; }
.otr-filterbar-chip.is-active { border-color: #f6c79c; background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.otr-filterbar-chip.is-active i { color: var(--otr-orange); }
.otr-filterbar-actions { display: flex; align-items: center; gap: 0.35rem; flex: 0 0 auto; }
.otr-filter-dialog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.otr-filter-dialog-group header { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.otr-filter-dialog-group h5 { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--otr-heading); }
.otr-filter-dialog-count { font-size: 0.78rem; font-weight: 700; color: var(--otr-orange-ink); }
.otr-filter-dialog-list { display: flex; flex-direction: column; gap: 0.05rem; max-height: 18rem; overflow-y: auto; border: 1px solid var(--otr-border); border-radius: 10px; padding: 0.3rem; }
.otr-filter-option[hidden] { display: none !important; }
.otr-filter-dialog-grid.is-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.otr-filter-dialog-field + .otr-filter-dialog-field { margin-top: 0.85rem; }
.otr-filter-dialog-grid.is-fields .otr-filter-dialog-field + .otr-filter-dialog-field { margin-top: 0; }
.otr-filter-date-inputs { display: flex; flex-direction: column; gap: 0.5rem; }
.otr-filter-date-inputs label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 600; font-size: 0.82rem; color: var(--otr-text-muted); }
.otr-filter-date-inputs label .form-control { flex: 1; min-width: 0; }
.otr-filter-presets { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.65rem; }
/* Wide date range: its own row of the dialog grid, inputs and presets on one line. */
.otr-filter-dialog-dates.is-wide { grid-column: 1 / -1; }
.otr-filter-dialog-dates.is-wide .otr-filter-date-inputs { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1rem; }
.otr-filter-dialog-dates.is-wide .otr-filter-date-inputs label { flex: 0 1 15rem; }
/* Required date range (announcements): a dark, set-apart panel. */
.otr-filter-dialog-dates.is-required { margin-bottom: 0.5rem; padding: 1rem 1.1rem 1.05rem; border-radius: 12px; color: #fff; background: radial-gradient(40rem 12rem at 100% 0%, rgba(244, 122, 31, 0.22), rgba(244, 122, 31, 0) 70%), var(--otr-sidebar-bg); }
.otr-filter-dialog-dates.is-required h5 { color: #fff; }
.otr-filter-dialog-dates.is-required .otr-filter-dialog-count { padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--otr-orange); color: #fff; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }
.otr-filter-dialog-dates.is-required .otr-filter-date-inputs label { color: rgba(255, 255, 255, 0.85); }
.otr-filter-dialog-dates.is-required .form-control { border-color: transparent; }
.otr-shell .otr-filter-dialog-dates.is-required .otr-filter-presets .btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.otr-shell .otr-filter-dialog-dates.is-required .otr-filter-presets .btn:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.35); }
.otr-shell .otr-filter-dialog-dates.is-required .otr-filter-presets .btn.is-active { background: var(--otr-orange); border-color: var(--otr-orange); color: #fff; }
.otr-shell .otr-filter-presets .btn.is-active { border-color: var(--otr-orange); color: var(--otr-orange-ink); background: var(--otr-orange-soft); }
/* "View" next to a row's Actions menu */
.otr-shell .otr-view-btn { white-space: nowrap; }
.otr-cell-actions .otr-view-btn + .btn-group, .otr-td-actions .otr-view-btn + .btn-group { margin-left: 0.35rem; }
@media (max-width: 767px) {
    .otr-filterbar { flex-wrap: wrap; padding: 0.65rem 0.75rem; }
    .otr-filterbar-icon { display: none; }
    .otr-filterbar-chips { flex: 1 1 100%; }
    .otr-filterbar-chip { max-width: 100%; }
    .otr-filterbar-actions { flex: 1 1 100%; justify-content: flex-end; }
    .otr-filter-dialog-grid, .otr-filter-dialog-grid.is-fields { grid-template-columns: 1fr; }
    .otr-filter-dialog-dates.is-wide .otr-filter-date-inputs { flex-direction: column; }
    .otr-filter-dialog-dates.is-wide .otr-filter-date-inputs label { flex: 1 1 auto; }
    .otr-filter-dialog-grid.is-fields .otr-filter-dialog-field + .otr-filter-dialog-field { margin-top: 0.85rem; }
    .otr-filter-dialog-list { max-height: 12rem; }
}

/* ===========================================================================
   Charts (js/widgets/otr-charts.js) and funnels (macros/charts.html.twig)
   =========================================================================== */
.otr-chart { position: relative; height: var(--chart-h, 260px); min-width: 0; }
.otr-chart.is-empty canvas { display: none; }
.otr-chart.is-empty::after { content: attr(data-empty); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: var(--otr-text-muted); font-size: 0.88rem; border: 1px dashed var(--otr-border); border-radius: 10px; }
.otr-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
.otr-chart-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.otr-chart-grid > .is-wide { grid-column: 1 / -1; }
.otr-chart-grid > .is-two { grid-column: span 2; }
.otr-section-title { display: flex; align-items: center; gap: 0.6rem; margin: 0.4rem 0 0.8rem; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--otr-text-muted); }
.otr-section-title::after { content: ""; flex: 1; height: 1px; background: var(--otr-border); }
.otr-chart-note { margin: 0.6rem 0 0; font-size: 0.78rem; color: var(--otr-text-muted); }
/* BC report: counting unit switch + "drivers behind the checks" card */
.otr-unit-switch a { display: inline-flex; align-items: center; gap: 0.35rem; }
.otr-unit-switch a i { font-size: 0.72rem; opacity: 0.8; }
.otr-segmented.otr-unit-switch a:not(.is-active):hover { background: #fff; color: var(--otr-heading); }
.otr-segmented.otr-unit-switch a.is-active { background: var(--otr-orange); color: #fff; box-shadow: 0 1px 2px rgba(180, 84, 8, 0.35); }
.otr-segmented.otr-unit-switch a.is-active:hover { background: var(--otr-orange-hover); color: #fff; }
.otr-unit-switch a.is-active i { opacity: 1; }
.otr-unit-switch a.is-active .otr-unit-check { font-size: 0.6rem; opacity: 1; }
.otr-unit-note { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 0 1rem; padding: 0.65rem 0.9rem; border: 1px solid var(--otr-green-soft); border-left: 4px solid var(--otr-green); border-radius: 10px; background: #f3fbf5; font-size: 0.82rem; color: var(--otr-text); }
.otr-unit-note i { margin-top: 0.15rem; color: var(--otr-green-ink); }
.otr-drivers-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.2rem; align-items: start; }
.otr-drivers-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem 1rem; }
.otr-drivers-stat { padding: 0.65rem 0.8rem; border: 1px solid var(--otr-border); border-radius: 10px; background: var(--otr-surface-muted); min-width: 0; }
.otr-drivers-stat .otr-kpi-value { margin-top: 0.2rem; }
.otr-drivers-stat.is-warn { border-color: #f6d4a8; background: #fff8ee; }
.otr-drivers-stat.is-warn .otr-kpi-value { color: var(--otr-orange-ink); }
.otr-drivers-stat.is-action { display: block; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.otr-drivers-stat.is-action:hover, .otr-drivers-stat.is-action:focus-visible { border-color: var(--otr-orange); box-shadow: 0 2px 8px rgba(180, 84, 8, 0.18); outline: none; }
.otr-drivers-stat.is-action .otr-drivers-stat-more { white-space: nowrap; font-weight: 700; color: var(--otr-orange-ink); }
.otr-drivers-stat.is-action .otr-drivers-stat-more i { font-size: 0.7rem; }
.otr-hired-open-intro { margin: 0 0 1rem; font-size: 0.85rem; color: var(--otr-text-muted); }
.otr-hired-open-driver { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-bottom: 0.75rem; }
.otr-hired-open-driver .otr-hired-open-name { font-size: 0.95rem; font-weight: 800; color: var(--otr-heading); }
.otr-hired-open-hired { font-size: 0.8rem; color: var(--otr-text-muted); }
.otr-hired-open-hired a { font-weight: 700; }
.otr-shell .modal .otr-inner-card:last-of-type { margin-bottom: 0; }
.otr-drivers-chart .otr-kpi-label { margin-bottom: 0.4rem; }
@media (max-width: 991px) {
    .otr-drivers-grid { grid-template-columns: minmax(0, 1fr); }
    .otr-drivers-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .otr-drivers-stats { grid-template-columns: minmax(0, 1fr); }
    .otr-filterbar-actions { flex-wrap: wrap; }
}
.otr-segmented { display: inline-flex; max-width: 100%; overflow-x: auto; padding: 0.2rem; gap: 0.15rem; border: 1px solid var(--otr-border); border-radius: 10px; background: var(--otr-surface-muted); }
.otr-segmented a { white-space: nowrap; }
.otr-segmented a { padding: 0.3rem 0.7rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; color: var(--otr-text-muted); text-decoration: none; }
.otr-segmented a:hover { color: var(--otr-heading); }
.otr-segmented a.is-active { background: #fff; color: var(--otr-heading); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }

.otr-funnel { display: flex; flex-direction: column; gap: 0.55rem; }
.otr-funnel-step { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr) 6.5rem; align-items: center; gap: 0.85rem; }
.otr-funnel-label { font-weight: 700; color: var(--otr-heading); font-size: 0.88rem; line-height: 1.25; }
.otr-funnel-label small { display: block; font-weight: 500; color: var(--otr-text-muted); font-size: 0.75rem; }
.otr-funnel-track { height: 34px; background: var(--otr-surface-muted); border-radius: 8px; overflow: hidden; }
.otr-funnel-bar { height: 100%; width: var(--w, 0%); min-width: 2.6rem; border-radius: 8px; background: var(--c, var(--otr-orange)); display: flex; align-items: center; padding: 0 0.65rem; color: #fff; font-weight: 800; font-size: 0.85rem; white-space: nowrap; transition: width .5s ease; }
.otr-funnel-rate { text-align: right; line-height: 1.2; }
.otr-funnel-rate strong { display: block; color: var(--otr-heading); font-size: 0.95rem; }
.otr-funnel-rate span { font-size: 0.72rem; color: var(--otr-text-muted); }
.otr-funnel-drops { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.otr-funnel-drops .otr-pill { font-size: 0.75rem; }

/* ---------------------------------------------------------------------------
   Column funnel (macros/charts.html.twig flow()): one column per step, bars
   joined by flow bands, the hatched block above a bar is what the previous
   step lost; below each step how many stopped there and why. --lin / --log
   are the bar heights on each scale, .is-log switches.
   --------------------------------------------------------------------------- */
.otr-flow { --flow-gap: 14px; --flow-plot: 210px; container: otr-flow / inline-size; }
.otr-flow-step { --h: var(--lin); --ph: var(--prev-lin); }
.otr-flow.is-log .otr-flow-step { --h: var(--log); --ph: var(--prev-log); }
.otr-flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.otr-flow-summary { margin: 0; font-size: 0.86rem; color: var(--otr-text-muted); }
.otr-flow-summary strong { color: var(--otr-heading); }
.otr-flow-summary-sep { margin: 0 0.35rem; }
.otr-segmented.is-buttons button { border: 0; background: none; padding: 0.3rem 0.7rem; border-radius: 8px; font-size: 0.8rem; font-weight: 700; color: var(--otr-text-muted); white-space: nowrap; cursor: pointer; }
.otr-segmented.is-buttons button:hover { color: var(--otr-heading); }
.otr-segmented.is-buttons button.is-active { background: #fff; color: var(--otr-heading); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.otr-flow-scroll { overflow-x: auto; margin: 0 -0.25rem; padding: 0 0.25rem 0.25rem; }
.otr-flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--steps), minmax(7.4rem, 1fr)); grid-template-rows: auto auto var(--flow-plot) auto auto; column-gap: var(--flow-gap); }
.otr-flow-step { display: grid; grid-row: span 5; grid-template-rows: subgrid; min-width: 0; }
.otr-flow-head { display: flex; flex-direction: column; gap: 0.1rem; padding-bottom: 0.55rem; }
.otr-flow-index { width: 1.35rem; height: 1.35rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 800; color: #fff; background: var(--c); margin-bottom: 0.25rem; }
.otr-flow-name { font-weight: 800; color: var(--otr-heading); font-size: 0.9rem; line-height: 1.2; }
.otr-flow-sub { font-size: 0.72rem; color: var(--otr-text-muted); line-height: 1.3; }
.otr-flow-figure { display: flex; flex-direction: column; padding-bottom: 0.6rem; }
.otr-flow-value { font-size: 1.35rem; font-weight: 800; color: var(--otr-heading); line-height: 1.1; letter-spacing: -0.01em; }
.otr-flow-share { font-size: 0.74rem; color: var(--otr-text-muted); }
.otr-flow-plot { position: relative; border-bottom: 2px solid var(--otr-border); }
.otr-flow-bar, .otr-flow-ghost { position: absolute; bottom: 0; left: 14%; width: 72%; border-radius: 7px 7px 0 0; transition: height .45s ease; }
.otr-flow-bar { height: var(--h); min-height: 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 72%, #fff), var(--c)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.otr-flow-ghost { height: var(--ph); background: repeating-linear-gradient(135deg, rgba(220, 38, 38, 0.13) 0 5px, rgba(220, 38, 38, 0.04) 5px 10px); border: 1px dashed rgba(220, 38, 38, 0.35); border-bottom: 0; }
/* Flow band from the previous bar's top to this bar's top */
.otr-flow-plot:not(.is-first)::before { content: ""; position: absolute; bottom: 0; left: calc(-14% - var(--flow-gap)); width: calc(28% + var(--flow-gap)); height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 22%, transparent), color-mix(in srgb, var(--c) 22%, transparent)); clip-path: polygon(0 calc(100% - var(--ph)), 100% calc(100% - var(--h)), 100% 100%, 0 100%); transition: clip-path .45s ease; }
.otr-flow-pass { display: flex; flex-direction: column; padding: 0.55rem 0 0.5rem; line-height: 1.2; }
.otr-flow-pass strong { font-size: 1rem; color: var(--otr-heading); }
.otr-flow-pass strong::before { content: "\2192\00a0"; color: var(--c); }
.otr-flow-pass span { font-size: 0.72rem; color: var(--otr-text-muted); }
.otr-flow-pass.is-weakest strong { color: var(--otr-red-ink); }
.otr-flow-step:first-child .otr-flow-pass strong::before { content: none; }
.otr-flow-drop { border-top: 1px dashed var(--otr-border); padding-top: 0.55rem; min-width: 0; }
.otr-flow-drop-head { margin: 0 0 0.35rem; font-size: 0.76rem; color: var(--otr-text-muted); line-height: 1.35; }
.otr-flow-drop-head strong { color: var(--otr-heading); font-size: 0.85rem; }
.otr-flow-drop-head.is-end { color: var(--otr-green-ink); font-weight: 700; }
.otr-flow-flag { display: inline-block; margin-top: 0.2rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--otr-red-soft); color: var(--otr-red-ink); font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.otr-flow-step.is-biggest-drop .otr-flow-drop { border-top-color: rgba(220, 38, 38, 0.45); }
.otr-flow-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.otr-flow-reasons li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem; font-size: 0.72rem; line-height: 1.3; color: var(--otr-text); }
.otr-flow-reasons li span { min-width: 0; }
.otr-flow-reasons li span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 999px; margin-right: 0.35rem; vertical-align: 0.05rem; background: var(--otr-blue); }
.otr-flow-reasons li.is-lost span::before { background: var(--otr-red); }
.otr-flow-reasons li b { font-weight: 800; color: var(--otr-heading); white-space: nowrap; }
.otr-flow-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.9rem 0 0; font-size: 0.74rem; color: var(--otr-text-muted); }
.otr-flow-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 0.35rem; background: var(--otr-blue); }
.otr-flow-legend .is-lost::before { background: var(--otr-red); }
.otr-flow-legend .is-ghost::before { width: 12px; height: 10px; border-radius: 2px; vertical-align: -1px; border: 1px dashed rgba(220, 38, 38, 0.45); background: repeating-linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0 3px, transparent 3px 6px); }
/* Narrow cards (phones, tablets, side-by-side layouts): one row per step, horizontal bars */
@container otr-flow (max-width: 880px) {
    .otr-flow-scroll { overflow: visible; margin: 0; padding: 0; }
    .otr-flow-steps { display: flex; flex-direction: column; gap: 0.85rem; }
    .otr-flow-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none; gap: 0.15rem 0.75rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--otr-surface-muted); }
    .otr-flow-step:last-child { border-bottom: 0; padding-bottom: 0; }
    .otr-flow-head { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0 0.45rem; padding: 0; }
    .otr-flow-index { margin: 0; }
    .otr-flow-sub { flex-basis: 100%; }
    .otr-flow-figure { align-items: flex-end; padding: 0; }
    .otr-flow-value { font-size: 1.1rem; }
    .otr-flow-plot { grid-column: 1 / -1; height: 16px; margin: 0.35rem 0 0.1rem; border: 0; border-radius: 6px; background: var(--otr-surface-muted); overflow: hidden; }
    .otr-flow-plot:not(.is-first)::before { display: none; }
    .otr-flow-bar, .otr-flow-ghost { top: 0; left: 0; height: 100%; border-radius: 6px; transition: width .45s ease; }
    .otr-flow-bar { width: var(--h); min-width: 3px; }
    .otr-flow-ghost { width: var(--ph); border: 0; }
    .otr-flow-pass { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 0.35rem; padding: 0.15rem 0 0; }
    .otr-flow-drop { grid-column: 1 / -1; border-top: 0; padding-top: 0.2rem; }
    .otr-flow-reasons { flex-direction: row; flex-wrap: wrap; gap: 0.2rem 0.85rem; }
}

.otr-mini-table { width: 100%; font-size: 0.86rem; }
.otr-mini-table th { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--otr-text-muted); padding: 0 0.4rem 0.45rem; text-align: right; }
.otr-mini-table th:first-child, .otr-mini-table td:first-child { text-align: left; }
.otr-mini-table td { padding: 0.4rem; border-top: 1px solid var(--otr-surface-muted); text-align: right; color: var(--otr-text); }
.otr-mini-table td:first-child { font-weight: 700; color: var(--otr-heading); }
.otr-rate-bar { display: inline-block; vertical-align: middle; width: 3.5rem; height: 6px; margin-left: 0.4rem; border-radius: 999px; background: var(--otr-gray-soft); overflow: hidden; }
.otr-rate-bar > span { display: block; height: 100%; width: var(--w, 0%); background: var(--otr-green); border-radius: inherit; }

@media (max-width: 991px) {
    .otr-chart-grid.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .otr-chart-grid, .otr-chart-grid.is-3 { grid-template-columns: 1fr; }
    .otr-chart-grid > .is-two { grid-column: auto; }
    .otr-chart { height: var(--chart-h-sm, 230px); }
    .otr-funnel-step { grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.75rem; }
    .otr-funnel-label { grid-column: 1 / -1; }
    .otr-funnel-rate { grid-column: 2; grid-row: 2; }
}
.otr-shell .otr-grid > tbody > tr.otr-row-total > td { font-weight: 800; color: var(--otr-heading); border-top: 2px solid var(--otr-border-strong); background-color: var(--otr-surface-muted); }
.otr-text-danger { color: var(--otr-red-ink) !important; }
/* Grouped table headers (recruiter reward report) */
.otr-shell .otr-grid > thead > tr > th.otr-th-group { text-align: center; border-bottom: 1px solid var(--otr-border); padding-bottom: 0.35rem; }
.otr-shell .otr-grid > thead > tr > th.otr-th-sub { font-size: 0.68rem; padding-top: 0.35rem; }
.otr-shell .otr-grid > thead > tr > th[rowspan] { vertical-align: bottom; }
.otr-reward-table td + td { white-space: nowrap; }
.otr-nowrap { white-space: nowrap; }
.otr-dash-perf-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin: 0.4rem 0 0.9rem; }
.otr-dash-perf-head .otr-section-title { margin: 0; flex: 1 1 14rem; }
.otr-delta { font-weight: 800; color: var(--otr-text-muted); }
.otr-delta.is-up { color: var(--otr-green-ink); }
.otr-delta.is-down { color: var(--otr-red-ink); }
.otr-kpi.is-orange { border-left-color: var(--otr-orange); }

/* ===========================================================================
   Announcements calendar (pages/list_announcements.html.twig,
   js/pages/announcements-calendar.js on FullCalendar's day grid)
   =========================================================================== */
.ann-cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--otr-border); }
.ann-cal-nav { display: flex; align-items: center; gap: 0.35rem; }
.ann-cal-heading { display: flex; align-items: baseline; justify-content: center; gap: 0.6rem; flex: 1 1 auto; min-width: 0; }
.ann-cal-title { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.35; color: var(--otr-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-cal-count { font-size: 0.8rem; color: var(--otr-text-muted); white-space: nowrap; }
.ann-cal-controls { display: flex; align-items: center; gap: 0.85rem; }
.otr-shell .ann-cal-switch { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--otr-text-muted); cursor: pointer; user-select: none; }
.ann-cal-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ann-cal-switch-track { position: relative; flex: 0 0 auto; width: 2.1rem; height: 1.2rem; border-radius: 999px; background: var(--otr-border-strong); transition: background .15s; }
.ann-cal-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.2rem - 4px); height: calc(1.2rem - 4px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25); transition: transform .15s; }
.ann-cal-switch input:checked + .ann-cal-switch-track { background: var(--otr-orange); }
.ann-cal-switch input:checked + .ann-cal-switch-track::after { transform: translateX(0.9rem); }
.ann-cal-switch input:focus-visible + .ann-cal-switch-track { outline: 2px solid var(--otr-orange); outline-offset: 2px; }
.ann-cal-progress { height: 2px; overflow: hidden; }
.ann-cal-card.is-loading .ann-cal-progress { background: linear-gradient(90deg, transparent, var(--otr-orange), transparent) no-repeat; background-size: 40% 100%; animation: ann-cal-loading 1s linear infinite; }
@keyframes ann-cal-loading { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.ann-cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ann-cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 1rem; padding: 0.75rem 1.1rem; border-top: 1px solid var(--otr-border); font-size: 0.76rem; color: var(--otr-text-muted); }
.ann-cal-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.ann-cal-legend-hint { margin-left: auto; }

/* Status colors (--st = card background, --st-ink = text on it; the pastel
   set of the previous (UF4) announcements board) */
.is-st-none { --st: #f6f6f6; --st-ink: #4b5563; }
.is-st-arrived { --st: #b6e7ba; --st-ink: #14532d; }
.is-st-ready { --st: #dbe39b; --st-ink: #3f4a0a; }
.is-st-almost_ready { --st: #e7c6b6; --st-ink: #7c2d12; }
.is-st-coho { --st: #b6c7e7; --st-ink: #1e3a8a; }
.is-st-something_missing { --st: #f7a2a2; --st-ink: #7f1d1d; }
.is-st-tbd { --st: #d1b9e7; --st-ink: #4c1d95; }
.ann-card-dot { flex: 0 0 auto; display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--st, #94a3b8); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }

/* FullCalendar in the OTR look */
.ann-cal { min-width: 64rem; --fc-border-color: var(--otr-border); --fc-today-bg-color: rgba(244, 122, 31, 0.05); --fc-neutral-bg-color: var(--otr-surface-muted); --fc-page-bg-color: #fff; --fc-event-bg-color: transparent; --fc-event-border-color: transparent; --fc-event-text-color: inherit; --fc-highlight-color: rgba(244, 122, 31, 0.14); }
.ann-cal.is-compact { min-width: 54rem; }
.ann-cal .fc-scrollgrid { border-width: 0; }
.ann-cal .fc-scrollgrid-section > td, .ann-cal .fc-scrollgrid-section > th { border-right: 0; }
.ann-cal .fc-col-header-cell { background: var(--otr-surface-muted); }
.ann-cal .fc-col-header-cell-cushion { padding: 0.55rem 0.4rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--otr-text-muted); text-decoration: none; }
.ann-cal .fc-daygrid-day-frame { min-height: 7.5rem; }
.ann-cal .fc-daygrid-day-top { padding: 0.35rem 0.45rem 0.15rem; }
.ann-cal .fc-daygrid-day-number { padding: 0.05rem 0.45rem; font-size: 0.75rem; font-weight: 700; color: var(--otr-text-muted); text-decoration: none; border-radius: 999px; }
.ann-cal .fc-day-today .fc-daygrid-day-number { color: #fff; background: var(--otr-orange); }
.ann-cal .fc-daygrid-week-number { margin: 0.3rem 0 0 0.3rem; padding: 0.05rem 0.35rem; font-size: 0.65rem; font-weight: 700; color: var(--otr-text-muted); background: var(--otr-gray-soft); border-radius: 6px; text-decoration: none; }
.ann-cal .fc-daygrid-day-events { margin: 0.15rem 0 0.35rem; }
.ann-cal .fc-daygrid-event-harness { margin: 0 0.35rem 0.4rem; }
.ann-cal .fc-daygrid-event { margin: 0 !important; padding: 0; border: 0; border-radius: 8px; background: none; white-space: normal; font-size: inherit; }
.ann-cal .fc-event-main { padding: 0; color: inherit; }
.ann-cal .fc-event:focus, .ann-cal .fc-event:focus-visible, .ann-cal .fc-event::after, .ann-cal .fc-event::before { box-shadow: none; background: none; }
.ann-cal .fc-event-dragging:not(.fc-event-mirror) { opacity: 0.35; }
.ann-cal .fc-event-mirror .ann-card { box-shadow: 0 10px 24px rgba(16, 24, 40, 0.2); transform: rotate(-1.5deg); }

/* Cards */
.ann-card { position: relative; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.45rem 0.5rem 0.5rem; border: 1px solid color-mix(in srgb, var(--st) 78%, #000); border-radius: 8px; background: var(--st); color: var(--st-ink, var(--otr-heading)); font-size: 0.76rem; line-height: 1.3; text-align: left; cursor: default; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.ann-card-head { display: flex; align-items: flex-start; gap: 0.35rem; min-width: 0; }
.ann-card-grip { flex: 0 0 auto; margin: -0.1rem 0 0 -0.2rem; padding: 0.1rem 0.25rem; border-radius: 4px; color: rgba(0, 0, 0, 0.4); cursor: grab; touch-action: none; }
.ann-card-grip:hover { color: var(--st-ink, var(--otr-heading)); background: rgba(0, 0, 0, 0.08); }
.ann-card-grip:active { cursor: grabbing; }
.ann-card-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.otr-shell .ann-card .ann-card-driver { font-weight: 800; color: var(--otr-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otr-shell .ann-card .ann-card-company { font-size: 0.7rem; color: var(--st-ink, var(--otr-text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otr-shell .ann-card a.ann-card-driver:hover, .otr-shell .ann-card a.ann-card-company:hover, .otr-shell .ann-card a.ann-card-bc:hover { text-decoration: underline; color: var(--otr-heading); }
.ann-card-head .ann-card-dot { display: none; margin-top: 0.3rem; }
.ann-card-body { display: flex; flex-direction: column; gap: 0.35rem; }
.ann-card-meta { display: flex; justify-content: space-between; gap: 0.4rem; font-size: 0.7rem; color: var(--st-ink, var(--otr-text)); }
.ann-card-recruiter { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otr-shell .ann-card .ann-card-bc { flex: 0 0 auto; color: var(--st-ink, var(--otr-text)); white-space: nowrap; font-weight: 600; }
.otr-shell .ann-card .form-control.input-sm { height: 1.85rem; padding: 0.15rem 0.45rem; font-size: 0.74rem; border-radius: 6px; border-color: rgba(0, 0, 0, 0.1); background-color: #fff; color: var(--otr-text); }
.otr-shell .ann-card select.ann-card-status { font-weight: 700; color: var(--otr-heading); }
.otr-shell .ann-card textarea.ann-card-comment { height: auto; min-height: 2.7rem; line-height: 1.3; resize: vertical; transition: border-color .15s; }
.otr-shell .ann-card .ann-card-comment.is-saving { box-shadow: 0 0 0 2px #fde68a; }
.otr-shell .ann-card .ann-card-comment.is-saved { box-shadow: 0 0 0 2px #bbf7d0; }
.otr-shell .ann-card .ann-card-comment.is-error { box-shadow: 0 0 0 2px #fecaca; }
.otr-shell .ann-card .form-control[disabled], .otr-shell .ann-card .form-control[readonly] { background-color: rgba(255, 255, 255, 0.85); cursor: default; }
.ann-card-actions { display: flex; align-items: center; gap: 0.35rem; }
.otr-shell .ann-card-actions .btn-xs { padding: 0.12rem 0.45rem; font-size: 0.7rem; border-radius: 6px; }
.otr-shell .ann-card-remove { margin-left: auto; color: rgba(0, 0, 0, 0.45); }
.otr-shell .ann-card-remove:hover, .otr-shell .ann-card-remove:focus { color: var(--otr-red-ink); background: rgba(255, 255, 255, 0.6); }
.ann-card-hired { padding: 0.05rem 0.5rem; border-radius: 999px; background: #fff; color: var(--otr-green-ink); font-size: 0.68rem; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }

/* Compact: names only, a click opens one card at a time */
.ann-cal.is-compact .fc-daygrid-day-frame { min-height: 4.5rem; }
.ann-cal.is-compact .fc-daygrid-event-harness { margin-bottom: 0.3rem; }
.ann-cal.is-compact .ann-card { gap: 0; padding: 0.35rem 0.45rem; cursor: pointer; }
.ann-cal.is-compact .ann-card-body { display: none; }
.ann-cal.is-compact .ann-card:not(.is-expanded) a { pointer-events: none; }
.ann-cal.is-compact .ann-card:not(.is-expanded):hover { background: color-mix(in srgb, var(--st) 92%, #000); border-color: color-mix(in srgb, var(--st) 65%, #000); }
.ann-cal.is-compact .ann-card.is-expanded { gap: 0.4rem; padding: 0.45rem 0.5rem 0.5rem; cursor: default; box-shadow: 0 8px 20px rgba(16, 24, 40, 0.25); }
.ann-cal.is-compact .ann-card.is-expanded .ann-card-head { cursor: pointer; }
.ann-cal.is-compact .ann-card.is-expanded .ann-card-body { display: flex; }

@media (max-width: 767px) {
    .ann-cal-toolbar { padding: 0.7rem 0.85rem; }
    .ann-cal-heading { order: -1; flex-basis: 100%; justify-content: flex-start; }
    .ann-cal-controls { flex: 1 1 auto; justify-content: space-between; }
    .ann-cal-legend { padding: 0.7rem 0.85rem; }
    .ann-cal-legend-hint { margin-left: 0; flex-basis: 100%; }
}

/* ===========================================================================
   Background check page (pages/info_background_check.html.twig)
   =========================================================================== */
.otr-card-icon.is-orange { background: var(--otr-orange-soft); color: var(--otr-orange); }
.bc-progress-card { padding: 1.1rem 1.25rem 0.9rem; }
.bc-steps { list-style: none; margin: 0; padding: 0; display: flex; }
.bc-step { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.bc-step::before { content: ""; position: absolute; top: 0.95rem; right: 50%; width: 100%; height: 3px; background: var(--otr-border); z-index: 0; }
.bc-step:first-child::before { display: none; }
.bc-step.is-done::before, .bc-step.is-current::before, .bc-step.is-ended::before { background: var(--otr-green); }
.bc-step-dot { position: relative; z-index: 1; width: 1.95rem; height: 1.95rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 800; background: #fff; border: 2px solid var(--otr-border-strong); color: var(--otr-text-muted); }
.bc-step.is-done .bc-step-dot { background: var(--otr-green); border-color: var(--otr-green); color: #fff; }
.bc-step.is-current .bc-step-dot { border-color: var(--otr-orange); color: var(--otr-orange); box-shadow: 0 0 0 4px var(--otr-orange-soft); }
.bc-step.is-ended .bc-step-dot { background: var(--otr-red); border-color: var(--otr-red); color: #fff; }
.bc-step.is-ended.is-cancelled .bc-step-dot { background: var(--otr-gray-ink); border-color: var(--otr-gray-ink); }
.bc-step.is-ended.is-cancelled::before { background: var(--otr-border-strong); }
.bc-step-label { margin-top: 0.45rem; font-size: 0.82rem; font-weight: 800; color: var(--otr-heading); line-height: 1.25; }
.bc-step.is-todo .bc-step-label { color: var(--otr-text-muted); font-weight: 700; }
.bc-step-date { font-size: 0.74rem; color: var(--otr-text-muted); line-height: 1.3; }
.bc-step.is-current .bc-step-date { color: var(--otr-orange-ink); font-weight: 700; }
.bc-progress-reason { margin: 0.85rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--otr-surface-muted); font-size: 0.86rem; color: var(--otr-text); }

.bc-comment textarea { resize: vertical; }
.bc-comment-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.1rem; margin-top: 0.4rem; }
.bc-comment-actions { display: inline-flex; gap: 0.4rem; }
.bc-comment-actions[hidden] { display: none; }
.bc-email-subject { margin: 0 0 0.55rem; font-weight: 800; color: var(--otr-heading); overflow-wrap: anywhere; }

.bc-task-progress { display: flex; height: 6px; margin: -0.2rem 0 0.9rem; border-radius: 999px; background: var(--otr-gray-soft); overflow: hidden; }
.bc-task-progress > span { width: var(--w); background: var(--otr-green); }
.bc-task-progress > span.is-done { background: var(--otr-blue); }
.bc-tasks { list-style: none; margin: 0; padding: 0; }
.bc-task { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.65rem 0; border-top: 1px solid var(--otr-surface-muted); }
.bc-task:first-child { border-top: 0; padding-top: 0; }
.bc-task-icon { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; background: var(--otr-gray-soft); color: var(--otr-border-strong); }
.bc-task.is-done .bc-task-icon { background: var(--otr-blue-soft); color: var(--otr-blue); }
.bc-task.is-verified .bc-task-icon { background: var(--otr-green-soft); color: var(--otr-green); }
.bc-task-main { flex: 1 1 auto; min-width: 0; }
.bc-task-text { margin: 0 0 0.25rem; color: var(--otr-heading); font-weight: 600; overflow-wrap: anywhere; }
.bc-task-actions { flex: 0 0 auto; display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: flex-end; }

.bc-timeline { list-style: none; margin: 0; padding: 0; }
.bc-timeline-item { position: relative; display: flex; gap: 0.8rem; padding-bottom: 0.95rem; }
.bc-timeline-item::before { content: ""; position: absolute; left: 0.45rem; top: 1.1rem; bottom: 0; width: 2px; background: var(--otr-surface-muted); }
.bc-timeline-item:last-child { padding-bottom: 0; }
.bc-timeline-item:last-child::before { display: none; }
.bc-timeline-dot { position: relative; flex: 0 0 auto; width: 0.95rem; height: 0.95rem; margin-top: 0.3rem; border-radius: 50%; background: var(--otr-gray-ink); box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--otr-border); }
.bc-timeline-dot.is-green { background: var(--otr-green); }
.bc-timeline-dot.is-blue { background: var(--otr-blue); }
.bc-timeline-dot.is-red { background: var(--otr-red); }
.bc-timeline-dot.is-purple { background: var(--otr-purple); }
.bc-timeline-dot.is-yellow { background: var(--otr-yellow); }
.bc-timeline-body { flex: 1 1 auto; min-width: 0; }
.bc-timeline-title { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin: 0; font-size: 0.86rem; }
.bc-timeline-meta { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--otr-text-muted); }
.bc-timeline-tasks { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.8rem; color: var(--otr-text); }

.bc-docs, .bc-invoices { list-style: none; margin: 0; padding: 0; }
.bc-docs li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-top: 1px solid var(--otr-surface-muted); font-size: 0.86rem; }
.bc-docs li:first-child { border-top: 0; }
.bc-doc-name { color: var(--otr-text-muted); }
.bc-doc-value { color: var(--otr-heading); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
a.bc-doc-value { color: var(--otr-orange); }
.bc-invoices li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.55rem 0; border-top: 1px solid var(--otr-surface-muted); }
.bc-invoices li:first-child { border-top: 0; padding-top: 0; }
.bc-invoices li > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.bc-invoice-name { font-weight: 700; }
.bc-invoice-amounts { display: flex; align-items: center; gap: 0.5rem; flex: 0 0 auto; }
.bc-ann-status { display: inline-block; padding: 0.2rem 0.62rem; border-radius: 999px; background: var(--st, #f6f6f6); color: var(--st-ink, var(--otr-heading)); font-size: 0.72rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }

@media (max-width: 767px) {
    .bc-progress-card { padding: 0.9rem 0.6rem 0.8rem; }
    .bc-step-label { font-size: 0.7rem; }
    .bc-step-date { font-size: 0.64rem; }
    .bc-step-dot { width: 1.7rem; height: 1.7rem; }
    .bc-step::before { top: 0.83rem; }
    .bc-task { flex-wrap: wrap; }
    .bc-task-actions { flex-basis: 100%; justify-content: flex-start; padding-left: 2.3rem; }
}

/* Company page email cards: only the first address until "Show all" */
.otr-email-card:not(.is-expanded) .otr-detail-row.is-extra { display: none; }
.otr-email-card:not(.is-expanded) .otr-detail-row:first-child { border-bottom: 0; }

/* ---------------------------------------------------------------- /migration (root only) */
.mig-run { margin-bottom: 1.25rem; }
.mig-run-head { display: flex; align-items: center; gap: 0.85rem; }
.mig-run-icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; background: var(--otr-orange-soft); color: var(--otr-orange-ink); }
.mig-run.is-done .mig-run-icon { background: var(--otr-green-soft); color: var(--otr-green-ink); }
.mig-run.is-failed .mig-run-icon { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.mig-run.is-stopped .mig-run-icon { background: var(--otr-gray-soft); color: var(--otr-gray-ink); }
.mig-run-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mig-run-title strong { color: var(--otr-heading); font-size: 1.1rem; }
.mig-run-title span { color: var(--otr-text-muted); font-size: 0.84rem; }
.mig-run-percent { color: var(--otr-heading); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.mig-warn { color: var(--otr-red-ink); font-weight: 600; }
.mig-bar { height: 6px; border-radius: 999px; background: var(--otr-gray-soft); overflow: hidden; margin-top: 0.45rem; }
.mig-bar.is-large { height: 10px; margin-top: 1rem; }
.mig-bar > span { display: block; height: 100%; width: 0; border-radius: inherit; background-color: var(--otr-orange); transition: width .5s ease; }
.mig-run.is-running .mig-bar > span { background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%); background-size: 200% 100%; animation: otr-export-shimmer 1.4s linear infinite; }
.mig-bar.is-indeterminate > span { width: 100%; background-color: var(--otr-orange-soft); background-image: linear-gradient(90deg, var(--otr-orange-soft) 0%, var(--otr-orange) 50%, var(--otr-orange-soft) 100%); }
.mig-run.is-done .mig-bar > span { background-color: var(--otr-green); }
.mig-run.is-failed .mig-bar > span { background-color: var(--otr-red); }
.mig-run.is-stopped .mig-bar > span { background-color: var(--otr-border-strong); }
.mig-stages { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.mig-stage { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.45rem 0.5rem; border-radius: var(--otr-radius-ctl); }
.mig-stage.is-running { background: var(--otr-surface-muted); }
.mig-stage-dot { width: 1.6rem; height: 1.6rem; flex: 0 0 auto; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; background: var(--otr-gray-soft); color: var(--otr-text-muted); }
.mig-stage.is-done .mig-stage-dot { background: var(--otr-green-soft); color: var(--otr-green-ink); }
.mig-stage.is-running .mig-stage-dot { background: var(--otr-orange); color: #fff; }
.mig-stage.is-failed .mig-stage-dot { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.mig-stage.is-skipped { opacity: 0.55; }
.mig-stage.is-stopped .mig-stage-dot { background: var(--otr-border-strong); color: #fff; }
.mig-stage-main { flex: 1; min-width: 0; padding-top: 0.15rem; }
.mig-stage-line { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.mig-stage-line strong { color: var(--otr-heading); font-size: 0.92rem; font-weight: 700; }
.mig-stage.is-pending .mig-stage-line strong, .mig-stage.is-skipped .mig-stage-line strong { color: var(--otr-text-muted); font-weight: 600; }
.mig-stage-side { color: var(--otr-text-muted); font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mig-stage-detail { display: block; color: var(--otr-text); font-size: 0.84rem; margin-top: 0.15rem; overflow-wrap: anywhere; }
.mig-result { margin-top: 1rem; padding: 0.8rem 0.95rem; border-radius: var(--otr-radius-ctl); border: 1px solid transparent; }
.mig-result ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.mig-result li { display: flex; gap: 0.6rem; font-size: 0.88rem; font-weight: 600; line-height: 1.45; }
.mig-result li i { width: 1rem; margin-top: 0.2rem; text-align: center; flex: 0 0 auto; }
.mig-result.is-ok { background: var(--otr-green-soft); color: var(--otr-green-ink); }
.mig-result.is-warn { background: var(--otr-yellow-soft); color: var(--otr-yellow-ink); }
.mig-result.is-bad { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.mig-run-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.mig-log { flex: 1; min-width: 0; }
.mig-log summary { cursor: pointer; font-size: 0.84rem; font-weight: 700; color: var(--otr-text-muted); padding: 0.3rem 0; }
.mig-log summary i { margin-right: 0.3rem; }
.mig-log pre { margin: 0.4rem 0 0; max-height: 22rem; overflow: auto; padding: 0.75rem 0.85rem; background: #111827; color: #e5e7eb; border: 0; border-radius: var(--otr-radius-ctl); font-size: 0.76rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

.mig-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.mig-mode { position: relative; margin: 0; cursor: pointer; }
.mig-mode input { position: absolute; opacity: 0; pointer-events: none; }
.mig-mode span { display: flex; flex-direction: column; gap: 0.1rem; height: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--otr-border); border-radius: var(--otr-radius-ctl); transition: border-color .15s, box-shadow .15s; }
.mig-mode span i { color: var(--otr-text-muted); font-size: 1.05rem; margin-bottom: 0.3rem; }
.mig-mode strong { color: var(--otr-heading); font-size: 0.92rem; }
.mig-mode small { color: var(--otr-text-muted); font-weight: 600; font-size: 0.78rem; }
.mig-mode input:checked + span { border-color: var(--otr-orange); box-shadow: var(--otr-shadow-focus); }
.mig-mode input:checked + span i { color: var(--otr-orange); }
.mig-mode input:focus-visible + span { outline: 2px solid var(--otr-orange); outline-offset: 2px; }
.mig-mode input:disabled + span { opacity: 0.6; cursor: not-allowed; }
.mig-options { display: grid; gap: 0.2rem; }
.mig-check, .mig-confirm { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0; padding: 0.5rem 0.55rem; border-radius: var(--otr-radius-ctl); font-weight: 500; cursor: pointer; }
.mig-check:hover { background: var(--otr-surface-muted); }
.mig-check input, .mig-confirm input { margin: 0.2rem 0 0; width: 1rem; height: 1rem; flex: 0 0 auto; accent-color: var(--otr-orange); }
.mig-check span { display: flex; flex-direction: column; gap: 0.1rem; }
.mig-check strong { color: var(--otr-heading); font-size: 0.9rem; }
.mig-check small { color: var(--otr-text-muted); font-size: 0.8rem; line-height: 1.4; }
.mig-check.is-danger strong { color: var(--otr-red-ink); }
.mig-check.is-danger input { accent-color: var(--otr-red); }
.mig-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.mig-field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.75rem; font-weight: 600; font-size: 0.82rem; color: var(--otr-text-muted); }
.mig-fields .mig-field { margin-bottom: 0; }
.mig-field small { font-weight: 500; }
.mig-confirm { margin-top: 0.9rem; padding: 0.7rem 0.8rem; background: var(--otr-red-soft); color: var(--otr-red-ink); font-size: 0.86rem; font-weight: 600; line-height: 1.45; }
.mig-confirm input { accent-color: var(--otr-red); }
.mig-form-actions { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; margin-top: 1rem; }
.mig-callout { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 0.9rem; padding: 0.65rem 0.85rem; border-radius: var(--otr-radius-ctl); font-size: 0.86rem; font-weight: 600; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.mig-callout i { margin-top: 0.2rem; }
.mig-callout[hidden] { display: none; }
.mig-callout.is-red { background: var(--otr-red-soft); color: var(--otr-red-ink); }
.mig-callout.is-yellow { background: var(--otr-yellow-soft); color: var(--otr-yellow-ink); }
#mig-start-error { margin: 0.9rem 0 0; }
.mig-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.otr-shell .mig-switch { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; font-size: 0.92rem; font-weight: 700; color: var(--otr-heading); cursor: pointer; user-select: none; }
.mig-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.mig-switch-track { position: relative; flex: 0 0 auto; width: 2.6rem; height: 1.45rem; border-radius: 999px; background: var(--otr-border-strong); transition: background .15s; }
.mig-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.45rem - 6px); height: calc(1.45rem - 6px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25); transition: transform .15s; }
.mig-switch input:checked + .mig-switch-track { background: var(--otr-orange); }
.mig-switch input:checked + .mig-switch-track::after { transform: translateX(1.15rem); }
.mig-switch input:focus-visible + .mig-switch-track { outline: 2px solid var(--otr-orange); outline-offset: 2px; }
.mig-switch input:disabled + .mig-switch-track { opacity: 0.6; }
.mig-inline { display: flex; gap: 0.5rem; }
.mig-inline .form-control { flex: 1; min-width: 0; }
.mig-bypass { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.7rem 0.8rem; border-radius: var(--otr-radius-ctl); background: var(--otr-orange-soft); color: var(--otr-orange-ink); font-weight: 600; }
.mig-bypass[hidden] { display: none; }
.mig-bypass .form-control { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; background: #fff; }
.mig-confirm-inline { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; padding: 0.6rem 0.75rem; border-radius: var(--otr-radius-ctl); background: var(--otr-red-soft); color: var(--otr-red-ink); font-weight: 700; font-size: 0.86rem; }
.mig-confirm-inline[hidden] { display: none; }
.mig-confirm-inline span { flex: 1 1 100%; }
@media (max-width: 767px) {
    .mig-modes, .mig-fields { grid-template-columns: 1fr; }
    .mig-run-foot { flex-direction: column-reverse; align-items: stretch; }
}
