/* ==========================================================================
   Lingsaa Support — staff app. Tokens and shared components come from /assets/base.css.
   Shell follows Lingsaa Monitor (navy sidebar, sticky blurred top bar).
   ========================================================================== */

.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.btn.block { width: 100%; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.sm.icon-only { width: 28px; }
.noscript { padding: 24px; }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.seg .btn, .seg button {
  height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; box-shadow: none;
  color: var(--text-2); font-size: 13px; font-weight: 550;
}
.seg .btn:hover { color: var(--text); background: transparent; }
.seg .btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border), 0 1px 3px rgba(16, 24, 40, 0.1); }

/* Loading */
.boot { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 28px 20px; justify-content: center; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.retry-btn { margin-left: 12px; }
.notice .retry-btn { vertical-align: middle; }

/* ---------- App shell ---------- */

.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  --text: var(--side-text);
  --text-2: var(--side-text-2);
  --muted: var(--side-muted);
  --surface: #161b38;
  --surface-2: var(--side-hover);
  --border: var(--side-border);
  --border-strong: rgba(255, 255, 255, 0.14);
  --critical-tint: rgba(229, 72, 77, 0.2);
  --critical-ink: #ff9a9d;
  --focus: #a5a7ff;
  color-scheme: dark;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--side-bg); color: var(--text);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  min-width: 0; isolation: isolate;
}
.sidebar::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 260px; z-index: -1; pointer-events: none;
  background: radial-gradient(260px 200px at 20% -40px, rgba(129, 132, 255, 0.28), transparent 70%);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 16px 14px 20px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 15.5px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent-grad); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 16px -4px rgba(99, 102, 241, 0.7);
}
.brand-mark .icon { width: 18px; height: 18px; }
.sidebar .menu-btn { display: none; color: var(--text); }
.sidebar-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
.new-btn { margin: 4px 0 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 11px;
  border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-weight: 500; min-width: 0;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link > .icon { color: var(--muted); }
.nav-link:hover > .icon { color: var(--text-2); }
.nav-link[aria-current="page"] { background: var(--side-active); color: #fff; box-shadow: inset 0 0 0 1px rgba(129, 132, 255, 0.18); }
.nav-link[aria-current="page"]::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent-grad); box-shadow: 0 0 12px rgba(129, 132, 255, 0.8);
}
.nav-link[aria-current="page"] > .icon { color: #a5a7ff; }
.nav-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count {
  font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; padding: 0 7px; min-width: 20px;
  text-align: center; line-height: 18px; border-radius: 9px;
  background: var(--critical-tint); color: var(--critical-ink); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, 0.3);
}
.nav-count.neutral { background: rgba(255, 255, 255, 0.08); color: var(--text-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.nav-section { margin-top: 20px; }
.nav-section-title { display: block; padding: 0 11px 8px; font-size: 10.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.side-select { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: var(--border-strong); }
.side-select option { background: #161b38; color: #eef0fb; }

.sidebar-foot { border-top: 1px solid var(--border); padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 12px; background: rgba(0, 0, 0, 0.12); }
.sidebar-foot .seg { display: flex; background: rgba(255, 255, 255, 0.04); }
.sidebar-foot .seg .btn { flex: 1; }
.sidebar-foot .seg .btn[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: #fff; }
.user-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-text { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .btn.ghost { color: var(--text-2); }
.sidebar .btn.ghost:hover { color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 16px 32px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.page-title { flex: 1 1 200px; min-width: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-controls select { width: auto; }
.updated { color: var(--muted); font-size: 12.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.updated:not(:empty)::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-tint); }
.updated.failed { color: var(--critical-ink); }
.updated.failed::before { background: var(--critical); box-shadow: 0 0 0 3px var(--critical-tint); }
.content { padding: 24px 32px 56px; display: flex; flex-direction: column; gap: 20px; max-width: 1520px; width: 100%; outline: none; }
.view { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.view .card + .card { margin-top: 0; }
.view.narrow { max-width: 820px; }

/* ---------- Login ---------- */

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-wrap { width: 100%; max-width: 400px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 18px; }
.login-card { padding: 28px; box-shadow: var(--shadow); }
.login-title { font-size: 20px; margin-bottom: 4px; }
.login-foot { text-align: center; margin-top: 16px; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: 0.4em; text-align: center; }

/* ---------- Inbox ---------- */

.filter-bar { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.search-wrap { position: relative; }
.search-wrap > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input { padding-left: 36px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row select { width: auto; flex: 1 1 140px; min-width: 0; max-width: 220px; min-height: 34px; padding: 5px 9px; font-size: 13px; }

.list-card { padding: 0; overflow: hidden; transition: opacity 0.15s; }
.list-card.is-loading { opacity: 0.55; }
.card-pad { padding: 16px; }
.trow {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, 1fr) 96px;
  gap: 14px; align-items: center; padding: 12px 18px;
  color: var(--text); text-decoration: none; border-bottom: 1px solid var(--grid);
}
a.trow:hover { background: var(--surface-2); text-decoration: none; }
.tlist .trow:last-child { border-bottom: 0; }
.trow.thead { padding-top: 10px; padding-bottom: 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); }
.trow-main { min-width: 0; }
.trow-top { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.trow-num { color: var(--text-2); font-size: 12px; }
.trow-app { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-dot { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
.reply-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.trow-subject { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.needs-reply .trow-subject { font-weight: 700; }
.trow-preview { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-who { min-width: 0; font-size: 13px; }
.trow-name, .trow-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.trow-assignee { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-when { font-size: 12.5px; text-align: right; white-space: nowrap; }
.empty-icon { width: 32px; height: 32px; color: var(--muted); margin-bottom: 8px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Ticket ---------- */

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.ticket-head { display: flex; flex-direction: column; gap: 8px; }
.ticket-meta { gap: 8px; }
.ticket-num { font-size: 13px; color: var(--text-2); }
.app-pill { background: var(--surface-3); }
.subject-row { display: flex; align-items: flex-start; gap: 8px; }
.ticket-subject { font-size: 21px; line-height: 1.3; overflow-wrap: anywhere; }
.subject-edit { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.subject-edit input { flex: 1 1 260px; }

.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.ticket-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.thread-card { padding: 16px; }
.ticket-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 4px; }
.side-card { padding: 16px; }
.side-card h3 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.side-field { display: block; margin-top: 10px; }
.side-field:first-of-type { margin-top: 0; }
.side-field > span { display: block; font-size: 12.5px; font-weight: 550; color: var(--text-2); margin-bottom: 4px; }
.side-field select { min-height: 34px; padding: 5px 9px; }
.take-btn { margin-top: 6px; }

.facts { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fact { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; font-size: 13px; }
.fact dt { color: var(--muted); }
.fact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cust-history { margin-top: 12px; border-top: 1px solid var(--grid); padding-top: 10px; }
.cust-history ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cust-history li a { font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.cust-history .row { gap: 6px; margin-top: 3px; }
.events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 9px; border-radius: 999px; background: var(--surface-3); font-size: 12.5px; }
.tag-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; background: transparent; color: var(--muted); border-radius: 50%; cursor: pointer; padding: 0; }
.tag-x:hover { background: var(--surface-2); color: var(--text); }
.tag-x .icon { width: 12px; height: 12px; }
.tags .tag-input { flex: 1 1 100px; min-height: 30px; padding: 4px 8px; font-size: 13px; }

.msg .msg-head { flex-wrap: wrap; }
.who-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.msg.internal .who-tag { color: var(--warning-ink); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { display: block; width: 120px; height: 90px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attachments a .icon { width: 13px; height: 13px; }

.composer { padding: 16px; }
.composer.is-internal { background: var(--warning-tint); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.composer textarea { min-height: 140px; }
.mode-hint { margin-top: 0; }
.composer-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.saved-select { width: auto; max-width: 240px; min-height: 36px; }
.after-label { display: inline-flex; align-items: center; gap: 8px; }
.after-select { width: auto; min-height: 36px; }
.kbd-hint { margin: 0; }

.attacher { display: flex; flex-direction: column; gap: 8px; }
.attach-hint { margin-top: 0; }
.attach-list { display: flex; flex-direction: column; gap: 6px; }
.attach-list:empty { display: none; }
.attach-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto 80px auto auto; gap: 8px; align-items: center;
  padding: 6px 8px 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px;
}
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-track { height: 5px; border-radius: 3px; background: var(--track-accent); overflow: hidden; }
.attach-bar { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.attach-item.done .attach-bar { background: var(--good); }
.attach-item.failed { border-color: color-mix(in srgb, var(--critical) 35%, transparent); }
.attach-item.failed .attach-track { display: none; }
.attach-item.failed .attach-state { grid-column: 4 / 6; }
.attach-state { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- New ticket / forms ---------- */

.new-form { display: flex; flex-direction: column; gap: 16px; }
.new-form .card + .card { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row legend { font-weight: 550; font-size: 13px; color: var(--text-2); margin-bottom: 6px; padding: 0; width: 100%; }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.form-actions { justify-content: flex-end; }
.with-unit { display: flex; align-items: center; gap: 8px; }
.num-input { max-width: 110px; }

/* ---------- Reports ---------- */

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { padding: 16px 18px; }
.tile-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.tile-bad .tile-value { color: var(--critical-ink); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 200px; margin-top: 16px; padding-bottom: 2px; border-bottom: 1px solid var(--axis); }
.bar-day { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.bar-pair { display: flex; align-items: flex-end; gap: 1px; width: 100%; height: 100%; }
.bar { flex: 1; min-height: 0; border-radius: 3px 3px 0 0; }
.bar.created, .key.created { background: var(--series); }
.bar.solved, .key.solved { background: var(--s-3xx); }
.bar-axis { display: flex; justify-content: space-between; margin-top: 6px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.table-wrap { overflow-x: auto; }

/* ---------- Settings ---------- */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab { padding: 8px 12px; color: var(--text-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
td.actions, .actions { white-space: nowrap; }
td.actions .btn + .btn, .actions .btn + .btn { margin-left: 6px; }
td select { min-height: 32px; padding: 4px 8px; width: auto; }
.reply-list { list-style: none; margin: 0; padding: 0; }
.reply-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--grid); }
.reply-text { flex: 1; min-width: 0; }
.reply-body { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Dialogs ---------- */

.modal {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow);
}
.modal.wide { width: min(680px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(10, 12, 25, 0.5); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 14px 20px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.modal-foot.inline { padding: 4px 0 0; }
.copy-box { display: flex; gap: 8px; }
.secret-input { flex: 1; font-size: 13px; }

/* ---------- Phones / tablets ---------- */

@media (max-width: 1100px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
  .ticket-side { position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trow { grid-template-columns: minmax(0, 3fr) minmax(0, 1.4fr) minmax(0, 1.4fr) 90px; }
  .trow-assignee, .trow.thead > :nth-child(4) { display: none; }
}

@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 40; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar::before { height: 100%; }
  .sidebar-head { padding: 10px 12px 10px 16px; min-height: 58px; }
  .sidebar .menu-btn { display: inline-flex; }
  .sidebar-panel {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100vh - 58px); background: var(--side-bg);
    border-bottom: 1px solid var(--border); box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  }
  .sidebar.open .sidebar-panel { display: flex; }
  .sidebar-scroll { padding: 4px 10px 12px; }
  .nav-link[aria-current="page"]::before { left: -10px; }

  .topbar { position: static; padding: 14px 16px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .page-title { font-size: 18px; }
  .content { padding: 4px 16px 40px; }
  .hide-sm { display: none; }

  .trow.thead { display: none; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; }
  .trow-main { grid-column: 1 / -1; }
  .trow-subject, .trow-preview { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .trow-who { grid-column: 1; display: flex; gap: 6px; flex-wrap: wrap; color: var(--text-2); }
  .trow-who > * { max-width: 100%; }
  .trow-company::before { content: '· '; }
  .trow-when { grid-column: 2; grid-row: 2; align-self: start; }
  .trow-pills { grid-column: 1 / -1; }
  .trow-assignee { display: none; }
  .filter-row select { max-width: none; flex: 1 1 calc(50% - 8px); }

  .ticket-side { grid-template-columns: minmax(0, 1fr); }
  .ticket-subject { font-size: 18px; }
  .thread-card, .composer { padding: 12px; }
  .composer-actions > * { flex: 1 1 100%; }
  .composer-actions .spacer { display: none; }
  .saved-select, .after-select { max-width: none; width: 100%; }
  .after-label { flex-direction: column; align-items: stretch; gap: 4px; }
  .composer-actions .btn.primary { width: 100%; }
  .attach-item { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .attach-size, .attach-track { display: none; }
  .attach-item.failed .attach-state { grid-column: auto; }
  .kbd-hint { display: none; }

  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-4, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 12px 14px; }
  .tile-value { font-size: 21px; }
  .bars { height: 150px; gap: 1px; }
  .fact { grid-template-columns: 100px minmax(0, 1fr); }
  .form-actions .btn { flex: 1; }
  td.actions { white-space: normal; }
  td.actions .btn { margin: 2px 4px 2px 0; }
  td.actions .btn + .btn { margin-left: 0; }
  .reply-item { flex-direction: column; }
  .modal-head { padding: 14px 16px 0; }
  .modal-body { padding: 12px 16px 16px; }
  .modal-foot { padding: 0 16px 16px; }
  .copy-box { flex-direction: column; }
}
