:root {
  color-scheme: light;
  --ink: #282626; --muted: #5f5c5c;
  --brand: #801519; --brand-dark: #711217; --brand-deep: #541015; --brand-tint: #fbefef;
  --silver: #d7d7d7; --line: #dedada; --control-border: #928989; --paper: #f5f4f4;
  font-family: "Segoe UI", "Aptos", system-ui, sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.topbar { min-height: 72px; display: flex; align-items: center; gap: 21px; padding: 8px clamp(20px, 4vw, 66px); color: var(--ink); background: #fff; border-bottom: 3px solid var(--brand); }
.brand-logo { display: block; flex: none; width: auto; height: 66px; }
.header-home { display: block; flex: none; }
.top-context { display: flex; align-items: center; gap: 19px; color: var(--muted); font-size: .92rem; }
.top-divider { width: 1px; height: 25px; background: var(--silver); }
.top-user { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 13px; margin-left: auto; color: var(--muted); }
.mode { padding: 5px 10px; color: var(--brand-dark); background: var(--brand-tint); border: 1px solid #e3cccc; border-radius: 999px; font-size: .82rem; }
.account { display: grid; min-width: 0; max-width: min(30vw, 16rem); text-align: right; font-size: .87rem; }
.account strong, .account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account strong { color: var(--ink); }
.account span { font-size: .8rem; }
.account-action { flex: none; }
.shell { max-width: 1550px; margin: 0 auto; padding: 34px clamp(18px, 4vw, 66px) 20px; }
.back-link { display: inline-block; margin-bottom: 15px; font-size: .9rem; font-weight: 650; }
.launchpad-shell { max-width: 1180px; }
.launchpad-intro { padding: clamp(24px, 5vw, 50px); margin-bottom: 28px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 12px; }
.launchpad-intro p, .launchpad-tool p { line-height: 1.5; color: var(--muted); }
.launchpad-intro .button { margin-top: 18px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 15px; margin-top: 12px; }
.launchpad-tool { max-width: 450px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.launchpad-tool h3 { font-size: 1.2rem; }
.launchpad-tool p { margin: 7px 0 16px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 23px; }
.eyebrow { color: var(--brand); font-size: .78rem; font-weight: 760; letter-spacing: .105em; }
h1, h2, h3, p { margin: 0; }
h1 { margin: 4px 0 6px; font-size: clamp(2rem, 4vw, 3.05rem); line-height: 1.05; font-weight: 760; letter-spacing: -.045em; }
.intro p { color: var(--muted); line-height: 1.5; }
.date-filter { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.date-filter label { display: grid; gap: 4px; color: #463c3d; font-size: .87rem; font-weight: 650; }
.date-filter input { min-width: 9.6rem; font-weight: 450; }
.button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; border-radius: 8px; border: 1px solid transparent; padding: 8px 13px; font-weight: 650; font-size: .91rem; text-decoration: none; white-space: nowrap; }
.secondary { color: var(--ink); border-color: var(--control-border); background: white; }
.secondary:hover { background: #f3f0f0; }
.primary { color: white; background: var(--brand); }
.primary:hover { background: var(--brand-dark); }
.quiet { color: var(--brand-dark); background: var(--brand-tint); }
.quiet:hover { background: #f4dddd; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 20px; }
.metric { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px 14px; color: var(--ink); }
.metric:hover, .metric[aria-pressed="true"] { border-color: var(--brand); }
.metric[aria-pressed="true"] { background: var(--brand-tint); }
.metric-label { display: flex; align-items: center; gap: 9px; color: #4e4546; font-size: .9rem; font-weight: 610; }
.metric-value { display: block; margin-top: 3px; padding-left: 16px; font-size: 1.73rem; line-height: 1.2; font-weight: 740; }
.dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #777171; }
.dot.open { background: var(--brand); } .dot.in_progress { background: #785864; } .dot.waiting { background: #775847; } .dot.handled { background: #5f5c5c; }
.workspace { background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; display: grid; grid-template-columns: minmax(345px, 43%) minmax(0, 1fr); min-height: 560px; }
.session-notice { padding: 24px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); }
.queue { border-right: 1px solid var(--line); min-width: 0; }
.queue-top { padding: 19px 20px 13px; }
h2 { font-size: 1.24rem; letter-spacing: -.02em; }
.queue-top p { margin-top: 3px; color: var(--muted); font-size: .86rem; }
.filters { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(130px, .72fr); gap: 8px; padding: 0 20px; }
input, select, textarea { width: 100%; border: 1px solid var(--control-border); border-radius: 7px; padding: 8px 10px; color: var(--ink); background: #fff; min-height: 39px; }
input::placeholder, textarea::placeholder { color: #686161; }
.select-wrap { position: relative; display: block; }
.select-wrap::after { content: ""; position: absolute; top: 15px; right: 13px; width: 7px; height: 7px; border-right: 1.6px solid #5f5656; border-bottom: 1.6px solid #5f5656; transform: rotate(45deg); pointer-events: none; }
select { appearance: none; padding-right: 30px; }
.search { position: relative; display: block; }
.search input { padding-left: 32px; }
.search span { position: absolute; top: 13px; left: 12px; width: 11px; height: 11px; border: 1.6px solid #6b6060; border-radius: 50%; pointer-events: none; }
.search span::after { content: ""; width: 5px; height: 1.5px; background: #6b6060; position: absolute; top: 8px; left: 7px; transform: rotate(45deg); }
.tabs { display: flex; padding: 10px 16px 0; gap: 5px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; color: var(--muted); white-space: nowrap; padding: 8px 8px 10px; font-size: .86rem; font-weight: 650; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--brand-dark); }
.tab[aria-pressed="true"] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.queue-list { padding: 0; margin: 0; list-style: none; max-height: 584px; overflow-y: auto; }
.queue-list li + li { border-top: 1px solid #ece8e8; }
.request { width: 100%; text-align: left; border: 0; border-left: 4px solid transparent; padding: 13px 17px 14px 16px; color: var(--ink); background: #fff; }
.request:hover { background: #f7f4f4; }
.request[aria-current="true"] { background: var(--brand-tint); border-left-color: var(--brand); }
.request-top, .request-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.request-sender { color: #514747; font-size: .86rem; font-weight: 650; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.request time { color: #625a5a; white-space: nowrap; font-size: .81rem; }
.request-subject { display: block; margin: 4px 0 7px; overflow-wrap: anywhere; font-weight: 700; line-height: 1.3; }
.request-owner { color: var(--muted); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.badge { display: inline-block; flex-shrink: 0; padding: 3px 8px; border-radius: 5px; background: #efeded; color: #4c4344; font-size: .8rem; font-weight: 650; line-height: 1.35; }
.badge.change { color: #711217; background: #f7e4e6; }
.badge.new { color: #523841; background: #f0e6e9; }
.badge.info { color: #494646; background: #eae7e7; }
.badge.waiting { color: #624638; background: #f4ebe5; }
.badge.handled { color: #383636; background: #e4e1e1; }
.badge.in_progress { color: #5e414c; background: #eee4e8; }
.detail { min-width: 0; padding: 23px clamp(18px, 2.4vw, 36px) 25px; }
.detail-label { margin-bottom: 10px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.detail h2 { font-size: clamp(1.32rem, 2.7vw, 1.75rem); line-height: 1.2; overflow-wrap: anywhere; }
.sender-line { color: var(--muted); line-height: 1.5; margin-top: 7px; font-size: .91rem; overflow-wrap: anywhere; }
.preview { padding: 13px 15px; margin: 14px 0; border-left: 3px solid #a55b60; border-radius: 0 7px 7px 0; background: #f7f3f3; color: #423637; line-height: 1.48; overflow-wrap: anywhere; }
.section-heading { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
h3 { font-size: 1rem; }
.routing-hint { font-size: .86rem; color: var(--muted); margin: 6px 0 11px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 13px; }
.field { display: block; color: #463c3d; font-size: .87rem; font-weight: 650; }
.field input, .field textarea, .field .select-wrap { margin-top: 4px; font-weight: 450; }
.field input, .field textarea { font-size: .94rem; }
.notes { margin-top: 10px; }
textarea { display: block; min-height: 66px; resize: vertical; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.activity { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; font-size: .87rem; color: var(--muted); }
.activity summary { cursor: pointer; font-weight: 660; color: var(--ink); }
.activity ul { padding-left: 20px; line-height: 1.5; }
.placeholder { color: var(--muted); padding: 18px 20px; line-height: 1.45; }
.alert { border-radius: 7px; color: #711217; background: var(--brand-tint); border: 1px solid #d7aaaa; padding: 10px 13px; margin-bottom: 12px; }
.toast { position: fixed; z-index: 2; right: 25px; bottom: 20px; max-width: calc(100vw - 50px); border-radius: 8px; padding: 11px 15px; color: #fff; background: var(--brand-deep); box-shadow: 0 5px 25px #54101530; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding-top: 12px; font-size: .82rem; color: var(--muted); }
@media (max-width: 840px) {
  .workspace { grid-template-columns: minmax(290px, 42%) minmax(0, 1fr); }
  .filters { display: flex; flex-direction: column; }
  .actions { align-items: stretch; }
}
@media (max-width: 680px) {
  .topbar { gap: 10px; }
  .top-divider { display: none; }
  .top-user { gap: 6px 9px; }
  .intro { align-items: start; flex-direction: column; gap: 10px; }
  .metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .workspace { grid-template-columns: 1fr; }
  .queue { border-right: 0; border-bottom: 1px solid var(--line); }
  .queue-list { max-height: 338px; }
  .filters { display: grid; }
  .tabs { flex-wrap: wrap; }
}
@media (max-width: 440px) {
  .top-context { display: none; }
  .account { max-width: min(35vw, 12rem); }
  .filters { grid-template-columns: 1fr; }
}
