:root {
  --app-navy: #1f3864;
  --app-navy-dark: #162a4c;
  --app-accent: #2e9e7a;
  --app-accent-dark: #247f62;
  --app-bg: #f4f6f9;
}
body { background: var(--app-bg); }
.app-navbar { background: var(--app-navy); }
.app-navbar .navbar-brand, .app-navbar .nav-link { color: #e6ebf3; }
.app-navbar .nav-link:hover, .app-navbar .nav-link.active { color: #fff; }
.app-navbar .nav-link.active { border-bottom: 2px solid var(--app-accent); }
.app-main { padding: 1.25rem 1.5rem 3rem; max-width: 1400px; }
.btn-accent { background: var(--app-accent); color: #fff; border: 0; }
.btn-accent:hover { background: var(--app-accent-dark); color: #fff; }
.notif-badge { position: absolute; top: 0; right: -2px; font-size: .65rem; }

.stat-card { background: #fff; border: 1px solid #e3e7ee; border-radius: .5rem; padding: .9rem 1rem; text-decoration: none; color: inherit; display: block; }
.stat-card:hover { border-color: var(--app-accent); color: inherit; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.stat-card .stat-label { color: #6c757d; font-size: .85rem; }
.stat-card.danger .stat-value { color: #c0392b; }
.stat-card.warn .stat-value { color: #b7770d; }

.panel { background: #fff; border: 1px solid #e3e7ee; border-radius: .5rem; }
.panel-header { padding: .75rem 1rem; border-bottom: 1px solid #e3e7ee; font-weight: 600; }
.panel-body { padding: 1rem; }

/* status & priority badges - consistent everywhere (document 14.3) */
.badge-status { font-weight: 500; }
.status-open { background: #6c757d; }
.status-assigned { background: #0d6efd; }
.status-in_progress { background: #17a2b8; }
.status-waiting_requester { background: #fd7e14; }
.status-on_hold { background: #6f42c1; }
.status-resolved { background: #20c997; }
.status-closed { background: #343a40; }
.status-reopened { background: #dc3545; }
.status-rejected { background: #e83e8c; }
.status-awaiting_approval { background: #0d6efd; }
.status-cancelled { background: #adb5bd; color: #212529; }
.prio-low { background: #adb5bd; color: #212529; }
.prio-medium { background: #0d6efd; }
.prio-high { background: #fd7e14; }
.prio-critical { background: #dc3545; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 400px; }
@media (max-width: 576px) { .app-main { padding: 1rem .75rem 3rem; } }

/* uploader */
.uploader-drop { border: 2px dashed #c5ccd6; border-radius: .5rem; padding: 1.1rem; text-align: center; color: #495057; background: #fafbfc; }
.uploader.dragover .uploader-drop { border-color: var(--app-accent); background: #eefaf5; }
.uploader-item { display: flex; align-items: center; flex-wrap: wrap; padding: .35rem .25rem; border-bottom: 1px solid #eef0f3; font-size: .9rem; }
.uploader-progress { height: 4px; width: 100%; margin-top: .25rem; order: 5; }
.uploader-remove { margin-left: auto; padding: 0 .25rem; }
.uploader-name { word-break: break-all; }

/* attachments */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.file-card { border: 1px solid #e3e7ee; border-radius: .5rem; overflow: hidden; background: #fff; font-size: .8rem; }
.file-card .thumb { height: 110px; display: flex; align-items: center; justify-content: center; background: #f1f3f6; overflow: hidden; }
.file-card .thumb img { max-width: 100%; max-height: 100%; object-fit: cover; width: 100%; height: 100%; cursor: zoom-in; }
.file-card .thumb i { font-size: 2.2rem; color: #6c757d; }
.file-card .meta { padding: .4rem .5rem; }
.file-card .name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ticket detail */
.ticket-header { background: #fff; border: 1px solid #e3e7ee; border-radius: .5rem; padding: 1rem 1.25rem; }
.ticket-number { color: #6c757d; font-weight: 500; }
.timeline-item { border-left: 3px solid #e3e7ee; padding: .25rem 0 .75rem 1rem; margin-left: .5rem; }
.timeline-item.system { color: #6c757d; font-size: .875rem; border-left-color: #f1f3f6; }
.timeline-item.internal { background: #fff8e6; border-left-color: #f0c36d; border-radius: 0 .4rem .4rem 0; padding-right: .75rem; }
.desc-box { white-space: pre-wrap; }
.filter-bar .form-control, .filter-bar .form-select { font-size: .875rem; }
th a { color: inherit; text-decoration: none; }
th a.active { color: var(--app-navy); }
.overdue-dot::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #dc3545; margin-right: .3rem; }

/* remarks & mentions */
.remark-body { white-space: normal; word-break: break-word; }
.mention { background: #e7f1ff; color: #0a58ca; border-radius: .25rem; padding: 0 .2rem; font-weight: 500; }
.mention-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; max-height: 220px; overflow-y: auto; }
.timeline-item:target { background: #fffbe6; border-radius: .4rem; }

.notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }

/* print / save as PDF */
@media print {
  .app-navbar, .no-print, .btn, form.no-print { display: none !important; }
  .app-main { max-width: 100%; padding: 0; }
  .panel { break-inside: avoid; border: 1px solid #ccc; }
  a { color: inherit; text-decoration: none; }
}

/* mobile polish (step 9) */
@media (max-width: 767px) {
  .ticket-header h1 { font-size: 1.15rem; }
  .stat-card .stat-value { font-size: 1.4rem; }
  .table td, .table th { padding: .35rem .4rem; font-size: .85rem; }
  .modal-dialog { margin: .5rem; }
  .filter-bar .col-md-3, .filter-bar .col-md-4, .filter-bar .col-md-2 { flex: 0 0 100%; max-width: 100%; }
  .nav-tabs .nav-link { padding: .4rem .6rem; font-size: .9rem; }
  .btn-sm { padding: .3rem .55rem; }
  #actionBar .btn { flex: 1 1 45%; }
  .notif-menu { width: 92vw; }
}
input, select, textarea { font-size: 16px !important; } /* prevents iOS zoom on focus */

/* ---------- Mobile (step 15a): cards, bottom nav, drawers ---------- */
.ticket-cards { display: flex; flex-direction: column; }
.ticket-card { display: block; padding: .7rem .9rem; border-bottom: 1px solid #e9ecef; color: inherit; text-decoration: none; }
.ticket-card:active { background: #f1f3f5; }
.ticket-card .tc-number { font-weight: 600; color: var(--bs-primary, #1f3864); font-size: .85rem; }
.ticket-card .tc-title { font-size: 1rem; margin: .15rem 0; line-height: 1.3; }
.ticket-card .tc-meta { font-size: .78rem; color: #6c757d; }
@media (max-width: 767.98px) {
  body { padding-bottom: calc(var(--bottom-nav-h) + 8px); }
  .app-main { padding-left: .5rem; padding-right: .5rem; }
  .app-navbar .navbar-brand { font-size: 1rem; }
  .app-navbar .navbar-toggler { display: none; }         /* replaced by the bottom Menu */
  .btn, .form-control, .form-select { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  .stat-card { padding: .6rem .5rem; }
  .stat-card .stat-value { font-size: 1.4rem; }
  .panel { border-radius: .5rem; }
  .filter-bar .col-md-2, .filter-bar .col-md-3, .filter-bar .col-md-4, .filter-bar .col-md-6 { width: 100%; }
  .pagination { flex-wrap: wrap; }
  h1.h4 { font-size: 1.15rem; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
}
:root { --bottom-nav-h: calc(56px + env(safe-area-inset-bottom, 0px)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; height: var(--bottom-nav-h); box-sizing: border-box; background: #fff; border-top: 1px solid #dee2e6; box-shadow: 0 -2px 8px rgba(0,0,0,.06); padding-bottom: env(safe-area-inset-bottom, 0px); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 55px; font-size: .68rem; color: #6c757d; text-decoration: none; line-height: 1.1; position: relative; }
.bottom-nav a i { display: block; font-size: 1.35rem; line-height: 1; margin-bottom: .2rem; }
.bottom-nav a.active { color: var(--bs-primary, #1f3864); font-weight: 600; }
.bottom-nav a.bn-new i { font-size: 1.9rem; color: var(--accent, #2e9e7a); }
.bn-badge { display: inline-block; background: #dc3545; color: #fff; border-radius: 10px; padding: 0 5px; font-size: .62rem; vertical-align: top; }
@media (max-width: 767.98px) { form.panel.offcanvas-md.collapse:not(.show) { display: flex; } .ticket-card { cursor: pointer; } }

/* ---------- Mobile (step 15b): new-ticket wizard, ticket page ---------- */
.mstep-progress { display: flex; gap: .35rem; margin-bottom: .75rem; }
.mstep-progress span { flex: 1; text-align: center; font-size: .75rem; padding: .35rem .2rem; border-radius: .4rem; background: #e9ecef; color: #6c757d; }
.mstep-progress span.active { background: #cfe2ff; color: #084298; }
.mstep-progress span.current { background: var(--bs-primary, #1f3864); color: #fff; font-weight: 600; }
.mstep-bar { position: fixed; left: 0; right: 0; bottom: var(--bottom-nav-h, 60px); z-index: 1029; display: flex; gap: .5rem; padding: .5rem .75rem; background: #fff; border-top: 1px solid #dee2e6; }
@media (max-width: 767.98px) {
  body.has-mstep { padding-bottom: calc(var(--bottom-nav-h) + 72px); }
  .uploader { padding: 1.25rem .75rem; text-align: center; }
  .uploader .uploader-camera { display: inline-block; margin-top: .5rem; padding: .6rem 1rem; background: var(--accent, #2e9e7a); color: #fff; border-radius: .4rem; text-decoration: none; font-weight: 600; }
  .ticket-header .text-end { text-align: left !important; width: 100%; }
  #actionBar { position: fixed; left: 0; right: 0; top: var(--top-nav-h, 56px); z-index: 1019; margin: 0 !important; padding: .5rem .6rem; background: #fff; border-bottom: 1px solid #dee2e6; box-shadow: 0 2px 6px rgba(0,0,0,.06); flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: .4rem !important; }
  #actionBar .btn { white-space: nowrap; flex: 0 0 auto; }
  body.has-actionbar .app-main { padding-top: 58px; }
  body.has-actionbar { padding-bottom: calc(var(--bottom-nav-h) + 8px); }
  #actionBar .btn { padding: .35rem .6rem; font-size: .85rem; }
  .ticket-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ticket-tabs .nav-link { white-space: nowrap; padding: .5rem .7rem; }
  .ticket-side .panel-header.collapsible { cursor: pointer; position: relative; padding-right: 1.6rem; }
  .ticket-side .panel-header.collapsible::after { content: "\F282"; font-family: "bootstrap-icons"; position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); font-size: .8rem; }
  .ticket-side .panel-header.collapsed::after { content: "\F285"; }
  .modal-dialog { margin: .5rem; }
  .modal-lg { max-width: none; }
}

/* ---------- Mobile (step 15c): dashboards, reports, PWA ---------- */
@media (max-width: 767.98px) {
  .stat-card { min-height: 78px; }
  .row.g-3 > [class*="col-lg"]:not([class*="col-6"]), .row.g-3 > [class*="col-md"]:not([class*="col-6"]) { width: 100%; }
  .panel-header { font-size: .9rem; }
  canvas { max-height: 230px; }
  .dash-controls, form.d-flex.gap-2.align-items-center { flex-wrap: wrap !important; }
  form.d-flex.gap-2.align-items-center .form-select, form.d-flex.gap-2.align-items-center .form-control { max-width: 100% !important; flex: 1 1 45%; }
  .btn-group.btn-group-sm { flex-wrap: wrap; }
  .table-responsive table { font-size: .82rem; }
  .table-responsive th, .table-responsive td { white-space: nowrap; }
  .reports-list .list-group-item { padding: .75rem .75rem; }
  .print-only, .no-print-mobile { display: none !important; }
  .navbar-brand { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .comparison-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison-strip > * { flex: 0 0 46%; }
}
@media (display-mode: standalone) {
  .app-navbar { padding-top: env(safe-area-inset-top); }
}

/* ---------- Desktop guards for mobile changes (step 15d) ---------- */
@media (min-width: 768px) {
  /* Bootstrap's offcanvas-md strips background/border/padding above md; restore the filter panel look */
  form.panel.offcanvas-md { background-color: #fff !important; border: 1px solid #e3e7ee !important; border-radius: .5rem; }
  form.panel.offcanvas-md .offcanvas-body { padding: 1rem !important; flex-wrap: wrap; background-color: #fff !important; }
  form.panel.offcanvas-md.collapse:not(.show) { display: none; }
  .ticket-cards { display: none !important; }
  .mstep-bar, .mstep-progress, .bottom-nav { display: none !important; }
}
@media (max-width: 767.98px) {
  form.panel.offcanvas-md .offcanvas-body { padding-bottom: 70px; }
  form.panel.offcanvas-md .filter-actions { position: fixed; left: 0; right: 0; bottom: 0; padding: .6rem .9rem; background: #fff; border-top: 1px solid #dee2e6; z-index: 2; }
  form.panel.offcanvas-md .filter-actions .btn { flex: 1; min-height: 42px; }
}
/* menu drawer headings; filter drawer buttons */
#menuDrawer .menu-heading { background: #eef2f8; color: #1f3864; font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding-top: .5rem; padding-bottom: .5rem; }
@media (max-width: 767.98px) {
  form.panel.offcanvas-md .filter-actions .btn { display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 767.98px) {
  .form-check .form-check-input[type=radio] { margin-top: .35em; }
  .form-check-label { line-height: 1.6; }
}
/* kind toggle on the ticket form */
.kind-toggle { display: flex; gap: .5rem; }
.kind-toggle .btn { flex: 1; padding: .6rem .5rem; font-weight: 600; }
.kind-toggle .btn i { margin-right: .25rem; }
/* people picker */
.pp-wrap { position: relative; }
.pp-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.pp-chips:empty { display: none; }
.pp-chip { display: inline-flex; align-items: center; gap: .3rem; background: #e7eef8; color: #1f3864; border-radius: 999px; padding: .2rem .6rem .2rem .7rem; font-size: .85rem; }
.pp-x { border: 0; background: transparent; color: #1f3864; font-size: 1.1rem; line-height: 1; padding: 0 .1rem; cursor: pointer; }
.pp-list { position: absolute; left: 0; right: 0; z-index: 1060; background: #fff; border: 1px solid #ced4da; border-radius: .375rem; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 240px; overflow-y: auto; margin-top: .2rem; }
.pp-item { padding: .5rem .75rem; cursor: pointer; font-size: .92rem; }
.pp-item:hover { background: #f1f4f9; }
@media (max-width: 767.98px) { .pp-item { padding: .7rem .8rem; } .pp-list { max-height: 50vh; } }

/* ---------- Timeline (step 18l) - calm, single accent ---------- */
.tl { position: relative; display: flex; flex-direction: column; gap: .9rem; padding-left: 2.6rem; }
.tl::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: #e6eaf0; }
.tl-remark { position: relative; }
.tl-avatar { position: absolute; left: -2.6rem; top: 0; width: 36px; height: 36px; border-radius: 50%; background: #1f3864; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .78rem; letter-spacing: .02em; box-shadow: 0 0 0 3px #fff; }
.av-0, .av-1, .av-2, .av-3, .av-4, .av-5, .av-6, .av-7 { background: #1f3864; }
.tl-card { background: #f6f8fb; border-radius: .75rem; padding: .7rem .95rem; }
.tl-remark.mine .tl-card { background: #eef3fb; }
.tl-remark.internal .tl-card { background: #fff7e0; }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; margin-bottom: .3rem; font-size: .8rem; }
.tl-name { font-weight: 700; color: #1f3864; font-size: .9rem; }
.tl-title { color: #6b7280; }
.tl-title::before { content: "\00b7"; margin-right: .5rem; color: #c3c9d3; }
.tl-time { color: #9aa3b2; margin-left: auto; white-space: nowrap; }
.tl-head .badge { font-weight: 500; }
.tl-edit { color: #9aa3b2; text-decoration: none; font-size: .78rem; }
.tl-edit:hover { color: #1f3864; }
.tl-body { font-size: .95rem; line-height: 1.5; color: #1f2937; word-break: break-word; }
.tl-action { position: relative; padding: .1rem 0 .1rem .1rem; font-size: .88rem; color: #374151; }
.tl-action-icon { position: absolute; left: -2.6rem; top: 3px; width: 36px; display: flex; justify-content: center; }
.tl-action-icon i { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #6b7280; font-size: .7rem; box-shadow: 0 0 0 3px #fff; border: 2px solid #c3c9d3; }
.tl-action-body strong { color: #1f3864; font-weight: 600; }
.tl-action-text { color: #374151; }
.tl-meta { font-size: .76rem; color: #9aa3b2; margin-top: .1rem; }
.tl-action.act-ok .tl-action-icon i { border-color: #2e9e7a; color: #2e9e7a; }
.tl-action.act-bad .tl-action-icon i { border-color: #d6455d; color: #d6455d; }
.tl-action.act-warn .tl-action-icon i { border-color: #e8a33d; color: #c47d12; }
.tl-action.act-wait .tl-action-icon i { border-color: #e8a33d; color: #c47d12; }
.tl-action.act-info .tl-action-icon i { border-color: #1f3864; color: #1f3864; }
.tl-action.act-muted .tl-action-icon i { border-color: #c3c9d3; color: #9aa3b2; }
.tl-action:target, .tl-remark:target .tl-card { box-shadow: 0 0 0 3px #ffe69c; border-radius: .75rem; }
.remark-form { background: #fff; border: 1px solid #e6eaf0; border-radius: .75rem; padding: .75rem; margin-left: 2.6rem; }
.remark-form .uploader { padding: .6rem; font-size: .8rem; }
.uploader-compact { padding: .45rem .75rem !important; text-align: left !important; }
.uploader-compact .uploader-drop { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.uploader-compact .uploader-hint { margin-left: auto; }

/* stage strip above the remark box (step 19a) */
.stage-strip { display: flex; align-items: center; gap: .5rem; margin-left: 2.6rem; padding: .45rem .75rem; background: #f6f8fb; border-radius: .6rem; }
.stage-strip .stage-label { font-weight: 600; color: #1f3864; white-space: nowrap; font-size: .85rem; }
.stage-strip .form-select { max-width: 220px; }
.stage-strip .form-control { max-width: 320px; }
@media (max-width: 767.98px) { .stage-strip { margin-left: 0; flex-wrap: wrap; } .stage-strip .form-select, .stage-strip .form-control { max-width: none; flex: 1 1 100%; } }

/* ---------- Phone timeline & remark box (single consolidated block) ---------- */
@media (max-width: 767.98px) {
  .tl { padding-left: 0; gap: .6rem; } .tl::before { display: none; }
  .tl-avatar { display: none; }
  .tl-action { display: flex; align-items: flex-start; padding: .25rem 0; font-size: .84rem; }
  .tl-action-icon { position: static; width: auto; display: inline-flex; margin-right: .35rem; }
  .tl-meta { font-size: .7rem; }
  .tl-card { padding: .55rem .7rem; border-radius: .6rem; }
  .tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .45rem; margin-bottom: .25rem; font-size: .74rem; line-height: 1.25; }
  .tl-name { order: 0; font-size: .86rem; }
  .tl-edit { order: 1; margin-left: auto; font-size: .72rem; }
  .tl-br { order: 2; flex-basis: 100%; height: 0; }
  .tl-title, .tl-time, .tl-head .badge { order: 3; }
  .tl-title { font-size: .74rem; }
  .tl-title::before { content: ""; margin: 0; }
  .tl-title::after { content: "\00b7"; margin-left: .45rem; color: #c3c9d3; }
  .tl-time { margin-left: 0; font-size: .7rem; white-space: nowrap; }
  .tl-body { font-size: .9rem; line-height: 1.4; }
  .tl-action:target, .tl-remark:target .tl-card { box-shadow: none; }
  .stage-strip { margin-left: 0; padding: .4rem .6rem; gap: .35rem; flex-wrap: wrap; }
  .stage-strip .stage-label { flex-basis: 100%; }
  .stage-strip .form-select, .stage-strip .form-control { max-width: none; flex: 1 1 100%; }
  .remark-form { margin-left: 0; padding: .5rem; }
  .remark-form textarea { min-height: 70px; }
}

/* ---------- History tab (step 21e) ---------- */
.hist { display: flex; flex-direction: column; }
.hist-item { display: grid; grid-template-columns: 130px 1fr; gap: .25rem 1rem; padding: .5rem 0; border-bottom: 1px solid #eef1f5; font-size: .88rem; }
.hist-item:last-child { border-bottom: 0; }
.hist-when { color: #6b7280; white-space: nowrap; font-size: .82rem; }
.hist-details { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-top: .2rem; }
.hist-kv { background: #f3f5f9; border-radius: .35rem; padding: .1rem .45rem; font-size: .78rem; color: #374151; word-break: break-word; }
.hist-k { color: #6b7280; }
.hist-k::after { content: ":"; }
@media (max-width: 767.98px) {
  .hist-item { grid-template-columns: 1fr; gap: .1rem; padding: .55rem 0; }
  .hist-when { font-size: .74rem; }
  .hist-kv { font-size: .74rem; }
}

/* dashboard activity rows */
.act-row { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; padding: .35rem 0; border-bottom: 1px solid #eef1f5; font-size: .88rem; }
.act-row:last-child { border-bottom: 0; }
.act-main { min-width: 0; }
.act-time { color: #9aa3b2; font-size: .76rem; white-space: nowrap; }
@media (max-width: 767.98px) { .act-row { flex-direction: column; gap: .1rem; } .act-time { font-size: .72rem; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.kind-toggle.shake { animation: shake .25s ease-in-out 2; }

/* ---------- Order picker cards (step 31) ---------- */
.order-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-height: 420px; overflow-y: auto; padding: 2px; }
.order-card { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid #dfe3ea; border-radius: .6rem; padding: .5rem .7rem; font-size: .84rem; line-height: 1.35; cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.order-card:hover, .order-card:focus { border-color: #1f3864; box-shadow: 0 0 0 3px rgba(31,56,100,.12); outline: none; background: #f7f9fd; }
.order-card.is-picked { border-color: #198754; background: #f3fbf6; cursor: default; }
.oc-top { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-bottom: .15rem; }
.oc-no { font-weight: 700; color: #1f3864; }
.oc-when { color: #6b7280; font-size: .76rem; }
.oc-top .badge { font-size: .62rem; }
.oc-guest { font-weight: 600; }
.oc-phone { font-weight: 400; color: #6b7280; }
.oc-items { color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-total { color: #1f3864; font-weight: 600; font-size: .8rem; }
.oc-empty { grid-column: 1 / -1; color: #6b7280; font-size: .85rem; padding: .75rem; text-align: center; border: 1px dashed #dfe3ea; border-radius: .6rem; }
#orderPicked { border: 0 !important; background: transparent !important; padding: 0 !important; }
@media (max-width: 767.98px) {
  .order-cards { grid-template-columns: 1fr; max-height: 52vh; overflow-y: auto; gap: .4rem; }
  .order-card { padding: .45rem .6rem; font-size: .84rem; line-height: 1.3; }
  .oc-top { margin-bottom: 0; } .oc-when { font-size: .72rem; } .oc-total { display: inline; margin-left: .35rem; }
  .oc-items { display: inline; white-space: normal; }
  .oc-line2 { display: flex; justify-content: space-between; gap: .5rem; }
}
.pp-chip-locked { background: #eef2f8; border-color: #c9d3e6; padding-right: .5rem; }
.pp-wrap.pp-locked { min-height: 0; }
.pp-locked-note { font-size: .78rem; color: #6b7280; }

/* ---------- Delivery dashboard (step 33) ---------- */
.dd-table { font-size: .84rem; } .dd-table th { font-size: .74rem; color: #6b7280; white-space: nowrap; }
.dd-heat td, .dd-heat th { font-size: .7rem; padding: .15rem .25rem; } .dd-heat td { min-width: 1.7rem; border-radius: .2rem; }
@media (max-width: 767.98px) { .dd-kpis .h3 { font-size: 1.35rem; } }
.dd-eval td.dd-bad { background: #fde2e4; color: #b02a37; font-weight: 600; } .dd-eval td.dd-good { color: #146c43; }
