/* ================================================================
   The Rookery — operator.css (wave743): the operator face at
   admin.rookery.build (operator.js puts html.rk-operator on), the
   desk's triage inbox (desk-inbox.js) and Demos (desk-demos.js).
   House colours: violet + gold (locked); gold is the one main action.
   ================================================================ */

/* ---- the operator face: only its role's doors ---- */
html.rk-operator #topbar nav .navbtn:not(.op-nav) { display: none !important; }
html.rk-operator #topbar nav .navbtn.op-nav { display: flex !important; }
html.rk-operator #help-dock,
html.rk-operator #chat-dock,
html.rk-operator .dash-won-caret { display: none !important; }
#nav-demos:not(.op-nav) { display: none !important; }
html.rk-operator #topbar .brand::after {
  content: 'Operator'; display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--ds-gold, #EDC56F); color: #0B2235; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle;
}
.op-pointer a { font-weight: 600; }

/* the page for a signed-in person who isn't on the console */
.op-denied { max-width: 520px; margin: 12vh auto; text-align: center; padding: 0 20px; }
.op-denied img { margin: 0 auto 16px; display: block; border-radius: 12px; }
.op-denied h1 { font-size: 24px; color: var(--ds-navy, #0B2235); margin: 0 0 8px; }
.op-denied p { color: var(--ds-muted, #5A6572); line-height: 1.55; }
.op-denied .btn { margin: 6px 4px 0; }

/* ---- the triage inbox (the desk's Messages tab) ---- */
.di { display: grid; grid-template-columns: 200px minmax(240px, 320px) 1fr; border: 1px solid var(--ds-line, #e3e3e8); border-radius: 14px; overflow: hidden; background: var(--ds-card, #fff); min-height: 560px; }
.di-views { background: var(--ds-tint, #f7f6fb); border-right: 1px solid var(--ds-line, #e3e3e8); padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.di-views button { display: flex; justify-content: space-between; gap: 6px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--ds-ink, #222); cursor: pointer; text-align: left; }
.di-views button span { color: var(--ds-faint, #888); font-size: 12px; }
.di-views button.on { background: #efe9fb; color: #2A095E; font-weight: 700; box-shadow: inset 3px 0 0 #EDC56F; }
.di-views .di-manage { margin-top: auto; color: var(--ds-muted, #666); font-size: 12.5px; }
.di-list { border-right: 1px solid var(--ds-line, #e3e3e8); overflow: auto; max-height: 78vh; }
.di-row { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--ds-hair, #f0eff4); background: none; padding: 11px 14px; font: inherit; cursor: pointer; }
.di-row:hover { background: var(--ds-tint, #f7f6fb); }
.di-row.on { background: #fbf3df; }
.di-row-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--ds-ink, #222); }
.di-row-top span { color: var(--ds-faint, #888); font-size: 11.5px; flex: none; }
.di-row.unread .di-row-top b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #EDC56F; margin-left: 6px; vertical-align: middle; }
.di-row-sub { font-size: 12.5px; color: var(--ds-muted, #666); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di-row-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.di-row-tags i { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #efedf3; color: var(--ds-muted, #666); }
.di-pr-urgent { background: #f8e3de !important; color: #b5432f !important; }
.di-pr-high { background: #fbeedb !important; color: #a8661a !important; }
.di-ai { background: #F4F0FF !important; color: #6A4CF0 !important; }
.di-sla.soon { background: #fbeedb !important; color: #a8661a !important; }
.di-sla.late { background: #f8e3de !important; color: #b5432f !important; }
.di-thread { display: flex; flex-direction: column; min-width: 0; background: #faf9f6; }
.di-pick { margin: auto; }
.di-th-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ds-line, #e3e3e8); background: var(--ds-card, #fff); }
.di-th-t { flex: 1 1 100%; }
.di-th-t h3 { margin: 0; font-size: 16px; color: var(--ds-navy, #0B2235); }
.di-th-t p { margin: 2px 0 0; font-size: 12.5px; color: var(--ds-muted, #666); }
.di-th-head label { display: flex; flex-direction: column; font-size: 11px; color: var(--ds-faint, #888); gap: 2px; }
.di-th-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.di-handoff { margin: 0; padding: 8px 16px; background: #F4F0FF; color: #4b2fb3; font-size: 13px; }
.di-msgs { flex: 1; overflow: auto; padding: 16px; max-height: 52vh; }
.di-msg { max-width: 78%; margin: 0 0 12px; }
.di-msg .di-b { padding: 9px 13px; border-radius: 12px; background: #fff; border: 1px solid var(--ds-line, #e3e3e8); line-height: 1.5; white-space: pre-wrap; font-size: 14px; }
.di-msg.di-me { margin-left: auto; }
.di-msg.di-me .di-b { background: #2A095E; border-color: #2A095E; color: #fff; }
.di-msg.di-note { margin-left: auto; }
.di-msg.di-note .di-b { background: #fff8e6; border: 1px dashed #e2c27c; color: #5d4a22; }
.di-m { margin: 3px 2px 0; font-size: 11px; color: var(--ds-faint, #888); }
.di-me .di-m, .di-note .di-m { text-align: right; }
.di-compose { border-top: 1px solid var(--ds-line, #e3e3e8); background: var(--ds-card, #fff); padding: 10px 14px 12px; }
.di-meet { margin-bottom: 8px; }
.di-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.di-tabs .grow { flex: 1; }
.di-tabs button[data-di-mode] { border: 0; background: none; padding: 6px 10px; border-radius: 6px; font: inherit; font-weight: 600; color: var(--ds-muted, #666); cursor: pointer; }
.di-tabs button[data-di-mode].on { background: #2A095E; color: #fff; }
.di-notemode .di-tabs button[data-di-mode].on { background: #EDC56F; color: #0B2235; }
.di-callie { color: #6A4CF0 !important; border-color: #ddd3fd !important; background: #F4F0FF !important; }
.di-compose textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--ds-line, #e3e3e8); border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
.di-notemode textarea { background: #fffaf0; border-color: #e2c27c; }
.di-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.di-saved { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.di-foot .btn { margin-left: auto; }
@media (max-width: 1100px) { .di { grid-template-columns: 1fr; } .di-views { flex-direction: row; flex-wrap: wrap; } .di-list { max-height: 40vh; } }

/* ---- Demos ---- */
.dd { max-width: 1200px; margin: 0 auto; padding: 24px; }
.dd-card { background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e3e3e8); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.dd-card h2 { margin: 0 0 6px; font-size: 16px; color: var(--ds-navy, #0B2235); }
.dd-t { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.dd-t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-faint, #888); padding: 8px 10px; border-bottom: 1px solid var(--ds-line, #e3e3e8); }
.dd-t td { padding: 10px; border-bottom: 1px solid var(--ds-hair, #f0eff4); vertical-align: middle; }
.dd-note { background: #fbf3df; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: #5d4a22; }
.dd-two { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.dd-phonecard { display: flex; flex-direction: column; align-items: center; text-align: center; }
.dd-phone { width: 270px; height: 550px; border-radius: 40px; background: #111; padding: 12px; box-shadow: 0 20px 40px rgba(11, 34, 53, .18); }
.dd-phone:fullscreen { width: auto; height: 92vh; aspect-ratio: 270 / 550; margin: auto; background: #111; }
.dd-phone .scr { background: #faf9f6; border-radius: 30px; height: 100%; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.dd-phone .sb { display: flex; justify-content: space-between; padding: 10px 20px 4px; font-size: 11px; font-weight: 600; }
.dd-phone .sb span:last-child { color: #86672a; }
.dd-phone .ph2 { padding: 6px 16px 10px; font-size: 22px; font-weight: 700; color: #0B2235; }
.dd-phone .pbody { flex: 1; overflow: auto; padding: 0 12px; }
.dd-phone .pc { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 12px; border: 1px solid #ebe7de; }
.dd-phone .pc b { display: block; } .dd-phone .pc span { color: #7a7f87; font-size: 11px; }
.dd-phone .pc-c { text-align: center; padding: 18px 12px; }
.dd-phone .plogo { display: block; width: 40px; height: 40px; border-radius: 10px; background: #2A095E; margin: 0 auto 8px; }
.dd-phone .pbtn { background: #2A095E; color: #fff; text-align: center; border-radius: 10px; padding: 10px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.dd-phone .pbtn.ghost { background: #fff; color: #2A095E; border: 1px solid #ddd; }
.dd-phone .pimg { height: 170px; border-radius: 12px; margin-bottom: 8px; position: relative; background: linear-gradient(160deg, #cdbfa6, #9c8a6c 60%, #6e604a); }
.dd-phone .dim { position: absolute; border-top: 2px solid #EDC56F; color: #fff; font-size: 11px; font-weight: 700; text-align: center; text-shadow: 0 1px 2px #000; }
.dd-phone .dim.v { border-top: 0; border-left: 2px solid #EDC56F; width: 0; writing-mode: vertical-rl; padding-left: 3px; }
.dd-phone .pmsg { background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 12px; margin-bottom: 8px; max-width: 85%; border: 1px solid #ebe7de; }
.dd-phone .pmsg.me { margin-left: auto; background: #2A095E; color: #fff; }
.dd-phone .ptab { display: flex; justify-content: space-around; border-top: 1px solid #e6e3dc; background: #fff; padding: 8px 4px 14px; }
.dd-phone .ptab button { border: 0; background: none; font: inherit; font-size: 10.5px; color: #9aa0a8; font-weight: 600; cursor: pointer; }
.dd-phone .ptab button.on { color: #2A095E; }
.dd-qr { display: flex; gap: 18px; align-items: center; margin: 10px 0; }
.dd-qrimg { width: 170px; height: 170px; flex: none; background: #fff; border: 1px solid var(--ds-line, #e3e3e8); border-radius: 10px; padding: 6px; }
.dd-qrimg svg { width: 100%; height: 100%; }
.dd-code { white-space: nowrap; font-size: 26px; font-weight: 700; letter-spacing: .18em; color: #2A095E; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.dd-steps { padding-left: 20px; line-height: 1.6; font-size: 13.5px; color: var(--ds-ink, #222); }
@media (max-width: 900px) { .dd-two { grid-template-columns: 1fr; } }
.dd-t .btn[disabled] { opacity: .45; cursor: not-allowed; }
/* the company-side rail extras: sections, quick add, search, the bell — and the
   Dashboard's job-money tabs (they read the company's projects, not sales) */
html.rk-operator #topbar nav .nav-sec,
html.rk-operator #dsx-quick-btn,
html.rk-operator #topbar .gc-row,
html.rk-operator #view-dashboard [data-dash-view="profit"],
html.rk-operator #view-dashboard [data-dash-view="cashflow"] { display: none !important; }
/* the operator rail's order: desk, sales, demos, feedback */
html.rk-operator #topbar nav { display: flex; flex-direction: column; }
html.rk-operator #nav-supportdesk { order: -4; }
html.rk-operator #nav-dashboard { order: -3; }
html.rk-operator #nav-demos { order: -2; }
html.rk-operator #nav-feedback { order: -1; }
