/* iOrders Support — v1.1 */
:root {
  --canvas: #f3f4f6;
  --paper: #ffffff;
  --paper-2: #f8f9fb;
  --line: #e4e7ec;
  --line-2: #d0d5dd;
  --ink: #15181e;
  --ink-2: #4b5563;
  --ink-3: #8a919e;
  --blue: #2457c5;
  --blue-ink: #fff;
  --blue-soft: #dde7fb;
  --blue-line: #b9c9f3;
  --open: #b7560a;
  --open-bg: #fdf1e4;
  --prog: #1d6b8f;
  --prog-bg: #e4f1f7;
  --esc: #c0271d;
  --esc-bg: #fce9e7;
  --closed: #237a47;
  --closed-bg: #e5f4ea;
  --other: #6b3fc0;
  --other-bg: #efe9fb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --radius: 10px;
}

:root[data-theme="dark"] {
  --canvas: #1b1f27;
  --paper: #232832;
  --paper-2: #2b313d;
  --line: #363d4b;
  --line-2: #465063;
  --ink: #f1f3f6;
  --ink-2: #bcc4d0;
  --ink-3: #8e97a7;
  --blue: #8db0ff;
  --blue-ink: #0b1a3d;
  --blue-soft: #243354;
  --blue-line: #3a5088;
  --open: #f5b366;
  --open-bg: #43301a;
  --prog: #74c6e8;
  --prog-bg: #193c4a;
  --esc: #ff968c;
  --esc-bg: #4a2320;
  --closed: #7fd8a4;
  --closed-bg: #1d3b28;
  --other: #c8b1ff;
  --other-bg: #342a4e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --canvas: #1b1f27;
    --paper: #232832;
    --paper-2: #2b313d;
    --line: #363d4b;
    --line-2: #465063;
    --ink: #f1f3f6;
    --ink-2: #bcc4d0;
    --ink-3: #8e97a7;
    --blue: #8db0ff;
    --blue-ink: #0b1a3d;
    --blue-soft: #243354;
    --blue-line: #3a5088;
    --open: #f5b366;
    --open-bg: #43301a;
    --prog: #74c6e8;
    --prog-bg: #193c4a;
    --esc: #ff968c;
    --esc-bg: #4a2320;
    --closed: #7fd8a4;
    --closed-bg: #1d3b28;
    --other: #c8b1ff;
    --other-bg: #342a4e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
  }
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px
}

*::-webkit-scrollbar-track {
  background: transparent
}

*::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--ink-3);
  background-clip: padding-box
}

*::-webkit-scrollbar-corner {
  background: transparent
}

html,
body {
  margin: 0;
  height: 100%
}

body {
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit
}

a {
  color: var(--blue);
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em
}

[hidden] {
  display: none !important
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px
}

@media (prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    animation: none !important
  }
}

/* ---- header ---- */
.app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  height: 100dvh
}

header.top {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  padding: 0 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line)
}

.brandblock {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  flex: none;
  line-height: 1
}

a.brandblock {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 4px;
  margin-left: -4px
}

a.brandblock:hover {
  background: var(--paper-2)
}

.brand {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  padding-left: 1px
}

.brand-logo {
  height: 18px;
  width: auto;
  display: block;
  flex: none
}

:root[data-theme="dark"] .brand-logo {
  filter: invert(1) brightness(1.6)
}

@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) .brand-logo {
    filter: invert(1) brightness(1.6)
  }
}

.nav {
  display: flex;
  gap: 2px
}

.btn.approvals {
  color: var(--open);
  border-color: var(--open);
  background: var(--open-bg);
  font-weight: 600
}

.btn.approvals b {
  margin-left: 4px;
  background: var(--open);
  color: #fff;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11.5px
}

.hbar {
  display: contents
}

.hsearch {
  flex: 0 1 460px;
  min-width: 160px
}

.hsearch .field {
  width: 100%;
  padding: 7px 12px;
  font-size: 13.5px;
  border-radius: 999px;
  background: var(--paper-2)
}

.hsearch .field:focus {
  background: var(--paper)
}

.queue.searching .filters-row {
  opacity: .45;
  pointer-events: none
}

.navbtn {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px
}

.navbtn:hover {
  background: var(--paper-2);
  color: var(--ink)
}

.navbtn[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
  background: var(--paper-2)
}

.spacer {
  flex: 1
}

.me {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap
}

.me b {
  color: var(--ink);
  font-weight: 600
}

.menu {
  position: relative
}

.menu>summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  user-select: none
}

.menu>summary::-webkit-details-marker {
  display: none
}

.menu>summary:hover,
.menu[open]>summary {
  background: var(--paper-2)
}

.menu .av.sm {
  width: 24px;
  height: 24px;
  font-size: 10px
}

.menu>summary .chev {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg);
  margin: 0 2px 3px
}

.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 260px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10, 12, 16, .18);
  padding: 6px;
  z-index: 40;
  display: grid;
  gap: 2px
}

.menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px
}

.menu-head b {
  font-size: 13.5px
}

.menu-head .note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-3)
}

.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none
}

.menu-item:hover {
  background: var(--paper-2)
}

.menu-item:disabled {
  color: var(--ink-3);
  cursor: default
}

.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  font-size: 13.5px
}

.menu-foot {
  padding: 8px 10px 4px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3)
}

.seg {
  display: inline-flex;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px
}

.seg button {
  border: 0;
  background: transparent;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2)
}

.seg button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 600
}

/* ---- controls ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: var(--shadow);
  transition: background .12s, border-color .12s
}

.btn:active {
  transform: translateY(.5px)
}

.btn:hover {
  background: var(--paper-2);
  text-decoration: none
}

.btn.primary {
  background: var(--blue);
  color: var(--blue-ink);
  border-color: var(--blue)
}

.btn.primary:hover {
  filter: brightness(1.06);
  background: var(--blue)
}

.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2)
}

.btn.quiet:hover {
  background: var(--paper-2);
  color: var(--ink)
}

.btn.danger {
  color: var(--esc)
}

.btn.sm {
  padding: 4px 9px;
  font-size: 12.5px
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed
}

.btn.block {
  width: 100%;
  justify-content: center
}

.iconbtn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px
}

.iconbtn:hover {
  background: var(--paper-2);
  color: var(--ink)
}

.field {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  outline: none;
  color: var(--ink)
}

.field:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft)
}

select.field {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px
}

select.field:disabled,
input.field:disabled {
  background-color: var(--paper-2);
  color: var(--ink-2)
}

textarea.field {
  resize: vertical;
  min-height: 56px;
  line-height: 1.45
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.5
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor
}

.s-open {
  color: var(--open);
  background: var(--open-bg)
}

.s-closed {
  color: var(--closed);
  background: var(--closed-bg)
}

.s-esc {
  color: var(--esc);
  background: var(--esc-bg)
}

.s-prog {
  color: var(--prog);
  background: var(--prog-bg)
}

.s-other {
  color: var(--other);
  background: var(--other-bg)
}

.tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line)
}

.tag.warn {
  color: var(--open);
  background: var(--open-bg);
  border-color: transparent
}

.tag.prog {
  color: var(--prog);
  background: var(--prog-bg);
  border-color: transparent;
  font-weight: 600
}

.card.ok b {
  color: var(--closed)
}

.livework {
  margin-top: 12px
}

.livework>.hd {
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em
}

.lw-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px
}

.lw-row .s {
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0
}

.lw-row a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600
}

.lw-row .lw-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  flex: none
}

.lw-row .late {
  color: var(--esc)
}

.dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--closed);
  margin-right: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px var(--closed-bg)
}

.tag.hot {
  color: var(--esc);
  background: var(--esc-bg);
  border-color: transparent;
  font-weight: 600
}

.row .replymark {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue-line)
}

.row .replymark svg {
  width: 16px;
  height: 16px
}

.row[aria-current="true"] .replymark {
  color: var(--blue-ink);
  background: var(--blue);
  box-shadow: none
}

.thead .sub .tag svg {
  vertical-align: -2px;
  margin-right: 3px
}

.tag.prio {
  border-color: transparent;
  font-weight: 700
}

.tag.p-high {
  color: var(--esc);
  background: var(--esc-bg)
}

.tag.p-med {
  color: var(--open);
  background: var(--open-bg)
}

.tag.p-low {
  color: var(--ink-2);
  background: var(--paper-2);
  border-color: var(--line)
}

.row.p-high {
  box-shadow: inset 3px 0 0 var(--esc)
}

.row.p-high[aria-current="true"] {
  box-shadow: inset 4px 0 0 var(--esc), inset 0 0 0 1px var(--blue-line)
}

.thead .sub .tag {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px
}

.thead .sub .spacer {
  flex: 1
}

.thead .sub .tag.link {
  cursor: pointer;
  color: var(--blue);
  background: var(--paper);
  border: 1px solid var(--line-2);
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5
}

.thead .sub .tag.link:hover {
  background: var(--blue-soft);
  border-color: var(--blue-line)
}

.tag.ok {
  color: var(--closed);
  background: var(--closed-bg);
  border-color: transparent
}

.tag.bad {
  color: var(--esc);
  background: var(--esc-bg);
  border-color: transparent
}

.tag.portal {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: transparent
}

/* ---- tickets page ---- */
.main {
  min-height: 0
}

.page {
  height: 100%;
  min-height: 0
}

.page[data-page="tickets"] {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr)
}

.queue {
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0
}

.queue-top {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px
}

.views {
  display: flex;
  gap: 4px;
  flex-wrap: wrap
}

.view {
  border: 0;
  background: transparent;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2)
}

.view:hover {
  background: var(--paper-2)
}

.view[aria-pressed="true"] {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600
}

.filters-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px
}

.filters-row label {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--ink-3);
  min-width: 0
}

.filters-row .field {
  padding: 5px 26px 5px 9px;
  font-size: 13px
}

.stalebar {
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--open);
  background: var(--open-bg);
  border-bottom: 1px solid var(--line)
}

.count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--line)
}

.count b {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums
}

.count span {
  color: var(--ink-2);
  font-size: 13px
}

.count #count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0
}

.count .resetf {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap
}

.count .spin {
  margin-left: auto
}

.list {
  overflow: auto;
  flex: 1
}

.list .more {
  padding: 12px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px
}

.row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 14px
}

.row:hover {
  background: var(--paper-2)
}

.row[aria-current="true"],
.row[aria-current="true"]:hover {
  background: var(--blue-soft);
  box-shadow: inset 4px 0 0 var(--blue), inset 0 0 0 1px var(--blue-line);
  border-bottom-color: var(--blue-line)
}

.row[aria-current="true"] .n {
  color: var(--blue)
}

.row[aria-current="true"] .s {
  color: var(--ink);
  font-weight: 700
}

.row .n {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  flex: none;
  font-size: 13px
}

.row .pill {
  font-size: 0;
  padding: 0;
  width: 8px;
  height: 8px;
  gap: 0;
  flex: none
}

.row .pill::before {
  width: 8px;
  height: 8px
}

.row .s {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550
}

.row .tag {
  flex: none;
  font-size: 11px;
  padding: 0 7px
}

.row .w {
  flex: none;
  font-size: 12.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: right
}

.row.is-new .n::after {
  content: "new";
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--closed);
  background: var(--closed-bg);
  padding: 0 5px;
  border-radius: 4px;
  vertical-align: 1px
}

.empty {
  padding: 32px 16px;
  color: var(--ink-3);
  text-align: center;
  font-size: 13.5px
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3)
}

.work {
  overflow: auto;
  min-height: 0
}

.work-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 22px 60px
}

.thead {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap
}

/* Ticket header and the tab/action row stay put while the conversation scrolls (desktop). */
@media (min-width:861px) {
  .work-in {
    padding-top: 0
  }

  .work-in>#wtop {
    display: contents
  }

  /* so the sticky header's containing block is the whole scrolling column */
  #wtop>.thead {
    position: sticky;
    top: 0;
    z-index: 21;
    background: var(--canvas);
    padding: 14px 0 8px;
    margin: 0
  }

  #feedHd {
    position: sticky;
    top: var(--thead-h, 64px);
    z-index: 20;
    background: var(--paper);
    border-radius: var(--radius) var(--radius) 0 0
  }
}

.thead .ttl {
  min-width: 0;
  flex: 1 1 100%
}

.thead .ttlrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.thead .ttlrow h1 {
  min-width: 0;
  flex: 0 1 auto
}

.thead .ttlrow .spacer {
  flex: 1
}

.thead .ttlrow .sub {
  margin-top: 0;
  justify-content: flex-end;
  flex: 0 1 auto
}

.thead .ownerchip.lead {
  flex: none
}

.thead h1 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600
}

.thead h1 .copybtn {
  vertical-align: -2px;
  margin-left: 2px;
  padding: 3px 6px;
  color: var(--ink-3)
}

.thead h1 .copybtn:hover {
  color: var(--blue);
  background: var(--blue-soft)
}

.tactions {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  flex: 1 1 100%;
  justify-content: flex-start
}

.tactions label {
  display: grid;
  gap: 3px;
  font-size: 11.5px;
  color: var(--ink-3)
}

.tactions .field {
  padding: 6px 26px 6px 9px;
  font-size: 13px;
  min-width: 120px
}

.tactions .btn {
  height: 33px
}

.tactions .due {
  display: inline-flex
}

.tactions .due-btn {
  font-variant-numeric: tabular-nums;
  min-width: 130px;
  justify-content: flex-start;
  font-weight: 500
}

.tactions .due-btn.late {
  color: var(--esc);
  border-color: var(--esc)
}

.duepop {
  position: absolute;
  z-index: 45;
  width: min(340px, calc(100vw - 16px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(10, 12, 16, .22);
  padding: 10px;
  display: grid;
  gap: 8px
}

.dp-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.dp-quick .btn {
  padding: 3px 8px;
  font-size: 12px
}

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 0 2px
}

.dp-head .iconbtn {
  font-size: 18px;
  line-height: 1;
  padding: 2px 8px
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center
}

.dp-grid .dw {
  font-size: 11px;
  color: var(--ink-3);
  padding: 2px 0;
  font-weight: 600
}

.dp-grid .dc {
  border: 0;
  background: transparent;
  border-radius: 7px;
  height: 32px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  font-variant-numeric: tabular-nums
}

.dp-grid .dc:hover {
  background: var(--paper-2)
}

.dp-grid .dc.past {
  color: var(--ink-3)
}

.dp-grid .dc.today {
  box-shadow: inset 0 0 0 1px var(--line-2);
  font-weight: 700
}

.dp-grid .dc.sel,
.dp-grid .dc.sel:hover {
  background: var(--blue);
  color: #fff;
  font-weight: 700
}

.dp-grid .dc.pad {
  pointer-events: none
}

.dp-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2)
}

.dp-time .field {
  padding: 5px 24px 5px 8px;
  font-size: 13px;
  min-width: 0;
  width: auto
}

.dp-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px
}

.dp-foot .note {
  margin: 0;
  font-size: 12.5px
}

.dp-foot .spacer {
  flex: 1
}

.closebox {
  display: flex;
  align-items: center;
  gap: 8px
}

.block>.hd .closebox {
  margin-left: 0
}

.block>.hd .split.more {
  margin-left: 4px
}

.morebtn {
  font-size: 20px;
  line-height: 1;
  padding: 2px 8px;
  color: var(--ink-2)
}

.morebtn:hover {
  color: var(--ink)
}

.split-menu .msep {
  height: 1px;
  background: var(--line);
  margin: 4px 2px
}

.split.status {
  display: inline-flex;
  align-items: stretch;
  border-radius: 8px;
  box-shadow: var(--shadow)
}

.split.status .btn {
  box-shadow: none;
  height: 32px;
  font-weight: 600
}

.split.status .btn:first-child {
  border-radius: 8px 0 0 8px;
  padding-right: 12px
}

.split.status .btn.caret {
  border-radius: 0 8px 8px 0;
  border-left: 1px solid rgba(255, 255, 255, .35);
  padding: 0 9px;
  width: 32px;
  justify-content: center
}

.split.status:not(.primary) .btn.caret {
  border-left-color: var(--line-2)
}

.split.status .btn.caret .chev {
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 3px;
  transition: transform .15s
}

.split.status .btn.caret:hover .chev {
  transform: rotate(45deg) scale(1.1)
}

.split.status .btn:disabled {
  opacity: .7;
  cursor: default
}

.split.status .split-menu {
  min-width: 200px;
  right: 0;
  top: calc(100% + 6px);
  padding: 6px
}

.split-menu button {
  padding: 8px 12px;
  font-size: 13.5px;
  border-radius: 7px;
  white-space: nowrap
}

.split-menu {
  min-width: 190px
}

.split-menu button.cur {
  color: var(--blue);
  font-weight: 600;
  background: var(--blue-soft)
}

.block>.hd .closebox {
  gap: 8px
}

.block>.hd .closebox>.btn {
  height: 32px
}

.hdctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px
}

.hdctl .hdc {
  display: inline-flex
}

.hdctl .field {
  padding: 5px 24px 5px 9px;
  font-size: 12.5px;
  min-width: 0;
  width: auto;
  max-width: 170px;
  height: 32px
}

.hdctl .btn {
  height: 32px;
  font-size: 12.5px;
  padding: 0 10px
}

.hdctl .due-btn {
  min-width: 0
}

@media (max-width:1100px) {
  .block>.hd {
    flex-wrap: wrap
  }

  .hdctl {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-end
  }

  #feedHd {
    align-items: center;
    overflow: visible
  }

  #feedHd .tabs {
    flex: 1 1 100%;
    min-width: 0
  }

  #feedHd>.spacer {
    display: none
  }

  #feedHd .hdctl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    justify-content: initial
  }

  #feedHd .hdctl .hdc {
    min-width: 0
  }

  #feedHd .hdctl .field,
  #feedHd .hdctl .due-btn {
    width: 100%;
    max-width: none
  }

  #feedHd .closebox {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0
  }

  #feedHd .closebox .split.status {
    display: flex;
    min-width: 0;
    max-width: 100%
  }

  #feedHd .closebox .split.status>.btn:first-child {
    min-width: 0
  }

  #feedHd>.split.more {
    order: 4;
    margin-left: auto
  }
}

@media (min-width:1101px) and (max-width:1280px) {
  #feedHd {
    flex-wrap: wrap
  }

  #feedHd .tabs {
    flex: 1 1 100%;
    min-width: 0
  }

  #feedHd>.spacer {
    display: none
  }

  #feedHd .hdctl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    justify-content: initial
  }

  #feedHd .hdctl .hdc {
    min-width: 0
  }

  #feedHd .hdctl .field,
  #feedHd .hdctl .due-btn {
    width: 100%;
    max-width: none
  }

  #feedHd .closebox {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0
  }

  #feedHd .closebox .split.status {
    display: flex;
    flex: 1;
    min-width: 0;
    max-width: 100%
  }

  #feedHd .closebox .split.status>.btn:first-child {
    flex: 1;
    min-width: 0
  }

  #feedHd .closebox .split.status>.btn.caret {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px
  }

  #feedHd>.split.more {
    order: 4;
    margin-left: auto
  }
}

.subj.editing {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
  background: var(--paper)
}

.cfm-extra {
  margin-top: 12px
}

.switch {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  font-size: 12.5px;
  color: var(--ink-2)
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0
}

.switch .track {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--line-2);
  position: relative;
  transition: background .15s
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .15s
}

.switch input:checked+.track {
  background: var(--blue)
}

.switch input:checked+.track::after {
  transform: translateX(14px)
}

.switch input:focus-visible+.track {
  outline: 2px solid var(--blue);
  outline-offset: 2px
}

.thead .sub {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 12.5px
}

.thead .num {
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-weight: 500
}

.block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 12px
}

.block>.hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 13px
}

.block>.hd .spacer {
  flex: 1
}

.block>.bd {
  padding: 10px 14px
}

.request {
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere
}

.request.muted {
  color: var(--ink-3);
  font-size: 14px
}

.tabs {
  display: inline-flex;
  gap: 2px
}

.tab small {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  margin-left: 3px
}

.tab small.okdot {
  color: var(--closed)
}

#feedPanel .panel {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2)
}

#feedPanel .panel .field {
  background: var(--paper)
}

#feedPanel .compose .actions .hint {
  margin-left: auto
}

.tab {
  border: 0;
  background: transparent;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2)
}

.tab[aria-selected="true"] {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0
}

.feed .day {
  padding: 8px 14px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3)
}

.msg {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--line)
}

.feed .day+.msg {
  border-top: 0
}

.av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 650;
  color: #fff;
  flex: none
}

.msg .line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13.5px
}

.msg .line b {
  font-weight: 600
}

.msg .line .what {
  color: var(--ink-2)
}

.addrline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12px;
  color: var(--ink-3);
  margin: 2px 0 4px
}

.addrline b {
  font-weight: 600;
  color: var(--ink-2);
  margin-right: 4px
}

.msg .line .when {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums
}

.msg .text {
  margin-top: 4px;
  overflow-wrap: anywhere;
  line-height: 1.45;
  max-height: 460px;
  overflow: auto
}

.txt p {
  margin: 0
}

.txt .gap {
  height: 6px
}

.txt .inl {
  display: block;
  margin: 6px 0
}

.txt .inl img {
  max-width: min(100%, 560px);
  max-height: 420px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block
}

.msg .text.note {
  background: var(--paper-2);
  border-radius: 8px;
  padding: 7px 10px
}

.msg .text.email {
  border-left: 3px solid var(--line-2);
  padding-left: 10px;
  max-height: none;
  overflow: visible
}

.mail {
  width: 100%;
  height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  display: block
}

.msg .before {
  color: var(--ink-3);
  text-decoration: line-through;
  margin-bottom: 3px
}

.msg .change {
  margin-top: 6px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.msg .tags {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
  align-items: center
}

.msg.one {
  align-items: center;
  padding: 6px 14px
}

.msg.one.note-row {
  background: var(--note-bg, rgba(240, 168, 86, .08));
  box-shadow: inset 4px 0 0 var(--open);
  padding: 9px 14px 9px 16px
}

.msg.one.note-row.pub {
  background: var(--note-pub-bg, rgba(36, 87, 197, .08));
  box-shadow: inset 4px 0 0 var(--blue)
}

.msg.one.note-row .one-text {
  font-size: 14px
}

.msg.one.editing-note {
  background: var(--paper-2)
}

.msg.one .av {
  width: 22px;
  height: 22px;
  font-size: 9.5px
}

.msg.one .line {
  gap: 8px;
  align-items: center;
  min-width: 0
}

.msg.one .onebody {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px
}

.msg.one.editing-note {
  align-items: flex-start
}

.editor.ne {
  min-height: 24px;
  white-space: pre-wrap;
  border: 0;
  background: transparent;
  padding: 0;
  outline: none;
  max-height: none;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  cursor: text;
  font: inherit
}

.editor.ne:focus {
  outline: none;
  box-shadow: inset 3px 0 0 var(--blue);
  padding-left: 10px;
  margin-left: -13px
}

.ne-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px
}

.ne-actions .hint {
  color: var(--ink-3);
  font-size: 12px;
  margin-left: auto
}

.msg.one:has(.one-text.multi) .av,
.msg.one.editing-note .av {
  align-self: start;
  margin-top: 2px
}

.msg.one.has-files {
  align-items: flex-start
}

.msg.one .nfiles {
  padding-left: 0
}

.msg.one .one-text {
  min-width: 0;
  overflow-wrap: anywhere
}

.msg.one .one-text.multi {
  white-space: pre-wrap;
  line-height: 1.5;
  flex: 1 1 100%;
  margin: 2px 0 2px 0
}

.msg.one:has(.one-text.multi) {
  align-items: flex-start
}

.msg.one:has(.one-text.multi) .av {
  margin-top: 2px
}

.msg.one .line:has(.one-text.multi) {
  flex-wrap: wrap
}

.msg.one .line:has(.one-text.multi) .rmeta {
  margin-left: auto
}

.msg.one .arr {
  color: var(--ink-3)
}

.field.editor {
  min-height: 64px;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  cursor: text
}

.field.editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-3);
  pointer-events: none
}

.field.editor .echip {
  cursor: default;
  user-select: all;
  margin: 0 1px
}

a.tlink {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--blue-soft)
}

a.tlink:hover {
  text-decoration: underline
}

.msg.one .rmeta {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex: none
}

.msg.one .line .when {
  margin-left: 0
}

.msg.one .edit {
  padding: 1px 8px;
  font-size: 12px;
  min-height: 0;
  line-height: 1.5
}

.msg.one .edit.del:hover {
  color: var(--esc);
  border-color: var(--esc)
}

.tag.priv {
  color: var(--other);
  background: var(--other-bg);
  border-color: transparent
}

.files {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px
}

.files.col {
  flex-direction: column;
  margin-top: 0
}

.file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 220px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  overflow: hidden
}

.file:hover {
  border-color: var(--blue);
  text-decoration: none
}

.file small {
  color: var(--ink-3);
  font-size: 11.5px;
  margin-left: auto;
  white-space: nowrap
}

.compose {
  display: grid;
  gap: 8px
}

.compose .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.compose .hint {
  color: var(--ink-3);
  font-size: 12.5px;
  margin-left: auto
}

.split {
  position: relative;
  display: inline-flex
}

.split .btn {
  border-radius: 8px 0 0 8px
}

.split .btn.caret {
  border-radius: 0 8px 8px 0;
  border-left: 0;
  padding: 7px 9px
}

.split .caret .chev {
  display: block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 3px
}

.split-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 150px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 12, 16, .18);
  padding: 4px;
  z-index: 30;
  display: grid
}

.split-menu[hidden] {
  display: none
}

.split-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer
}

.split-menu button:hover {
  background: var(--paper-2)
}

.compose-mail {
  margin-top: 12px
}

.compose-mail>.hd {
  display: flex;
  align-items: center;
  gap: 10px
}

.chipfield {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  cursor: text
}

.chipfield:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft)
}

.chipfield .cf-lbl {
  font-size: 12px;
  color: var(--ink-3);
  margin-right: 2px;
  flex: none
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid var(--blue-line);
  font-size: 12.5px;
  font-weight: 600;
  max-width: 100%
}

.chip.bad {
  color: var(--esc);
  background: var(--esc-bg);
  border-color: transparent
}

.chip .cx {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 999px;
  opacity: .7
}

.chip .cx:hover {
  opacity: 1;
  background: rgba(0, 0, 0, .08)
}

.chipfield .chipin {
  flex: 1;
  min-width: 140px;
  border: 0;
  background: transparent;
  outline: 0;
  font: inherit;
  font-size: 13.5px;
  padding: 4px 2px;
  color: var(--ink)
}

.chipsug {
  position: absolute;
  left: 8px;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 260px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 12, 16, .18);
  padding: 4px;
  display: grid
}

.chipsug button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer
}

.chipsug button:hover,
.chipsug button:focus {
  background: var(--paper-2);
  outline: 0
}

.compose .fromline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3)
}

.compose .chip.from {
  background: var(--paper-2);
  color: var(--ink-2);
  border-color: var(--line)
}

.rtbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--paper-2)
}

.rtbar button {
  border: 0;
  background: transparent;
  min-width: 30px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
  font-family: inherit
}

.rtbar button:hover {
  background: var(--paper);
  color: var(--ink)
}

.rtbar .sep {
  width: 1px;
  height: 18px;
  background: var(--line-2);
  margin: 0 4px
}

.rtbar .spacer {
  flex: 1
}

.editwrap {
  border: 1px solid var(--line-2);
  border-radius: 0 0 8px 8px;
  background: var(--paper);
  overflow: hidden
}

.editwrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft)
}

.editwrap .field.editor.rt {
  min-height: 150px;
  border: 0;
  border-radius: 0;
  margin: 0;
  box-shadow: none
}

.field.editor.rt a {
  color: var(--blue)
}

.field.editor.rt {
  max-height: 520px
}

.field.editor.rt .qhead {
  color: var(--ink-3);
  font-size: 12.5px;
  margin: 8px 0 4px
}

.field.editor.rt .qbq {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--line-2)
}

.field.editor.rt .qbq img {
  max-width: 100%;
  height: auto
}

.field.editor.rt .qbq table {
  max-width: 100%
}

:root:not([data-theme="light"]) .field.editor.rt .qbq * {
  background: transparent !important;
  color: inherit !important
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .field.editor.rt .qbq * {
    background: revert;
    color: revert
  }
}

.split-menu.left {
  right: auto;
  left: 0;
  top: auto;
  bottom: calc(100% + 4px)
}

.compose .addr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.compose .addr label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2)
}

.compose .addr .field {
  flex: 1;
  min-width: 0
}

@media (max-width:900px) {
  .compose .addr {
    grid-template-columns: 1fr
  }
}

.msg.one-mail .edit {
  padding: 1px 6px;
  font-size: 12px;
  opacity: 0
}

.msg.one-mail:hover .edit {
  opacity: 1
}

/* right rail */
.drawer-bg {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, .35);
  z-index: 40
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--line);
  z-index: 41;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0, 0, 0, .18)
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line)
}

.drawer-head h2 {
  font-size: 15px
}

.rail {
  overflow: auto;
  min-height: 0;
  padding: 14px 16px 40px;
  display: grid;
  gap: 12px;
  align-content: start;
  flex: 1
}

.rail h2 {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 4px
}

.rail .grp {
  display: grid;
  gap: 8px
}

.rail label {
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  color: var(--ink-2)
}

.rail .field {
  padding: 6px 9px;
  font-size: 13px
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 13px
}

.kv dt {
  color: var(--ink-3);
  white-space: nowrap
}

.kv dd {
  margin: 0;
  overflow-wrap: anywhere
}

.kv dd.muted {
  color: var(--ink-3)
}

.people {
  display: grid;
  gap: 8px
}

.person {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  align-items: center;
  font-size: 13px
}

.person .av {
  width: 26px;
  height: 26px;
  font-size: 10.5px
}

.person small {
  display: block;
  color: var(--ink-3);
  font-size: 12px
}

.rail .res {
  font-size: 13px;
  line-height: 1.45;
  background: var(--paper-2);
  border-radius: 8px;
  padding: 7px 10px
}

.rail .note {
  font-size: 12.5px;
  color: var(--ink-3)
}

.rail .divider {
  height: 1px;
  background: var(--line)
}

/* ---- other pages ---- */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 28px 60px
}

.pagehead h1 {
  font-size: 20px
}

.pagehead p {
  margin: 4px 0 0;
  color: var(--ink-2)
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
  flex-wrap: wrap
}

.toolbar .field {
  width: auto
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px
}

.wrap.wide {
  max-width: 1100px
}

.cards.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

@media (max-width:800px) {
  .cards.cards-4 {
    grid-template-columns: 1fr 1fr
  }
}

.card.bad b {
  color: var(--esc)
}

.agentcards {
  display: grid;
  gap: 10px;
  margin-top: 14px
}

.agentcard {
  margin-top: 0;
  padding: 14px 16px;
  cursor: pointer
}

.agentcard:hover {
  border-color: var(--line-2)
}

.agentcard .ac-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  margin-bottom: 10px
}

.agentcard .ac-head .chev {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform .15s;
  margin-right: 2px
}

.agentcard .ac-head .av {
  width: 30px;
  height: 30px
}

.agentcard .role-label {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: capitalize
}

.agentcard .ac-seen {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 400
}

.agentcard.open .ac-head .chev {
  transform: rotate(45deg)
}

.agentcard .ac-now {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12.5px
}

.agentcard .ac-now b {
  color: var(--ink)
}

.agentcard .ac-now b.late {
  color: var(--esc)
}

.agentcard .ac-now a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 650
}

.agentcard .muted {
  color: var(--ink-3)
}

.ac-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0
}

.ac-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px
}

.ac-metric span {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap
}

.ac-metric b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums
}

.agentcard .dash-cols {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line)
}

.dash-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper)
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 4px
}

.cards.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  gap: 2px
}

.card b {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1
}

.card span {
  font-size: 12px;
  color: var(--ink-3)
}

.card.warn b {
  color: var(--open)
}

.card.late b {
  color: var(--esc)
}

.card.big {
  padding: 16px 18px
}

.card.big b {
  font-size: 34px
}

.card.big span {
  font-size: 13px;
  color: var(--ink-2)
}

.dash-group {
  margin-top: 18px
}

.dash-group h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 8px
}

.statline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 13.5px;
  color: var(--ink-2)
}

.statline b {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  margin-right: 4px
}

.statline.small {
  font-size: 12.5px;
  margin-bottom: 12px
}

.statline.small b {
  font-size: 14px
}

table.dash .zero {
  color: var(--ink-3);
  opacity: .45
}

table.dash small {
  font-weight: 500;
  color: var(--ink-3)
}

table.dash .grp-head th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-3);
  padding: 6px 10px 2px;
  border-bottom: 0;
  text-align: left
}

table.dash .grp-head th[colspan] {
  border-bottom: 2px solid var(--line-2);
  text-align: center
}

table.dash .grp {
  border-left: 1px solid var(--line);
  padding-left: 18px
}

table.dash .barwrap {
  position: relative;
  display: inline-block;
  min-width: 44px;
  padding: 0 6px;
  font-weight: 600
}

table.dash .bar {
  position: absolute;
  right: 0;
  top: 50%;
  height: 18px;
  transform: translateY(-50%);
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  border-radius: 4px;
  z-index: -1
}

table.dash .barwrap {
  z-index: 1
}

table.dash .dash-idle td {
  padding: 10px;
  color: var(--ink-3);
  font-size: 12.5px
}

.linkbtn {
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0
}

table.dash th,
table.dash td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle
}

table.dash th {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap
}

table.dash .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap
}

table.dash td.late,
table.dash .late {
  color: var(--esc);
  font-weight: 600
}

table.dash .dash-row {
  cursor: pointer
}

table.dash .dash-row:hover {
  background: var(--paper-2)
}

table.dash .dash-row .chev {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg);
  margin: 0 8px 2px 2px;
  transition: transform .15s
}

table.dash .dash-row.open .chev {
  transform: rotate(45deg)
}

table.dash .who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap
}

table.dash .dash-row .av.sm {
  width: 22px;
  height: 22px;
  font-size: 9px;
  vertical-align: middle;
  margin-right: 4px
}

table.dash .dash-row .note {
  margin-left: 8px;
  font-size: 11.5px
}

table.dash .dash-detail td {
  background: var(--paper-2);
  padding: 12px 14px
}

.dash-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.dash-cols h4 {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 0 0 6px;
  font-weight: 600
}

table.mini {
  width: 100%;
  font-size: 12.5px
}

table.mini th,
table.mini td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left
}

.dash-section h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px
}

.dash-section h4 span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums
}

.dash-section .note {
  padding: 12px
}

table.mini th {
  color: var(--ink-3);
  font-weight: 600;
  font-size: 11.5px
}

table.mini td.s {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

table.mini a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600
}

@media (max-width:1100px) {
  .dash-cols {
    grid-template-columns: 1fr
  }
}

@media (max-width:700px) {
  .ac-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .agentcard .ac-seen {
    width: 100%;
    margin-left: 40px;
    margin-top: -5px
  }

  .agentcard .ac-head {
    flex-wrap: wrap
  }
}

@media (max-width:420px) {
  .ac-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top
}

th {
  font-size: 12.5px;
  color: var(--ink-3);
  font-weight: 600
}

tr:last-child td {
  border-bottom: 0
}

td .muted {
  color: var(--ink-3)
}

.form {
  display: grid;
  gap: 12px
}

.form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--ink-2)
}

.form .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-2)
}

.inline-form {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr .8fr 1.2fr auto;
  gap: 8px;
  align-items: center
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, .45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px
}

.modal-card {
  background: var(--paper);
  border-radius: 14px;
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--line)
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line)
}

.modal-head h2 {
  font-size: 16px
}

.modal-body {
  padding: 18px
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  z-index: 60
}

.toast.err {
  background: var(--esc);
  color: #fff
}

.spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.back {
  display: none
}

.resline {
  display: flex;
  gap: 8px;
  align-items: flex-start
}

.resline .field {
  flex: 1
}

.resline .side {
  display: grid;
  gap: 8px;
  min-width: 170px;
  align-content: start;
  justify-items: start
}

.resline .side .btn {
  width: 100%;
  justify-content: center
}

@media (max-width:1280px) {
  .page[data-page="tickets"] {
    grid-template-columns: 400px minmax(0, 1fr)
  }
}

@media (max-width:860px) {

  /* ---- phones and small tablets: one column, list OR ticket, bigger touch targets ---- */
  body {
    overflow-x: hidden
  }

  .page[data-page="tickets"] {
    grid-template-columns: minmax(0, 1fr)
  }

  .queue {
    display: var(--q, flex);
    border-right: 0;
    min-width: 0
  }

  .work {
    display: var(--w, none);
    min-width: 0
  }

  .app.show-detail {
    --q: none;
    --w: block
  }

  /* header: brand · nav · avatar on the first row, search + actions on the second */
  header.top {
    flex-wrap: wrap;
    gap: 6px 10px;
    padding: 8px 12px;
    align-items: center
  }

  .nav {
    order: 1;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0
  }

  .nav::-webkit-scrollbar {
    display: none
  }

  .navbtn {
    padding: 6px 9px;
    font-size: 13.5px;
    white-space: nowrap
  }

  header.top>.spacer {
    display: none
  }

  .menu {
    order: 2
  }

  .menu>summary b {
    display: none
  }

  .menu>summary .chev {
    display: none
  }

  .menu>summary {
    padding: 2px
  }

  .menu-pop {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 8px;
    min-width: 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom))
  }

  .hbar {
    display: flex;
    order: 3;
    flex: 1 1 100%;
    min-width: 0;
    gap: 8px;
    align-items: center
  }

  .hbar>.spacer {
    display: none
  }

  .hsearch {
    flex: 1 1 auto;
    min-width: 0
  }

  .hsearch .field {
    padding: 9px 14px
  }

  .btn.approvals {
    flex: none
  }

  #newTicketBtn {
    flex: none;
    padding: 9px 12px
  }

  /* queue */
  .queue-top {
    padding: 10px 12px
  }

  .filters-row .field {
    padding: 9px 28px 9px 10px
  }

  .count {
    padding: 10px 14px
  }

  .row {
    padding: 13px 12px;
    gap: 8px
  }

  .row .tag.owner {
    max-width: 64px
  }

  .row .tag.due {
    display: none
  }

  /* ticket */
  .work-in>#wtop {
    display: contents
  }

  .btn.quiet.back {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 5;
    margin: -12px -12px 10px;
    width: calc(100% + 24px);
    border-radius: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 11px 14px;
    font-weight: 600;
    color: var(--blue)
  }

  .work-in {
    padding: 12px 12px calc(40px + env(safe-area-inset-bottom))
  }

  .thead {
    gap: 10px
  }

  .thead h1 {
    font-size: 17px;
    overflow-wrap: anywhere
  }

  .thead .sub {
    gap: 6px
  }

  .thead .sub .spacer {
    flex: 1 1 100%;
    display: none
  }

  .tactions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: end
  }

  .tactions label {
    min-width: 0
  }

  .tactions .field {
    min-width: 0;
    width: 100%;
    padding: 9px 28px 9px 10px;
    font-size: 16px
  }

  .tactions .due {
    display: flex
  }

  .tactions .due-btn {
    min-width: 0;
    width: 100%
  }

  .tactions .btn {
    height: 40px;
    justify-content: center
  }

  .tactions .split {
    display: flex
  }

  .tactions .split .btn:first-child {
    flex: 1
  }

  .closebox {
    grid-column: 1/-1;
    margin-left: 0;
    padding-left: 0;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px
  }

  .closebox .btn {
    flex: 1;
    min-width: 140px
  }

  .closebox .switch {
    flex: none
  }

  .block>.hd {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    padding: 6px 10px
  }

  .block>.hd::-webkit-scrollbar {
    display: none
  }

  #feedHd {
    align-items: center;
    flex-wrap: wrap;
    overflow: visible
  }

  .tabs {
    flex: none
  }

  #feedHd .tabs {
    flex: 1 1 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none
  }

  #feedHd .tabs::-webkit-scrollbar {
    display: none
  }

  #feedHd>.spacer {
    display: none
  }

  #feedHd .hdctl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    gap: 6px;
    margin: 0
  }

  #feedHd .hdctl .hdc {
    min-width: 0
  }

  #feedHd .hdctl .field,
  #feedHd .hdctl .due-btn {
    width: 100%;
    max-width: none
  }

  #feedHd .closebox {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0
  }

  #feedHd .closebox .split.status {
    display: flex;
    flex: 1;
    min-width: 0;
    max-width: 100%
  }

  #feedHd .closebox .split.status>.btn:first-child {
    flex: 1;
    min-width: 0
  }

  #feedHd .closebox .split.status>.btn.caret {
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px
  }

  #feedHd>.split.more {
    margin-left: auto
  }

  .tab {
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 13px
  }

  .msg {
    padding: 10px 10px 12px;
    gap: 8px;
    grid-template-columns: 26px 1fr
  }

  .msg.one {
    padding: 8px 10px
  }

  .msg.one .rmeta {
    margin-left: auto
  }

  .msg .text {
    max-height: none
  }

  .compose .addr {
    grid-template-columns: 1fr
  }

  .resline {
    flex-direction: column
  }

  .resline .side {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr 1fr;
    align-items: center
  }

  .fgrid {
    grid-template-columns: 1fr
  }

  .fold-row>.block {
    flex-basis: 100%
  }

  /* forms and dialogs: bottom sheets, single column */
  .modal {
    padding: 0;
    align-items: end
  }

  .modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom)
  }

  .modal-card.wide {
    width: 100%
  }

  .modal.cfm {
    align-items: center;
    padding: 16px
  }

  .modal.cfm .cfm-card {
    border-radius: 14px
  }

  .modal-body {
    padding: 14px
  }

  .form .two {
    grid-template-columns: 1fr
  }

  .modal-foot {
    position: sticky;
    bottom: 0;
    background: var(--paper);
    padding-top: 8px
  }

  .modal-foot .btn {
    flex: 1;
    justify-content: center;
    min-height: 40px
  }

  .toast {
    left: 12px;
    right: 12px;
    transform: none;
    text-align: center;
    bottom: calc(16px + env(safe-area-inset-bottom))
  }

  /* other pages */
  .wrap {
    padding: 14px 12px calc(40px + env(safe-area-inset-bottom))
  }

  .pagehead h1 {
    font-size: 18px
  }

  .pagehead p {
    font-size: 13px
  }

  .toolbar .field {
    flex: 1;
    min-width: 0
  }

  .inline-form {
    grid-template-columns: 1fr
  }

  .page[data-page="users"] .block,
  .page[data-page="audit"] .block,
  .page[data-page="dashboard"] .block,
  .page[data-page="users"] .bd,
  .page[data-page="audit"] .bd {
    overflow-x: auto;
    max-width: 100%
  }

  .wrap {
    max-width: 100vw;
    overflow-x: hidden
  }

  table {
    min-width: 520px
  }

  table.dash {
    min-width: 640px
  }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr))
  }

  .cards.cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .card b {
    font-size: 19px
  }

  .card.big b {
    font-size: 26px
  }

  /* touch: no iOS zoom on focus, roomier controls */
  .field,
  select.field,
  textarea.field {
    font-size: 16px
  }

  .btn {
    min-height: 36px
  }

  .iconbtn {
    min-width: 36px;
    min-height: 36px
  }
}

@media (max-width:420px) {
  .navbtn {
    padding: 6px 7px;
    font-size: 13px
  }

  .closebox .btn {
    min-width: 0
  }

  .cards.cards-3 {
    grid-template-columns: 1fr 1fr
  }
}

.modal-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.modal-foot .spacer {
  flex: 1
}

.btn.danger:hover {
  border-color: var(--esc)
}

/* Any checkbox not wrapped in .switch still renders as the same toggle. */
input[type="checkbox"]:not(.switch input) {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 34px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: var(--line-2);
  position: relative;
  cursor: pointer;
  transition: background .15s;
  vertical-align: middle
}

input[type="checkbox"]:not(.switch input)::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  transition: transform .15s
}

input[type="checkbox"]:not(.switch input):checked {
  background: var(--blue)
}

input[type="checkbox"]:not(.switch input):checked::after {
  transform: translateX(14px)
}

input[type="checkbox"]:not(.switch input):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px
}

input[type="checkbox"]:not(.switch input):disabled {
  opacity: .5;
  cursor: not-allowed
}

.filters-row.single {
  grid-template-columns: minmax(0, 1fr)
}

.row .tag.due {
  white-space: nowrap;
  flex: none
}

.row .tag.owner {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: none;
  background: #000;
  color: #fff;
  border-color: #000;
  font-weight: 700
}

/* Folded Note / Resolution panels: one slim row side by side; an open one takes the full width. */
.fold-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px
}

.fold-row>.block {
  margin-top: 0;
  flex: 1 1 280px;
  min-width: 0
}

.fold-row>.block[open] {
  flex-basis: 100%
}

.fold>summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-bottom: 0
}

.fold>summary::-webkit-details-marker {
  display: none
}

.fold[open]>summary {
  border-bottom: 1px solid var(--line)
}

.fold>summary:hover {
  background: var(--paper-2);
  border-radius: var(--radius)
}

.fold[open]>summary:hover {
  border-radius: var(--radius) var(--radius) 0 0
}

.fold .chev {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(-45deg);
  transition: transform .15s;
  flex: none;
  margin-right: 2px
}

.fold[open] .chev {
  transform: rotate(45deg)
}

.fold .note {
  font-weight: 400
}

.fold-peek {
  margin: 0;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

/* Confirmation dialog */
.modal.cfm {
  z-index: 60;
  animation: fadeIn .12s ease-out
}

.cfm-card {
  width: min(400px, 100%);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  animation: popIn .14s ease-out
}

.cfm-body {
  padding: 20px 22px 8px
}

.cfm-body h2 {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 6px
}

.cfm-body p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5
}

.cfm-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 22px 18px
}

.btn.primary.danger {
  background: var(--esc);
  border-color: var(--esc);
  color: #fff
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.98)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.ownerchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px
}

.ownerchip::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='5' r='3'/%3E%3Cpath d='M2 15c0-3.3 2.7-5.5 6-5.5s6 2.2 6 5.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='5' r='3'/%3E%3Cpath d='M2 15c0-3.3 2.7-5.5 6-5.5s6 2.2 6 5.5z'/%3E%3C/svg%3E") center/contain no-repeat
}

.ownerchip.none {
  color: var(--ink-3);
  font-weight: 500
}

.ownerchip.none::before {
  background: var(--line-2)
}

.attach-btn {
  cursor: pointer
}

.attach-btn input {
  display: none
}

.fcards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.fcards:empty {
  display: none
}

.fcard {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
  padding: 6px 8px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 12.5px
}

.fcard .fext {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid var(--blue-line);
  border-radius: 5px;
  padding: 3px 5px;
  min-width: 34px;
  text-align: center
}

.fcard .fname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550
}

.fcard small {
  color: var(--ink-3);
  flex: none
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px
}

.fcard.big {
  max-width: none;
  padding: 10px 12px;
  gap: 12px;
  font-size: 13px
}

.fcard.big .fext {
  min-width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  border-radius: 7px
}

.fcard.big:hover {
  border-color: var(--blue-line);
  background: var(--blue-soft)
}

.fcard.big .fopen {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: var(--ink)
}

.fcard.big .fmeta {
  display: grid;
  min-width: 0;
  flex: 1
}

.fcard.big .fmeta small {
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.fcard.big .fdl {
  flex: none;
  color: var(--ink-3);
  padding: 4px;
  border-radius: 6px
}

.fcard.big .fdl:hover {
  color: var(--blue);
  background: var(--paper)
}

.files-panel {
  border-bottom: 0
}

.fthumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
  border: 1px solid var(--line);
  background: var(--paper)
}

.fthumb.lg {
  width: 56px;
  height: 56px
}

.file .fext {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid var(--blue-line);
  border-radius: 6px;
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  text-align: center;
  line-height: 1.2
}

.pv {
  display: grid;
  place-items: center;
  min-height: 120px;
  max-height: 70vh;
  overflow: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px
}

iframe.mail {
  overflow: hidden
}

.pv-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain
}

.pv-frame {
  width: 100%;
  height: 70vh;
  border: 0;
  background: #fff
}

.pv-media {
  max-width: 100%;
  max-height: 70vh
}

.pv-text {
  width: 100%;
  margin: 0;
  padding: 12px;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 70vh;
  overflow: auto;
  text-align: left
}

.modal-card.wide {
  width: min(1100px, 100%)
}

.fcard .fx {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1
}

.fcard .fx:hover {
  color: var(--esc)
}

.filepick {
  display: grid;
  gap: 5px
}

.filepick input[type=file] {
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: var(--paper-2);
  cursor: pointer
}

.filepick input[type=file]::file-selector-button {
  font: inherit;
  font-size: 12.5px;
  margin-right: 10px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer
}

.filepick .hint,
.modal-foot .hint {
  font-size: 12px;
  color: var(--ink-3)
}

/* attachment chip: name opens it, arrow downloads it */
.file {
  padding: 0;
  gap: 0
}

.file .fview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 10px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1
}

.file .fview:hover {
  background: var(--paper);
  text-decoration: none
}

.file .fdl {
  display: inline-grid;
  place-items: center;
  align-self: stretch;
  padding: 0 11px;
  border-left: 1px solid var(--line-2);
  color: var(--ink-2)
}

.file .fdl svg {
  width: 16px;
  height: 16px
}

.file .fdl:hover {
  background: var(--blue-soft);
  color: var(--blue);
  text-decoration: none
}

.file .fview {
  padding-left: 8px
}