/* Shared workspace controls. Brand accents stay distinct from status colours. */
:root { --ux-canvas:#f3f5f6; --ux-paper:#fff; --ux-text:#202a31; --ux-muted:#5d6b74; --ux-line:#dce2e5; --ux-accent:#bd4d08; --ux-green:#137458; --ux-focus:#176fc1; }
body:has(.admin-top-shell) { --mf-canvas:var(--ux-canvas); --mf-paper:var(--ux-paper); --mf-text:var(--ux-text); --mf-muted:var(--ux-muted); --mf-line:var(--ux-line); --mf-ink:#202a31; --mf-rail:#202a31; --mf-rail-soft:#2d3940; --mf-radius:8px; --mf-shadow:none; color:var(--ux-text); font-size:14px; }
body:has(.admin-top-shell) :is(button,input,textarea,select) { font-family:inherit; }
body:has(.admin-top-shell) :is(h1,h2,h3,h4,p,span,strong,small,button,label), body:has(#portal) :is(h1,h2,h3,h4,p,span,strong,small,button,label) { letter-spacing:0!important; }
body:has(.admin-top-shell) .content { padding:20px 24px 32px!important; }
body:has(.admin-top-shell) .admin-header { background:#fff!important; border-bottom:1px solid var(--ux-line)!important; box-shadow:none!important; }
body:has(.admin-top-shell) .admin-userbar { grid-template-columns:minmax(240px,1fr) auto auto auto auto!important; gap:10px!important; }
body:has(.admin-top-shell) .admin-current-view { display:none!important; }
body:has(.admin-top-shell) .global-search { width:100%; max-width:560px!important; }
body:has(.admin-top-shell) #globalSearchInput { background:#f3f5f6!important; color:var(--ux-text)!important; border-color:var(--ux-line)!important; font-size:14px!important; min-height:42px!important; }
body:has(.admin-top-shell) #globalSearchInput::placeholder { color:var(--ux-muted); }
body:has(.admin-top-shell) .admin-userbar > :is(.client-live-chip,.esp-indicator) { display:none!important; }
body:has(.admin-top-shell) .mission-utility-menu > summary { background:#f3f5f6!important; color:var(--ux-text)!important; border:1px solid var(--ux-line)!important; }
body:has(.admin-top-shell) .mission-user-initials { background:#e5eaed!important; color:#354750!important; }
body:has(.admin-top-shell) .admin-top-nav { background:#202a31!important; }
body:has(.admin-top-shell) .admin-brand { background:#202a31!important; }
body:has(.admin-top-shell) .admin-top-nav button[data-nav], body:has(.admin-top-shell) .admin-nav-group-toggle { font-size:13px!important; font-weight:600!important; min-height:42px!important; }
body:has(.admin-top-shell) .admin-top-nav [data-nav].active { background:#3d322b!important; color:#ffb579!important; border-color:#876045!important; }
body:has(.admin-top-shell) :is(.btn,.segmented button) { border-radius:6px!important; box-shadow:none!important; font-size:13px!important; font-weight:650!important; min-height:38px; white-space:normal; line-height:1.35; }
body:has(.admin-top-shell) .btn.primary { background:#bd4d08!important; border-color:#bd4d08!important; color:#fff!important; }
body:has(.admin-top-shell) :is(.btn.green,.btn.blue,.btn.warn,.btn.red) { box-shadow:none!important; }
body:has(.admin-top-shell) .btn.red { background:#fff5f5!important; border-color:#edc5c9!important; color:#a52839!important; }
body:has(.admin-top-shell) :is(.field label,.check) { color:#45535c!important; font-size:13px!important; font-weight:650!important; }
body:has(.admin-top-shell) :is(.field input,.field select,.field textarea,.search,.mini-select) { font-size:14px!important; color:#202a31!important; border:1px solid #cbd4d9!important; border-radius:6px!important; background:#fff!important; min-height:40px; }
body:has(.admin-top-shell) :is(input,textarea,select):focus-visible, body:has(#portal) :is(input,textarea,select):focus-visible { outline:2px solid var(--ux-focus)!important; outline-offset:2px; box-shadow:none!important; }
:is(button,a,summary):focus-visible { outline:2px solid var(--ux-focus)!important; outline-offset:3px; }
[aria-invalid="true"] { outline:2px solid #b92d43!important; outline-offset:1px; }
body:has(.admin-top-shell) .mission-page-intro { margin:0 0 16px!important; padding:0 0 14px!important; border-bottom:1px solid var(--ux-line); min-height:0!important; }
body:has(.admin-top-shell) .mission-page-copy h1 { font-size:24px!important; line-height:1.25!important; margin:4px 0 0!important; }
body:has(.admin-top-shell) .mission-page-copy > p { display:none; }
body:has(.admin-top-shell) .mission-page-kicker { font-size:11px!important; color:var(--ux-muted)!important; }
body:has(.admin-top-shell) :is(.panel,.detail-side,.relation-box) { border-radius:6px!important; box-shadow:none!important; }
body:has(.admin-top-shell) #content > .panel { border:0!important; background:transparent!important; padding:0!important; }
body:has(.admin-top-shell) :is(.panel-head h2,.panel-head h3) { font-size:18px!important; }
body:has(.admin-top-shell) :is(.section-head h2,.section-head h3) { font-size:20px!important; }
body:has(.admin-top-shell) :is(.panel-head p,.section-head p) { font-size:13px!important; color:var(--ux-muted)!important; }
body:has(.admin-top-shell) .eyebrow { font-size:10px!important; font-weight:700; }
body:has(.admin-top-shell) :is(.summary-grid,.mini-stats) { gap:0!important; border:1px solid var(--ux-line); border-radius:6px; background:#fff; overflow:hidden; }
body:has(.admin-top-shell) :is(.summary-grid,.mini-stats) > .stat { border:0!important; border-right:1px solid var(--ux-line)!important; border-bottom:1px solid var(--ux-line)!important; border-radius:0!important; box-shadow:none!important; background:#fff!important; padding:12px 16px!important; min-height:72px!important; }
body:has(.admin-top-shell) .stat::before { display:none!important; }
body:has(.admin-top-shell) .stat > span { font-size:12px!important; color:var(--ux-muted)!important; }
body:has(.admin-top-shell) .stat > strong { font-size:20px!important; color:var(--ux-text)!important; line-height:1.35!important; }
body:has(.admin-top-shell) .modal .stat > strong { font-size:15px!important; }
body:has(.admin-top-shell) .dashboard-command-center { background:transparent!important; padding:0 0 18px!important; border:0!important; border-radius:0!important; box-shadow:none!important; min-height:0!important; }
body:has(.admin-top-shell) .dashboard-command-copy h1 { color:var(--ux-text)!important; font-size:28px!important; }
body:has(.admin-top-shell) .dashboard-command-copy p { color:var(--ux-muted)!important; font-size:14px!important; }
body:has(.admin-top-shell) .dashboard-quick-actions { display:none!important; }
body:has(.admin-top-shell) .dashboard-refresh { background:white!important; color:var(--ux-text)!important; border:1px solid var(--ux-line)!important; }
body:has(.admin-top-shell) .dashboard-briefing-strip { background:#fff!important; border:1px solid var(--ux-line)!important; border-radius:6px!important; color:var(--ux-text)!important; margin-bottom:20px!important; }
body:has(.admin-top-shell) .dashboard-briefing-strip :is(strong,span,small,b) { color:var(--ux-text)!important; }
body:has(.admin-top-shell) .dashboard-briefing-strip strong { font-size:24px!important; }
body:has(.admin-top-shell) .dashboard-briefing-strip button { border-color:var(--ux-line)!important; min-height:82px!important; }
body:has(.admin-top-shell) .dashboard-briefing-strip :is(span,small) { font-size:12px!important; }
body:has(.admin-top-shell) :is(.dashboard-mission-grid,.dashboard-lower-grid) { gap:20px!important; align-items:start!important; }
body:has(.admin-top-shell) .dashboard-mission-grid { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)!important; }
body:has(.admin-top-shell) .dashboard-attention-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:0 14px!important; }
body:has(.admin-top-shell) .dashboard-planning-panel { min-height:0!important; }
body:has(.admin-top-shell) :is(.dashboard-planning-panel,.dashboard-attention-panel,.dashboard-priority-panel,.dashboard-flow-panel,.dashboard-receivables-panel) { padding:16px!important; border:1px solid var(--ux-line)!important; border-radius:6px!important; box-shadow:none!important; }
body:has(.admin-top-shell) :is(.dashboard-planning-empty,.dashboard-empty-planning) { min-height:180px!important; }
body:has(.admin-top-shell) :is(.dashboard-attention-card strong,.dashboard-priority-card strong) { font-size:13px!important; }
body:has(.admin-top-shell) :is(.dashboard-attention-card small,.dashboard-priority-card small) { font-size:12px!important; }
body:has(.admin-top-shell) .dashboard-workshop-footer { display:none; }
body:has(.admin-top-shell) :is(.production-table,.table,.document-table) { font-size:13px!important; }
body:has(.admin-top-shell) :is(.production-table,.table) th { font-size:11px!important; background:#edf1f3!important; color:#495963!important; }
body:has(.admin-top-shell) :is(.production-table,.table) td { padding:12px 10px!important; font-size:13px!important; vertical-align:top; overflow-wrap:anywhere; }
body:has(.admin-top-shell) :is(.production-table,.table) tbody tr:hover { background:#f3f8fa!important; }
body:has(.admin-top-shell) :is(.production-table,.table) :is(.muted,small) { font-size:12px!important; }
body:has(.admin-top-shell) .production-table-wrap { background:#fff!important; border:1px solid var(--ux-line)!important; border-radius:6px!important; }
body:has(.admin-top-shell) .ticket-status-filters { gap:6px!important; }
body:has(.admin-top-shell) .ticket-status-filters .kanban-check { font-size:12px!important; border-radius:5px!important; }
.ux-ticket-filters { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:12px 0; }
.ux-ticket-filters button { min-height:36px; border:1px solid var(--ux-line); background:#fff; border-radius:5px; padding:7px 12px; color:var(--ux-text); font-size:13px; }
.ux-ticket-filters button[aria-pressed="true"] { color:#fff; background:#237460; border-color:#237460; }
.ux-status-disclosure { margin:0 0 14px; color:var(--ux-muted); font-size:13px; }
.ux-status-disclosure summary { cursor:pointer; padding:8px 0; }
.ux-status-disclosure[open] summary { margin-bottom:6px; }
.ux-email-modes { display:flex; gap:8px; margin:12px 0; flex-wrap:wrap; }
.ux-email-text { padding:18px; white-space:pre-wrap; overflow-wrap:anywhere; background:#f3f5f6; font:14px/1.6 system-ui,sans-serif; }
.email-test-iframe { display:block; width:100%; max-width:100%; min-height:620px; margin:auto; background:#fff; border:1px solid var(--ux-line); }
.email-test-iframe[hidden] { display:none!important; }
.ux-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0; color:var(--ux-muted); font-size:13px; flex-wrap:wrap; }
.ux-pagination > div { display:flex; align-items:center; gap:10px; }
.ux-pagination select { border:1px solid var(--ux-line); padding:8px; border-radius:5px; background:#fff; color:var(--ux-text); }
.ux-pagination button:disabled { opacity:.4; cursor:default; }
body:has(.admin-top-shell) .modal-backdrop { padding:20px!important; background:rgba(19,29,35,.6)!important; backdrop-filter:blur(2px)!important; }
body:has(.admin-top-shell) .modal.mission-modal { border-radius:8px!important; box-shadow:0 16px 60px #0003!important; max-height:calc(100dvh - 40px)!important; background:#fff!important; }
body:has(.admin-top-shell) .modal.mission-modal.modal-wide { width:min(1380px,100%)!important; max-width:1380px!important; }
body:has(.admin-top-shell) .modal.mission-modal.modal-document { width:min(1520px,100%)!important; max-width:1520px!important; }
body:has(.admin-top-shell) .modal.mission-modal .modal-head { background:#fff!important; padding:18px 20px!important; border-bottom:1px solid var(--ux-line)!important; }
body:has(.admin-top-shell) .modal.mission-modal .modal-head h2 { font-size:21px!important; line-height:1.3!important; }
body:has(.admin-top-shell) .modal .field { min-width:0; }
body.modal-open .modal.mission-modal :is(.btn,button) { font-size:13px!important; min-height:40px!important; }
body.modal-open .modal.mission-modal .field :is(input,select,textarea) { font-size:15px!important; }
body.modal-open .modal.mission-modal:has(#ticketForm) .document-modal-grid { display:block!important; }
body.modal-open .modal.mission-modal:has(#ticketForm) .detail-side { display:none!important; }
body:has(.admin-top-shell) .modal :is(.detail-main,.detail-side) { min-width:0; }
body:has(.admin-top-shell) .modal .detail-side { border:0!important; padding:16px!important; background:#fff!important; }
.ux-tabs { display:flex; gap:0; padding:0 20px; background:#fff; border-bottom:1px solid var(--ux-line); position:sticky; top:0; z-index:5; }
.ux-tabs button { min-height:48px; padding:12px 16px; border:0; border-bottom:3px solid transparent; background:none; font:inherit; font-size:14px; font-weight:650; color:var(--ux-muted); }
.ux-tabs button[aria-selected="true"] { border-bottom-color:#bd4d08; color:#a33d05; }
body:has(.admin-top-shell) .detail-grid.ux-ticket-layout { display:block!important; padding:18px 20px!important; }
.ux-ticket-layout > [hidden] { display:none!important; }
.ux-ticket-layout > section,.ux-ticket-layout > aside { margin:0!important; padding:0!important; }
.ux-ticket-layout #ticketEditForm { display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:12px 18px!important; }
.ux-ticket-layout #ticketEditForm .wide { grid-column:1/-1!important; }
.ux-ticket-layout #ticketEditForm > button[type="submit"],.ux-ticket-layout #ticketEditForm > button:last-child { position:sticky; bottom:0; z-index:4; padding:12px!important; margin:0; }
.ticket-save-feedback { padding:10px 12px; border:1px solid #b9d0c6; background:#eff7f3; color:#254e3d; border-radius:6px; overflow-wrap:anywhere; }
.ticket-save-feedback[hidden] { display:none!important; }
.ticket-save-feedback.error { border-color:#d69c9c; background:#fff1f1; color:#922e2e; }
#ticketForm > button[type="submit"], #ticketEditForm > button[type="submit"] { transform:none!important; touch-action:manipulation; }
.ux-ticket-layout .summary-grid { grid-template-columns:repeat(4,minmax(0,1fr))!important; }
.ux-ticket-layout .link-grid { display:flex!important; flex-wrap:wrap; gap:8px!important; margin:16px 0!important; }
.ux-ticket-layout :is(.ticket-parts-panel,.dormancy-panel,.aiq-panel,.history-fold) { border-radius:6px!important; box-shadow:none!important; }
.ux-ticket-layout .ticket-photo-proof { margin-top:0!important; }
.ux-ticket-history .history-fold { margin-top:0; margin-bottom:16px; }
.ux-ticket-history .communication-loading { margin-top:0; }
.ux-notify-button { display:inline-flex; position:relative; align-items:center; justify-content:center; width:42px; height:42px; padding:0; border:1px solid var(--ux-line); border-radius:6px; color:var(--ux-text); background:#fff; }
.ux-notify-button i { font-size:20px; }
.ux-notify-button b { position:absolute; top:-5px; right:-5px; min-width:19px; padding:2px 4px; border-radius:12px; font-size:10px; background:#b52f45; color:#fff; }
.ux-toast { position:fixed; z-index:10030; bottom:22px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:12px; width:max-content; max-width:min(620px,calc(100vw - 32px)); padding:12px 14px; background:#253238; color:#fff; border-radius:7px; box-shadow:0 5px 20px #0003; font:14px/1.4 system-ui,sans-serif; }
.ux-toast > span { overflow-wrap:anywhere; max-height:6em; overflow:auto; }
.ux-toast.error { background:#922e41; }.ux-toast.warn { background:#745411; }
.ux-toast button { flex-shrink:0; border:0; background:transparent; color:#fff; text-decoration:underline; font:inherit; padding:6px; min-height:32px; }
.ux-toast button.ux-toast-close { text-decoration:none; font-size:22px; padding:2px 6px; }
.ux-notifications { list-style:none; margin:0; padding:0; }
.ux-notification { display:flex; justify-content:space-between; gap:16px; border-bottom:1px solid var(--ux-line); padding:16px 20px; }
.ux-notification > div { display:grid; gap:6px; }.ux-notification strong { font-size:14px; font-weight:600; overflow-wrap:anywhere; }.ux-notification time { font-size:12px; color:var(--ux-muted); }
.ux-notification.error { border-left:3px solid #b52f45; }.ux-notification-tools { padding:12px 20px; }
.ux-refresh,.ux-network { position:fixed; bottom:0; left:0; right:0; z-index:10020; display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:12px; padding:10px 16px; background:#edf5fc; color:#214c70; border-top:1px solid #b5d1e7; font:13px/1.4 system-ui,sans-serif; }
.ux-refresh button { border:1px solid #8aadc7; background:#fff; color:#214c70; border-radius:5px; min-height:32px; padding:5px 10px; cursor:pointer; }
.ux-refresh-dismiss { font-size:20px; }.ux-network { background:#fff3d9; color:#735008; border-color:#dfc386; }
body:has(.admin-top-shell) .livechat-v2-layout { border-radius:6px!important; box-shadow:none!important; }
body:has(.admin-top-shell) :is(.livechat-message,.lc-message,.chat-msg-bubble) { border-radius:8px!important; font-size:14px!important; line-height:1.55!important; }
body:has(.admin-top-shell) .lcx-command { background:transparent!important; color:var(--ux-text)!important; border:0!important; padding:0 0 16px!important; border-radius:0!important; box-shadow:none!important; }
body:has(.admin-top-shell) .lcx-title h2 { font-size:24px!important; color:var(--ux-text)!important; }
body:has(.admin-top-shell) .lcx-title > p { display:none; }
body:has(.admin-top-shell) .lcx-metrics { gap:0!important; border:1px solid var(--ux-line); border-radius:6px; overflow:hidden; }
body:has(.admin-top-shell) .lcx-metrics button { background:#fff!important; border:0!important; border-right:1px solid var(--ux-line)!important; border-radius:0!important; color:var(--ux-text)!important; min-height:64px!important; box-shadow:none!important; }
body:has(.admin-top-shell) .lcx-metrics :is(span,strong,i) { color:var(--ux-text)!important; }
body:has(.admin-top-shell) .lcx-metrics strong { font-size:22px!important; }
body:has(.admin-top-shell) .lcx-metrics span { font-size:12px!important; }
body:has(.admin-top-shell) .lca-row-top strong { font-size:14px!important; }
body:has(.admin-top-shell) .lca-row-sub { font-size:13px!important; line-height:1.4!important; }
body:has(.admin-top-shell) .lca-row-meta :is(span,b,em),body:has(.admin-top-shell) .lca-row-top time { font-size:11px!important; }
body:has(.admin-top-shell) .lca-list-h { font-size:12px!important; }
body:has(.admin-top-shell) .lcx-context :is(input,select,textarea) { font-size:14px!important; min-height:40px; }
body:has(.admin-top-shell) .lcx-context label { font-size:12px!important; }
body:has(.admin-top-shell) .lcx-contact-line { font-size:12px!important; overflow-wrap:anywhere; }
body:has(.admin-top-shell) :is(.lcx-context-head,.lcx-response-state,.lca-head-id,.lcx-contact-actions) :is(strong,span,small,a,button) { font-size:12px!important; }
body:has(.admin-top-shell) #content[data-view="livechat"] > .mission-page-intro { display:none!important; }
body:has(.admin-top-shell) .lcx-toolbar { background:transparent!important; border:0!important; padding:0 0 14px!important; gap:10px!important; }
body:has(.admin-top-shell) .lca { border:1px solid var(--ux-line)!important; border-radius:6px!important; box-shadow:none!important; background:#fff!important; }
body:has(.admin-top-shell) :is(.lca-head,.lca-list-h,.lcx-thread-bar,.lca-composer) { background:#fff!important; border-color:var(--ux-line)!important; }
body:has(.admin-top-shell) .lca-row { border-radius:0!important; border-color:var(--ux-line)!important; box-shadow:none!important; }
body:has(.admin-top-shell) .lca-row.active { background:#eaf3f7!important; border-left:3px solid #237095!important; }
body:has(.admin-top-shell) .lca-avatar { background:#e4eef1!important; color:#305c6c!important; }
body:has(.admin-top-shell) .lca-head-id button { font-size:16px!important; overflow-wrap:anywhere; }
body:has(.admin-top-shell) .lca-msgs { background:#f4f6f7!important; }
body:has(.admin-top-shell) .lca-bubble { font-size:14px!important; line-height:1.6!important; border-radius:8px!important; box-shadow:none!important; overflow-wrap:anywhere; }
body:has(.admin-top-shell) .lca-msg.client .lca-bubble { background:#fff!important; color:var(--ux-text)!important; border:1px solid var(--ux-line)!important; }
body:has(.admin-top-shell) .lca-msg.staff .lca-bubble { background:#dfeee9!important; color:#164e3e!important; border:1px solid #c0d9cf!important; }
body:has(.admin-top-shell) .lcx-context { background:#fff!important; border-color:var(--ux-line)!important; }
body:has(.admin-top-shell) .lcx-context > section { border-radius:0!important; box-shadow:none!important; background:transparent!important; }
body:has(.admin-top-shell) .lcx-compose-foot > span { display:none; }
body:has(.admin-top-shell) .lcx-compose-foot { justify-content:flex-end; }
body:has(.admin-top-shell) :is(.lcx-filters,.lcx-quick-replies) button { border-radius:5px!important; min-height:34px; font-size:12px!important; }
body:has(.admin-top-shell) .lcx-filters button.active { background:#237460!important; border-color:#237460!important; color:#fff!important; }
body:has(#portal) { --bg:#f3f5f6; --panel:#fff; --panel-strong:#fff; --ink:#202a31; --muted:#5d6b74; --border:#dce2e5; --dark:#202a31; --dark-soft:#2d3940; --blue:#246caa; --green:#137458; --accent:#bd4d08; --accent-soft:#fff0e6; font-size:15px; }
body:has(#portal) :is(.portal-modal,.ticket-card,.document-card,.client-section) { border-radius:6px!important; box-shadow:none!important; }
body:has(#portal) .portal-modal { max-height:calc(100dvh - 32px)!important; overflow:auto; background:#fff!important; }
body:has(#portal) :is(input,select,textarea) { max-width:100%; min-height:42px; border-radius:6px!important; }
body:has(#portal) .portal-modal-head { position:sticky; top:0; z-index:5; background:#fff; border-bottom:1px solid var(--ux-line); }
body:has(#portal) .portal-modal-head h2 { font-size:22px!important; }
body:has(#portal) .portal-modal-backdrop { background:rgba(19,29,35,.6)!important; }
@media(min-width:1101px) {
  body:has(.admin-top-shell) .production-table { table-layout:fixed!important; width:100%!important; min-width:0!important; }
  body:has(.admin-top-shell) .production-table th:nth-child(1) { width:20%; }
  body:has(.admin-top-shell) .production-table th:nth-child(2) { width:15%; }
  body:has(.admin-top-shell) .production-table th:nth-child(3) { width:16%; }
  body:has(.admin-top-shell) .production-table th:nth-child(4) { width:13%; }
  body:has(.admin-top-shell) .production-table th:nth-child(5) { width:9%; }
  body:has(.admin-top-shell) .production-table th:nth-child(6) { width:10%; }
  body:has(.admin-top-shell) .production-table th:nth-child(7) { width:7%; }
  body:has(.admin-top-shell) .production-table th:nth-child(8) { width:10%; }
  body:has(.admin-top-shell) .production-table :is(select,button) { max-width:100%; min-width:0!important; }
}
@media(max-width:1100px) {
  body:has(.admin-top-shell) .content { padding:16px!important; }
  body:has(.admin-top-shell) .admin-userbar { grid-template-columns:minmax(180px,1fr) auto auto auto!important; }
  body:has(.admin-top-shell) .mission-plan-button { display:none!important; }
  .ux-ticket-layout .summary-grid { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
  .ux-ticket-layout #ticketEditForm { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
}
@media(max-width:760px) {
  body:has(.admin-top-shell) .admin-header { padding:0 12px!important; }
  body:has(.admin-top-shell) .admin-userbar { display:flex!important; flex-wrap:wrap!important; min-height:58px!important; gap:8px!important; }
  body:has(.admin-top-shell) .global-search { flex:1 1 100%; order:10; max-width:none!important; margin:0 0 10px!important; }
  body:has(.admin-top-shell) .admin-create-menu { margin-left:auto; }
  body:has(.admin-top-shell) .admin-create-menu > summary { min-height:38px!important; }
  body:has(.admin-top-shell) .admin-userbar .ux-notify-button { width:38px; height:38px; }
  body:has(.admin-top-shell) .content { padding:14px 12px 96px!important; }
  body:has(.admin-top-shell) .dashboard-command-copy h1 { font-size:24px!important; }
  body:has(.admin-top-shell) .dashboard-command-copy p { font-size:13px!important; }
  body:has(.admin-top-shell) .mission-page-context { display:none; }
  body:has(.admin-top-shell) .mission-page-copy h1 { font-size:23px!important; }
  body:has(.admin-top-shell) :is(.field input,.field select,.field textarea,.search,.mini-select) { font-size:16px!important; min-height:44px!important; }
  body:has(.admin-top-shell) .btn { min-height:42px!important; font-size:13px!important; }
  body:has(.admin-top-shell) .dashboard-briefing-strip { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  body:has(.admin-top-shell) .dashboard-attention-grid { grid-template-columns:minmax(0,1fr)!important; }
  body:has(.admin-top-shell) .tickets-workspace > .panel-head .toolbar { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px!important; width:100%; }
  body:has(.admin-top-shell) .tickets-workspace > .panel-head .toolbar :is(button,a) { width:100%!important; min-width:0!important; }
  body:has(.admin-top-shell) .tickets-workspace > .panel-head .toolbar > button:nth-last-child(3) { grid-column:1/-1; }
  body:has(.admin-top-shell) .kanban-tools { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px!important; }
  body:has(.admin-top-shell) .kanban-tools > :is(input,.muted) { grid-column:1/-1; }
  body:has(.admin-top-shell) .kanban-tools > :is(label,.segmented,select) { min-width:0!important; width:100%!important; margin:0!important; }
  body:has(.admin-top-shell) .kanban-tools > label { font-size:12px!important; }
  body:has(.admin-top-shell) .dashboard-briefing-title { display:none; }
  body:has(.admin-top-shell) .dashboard-briefing-risks { grid-column:1/-1; }
  body:has(.admin-top-shell) .dashboard-mission-grid { display:flex!important; flex-direction:column-reverse; }
  body:has(.admin-top-shell) .dashboard-mission-grid > * { width:100%; }
  body:has(.admin-top-shell) .modal-backdrop { padding:0!important; }
  body:has(.admin-top-shell) .modal.mission-modal { width:100%!important; max-width:100%!important; height:100dvh!important; max-height:100dvh!important; margin:0!important; border:0!important; border-radius:0!important; }
  body:has(.admin-top-shell) .modal.mission-modal .modal-head { padding:14px 16px!important; padding-top:max(14px,env(safe-area-inset-top))!important; }
  body:has(.admin-top-shell) .modal.mission-modal .modal-head h2 { font-size:19px!important; }
  body:has(.admin-top-shell) .detail-grid.ux-ticket-layout { padding:14px 16px 30px!important; }
  .ux-ticket-layout .summary-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  .ux-ticket-layout #ticketEditForm { grid-template-columns:minmax(0,1fr)!important; }
  .ux-tabs { padding:0 8px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ux-tabs button { padding:9px 5px; min-height:42px; font-size:12px; }
  .ux-toast { bottom:calc(82px + env(safe-area-inset-bottom)); max-width:calc(100vw - 24px); padding:10px 12px; font-size:13px; }
  .ux-toast > span { max-height:4.3em; }.ux-toast button { min-height:36px; }
  body.modal-open .ux-toast { bottom:calc(14px + env(safe-area-inset-bottom)); }
  .ux-refresh,.ux-network { bottom:calc(70px + env(safe-area-inset-bottom)); padding:8px 12px; font-size:12px; }
  .ux-pagination { font-size:12px; }.ux-pagination > div { gap:6px; }
  body:has(#portal) .portal-modal-backdrop { padding:0!important; }
  body:has(#portal) .portal-modal { width:100%!important; max-width:100%!important; max-height:100dvh!important; min-height:100dvh; border-radius:0!important; }
  body:has(#portal) :is(input,select,textarea) { font-size:16px!important; }
}
@media(max-width:1180px) {
  body:has(.admin-top-shell) .admin-header { display:grid!important; grid-template-columns:minmax(0,1fr) auto!important; grid-template-rows:54px 46px; height:112px!important; min-height:112px!important; padding:0 12px 12px!important; box-sizing:border-box; }
  body:has(.admin-top-shell) .admin-brand { position:static!important; width:auto!important; height:54px!important; background:transparent!important; padding:0!important; }
  body:has(.admin-top-shell) .admin-brand strong { color:var(--ux-text)!important; }
  body:has(.admin-top-shell) .admin-mobile-menu { position:static!important; grid-column:2; grid-row:1; margin:0!important; }
  body:has(.admin-top-shell) .admin-userbar { position:static!important; grid-column:1/-1; grid-row:2; display:grid!important; grid-template-columns:minmax(0,1fr) 42px auto!important; gap:8px!important; min-height:46px!important; margin:0!important; width:100%!important; }
  body:has(.admin-top-shell) .global-search { grid-column:1!important; grid-row:1!important; max-width:none!important; width:100%!important; margin:0!important; }
  body:has(.admin-top-shell) .admin-userbar > .ux-notify-button { grid-column:2; grid-row:1; width:42px; height:42px; }
  body:has(.admin-top-shell) .mission-utility-menu { grid-column:3!important; grid-row:1!important; }
  body:has(.admin-top-shell) .mission-utility-menu > summary { min-width:42px!important; padding:0 6px!important; }
  body:has(.admin-top-shell) .mission-utility-menu > summary > .ti { display:none; }
  body:has(.admin-top-shell) .admin-userbar > :is(.admin-create-menu,.mission-plan-button) { display:none!important; }
  body:has(.admin-top-shell) .global-search-results { left:0!important; right:auto!important; width:calc(100vw - 24px)!important; max-width:none!important; }
  body:has(.admin-top-shell) #adminTopNav.top-nav { top:112px!important; }
  body:has(.admin-top-shell) .dashboard-attention-grid { grid-template-columns:minmax(0,1fr)!important; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto!important; }
  *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
}
@media print {
  .ux-tabs,.ux-notify-button,.ux-toast,.ux-refresh,.ux-network,.ux-pagination,.ux-ticket-filters { display:none!important; }
  .ux-ticket-layout > [hidden] { display:block!important; }
}
