/* ============================================================
   Port Logic Tramp — page-level adapter.
   Gives the Tramp page vocabulary (page-header, card, form-grid, field,
   tabs, modal, …) the Aviation look, using the Aviation tokens. Direction
   neutral: logical properties only.
   ============================================================ */

/* ── Page scaffold ───────────────────────────────────────── */
.list-page .page-header { margin-bottom: 1.25rem; align-items: flex-start; }
.list-page .page-header h1,
.list-page h1.page-title {
  font-family: var(--font-display); font-size: 1.625rem; font-weight: 800; color: var(--text-primary);
  margin: 0 0 .25rem; letter-spacing: -.02em;
}
.list-page .page-header > div:first-child { flex: 1; min-width: 0; }
.list-page .page-subtitle { font-size: var(--text-sm); color: var(--text-muted); margin: 0; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-header-actions form { margin: 0; }
html[lang="ar"] .list-page .page-header h1 { letter-spacing: 0; }

/* ── Buttons (Aviation primary is blue inside pages) ─────── */
.btn { text-decoration: none; }
.btn-secondary { background: var(--bg-secondary); color: var(--text-secondary); border: 1.5px solid var(--border-medium); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-blue); color: var(--blue); background: var(--blue-bg); }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, .3); }
.btn-success:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 185, 129, .4); }
.btn-ghost { background: transparent; border: 1.5px solid transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--blue); border-color: transparent; }
.btn-sm { padding: .4rem .8rem; font-size: var(--text-xs); }
.btn-lg { padding: .875rem 1.75rem; font-size: var(--text-base); }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 34px; height: 34px; }
.list-page .btn.btn-primary { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); }
.list-page .btn { padding: .6875rem 1.125rem; }
.list-page .btn.btn-sm { padding: .4rem .8rem; }
.list-page .btn.btn-icon { padding: 0; }
.list-page .btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.pl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1.1rem; border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: 600; border: 1.5px solid transparent; cursor: pointer; transition: all var(--ease-fast); }
.pl-btn--primary { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; box-shadow: 0 2px 8px var(--blue-glow); }
.pl-btn--secondary { background: #fff; color: var(--text-secondary); border-color: var(--border-medium); }
.pl-btn--danger { background: linear-gradient(135deg, var(--error), #b91c1c); color: #fff; }
.pl-modal__footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: .75rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 1rem; box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 1.25rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.0625rem 1.25rem; border-bottom: 1px solid rgba(0, 0, 0, .06); background: #f8fafc; }
.card-header h3, .card-header h2 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin: 0; color: var(--text-primary); }
.card-body { padding: 1.25rem; }
.card > .table-wrap { margin: 0; }
.card .empty-state, .card .pl-empty { padding: 2.75rem 1rem; }
.list-page .data-table { min-width: 0; }
.list-page .data-table th { text-align: start; }
.data-table td.cell-primary { font-weight: 600; color: var(--text-primary); }
.data-table td.cell-num { text-align: end; font-variant-numeric: tabular-nums; }
.data-table .cell-muted, .cell-muted { color: var(--text-muted); }
.data-table tr.is-clickable { cursor: pointer; }
.data-table th.sortable a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.data-table th.sortable a:hover, .data-table th.is-sorted a { color: var(--blue); }
.data-table .sort-mark { font-size: .75rem; opacity: .6; }
.data-table .col-actions, .data-table .col-select { width: 1%; white-space: nowrap; }
.data-table td.col-actions { text-align: end; }
.list-page .data-table td { color: var(--text-secondary); }
.action-group { display: flex; gap: .375rem; justify-content: flex-end; }
.action-group form { margin: 0; display: inline-flex; }
a.action-btn { text-decoration: none; }
.action-btn--danger:hover { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); color: #ef4444; }
.table-toolbar__form { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; flex: 1; }
.filter-select { padding: .5rem 2rem .5rem .875rem; background: var(--bg-base) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E") no-repeat right .65rem center; border: 1.5px solid var(--border-light); border-radius: var(--radius-md); font-size: var(--text-sm); color: var(--text-secondary); appearance: none; cursor: pointer; }
.filter-select:focus { outline: none; border-color: var(--blue); }
a.filter-btn { text-decoration: none; }
.filter-btn--clear { color: var(--text-muted); }
.table-footer { gap: 1rem; flex-wrap: wrap; }
.jl-pagination { display: flex; align-items: center; gap: .5rem; }
a.jl-pg-btn, span.jl-pg-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--border-light); border-radius: 8px; background: #fff; color: var(--text-secondary); text-decoration: none; }
a.jl-pg-btn:hover { border-color: var(--border-blue); color: var(--blue); background: var(--blue-bg); }
span.jl-pg-btn { opacity: .4; }
.jl-pg-info { font-size: .78rem; color: var(--text-muted); }
.pl-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
.pl-empty__action { text-decoration: none; display: inline-block; }

/* status badges: Tramp variants (same anatomy as the Aviation ones) */
.status-badge--info { background: rgba(37, 99, 235, .1); color: #1d4ed8; }
.status-badge--info .status-badge__dot { background: #2563eb; }
.status-badge--primary { background: rgba(8, 145, 178, .1); color: #0e7490; }
.status-badge--primary .status-badge__dot { background: #0891b2; }
.status-badge--purple { background: rgba(124, 58, 237, .1); color: #6d28d9; }
.status-badge--purple .status-badge__dot { background: #7c3aed; }
.status-badge--neutral .status-badge__dot { background: #94a3b8; }
.status-badge--neutral { color: #64748b; }

/* ── Tabs (jobs view, reconciliation index) ──────────────── */
.tabs { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-light); margin-bottom: 1.25rem; }
.tabs::-webkit-scrollbar { display: none; }
.tab-link { display: inline-flex; align-items: center; gap: .4rem; padding: .72rem 1rem .78rem; margin-bottom: -1px; border-bottom: 2.5px solid transparent; border-radius: 8px 8px 0 0; font-size: .8rem; font-weight: 600; color: var(--text-muted); text-decoration: none; white-space: nowrap; transition: all var(--ease-fast); }
.tab-link:hover { color: var(--text-primary); background: rgba(0, 0, 0, .03); }
.tab-link.active { color: var(--blue); border-bottom-color: var(--blue); background: rgba(37, 99, 235, .06); font-weight: 700; }

/* ── Forms ───────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.125rem; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.form-grid > .span-2 { grid-column: span 2; }
.form-grid > .span-3 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field > label, .field > .field-label { font-size: .7rem; font-weight: 700; color: #4b5563; text-transform: uppercase; letter-spacing: .07em; font-family: var(--font-body); }
html[lang="ar"] .field > label { letter-spacing: 0; text-transform: none; font-size: .78rem; }
.req, .cf-req { color: #ef4444; }
.hint, .cf-hint { font-size: .7rem; color: #9ca3af; }
.error-text, .cf-error { font-size: .72rem; color: var(--error); font-weight: 500; }
.form-control {
  width: 100%; padding: .6875rem 1rem; background: #f8fafc; border: 1.5px solid rgba(0, 0, 0, .09); border-radius: .625rem;
  font-family: var(--font-body); font-size: .8125rem; color: #111827; transition: all .15s ease; box-sizing: border-box; line-height: 1.5;
}
.form-control::placeholder { color: #9ca3af; }
.form-control:hover { border-color: rgba(0, 0, 0, .15); }
.form-control:focus { outline: none; background: #fff; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.form-control.is-invalid { border-color: var(--error); }
.form-control:disabled, .form-control[readonly] { background: #f1f5f9; color: #6b7280; }
textarea.form-control { resize: vertical; min-height: 72px; }
select.form-control { appearance: none; padding-inline-end: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; }
[dir="rtl"] select.form-control { background-position: left .85rem center; }
select.form-control[multiple] { background-image: none; padding-inline-end: 1rem; }
.checkbox-row { display: flex; align-items: center; gap: .6rem; }
.checkbox-row label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .8125rem; color: var(--text-secondary); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); width: 16px; height: 16px; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(0, 0, 0, .06); }
fieldset.form-section { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.form-section > legend { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: 1rem; padding: 0 0 .75rem; width: 100%; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.cf-page { background: transparent; min-height: 0; margin: -1.5rem; }
.cf-body { max-width: none; }
.cf-section .form-grid, .cf-section .cf-grid { }
.cf-section > div > .form-grid { margin: 0; }
.cf-section select.form-control, .cf-section input.form-control { width: 100%; }
a.cf-hero-btn { text-decoration: none; }
.cf-hero__breadcrumb a, .cf-hero__breadcrumb span { text-decoration: none; }
.cf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cf-grid--1 { grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .form-grid, .form-grid.cols-2, .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid > .span-2, .form-grid > .span-3 { grid-column: auto; }
  .cf-grid--3 { grid-template-columns: 1fr; }
  .cf-page { margin: -1rem; }
}

/* ── Notices ─────────────────────────────────────────────── */
.plt-alert { display: flex; align-items: flex-start; gap: .625rem; padding: .8rem 1rem; border-radius: .625rem; border: 1px solid; font-size: .8125rem; line-height: 1.5; margin-bottom: 1rem; }
.plt-alert svg { margin-top: .15rem; }
.plt-alert--info { background: #eff6ff; border-color: rgba(37, 99, 235, .2); color: #1d4ed8; }
.plt-alert--success { background: #ecfdf5; border-color: rgba(5, 150, 105, .22); color: #047857; }
.plt-alert--warning { background: #fffbeb; border-color: rgba(217, 119, 6, .28); color: #92400e; }
.plt-alert--danger { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

/* ── Modal / drawer ──────────────────────────────────────── */
.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); z-index: 300; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop.open, .drawer-backdrop.open { display: flex; animation: fadeIn .15s ease; }
.modal { background: #fff; border: 1px solid var(--border-light); border-radius: 1.375rem; box-shadow: var(--shadow-2xl); width: 540px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; animation: scaleIn .18s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-light); }
.modal-header h3 { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; margin: 0; }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: .75rem; }
.menu { display: none; position: absolute; z-index: 200; min-width: 180px; background: #fff; border: 1px solid var(--border-light); border-radius: .75rem; box-shadow: var(--shadow-xl); padding: .35rem; }
.menu.open { display: block; }
.menu-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: .5rem; font-size: .8125rem; color: var(--text-secondary); text-decoration: none; background: none; border: 0; width: 100%; text-align: start; cursor: pointer; }
.menu-item:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Job workflow stepper ────────────────────────────────── */
.workflow-steps { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.workflow-steps li { flex: 1 1 110px; min-width: 110px; padding: .55rem .75rem; border-radius: .75rem; background: #fff; border: 1.5px solid var(--border-light); color: var(--text-muted); font-size: .72rem; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .05em; }
html[lang="ar"] .workflow-steps li { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.workflow-steps li.done { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .3); color: #059669; }
.workflow-steps li.current { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px var(--blue-glow); }
.workflow-steps li.attention { box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }
.workflow-blockers { margin: .5rem 0 0; padding-inline-start: 1.25rem; font-size: .8125rem; color: var(--text-secondary); }
.reopen-form { display: inline-flex; gap: .5rem; align-items: center; }
.reopen-form .form-control { min-width: 200px; padding: .5rem .85rem; }
#job-status-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
#job-status-actions form { margin: 0; }

/* ── Charge breakdown ────────────────────────────────────── */
.breakdown-box { border: 1px solid var(--border-light); border-radius: .75rem; background: #f8fafc; overflow: hidden; }
.breakdown-line { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; font-size: .8125rem; color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle); }
.breakdown-line:last-child { border-bottom: 0; }
.breakdown-line.total { background: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--text-primary); }

/* ── Reconciliation worksheet ────────────────────────────── */
.recon-table .row-mismatch td { background: rgba(239, 68, 68, .045); }
.recon-table .row-missing td { background: rgba(245, 158, 11, .06); }
.recon-table .status-match { color: #059669; font-weight: 700; }
.recon-table .status-mismatch { color: #dc2626; font-weight: 700; }
.recon-table .status-missing { color: #d97706; font-weight: 700; }
.recon-table .status-warning { color: #d97706; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .625rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-success { background: rgba(16, 185, 129, .1); color: #059669; }
.badge-danger { background: rgba(239, 68, 68, .1); color: #dc2626; }
.badge-warning { background: rgba(245, 158, 11, .1); color: #d97706; }
.badge-info, .badge-primary { background: rgba(37, 99, 235, .1); color: #1d4ed8; }
.badge-gray { background: rgba(148, 163, 184, .15); color: #64748b; }

/* ── Bulk bar / bar chart ────────────────────────────────── */
.bulk-bar { position: fixed; inset-inline: 0; bottom: 1.25rem; display: flex; justify-content: center; z-index: 150; pointer-events: none; transform: translateY(150%); transition: transform .25s ease; }
.bulk-bar.show { transform: none; }
.bulk-bar-inner { pointer-events: auto; display: flex; align-items: center; gap: .875rem; background: #0f172a; color: #fff; padding: .6rem 1rem; border-radius: 999px; box-shadow: var(--shadow-xl); }
.bulk-bar-count { font-size: .8125rem; font-weight: 600; }
.bulk-bar-divider { width: 1px; height: 20px; background: rgba(255, 255, 255, .2); }
.bulk-bar-actions { display: flex; gap: .5rem; }
.bulk-bar .btn { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .15); box-shadow: none; }
.bulk-bar .btn:hover { background: rgba(37, 99, 235, .4); }
.bar-chart-list { display: flex; flex-direction: column; gap: .7rem; }
.bar-chart-row { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; align-items: center; gap: .75rem; font-size: .8125rem; }
.bar-label { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: var(--bg-base); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; }
.bar-value { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* ── Upload Center ───────────────────────────────────────── */
.stepper { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.25rem; padding: .85rem 1.1rem; background: #fff; border: 1px solid var(--border-light); border-radius: 1rem; box-shadow: var(--shadow-sm); }
.stepper .step { display: inline-flex; align-items: center; gap: .55rem; font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.stepper .step .dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-base); border: 1.5px solid var(--border-medium); font-size: .72rem; font-weight: 700; }
.stepper .step.active { color: var(--blue); }
.stepper .step.active .dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-bg); }
.stepper .step.done { color: #059669; }
.stepper .step.done .dot { background: #10b981; border-color: #10b981; color: #fff; }
.stepper .step-sep { width: 28px; height: 2px; background: var(--border-medium); border-radius: 2px; }
.upload-kind-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .875rem; }
.upload-kind-card { position: relative; cursor: pointer; }
.upload-kind-card input { position: absolute; opacity: 0; }
.upload-kind-card > .upload-kind-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; border: 1.5px solid var(--border-light); border-radius: .875rem; background: #fff; transition: all var(--ease-fast); height: 100%; }
.upload-kind-card:hover > .upload-kind-body { border-color: var(--border-blue); }
.upload-kind-card input:checked + .upload-kind-body { border-color: var(--blue); background: var(--blue-bg); box-shadow: 0 0 0 3px var(--blue-bg); }
.upload-kind-icon { color: var(--blue); }
.upload-kind-label { font-weight: 700; color: var(--text-primary); font-size: .875rem; }
.upload-kind-desc { font-size: .72rem; color: var(--text-muted); }
.dropzone { display: block; border: 2px dashed var(--border-strong); border-radius: 1rem; background: #f8fafc; padding: 2.25rem 1rem; text-align: center; cursor: pointer; transition: all var(--ease-fast); }
.dropzone:hover, .dropzone.is-dragover { border-color: var(--blue); background: var(--blue-bg); }
.dropzone input[type=file] { display: none; }
.dropzone .dz-icon { color: var(--blue); margin-bottom: .5rem; }
.dropzone .dz-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.dropzone .dz-hint { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.dropzone .file-chip { display: none; align-items: center; gap: .75rem; justify-content: center; }
.dropzone.has-file [data-dz-prompt] { display: none; }
.dropzone.has-file .file-chip { display: inline-flex; }
.file-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: .6rem; background: var(--blue-bg); color: var(--blue); }
.file-meta { text-align: start; }
.file-name { font-weight: 600; font-size: .85rem; color: var(--text-primary); }
.file-size { font-size: .72rem; color: var(--text-muted); }
.kpi-top { display: flex; align-items: center; gap: .75rem; }
.kpi-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.tint-success { background: rgba(16, 185, 129, .1); color: #059669; }
@media (max-width: 700px) { .upload-kind-choices { grid-template-columns: 1fr; } }

/* ── Print ───────────────────────────────────────────────── */
.print-header { display: none; }
@media print {
  .no-print, .sidebar, .top-header, .sidebar-backdrop, .network-banner, .pl-toast-container, .bulk-bar { display: none !important; }
  .print-header { display: block; }
  .main-wrapper { margin: 0 !important; width: 100% !important; }
  .page-body { padding: 0; }
  body { background: #fff; }
  .card, .table-card { box-shadow: none; border: 1px solid #ddd; }
}

/* ── Searchable select (port of Aviation app-searchable-select) ── */
select.ss-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.ss { position: relative; width: 100%; }
.ss__trigger { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 0 .75rem; border: 1.5px solid rgba(0, 0, 0, .09); border-radius: .625rem; background: #f8fafc; cursor: pointer; font-size: .8125rem; color: #111827; font-family: var(--font-body); transition: border-color .15s, box-shadow .15s, background .15s; user-select: none; min-height: 42px; box-sizing: border-box; line-height: 1.3; }
.ss__trigger:hover { border-color: rgba(0, 0, 0, .18); }
.ss__trigger:focus-visible { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.ss--open .ss__trigger { background: #fff; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.ss--disabled .ss__trigger { opacity: .5; cursor: not-allowed; }
.ss__trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss__placeholder { color: #94a3b8; }
.ss__chevron { flex-shrink: 0; color: #94a3b8; transition: transform .2s cubic-bezier(.4, 0, .2, 1); }
.ss--open .ss__chevron { transform: rotate(180deg); color: #3b82f6; }
.ss__panel { z-index: 9999; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 4px 6px -1px rgba(0, 0, 0, .07), 0 16px 32px -4px rgba(0, 0, 0, .12); overflow: hidden; animation: ss-drop .14s cubic-bezier(.22, 1, .36, 1); }
@keyframes ss-drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.ss__search-wrap { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #f1f5f9; background: #fafbfc; }
.ss__search-icon { flex-shrink: 0; color: #94a3b8; }
.ss__search { flex: 1; border: none; outline: none; background: transparent; font-size: .8125rem; font-family: var(--font-body); color: #1e293b; min-width: 0; }
.ss__search::placeholder { color: #b0bec5; }
.ss__list { max-height: 236px; overflow-y: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent; }
.ss__item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; font-size: .8125rem; cursor: pointer; color: #334155; font-family: var(--font-body); transition: background .1s; }
.ss__item-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss__item:hover { background: #f1f5f9; }
.ss__item--active { background: #eff6ff; color: #2563eb; font-weight: 500; }
.ss__item--active:hover { background: #dbeafe; }
.ss__item--clear { color: #94a3b8; border-bottom: 1px solid #f1f5f9; border-radius: 0; margin-bottom: 4px; padding-bottom: 8px; }
.ss__item--empty { color: #94a3b8; cursor: default; justify-content: center; font-style: italic; padding: 12px 10px; }
.ss__item--empty:hover { background: transparent; }
.ss__item-check { color: #2563eb; flex-shrink: 0; }
.ss__item-check-placeholder { width: 12px; flex-shrink: 0; }

.kpi-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .kpi-grid--2 { grid-template-columns: 1fr; } }

/* generic inline filter row (audit log, reports) */
.filters { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.filters .form-control { width: auto; min-width: 180px; flex: 0 1 280px; padding: .5625rem 1rem; }
.filters .btn { padding: .5rem .9rem; }
.brand-logo__sub { overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.table-toolbar .filters { padding: 0; border: 0; }
.data-table td.cell-primary { white-space: nowrap; }

/* ── Error / offline pages ───────────────────────────────── */
.plt-error { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .85rem; max-width: 520px; margin: 0 auto; padding: 8vh 1rem 2rem; }
.plt-error__code { font-family: var(--font-display); font-size: 5rem; font-weight: 800; line-height: 1; background: linear-gradient(135deg, #0f172a, #2563eb); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -.04em; }
.plt-error__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin: 0; }
.plt-error__text { color: var(--text-muted); font-size: .9rem; line-height: 1.6; margin: 0 0 .5rem; }
.pl-empty__icon { width: 56px; height: 56px; background: #f0f4ff; border-radius: 1rem; display: flex; align-items: center; justify-content: center; color: #6366f1; }
.jl-job-id { white-space: nowrap; }
p.hint { margin: 0 0 .75rem; }
