/* Reception Planner — visual direction from reception-mockup.dc.html (handoff §10). */
:root {
  --ink: #17201C; --ink2: #26312D; --ink3: #3C4742; --mute: #59645F; --line: #E4E7E2; --line2: #EEF0EC; --edge: #CBD2CC;
  --ground: #F3F4F1; --card: #FFFFFF; --soft: #FAFBF9; --accent: #0E5C57; --accent-d: #0A4743; --sel: #F1F7F6;
  --hdr-mute: #A9B8B2; --hdr-field: #26312D;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14px; }
a { color: var(--accent); } a:hover { color: var(--accent-d); }
h2 { margin: 0; font-size: 18px; }
.h16 { font-size: 16px; }
.mono, .kpi-val, .agenda-time, .tl-when { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.muted { font-size: 13px; color: var(--mute); }
.sr { position: absolute; left: -9999px; }
[hidden] { display: none !important; }
.wrap { max-width: 1480px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* buttons, tabs, chips, tags */
.btn { font: inherit; font-size: 13px; font-weight: 600; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--edge); background: #fff; color: var(--ink); cursor: pointer; }
.btn:hover { background: #EEF1ED; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-pri:hover { background: var(--accent-d); }
.btn-sm { min-height: 36px; padding: 0 12px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; color: var(--hdr-mute); text-decoration: underline; cursor: pointer; min-height: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 12.5px; font-weight: 600; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--edge); background: #fff; color: var(--ink3); cursor: pointer; }
.chip-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.ch-ai { background: #E6ECFB; color: #1E3A8A; } .ch-kenect { background: #EEE8F8; color: #4C2F8F; } .ch-ghl { background: #E2F0EE; color: #0B4C48; }
.ch-rc { background: #FCEBDD; color: #8A3207; } .ch-cal { background: #E5F2E8; color: #1A5E30; } .ch-mute { background: #ECEEEB; color: var(--ink3); }
.sla-red, .st-bad { background: #FDE7E5; color: #9B1C12; } .sla-amb, .st-warn { background: #FFF1D6; color: #7A4A00; }
.sla-ok, .st-ok { background: #E5F2E8; color: #1A5E30; } .st-mute { background: #ECEEEB; color: var(--ink3); }
.st-unclass { background: #FFF6C7; color: #6B5300; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ok { background: #1F7A3D; } .dot-warn { background: #B4430C; } .dot-bad { background: #C0261A; } .dot-off { background: #9AA39E; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--ink); }
.login-card { background: #fff; border-radius: 14px; padding: 28px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { margin: 0; font-size: 24px; }
.login-card label, .dlg label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink3); }
.login-card input, .dlg input { font: inherit; font-size: 15px; min-height: 44px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 8px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--hdr-mute); }
.login-card .eyebrow { color: var(--mute); }
.err { color: #9B1C12; font-size: 13px; margin: 0; min-height: 1em; }

/* header */
.top { background: var(--ink); color: #fff; }
.top-row { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.brand { display: flex; flex-direction: column; gap: 2px; margin-right: auto; }
.title { font-size: 22px; font-weight: 700; }
.bday { display: flex; flex-direction: column; gap: 2px; }
.bday-val { font-size: 16px; font-weight: 600; }
.search { position: relative; display: flex; align-items: center; gap: 8px; background: var(--hdr-field); border-radius: 8px; padding: 0 12px; min-height: 44px; min-width: 260px; flex: 0 1 320px; }
.search input { font: inherit; font-size: 14px; background: transparent; border: 0; color: #fff; outline: none; width: 100%; min-height: 40px; }
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 20; overflow: hidden; }
.result { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--line2); padding: 10px 12px; min-height: 44px; cursor: pointer; }
.result:hover, .result:focus { background: var(--sel); }
.result small { color: var(--mute); }
.who { font-size: 13px; color: #CFD8D4; display: flex; align-items: center; gap: 8px; }

/* source bar + sample banner */
.sourcebar { background: #fff; border-bottom: 1px solid var(--line); }
.sources { padding-top: 10px; padding-bottom: 10px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 13px; color: var(--ink3); }
.sources .lbl { font-weight: 600; color: var(--ink); }
.src { display: inline-flex; align-items: center; gap: 6px; }
.src .note { color: var(--mute); }
.sample { background: #FFF8EA; border-bottom: 1px solid #F1E2BF; color: #7A4A00; font-size: 13px; }
.sample .wrap { padding-top: 8px; padding-bottom: 8px; }

/* layout */
.main { padding-top: 20px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.kpi-note { font-size: 12.5px; color: var(--ink3); }
.kpi.alert .kpi-note { color: #9B1C12; font-weight: 600; }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-width: 0; }
.card.pad { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card-head { padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.hrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.col-agenda { flex: 1 1 400px; }
.col-queue { flex: 1.35 1 460px; }
.col-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* agenda */
.arow { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.arow.block { background: var(--soft); }
.arow.clickable { cursor: pointer; }
.arow.clickable:hover { background: var(--sel); }
.agenda-time { width: 64px; flex: none; font-size: 13.5px; font-weight: 500; padding-top: 2px; }
.agenda-time small { display: block; font-size: 11px; color: var(--mute); }
.abody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.aline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.awho { font-weight: 600; font-size: 14.5px; }
.atitle { font-size: 13px; color: var(--ink3); }
.flag { font-size: 12.5px; color: #7A4A00; background: #FFF8EA; border-radius: 6px; padding: 6px 8px; }
.empty { padding: 40px 16px; text-align: center; color: var(--mute); font-size: 14px; }

/* queue */
.qrow { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.qrow-sel { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.pick { font: inherit; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; gap: 4px; min-height: 44px; width: 100%; }
.pick:hover .pname { text-decoration: underline; }
.pname { font-weight: 600; font-size: 15px; }
.psub { font-size: 12.5px; color: var(--mute); }
.pprev { font-size: 13.5px; color: var(--ink2); }
.qacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.owner { font-size: 12.5px; color: var(--ink3); margin-right: auto; }

/* contact */
.c-head { padding: 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.c-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.c-sub { font-size: 13px; color: var(--ink3); }
.timeline { list-style: none; margin: 0; padding: 12px 16px; display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow-y: auto; }
.timeline li { display: flex; gap: 10px; }
.tl-when { width: 78px; flex: none; font-size: 12px; color: var(--mute); padding-top: 2px; }
.tl-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13.5px; }
.tl-body .tag { align-self: flex-start; }
.reply { padding: 14px 16px; border-top: 1px solid var(--line); background: var(--soft); display: flex; flex-direction: column; gap: 10px; }
.reply label { font-size: 12.5px; font-weight: 600; color: var(--ink3); }
.reply textarea { font: inherit; font-size: 13.5px; border: 1px solid var(--edge); border-radius: 8px; padding: 10px; resize: vertical; background: #fff; color: var(--ink); min-height: 96px; }
.reply-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { font-size: 12px; color: var(--mute); }

/* team */
.member { display: flex; align-items: center; gap: 10px; }
.member-main { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: 14px; }
.member-role { font-size: 12.5px; color: var(--mute); }
.teamfoot { font-size: 12.5px; color: var(--mute); border-top: 1px solid var(--line2); padding-top: 10px; }
.teamfoot strong { color: var(--ink); }

/* threads */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); font-weight: 600; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { font-size: 13.5px; padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: top; }
td.name { font-weight: 600; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--sel); }

/* dialog + toast */
.dlg { border: 0; border-radius: 14px; padding: 20px; width: min(420px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(23, 32, 28, .45); }
.dlg form { display: flex; flex-direction: column; gap: 12px; }
.dlg h2 { margin: 0; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 50; max-width: calc(100vw - 32px); }

/* phone */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .search { min-width: 0; flex: 1 1 100%; order: 3; }
  .bday { order: 2; }
  .who { order: 4; }
  .col-agenda, .col-queue, .col-side { flex-basis: 100%; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi-val { font-size: 24px; }
}

/* snooze menu (details/summary — no interactive elements nested inside buttons) */
.snz { position: relative; }
.snz > summary { list-style: none; display: inline-flex; align-items: center; }
.snz > summary::-webkit-details-marker { display: none; }
.snz .menu { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 10; display: flex; flex-direction: column; min-width: 170px; overflow: hidden; }
.snz .menu button { font: inherit; font-size: 13.5px; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line2); padding: 0 14px; min-height: 44px; cursor: pointer; }
.snz .menu button:hover { background: var(--sel); }

/* 44px touch targets on phones / touch screens (handoff §10) */
@media (pointer: coarse), (max-width: 640px) {
  .btn-sm, .chip, .linkbtn { min-height: 44px; }
}

/* timeline message text (decrypted server-side for signed-in staff) */
.tl-detail { font-size: 13px; color: var(--ink2); background: var(--soft); border-left: 3px solid var(--line); padding: 6px 8px; border-radius: 4px; white-space: pre-wrap; }

/* team dialog */
.dlg-wide { width: min(860px, calc(100vw - 32px)); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.teamlist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.tm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
.tm:last-child { border-bottom: 0; }
.tm-main { flex: 1 1 200px; min-width: 0; }
.tm select, .teamadd select, .teamadd input:not([type=checkbox]) { font: inherit; font-size: 13.5px; min-height: 44px; border: 1px solid var(--edge); border-radius: 8px; padding: 0 8px; background: #fff; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; min-height: 44px; }
.teamadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.teamadd input:not([type=checkbox]) { flex: 1 1 180px; }
.pinbox { background: #E5F2E8; border: 1px solid #BFDCC7; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pin { font-family: 'IBM Plex Mono', monospace; font-size: 22px; font-weight: 600; letter-spacing: .15em; }
.btn.danger { color: #9B1C12; border-color: #E8B4AE; }
.btn.danger:hover { background: #FDE7E5; }

.dlg .chk { flex-direction: row; font-weight: 500; color: var(--ink); }   /* override the stacked .dlg label style */

/* queue sort menu */
.sortby { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); font-weight: 600; }
.sortby select { font: inherit; font-size: 13px; min-height: 36px; border: 1px solid var(--edge); border-radius: 8px; padding: 0 8px; background: #fff; color: var(--ink); }
@media (pointer: coarse), (max-width: 640px) { .sortby select { min-height: 44px; } }
