/* Look follows the company's operations board: rounded sidebar card, pill filters,
   dark summary strip, segmented tabs, two-line table rows with small tags. */
:root {
  --text: #101828;
  --muted: #667085;
  --line: #EAECF0;
  --line-strong: #D0D5DD;
  --soft: #F6F7F9;
  --blue: #2F6BEA;
  --blue-dark: #1F56C7;
  --navy: #0B1220;
  --red: #E5484D;
  --green: #16A34A;
  color-scheme: light;
  accent-color: #2F6BEA;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #fff; }
body {
  display: flex; gap: 6px; padding: 6px; color: var(--text);
  font: 13px/1.35 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "tnum";
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 13px; margin: 0; font-weight: 700; white-space: nowrap; }
h2 { font-size: 13px; margin: 0 0 6px; font-weight: 650; }
svg.i { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* sidebar card */
#nav { width: 214px; flex: none; height: calc(100vh - 12px); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px 8px; overflow-y: auto; }
body.nav-off #nav { display: none; }
.nav-brand { font-weight: 700; font-size: 14px; line-height: 1.2; padding: 2px 6px 14px; }
.nav-sec-h { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px; background: none; border: 0; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: #475467; text-transform: uppercase; cursor: pointer; }
.nav-sec-h svg { width: 13px; height: 13px; }
.nav-sec-body { background: var(--soft); border-radius: 8px; padding: 6px; }
.nav-sec.closed .nav-sec-body { display: none; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; color: #1D2939; font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.nav-link:last-child { margin-bottom: 0; }
.nav-link:hover { background: var(--line); }
.nav-link.active { background: var(--blue); color: #fff; font-weight: 600; }
.nav-count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; min-width: 18px; text-align: center; padding: 0 5px; border-radius: 9px; animation: blink 1.1s infinite; }
.nav-foot { margin-top: auto; }
.nav-demo { padding: 8px 6px; font-size: 11.5px; color: var(--muted); }
.nav-demo p { margin: 0 0 3px; }
.nav-user { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--line); }
.avatar { width: 30px; height: 30px; flex: none; border: 1px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; background: var(--soft); }
.nav-user-t { min-width: 0; flex: 1; }
.nav-user-t b { display: block; font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-t span { font-size: 11.5px; color: var(--muted); }
.nav-user select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* main */
#main { flex: 1; min-width: 0; height: calc(100vh - 12px); display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; flex: none; }
.topbar-r { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* controls */
input, select, textarea { font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 0 9px; background-color: #fff; height: 32px; }
select { appearance: none; -webkit-appearance: none; padding-right: 26px; font-weight: 500; background-repeat: no-repeat; background-position: right 8px center; background-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E"); }
.topbar select { min-width: 132px; max-width: 170px; }
.topbar select.wide { min-width: 180px; max-width: 240px; }
textarea { height: auto; padding: 6px 9px; resize: vertical; width: 100%; }
input[type=checkbox] { height: auto; margin: 0; }
input[type=date] { width: 128px; }
input::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
input:disabled, select:disabled { background-color: var(--soft); color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); padding: 0 11px; }
.btn:hover { background: var(--soft); }
.btn.sm { height: 25px; padding: 0 8px; font-size: 11.5px; border-radius: 5px; border-color: var(--line-strong); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.link { border: 0; background: none; padding: 0; height: auto; color: var(--blue); font-size: 11.5px; }
.btn:disabled, .btn.off { color: #98A2B3; cursor: default; background: #fff; }
.icon-btn { width: 32px; padding: 0; }

/* dark summary strip */
.strip { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; min-height: 49px; padding: 7px 14px; background: var(--navy); color: #fff; border-radius: 8px; margin-bottom: 8px; }
.strip-b { padding-right: 22px; border-right: 1px solid #2A3345; }
.strip-t { font-weight: 700; font-size: 13px; white-space: nowrap; }
.live { color: #34D399; font-weight: 500; font-size: 11.5px; margin-left: 8px; }
.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #34D399; margin-right: 4px; vertical-align: 1px; }
.strip-s { font-size: 11.5px; color: #98A2B3; white-space: nowrap; }
.stat b { display: block; font-size: 17px; font-weight: 700; line-height: 1.15; }
.stat span { font-size: 10px; letter-spacing: .03em; color: #98A2B3; text-transform: uppercase; white-space: nowrap; }
.stat.hot b { color: #FF6B6B; }
.strip-a { margin-left: auto; }

/* tabs and search */
.tabsrow { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.seg { display: flex; background: var(--soft); border-radius: 8px; padding: 3px; overflow-x: auto; }
.seg:empty { display: none; }
.view { background: none; border: 0; border-radius: 6px; padding: 4px 10px; font: inherit; font-weight: 500; color: #1D2939; cursor: pointer; white-space: nowrap; }
.view b { font-weight: 400; font-size: 11px; margin-left: 7px; color: var(--muted); }
.view:hover { background: var(--line); }
.view.active { background: #fff; font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search input { width: 240px; padding-left: 32px; border-style: dashed; border-color: var(--line-strong); }
.tabsrow label { display: flex; align-items: center; gap: 5px; color: var(--muted); }

/* table card */
.grid-host { flex: 1; min-height: 0; display: flex; }
.grid { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gscroll { flex: 1; min-height: 0; overflow: auto; }
.gt { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px; }
.gt th, .gt td { height: 40px; padding: 0 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.gt thead th { position: sticky; top: 0; z-index: 3; height: 37px; font-size: 12px; font-weight: 600; color: #1D2939; }
.gt tbody tr:hover td { background: #FAFBFC; }
.gt tbody tr.sel td { background: #EEF4FF; }
.gt .num { text-align: right; }
.gt .gsel { position: sticky; left: 0; z-index: 2; padding: 0; text-align: center; font-weight: 600; }
.gt thead .gsel { z-index: 5; }
.gsel input { display: none; }
tr:hover > .gsel input, tr.sel > .gsel input, .has-sel .gsel input, .gsel input:focus-visible { display: inline-block; }
tr:hover > .gsel .rownum, tr.sel > .gsel .rownum, .has-sel .gsel .rownum { display: none; }
.gt .gstick { position: sticky; z-index: 2; }
.gt thead .gstick { z-index: 4; }
.gt tfoot td { position: sticky; bottom: 0; z-index: 2; font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.gt tfoot .gsel, .gt tfoot .gstick { z-index: 3; }
.gt td:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.gh { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 4px; }
.si { color: #475467; display: inline-flex; font-style: normal; font-size: 9px; }
.si svg { width: 12px; height: 12px; }
.si.on { color: var(--blue); }
.rz { position: absolute; top: 0; right: 0; width: 5px; height: 100%; cursor: col-resize; }
.rz:hover { background: var(--line); }
.gt td.editable { cursor: cell; }
.gt tbody tr td.editable:hover { box-shadow: inset 0 0 0 1px #A9C4F5; }
.gt td.locked { cursor: not-allowed; }
.gt td.editing { padding: 0; overflow: visible; }
.gin { width: 100%; height: 38px; border: 0; border-radius: 0; outline: 2px solid var(--blue); outline-offset: -2px; }
.gempty { padding: 26px 16px; color: var(--muted); text-align: center; }
.gcols { position: absolute; top: 7px; right: 8px; z-index: 7; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 0; border-radius: 5px; color: #475467; cursor: pointer; }
.gcols:hover { background: var(--soft); }
.gbulk { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #EEF4FF; flex: none; }
.gbulk ~ .gcols { top: 45px; }
.gfoot { display: flex; align-items: center; gap: 14px; padding: 3px 10px; border-top: 1px solid var(--line); font-size: 12px; color: #344054; flex: none; min-height: 30px; }
.ghint { color: var(--muted); }
.gpager { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.gpager select { height: 25px; border-radius: 5px; }
.gpop { position: absolute; right: 8px; top: 34px; z-index: 10; width: 200px; max-height: 70%; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; box-shadow: 0 4px 14px rgba(16, 24, 40, .1); }
.gpop-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.gpop label { display: flex; gap: 7px; align-items: center; padding: 3px 0; }

/* two-line cells */
.l1, .l2 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l1 { font-weight: 500; line-height: 17px; }
.l2 { font-size: 11.5px; line-height: 15px; color: var(--muted); }
.l2 b { font-size: 12.5px; color: var(--text); font-weight: 600; margin-right: 4px; }
.sub { color: var(--muted); }

/* small tags */
.tag { display: inline-block; font-size: 11px; font-weight: 500; line-height: 16px; padding: 0 6px; border-radius: 4px; border: 1px solid transparent; white-space: nowrap; }
.t-outline { background: #fff; border-color: var(--line); color: #344054; }
.t-plain { background: var(--soft); color: #344054; }
.t-amber { background: #FFF6E5; border-color: #F7C266; color: #C27A0E; }
.t-red { background: #FEECEC; border-color: #F5A3A3; color: #C4282D; }
.t-green { background: #ECFDF3; border-color: #86DCA8; color: #15803D; }
.t-blue { background: #EEF4FF; border-color: #A9C4F5; color: #1F56C7; }
.ptime { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; line-height: 14px; padding: 0 6px; border-radius: 4px; border: 1px solid #86DCA8; background: #ECFDF3; color: #15803D; }
.ptime i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.ptime.off { background: var(--soft); border-color: var(--line); color: #475467; }
.ptime.off i { background: #98A2B3; }
.req { color: var(--red); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.status-new { display: inline-flex; gap: 4px; align-items: center; }
.new { font-size: 9.5px; font-weight: 750; line-height: 14px; padding: 0 4px; border-radius: 3px; background: var(--blue); color: #fff; animation: blink 1.1s infinite; }
.new.red { background: var(--red); }
@media (prefers-reduced-motion: reduce) { .new, .nav-count { animation: none; } }

/* issue record */
.record { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.cmdbar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 2px 0 8px; background: #fff; }
.count { color: var(--muted); }
.right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.rec-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 49px; padding: 7px 14px; background: var(--navy); color: #fff; border-radius: 8px; margin-bottom: 8px; }
.rec-title h1 { font-size: 14px; }
.docno { color: #98A2B3; font-weight: 500; }
.fg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.fg-item { display: flex; min-width: 0; border-bottom: 1px solid var(--line); min-height: 40px; }
.fg-item.wide { grid-column: 1 / -1; }
.fg-l { flex: none; width: 112px; padding: 11px 10px; font-size: 12px; color: var(--muted); }
.fg-v { flex: 1; min-width: 0; padding: 4px 8px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; font-weight: 500; overflow-wrap: anywhere; }
.fg-v input:not([type=checkbox]), .fg-v select, .fg-v textarea, .fg-v .checks { width: 100%; }
.fg-v.lockv { cursor: not-allowed; color: var(--muted); }
.ferr { color: var(--red); font-size: 11.5px; }
.ferr:empty { display: none; }
.invalid input:not([type=checkbox]), .invalid select, .invalid textarea { border-color: var(--red); }
.errors { background: #FEECEC; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.errors[hidden] { display: none; }
section.block { margin-bottom: 10px; }
.form { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.form-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); min-width: 0; }
.field.wide { margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; color: var(--text); font-size: 13px; }
.hint { font-size: 11.5px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 3px 14px; padding: 3px 0; color: var(--text); font-size: 12.5px; font-weight: 400; }
.checks label { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.closed-note { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.grid.plain .gscroll { max-height: 320px; }

/* dialog */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 40, .35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 440px; max-width: 100%; background: #fff; border-radius: 10px; padding: 14px 16px; }
.dialog p { margin: 0 0 10px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }

#toast { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 60; background: var(--navy); color: #fff; padding: 7px 14px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
#toast.show { opacity: 1; }

@media (max-width: 860px) {
  body { flex-direction: column; height: auto; }
  #nav { width: 100%; height: auto; }
  .nav-foot { display: none; }
  #main { height: calc(100vh - 170px); }
  .fg, .form-row { grid-template-columns: minmax(0, 1fr); }
  .search, .search input { width: 100%; }
  .topbar-r { margin-left: 0; }
}

/* issue page: two working columns, cards, feed */
.rec-title { gap: 8px 22px; }
.rec-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 22px; border-right: 1px solid #2A3345; }
.stat.sm b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 5px; min-height: 18px; }
.rec-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.rec-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card-h { padding: 9px 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
.card-b { padding: 12px; }
.card.flush .card-b { padding: 0; }
.card .grid { border: 0; border-radius: 0; }
.dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 12px; padding-top: 1px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl dd b { font-weight: 600; }
.fg.one { grid-template-columns: minmax(0, 1fr); border-radius: 8px; margin-bottom: 6px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.feed li { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.ev-h { display: flex; align-items: center; gap: 8px; }
.ev-h b { font-weight: 600; }
.ev-c { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ev-n { margin-top: 3px; }
#talk-form .field { margin-bottom: 10px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.pick span:hover { background: var(--soft); }
.pick input:checked + span { background: #EEF4FF; border-color: var(--blue); color: var(--blue-dark); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.invalid .pick span { border-color: var(--red); }
.talk-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.talk-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.talk-row .field { margin-bottom: 0 !important; }
.more { margin-top: 10px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.more-b { padding-top: 8px; }
.talk-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 1100px) {
  .rec-body { grid-template-columns: minmax(0, 1fr); }
  .talk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- email operations ---------- */
#main.pg-thread { overflow-y: auto; }
.feed { max-height: none; }
.nav-brand { font-size: 15px; letter-spacing: -.01em; }
.b-up { color: var(--blue); }
.b-360 { display: inline-block; margin-left: 2px; padding: 1px 5px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; vertical-align: 1px; }
.nav-num { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); }
.nav-link.active .nav-num { color: #fff; }
.nav-sec-h { cursor: default; }
a.stat.link { cursor: pointer; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; }
a.stat.link:hover { background: #1A2333; }
a.stat.link:hover b { text-decoration: underline; text-underline-offset: 3px; }
.nl { color: var(--blue); font-weight: 600; }
.nl:hover { text-decoration: underline; }
#main.pg-pulse { overflow-y: auto; }
.pulse { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 8px; align-items: start; }
.pulse-side { display: flex; flex-direction: column; gap: 8px; }
.card-h .sub { font-weight: 400; font-size: 12px; }
.gt.full { width: 100%; }
.gt.full th, .gt.full td { height: 34px; }
.gt tr.muted td { color: var(--muted); }
.gt tr.subtotal td { font-weight: 650; border-top: 1px solid var(--line-strong); background: #FAFBFC; }
.gt tfoot td { background: #FAFBFC; }
.gt .wrap { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 16px; }
.gt td { height: 44px; }
.tags { display: flex; flex-wrap: wrap; gap: 3px; white-space: normal; }
.tags .tag { line-height: 15px; }
.page-h { font-size: 15px; margin-left: 6px; }
.btn svg.i { width: 14px; height: 14px; }
.msg { margin-top: 6px; white-space: pre-wrap; line-height: 1.45; }
.feed li.ours { background: #F8FAFF; }
.rec-body .dl { grid-template-columns: 120px minmax(0, 1fr); }
.tabsrow .ghint { font-size: 12px; }
@media (max-width: 1100px) { .pulse { grid-template-columns: minmax(0, 1fr); } }
.pulse-main .gt.full th:first-child { width: 230px; }
.pulse-main .gt.full { min-width: 560px; }
.pulse-side .gt.full th.num, .pulse-side .gt.full td.num { width: 84px; }
.pulse-side .gt.full td:first-child { white-space: normal; }

/* ---------- white background, black text: no dark header, no grey panels ---------- */
:root { --text: #000; --muted: #000; --soft: #fff; --navy: #fff; }
body { color: #000; }
.strip, .rec-title { background: #fff; color: #000; border: 1px solid var(--line-strong); }
.strip-b { border-right-color: var(--line-strong); }
.strip-s, .stat span, .docno { color: #000; }
.stat span { font-size: 10.5px; }
.stat.hot b { color: #000; }
.live { color: #15803D; }
.live::before { background: #16A34A; }
a.stat.link:hover { background: #F2F5FF; }
.nav-sec-h, .nav-link, .view, .view b, .card-h .sub, .sub, .ghint, .l2, .gfoot, .gt thead th, .nav-num, .nav-demo, .nav-user-t span, .search svg, .si { color: #000; }
.nav-sec-body { background: #fff; border: 1px solid var(--line); }
.nav-link:hover, .view:hover { background: #F2F5FF; }
.seg { background: #fff; border: 1px solid var(--line); }
.view.active { background: var(--blue); color: #fff; box-shadow: none; }
.view.active b { color: #fff; }
.l2, .sub, .ghint, .card-h .sub { font-weight: 400; }
.gt tr.muted td { color: #000; }
.gt tr.subtotal td, .gt tfoot td { background: #fff; }
.gt tbody tr:hover td { background: #F7F9FF; }
.feed li.ours { background: #fff; }
.t-plain { background: #fff; border-color: var(--line-strong); color: #000; }
.t-outline { color: #000; }
.avatar { background: #fff; }
#toast { background: #000; }

/* ---------- email page, mailbox look ---------- */
#main.pg-thread { overflow-y: auto; }
.mx-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 4px 4px 8px; background: #fff; border-bottom: 1px solid var(--line); }
.mx-ib { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: #000; font: 20px/1 Inter, sans-serif; cursor: pointer; }
.mx-ib:hover { background: #F2F5FF; }
.mx-ib svg { width: 18px; height: 18px; }
.mx-ib.off { color: #C8CDD5; cursor: default; }
.mx-ib.off:hover { background: none; }
.mx-count { font-size: 12.5px; margin-right: 6px; }
.mx { max-width: 1100px; padding: 18px 20px 40px 8px; }
.mx-subj { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px 56px; }
.mx-subj h1 { font-size: 22px; font-weight: 400; white-space: normal; }
.mx-label { font-size: 12px; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 4px; }
.mx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px 56px; }
.mx-chip { font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 12px; }
.mx-chip b { font-weight: 600; }
.mx-warn, .mx-note { margin: 0 0 16px 56px; padding: 10px 12px; border-radius: 8px; line-height: 1.5; }
.mx-warn { background: #FEF3F2; border: 1px solid #F5A3A3; }
.mx-note { border: 1px solid #A9C4F5; background: #F5F8FF; }
.mx-note span { margin-left: 6px; }
.mx-msg { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mx-msg:last-of-type { border-bottom: 0; }
.mx-av { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.mx-mb { flex: 1; min-width: 0; }
.mx-h { display: flex; justify-content: space-between; gap: 12px; }
.mx-h b { font-size: 14px; font-weight: 700; }
.mx-addr, .mx-to { font-size: 12.5px; }
.mx-time { font-size: 12.5px; white-space: nowrap; }
.mx-body { margin-top: 18px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.mx-demo { margin-top: 8px; font-size: 12px; font-style: italic; }
.mx-acts { display: flex; gap: 10px; margin: 24px 0 0 56px; }
.mx-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 20px; border: 1px solid #000; border-radius: 18px; background: #fff; font: inherit; font-size: 14px; color: #000; cursor: pointer; }
.mx-pill:hover { background: #F2F5FF; }
.mx-pill svg { width: 16px; height: 16px; }
.mx-compose { margin: 20px 0 0 56px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; box-shadow: 0 1px 4px rgba(16, 24, 40, .08); }
.mx-cto { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mx-cto input { flex: 1; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.mx-compose textarea { border: 0; padding: 4px 0; font-size: 14px; line-height: 1.5; resize: vertical; }
.mx-compose textarea:focus-visible, .mx-cto input:focus-visible { outline: none; }
.mx-cfoot { display: flex; gap: 8px; margin-top: 8px; }
.mx-cfoot .btn.primary { border-radius: 18px; padding: 0 22px; }
.mx-cwarn { margin-bottom: 6px; padding: 6px 8px; border-radius: 6px; background: #FEF3F2; font-size: 12.5px; }

/* ---------- All Emails ---------- */
.hist-head { display: flex; align-items: baseline; gap: 12px; padding: 2px 0 10px; }
.hist-head .page-h { margin-left: 0; font-size: 18px; }
.search.wide input { width: 420px; }
.tabsrow input[type=datetime-local] { width: 190px; }
.tabsrow .right { margin-left: auto; }
.mx-chip.link { color: #000; }
.mx-chip.link:hover { border-color: var(--blue); background: #F2F5FF; }
.mx-msg.hl { background: #FFFBEA; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; }
.mx-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mx-att { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 12.5px; }
.mx-att svg { width: 14px; height: 14px; }
.mx-rel { font-size: 12.5px; margin-top: 2px; }
.mx-n { display: block; text-align: right; font-size: 12px; margin-top: 2px; }
.mx-sum { margin: 0 0 16px 56px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; }
.mx-sum-h { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.mx-ai { font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: var(--blue); color: #fff; line-height: 16px; }
.mx-sum p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; }

/* ---------- long chains: folded rows, jumps ---------- */
.mx-tools { display: flex; align-items: center; gap: 14px; margin: 0 0 6px 56px; font-size: 12.5px; }
.mx-tools .btn.link { font-size: 12.5px; }
.mx-msg { scroll-margin-top: 60px; }
.mx-msg.open .mx-who { cursor: pointer; }
.mx-tr { display: flex; align-items: flex-start; gap: 2px; }
.mx-ib.sm { width: 30px; height: 30px; }
.mx-ib.sm svg { width: 16px; height: 16px; }
.mx-rel { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-top: 4px; }
.mx-rel .mx-n { display: inline; margin: 0; white-space: nowrap; }
.mx-time { padding-top: 6px; }
.mx-jump { color: var(--blue); font-weight: 600; }
.mx-jump:hover { text-decoration: underline; }
.mx-ans { margin-top: 10px; font-size: 12.5px; }
.mx-av.us { background: #EEF4FF; border-color: #A9C4F5; }
.mx-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; scroll-margin-top: 60px; }
.mx-row:hover { background: #F7F9FF; }
.mx-row .mx-av { width: 32px; height: 32px; font-size: 13px; margin-left: 4px; }
.mx-row-t { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: baseline; }
.mx-row-t b { flex: none; width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mx-row-s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mx-row-r { flex: none; display: flex; align-items: center; gap: 10px; font-size: 12.5px; white-space: nowrap; }
.mx-row-r svg { width: 14px; height: 14px; }
.mx-more { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 0 8px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; font-size: 13px; color: #000; cursor: pointer; }
.mx-more span { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.mx-more:hover { background: #F7F9FF; }
.mx-row.hl, .mx-msg.hl { background: #FFFBEA; }
.mx-ctarget { font-size: 12.5px; margin-bottom: 6px; }

/* ---------- email page: full width, reply quote cards, jump feedback ---------- */
.mx { max-width: none; padding: 18px 28px 40px 12px; }
.mx-row-t b { width: 190px; }
.mx-num { flex: none; display: inline-block; min-width: 34px; margin-right: 8px; font-size: 12px; font-weight: 700; color: var(--blue); }
.mx-who .mx-num { min-width: 0; font-size: 13px; }
.mx-row-re { flex: none; font-size: 12px; font-weight: 600; color: var(--blue); }
.mx-tr .mx-time { text-align: right; }
.mx-quote { display: block; width: 100%; max-width: 900px; margin-top: 10px; padding: 8px 12px; text-align: left; font: inherit; color: #000; background: #F5F8FF; border: 1px solid #A9C4F5; border-left: 4px solid var(--blue); border-radius: 6px; cursor: pointer; }
.mx-quote:hover { background: #EAF1FF; border-color: var(--blue); }
.mx-quote-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.mx-quote-h svg { width: 14px; height: 14px; color: var(--blue); }
.mx-quote-h b { font-weight: 700; }
.mx-quote-go { margin-left: auto; font-weight: 700; color: var(--blue); white-space: nowrap; }
.mx-quote-b { display: block; margin-top: 3px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-first { margin-top: 8px; font-size: 12.5px; }
.mx-ans { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; }
.mx-ansb { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--blue); background: #fff; border: 1px solid #A9C4F5; border-radius: 14px; padding: 3px 10px; cursor: pointer; }
.mx-ansb:hover { background: #EAF1FF; border-color: var(--blue); }
.mx-came { margin: 0 0 10px; padding: 6px 10px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 12.5px; font-weight: 600; }
.mx-came .mx-jump { color: #fff; text-decoration: underline; margin-left: 6px; }
.mx-msg.hl { background: #FFFBEA; box-shadow: inset 4px 0 0 #F59E0B; margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 8px; }
@keyframes mxflash { 0% { box-shadow: inset 4px 0 0 #F59E0B, 0 0 0 4px #F59E0B; } 100% { box-shadow: inset 4px 0 0 #F59E0B, 0 0 0 0 rgba(245, 158, 11, 0); } }
.mx-msg.flash { animation: mxflash 1.4s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .mx-msg.flash { animation: none; } }

/* ---------- All Emails header: big search, labeled filters, chips ---------- */
.hx { flex: none; display: flex; flex-direction: column; gap: 14px; padding: 6px 4px 14px; }
.hx-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hx-top h1 { font-size: 22px; font-weight: 700; }
.hx-top p { margin: 4px 0 0; font-size: 14px; }
.hx-count { font-size: 15px; white-space: nowrap; }
.hx-count b { font-size: 20px; font-weight: 700; }
.hx-count span { margin: 0 10px; }
.hx-search { position: relative; display: flex; align-items: center; }
.hx-search svg { position: absolute; left: 14px; width: 20px; height: 20px; pointer-events: none; }
.hx-search input { width: 100%; height: 48px; padding: 0 16px 0 46px; font-size: 16px; border: 1.5px solid var(--line-strong); border-radius: 10px; }
.hx-search input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(47, 107, 234, .15); }
.hx-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 28px; }
.hx-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hx-l { font-size: 13px; font-weight: 600; }
.hx-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hx-b { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; font: inherit; font-size: 14px; font-weight: 500; color: #000; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 8px; cursor: pointer; white-space: nowrap; }
.hx-b:hover { border-color: var(--blue); background: #F5F8FF; }
.hx-b.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.hx-n { font-size: 12.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: #EEF4FF; color: #000; }
.hx-b.on .hx-n { background: rgba(255, 255, 255, .25); color: #fff; }
span.hx-b { cursor: default; }
.hx-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.hx-dt { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.hx-dt input { height: 40px; width: 210px; font-size: 14px; border: 1.5px solid var(--line-strong); border-radius: 8px; }
.hx-sel { height: 40px; width: 210px; font-size: 14px; border: 1.5px solid var(--line-strong); border-radius: 8px; padding-left: 12px; }
.hx-sel:hover, .hx-dt input:hover { border-color: var(--blue); }
.hx-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.hx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hx-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: #000; background: #EEF4FF; border: 1px solid #A9C4F5; border-radius: 17px; cursor: pointer; }
.hx-chip span { font-size: 12px; }
.hx-chip:hover { border-color: var(--blue); }
.hx-clear { height: 34px; padding: 0 12px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--blue); background: none; border: 0; cursor: pointer; }
.hx-clear:hover { text-decoration: underline; }
.hx-view .hx-b { height: 42px; font-size: 14.5px; }
.pg-history .gt { font-size: 13.5px; }
.pg-history .gt td { height: 52px; }
.pg-history .gt thead th { font-size: 13px; }

/* ---------- bigger controls on every page ---------- */
.view { padding: 7px 13px; font-size: 13.5px; }
.view b { font-size: 12px; }
.seg { padding: 4px; }
.search input { height: 38px; width: 320px; font-size: 14px; border-style: solid; border-width: 1.5px; }
.tabsrow select { height: 38px; font-size: 14px; }
.tabsrow { gap: 12px; margin-bottom: 10px; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.hx-group { display: flex; gap: 14px; align-items: flex-end; }
/* search sits on the title row, fixed width; result counts live on the view switch */
.hx-top { align-items: center; }
.hx-search { flex: 0 1 460px; }
.hx-search svg { left: 12px; width: 17px; height: 17px; }
.hx-search input { height: 40px; padding-left: 38px; font-size: 14px; border-width: 1.5px; border-radius: 8px; }
/* search sits in the When row, same height as the other controls */
.hx-search { flex: none; width: 360px; }

/* ---------- whole row opens the email ---------- */
.gt tr.rowlink { cursor: pointer; }
.gt tr.rowlink:hover td, .gt tr.rowlink:focus-visible td { background: #EEF4FF; }
.gt tr.rowlink:hover td:first-child, .gt tr.rowlink:focus-visible td:first-child { box-shadow: inset 4px 0 0 var(--blue); }
.gt tr.rowlink:focus-visible { outline: none; }
.gt tr.rowlink .subj { font-weight: 700; }
.gt tr.rowlink:hover .subj { color: var(--blue-dark); }
.gt .go { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 20px; line-height: 1; color: #000; }
.gt tr.rowlink:hover .go { background: var(--blue); color: #fff; }

/* ---------- the row you opened last stays marked when you come back ---------- */
.gt tr.rowlink.seen td { background: #FFF4C2; }
.gt tr.rowlink.seen td:first-child { box-shadow: inset 4px 0 0 var(--blue); }
.gt tr.rowlink.seen:hover td { background: #FFEFA8; }
.gt tr.rowlink.seen.flash td { animation: seenflash 1.6s ease-out; }
@keyframes seenflash { 0%, 35% { background: #FFE27A; } 100% { background: #FFF4C2; } }

/* ---------- shared header on every page ---------- */
.hx-tl { display: flex; align-items: center; gap: 14px; }
.hx-back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1.5px solid var(--line-strong); border-radius: 8px; color: #000; flex: none; }
.hx-back:hover { border-color: var(--blue); background: #F5F8FF; color: var(--blue); }
.hx-back svg { width: 18px; height: 18px; }
.hx-facts { display: flex; flex-wrap: wrap; gap: 12px; }
.hx-fact { display: flex; flex-direction: column; gap: 3px; min-width: 190px; padding: 12px 16px; border: 1.5px solid var(--line-strong); border-radius: 10px; color: #000; text-decoration: none; background: #fff; }
.hx-fact b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.hx-fact span { font-size: 14px; font-weight: 600; }
.hx-fact small { font-size: 12.5px; color: #000; }
.hx-fact:hover { border-color: var(--blue); background: #F5F8FF; box-shadow: inset 4px 0 0 var(--blue); }
.hx-fact:hover b { color: var(--blue); }

/* ---------- Today's Emails: side cards read the same as the kind table ---------- */
.pulse { grid-template-columns: minmax(0, 1fr) 500px; gap: 14px; }
.pulse-side { gap: 14px; }
.pg-pulse .card { border: 1.5px solid var(--line-strong); }
.pg-pulse .card-h { padding: 12px 14px; font-size: 15px; font-weight: 700; }
.pg-pulse .card-h .sub { font-size: 13px; }
.pg-pulse .gt { font-size: 14px; }
.pg-pulse .gt.full th, .pg-pulse .gt.full td { height: 40px; padding: 0 14px; }
.pg-pulse .gt thead th { font-size: 13px; font-weight: 700; }
.pg-pulse .gt tfoot td, .pg-pulse .gt tr.subtotal td { font-weight: 700; }
.pg-pulse .gt td.num a.nl, .pg-pulse .gt td a.nl { font-weight: 600; }
.pulse-side .gt.full th.num, .pulse-side .gt.full td.num { width: 150px; }
.pulse-side .gt.full thead th { white-space: normal; line-height: 1.2; }
.pulse-side .gt.full td:first-child { white-space: normal; line-height: 1.3; }
.pulse-side .tag { font-size: 13px; line-height: 22px; padding: 0 10px; }
@media (max-width: 1250px) { .pulse { grid-template-columns: minmax(0, 1fr); } }
.pulse-main .gt.full td:first-child { white-space: normal; line-height: 1.3; }

/* ---------- Today's Emails v2: equal facts, two matching tables ---------- */
.pulse-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pulse-facts .hx-fact { min-width: 0; padding: 14px 16px; gap: 4px; }
.pulse-facts .hx-fact span { font-size: 13.5px; font-weight: 600; }
.pulse-facts .hx-fact b { font-size: 28px; }
.pulse-facts .hx-fact small { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; padding: 0 4px 16px; }
.pcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pcard { border: 1.5px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.pcard-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line-strong); }
.pcard-h h2 { margin: 0; font-size: 16px; font-weight: 700; }
.pcard-h span { font-size: 13px; }
.pcard-h a { color: var(--blue); font-weight: 600; }
.pcard-foot { margin: 0; padding: 12px 16px; font-size: 13px; border-top: 1px solid var(--line); }
.pcard-foot a { color: #000; text-decoration: underline; }
.pcard .grid { border: 0; border-radius: 0; }
.pcard .grid.plain .gscroll { max-height: none; }
.ptable { font-size: 14px; }
.pg-pulse .ptable th, .pg-pulse .ptable td { height: 44px; padding: 0 16px; }
.ptable th:first-child { width: auto; }
.ptable th.num { width: 120px; }
.ptable .go-c { width: 44px; padding: 0 8px !important; text-align: center; }
.ptable tfoot td { font-weight: 700; }
.ptable a.wl { color: var(--blue); font-weight: 700; }
.ptable a.wl:hover { text-decoration: underline; }
.pg-pulse .pcard .gt td { height: 48px; }
@media (max-width: 1300px) { .pgrid { grid-template-columns: minmax(0, 1fr); } .pulse-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ptable th.num { width: 150px; }
.pulse-facts .hx-fact small { white-space: normal; overflow: visible; line-height: 1.3; }
.gt td:has(> .go), .ptable .go-c { text-overflow: clip; padding: 0 6px !important; text-align: center; }
.ptable td:first-child { white-space: normal; line-height: 1.25; }

/* ---------- Suspicious Emails: calm colors, readable findings ---------- */
.risk { display: inline-block; min-width: 62px; text-align: center; padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; color: #000; }
.r-high { background: #FDE7E7; }
.r-medium { background: #FFF1D6; }
.r-low { background: #EAF1FF; }
.finds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; white-space: normal; }
.finds li { position: relative; padding-left: 14px; font-size: 13.5px; line-height: 1.3; color: #000; }
.finds li::before { content: ''; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border-radius: 50%; }
.finds li.f-high::before { background: #E8A0A0; }
.finds li.f-medium::before { background: #EBC27A; }
.finds li.f-low::before { background: #A9C4F5; }
.pg-security .gt, .pg-list .gt { font-size: 13.5px; }
.pg-security .gt td { height: auto; padding-top: 12px; padding-bottom: 12px; vertical-align: top; }
.pg-security .gt td:has(> .go) { vertical-align: middle; }
.pg-security .gt thead th { font-size: 13px; font-weight: 700; }
