[hidden] { display: none !important; }
.workspace-mode main > section:not(#portal-app) { display: none; }
.workspace-mode.admin-messages-workspace #chat-dock { display: none !important; }
.admin-chat-actions button[aria-pressed="true"] { background: var(--navy); color: white; }
.chat-panel [hidden] { display: none !important; }
.workspace-mode #portal-app { min-height: 70vh; padding-top: 42px; }
.workspace-mode .chat-launcher { display: flex; }
/* Leave room for an intentionally opened admin chat on wide screens. */
@media (min-width: 1100px) {
  .workspace-mode.admin-workspace:has(#chat-dock.open) main { padding-right:420px; }
}
#admin-analytics-page [data-status]:empty { display:none; }
.workspace-controls { display: flex; gap: 10px; }
.workspace-controls { flex-wrap: wrap; margin-top: 14px; }
.workspace-card details { margin: 16px 0; }
.workspace-card summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 10px 0; }
.workspace-card details[open] .workspace-form { margin-top: 15px; }
.client-records { margin-top: 24px; }
.workspace-card small { color: #52657d; font-size: 13px; }
.conversation-label > input, .project-members > input { border: 1px solid #9fb3c7; border-radius: 5px; padding: 12px; font: inherit; width: 100%; }
.project-members { min-width: 0; border: 1px solid #cfdae5; padding: 16px; border-radius: 8px; }
.project-members legend { font-weight: 700; color: var(--navy); }
.project-members p { font-size: 13px; }
.project-members label.member-option { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-weight: 500; }
.member-option input { width: 20px; height: 20px; flex-shrink: 0; }
.member-option small { display: block; overflow-wrap: anywhere; }
.client-next-step { background: #edf5e9; border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.client-next-step p { margin-bottom: 0; }
.consultation-wizard { max-width: 820px; }
.consultation-wizard fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 18px; }
.consultation-wizard legend { font: 600 22px/1.3 'Space Grotesk', sans-serif; margin-bottom: 20px; color: var(--navy); }
.wizard-progress { color: var(--green) !important; font-weight: 700; }
.service-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service-options label { display: flex; align-items: center; gap: 10px; border: 1px solid #b6c8d7; border-radius: 8px; padding: 15px; cursor: pointer; }
.service-options label:has(input:checked) { background: #edf5e9; border-color: var(--green); }
.service-options input { width: 20px; min-width: 20px; height: 20px; }
.goal-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.goal-suggestions button { font-size: 13px; border-radius: 20px; }
@media(max-width:650px) { .service-options { grid-template-columns: 1fr; } }
.workspace-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--line); }
.workspace-tabs button { background: white; border: 1px solid #b9cbd9; border-radius: 6px; padding: 10px 17px; color: var(--navy); cursor: pointer; font-weight: 600; }
.workspace-tabs button[aria-current="page"] { background: var(--navy); color: white; border-color: var(--navy); }
.workspace-content { padding-top: 15px; }
.workspace-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.workspace-stats > button { background: #eaf4e4; border: 1px solid #ccdfc8; border-radius: 10px; padding: 24px; display: grid; color: var(--navy); text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.workspace-stats > button:hover { background: #dfeeda; border-color: #267a36; }
.workspace-stats > button:focus-visible { outline: 3px solid #267a36; outline-offset: 3px; }
.workspace-stats strong { font: 600 36px 'Space Grotesk', sans-serif; }
.workspace-stats span { font-size: 14px; }
.workspace-card { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 25px; margin-bottom: 20px; min-width: 0; overflow-wrap: anywhere; }
.workspace-card h3, .workspace-content > h3 { margin: 0 0 12px; font: 600 23px 'Space Grotesk', sans-serif; color: var(--navy); }
.workspace-card p, .workspace-content > p { color: #52657d; }
.workspace-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.workspace-list .workspace-card { margin: 0; }
.visitor-picker { display:grid; grid-template-columns:1fr; gap:10px; max-width:850px; }
.visitor-picker > * { min-width:0; max-width:100%; }
.visitor-picker > label { font-weight:600; color:var(--navy); }
.visitor-picker input, .visitor-picker select { box-sizing:border-box; width:100%; min-width:0; min-height:46px; padding:10px 12px; border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--navy); font:inherit; }
.visitor-picker-pages { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.visitor-picker [role="listbox"] { display:grid; gap:6px; max-height:300px; overflow:auto; }
.visitor-picker [role="option"] { text-align:left; overflow-wrap:anywhere; }
#admin-analytics-page [data-timeline] { margin-top:20px; scroll-margin-top:90px; }
.workspace-form { display: grid; gap: 16px; max-width: 760px; }
.workspace-form label, .conversation-label { display: grid; gap: 6px; font-weight: 600; color: var(--navy); }
.workspace-form input, .workspace-form textarea, .workspace-form select, .conversation-label select { width: 100%; min-width: 0; border: 1px solid #9fb3c7; padding: 11px 12px; border-radius: 5px; background: white; color: var(--ink); font: 16px/1.5 'DM Sans', sans-serif; }
.workspace-form textarea { resize: vertical; }
.consultation-wizard .service-options label { display: flex; align-items: center; gap: 12px; }
.consultation-wizard input[type="radio"] { width: 20px; min-width: 20px; height: 20px; padding: 0; flex: 0 0 20px; }
.consultation-wizard > p, .consultation-wizard fieldset > p { margin: 0; }
.workspace-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.workspace-form .portal-action, .workspace-card .portal-action { padding: 11px 16px; border-radius: 5px; font-size: 14px; min-height: 44px; }
.workspace-content button:disabled { opacity: .6; cursor: wait; }
.workspace-badge { display: inline-block; color: #237b32; background: #eaf4e4; padding: 4px 8px; border-radius: 4px; font-size: 12px; margin-bottom: 12px; }
.workspace-empty { border: 1px dashed #b9cbd9; padding: 24px; color: #52657d; border-radius: 8px; }
.workspace-hint { font-size: 13px; }
.workspace-messages { height: 370px; overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; margin: 16px 0; }
.workspace-message { max-width: 85%; width: fit-content; margin: 0 0 18px; }
.workspace-message.mine { margin-left: auto; }
.workspace-message small { font-size: 12px; color: #52657d; }
.workspace-message p { background: #edf5e9; padding: 12px 16px; margin: 4px 0 0; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-message.mine p { background: #e5f0fc; }
.preserve-lines { white-space: pre-wrap; }
#workspace-notice { color: #237b32; overflow-wrap: anywhere; }
#workspace-notice.error { color: #a52222; }
@media(max-width:650px) {
  .workspace-stats { gap: 8px; }
  .workspace-stats > button { padding: 12px; }
  .workspace-stats strong { font-size: 28px; }
  .workspace-stats span { font-size: 12px; }
  .workspace-list, .workspace-form-row { grid-template-columns: 1fr; }
  .client-console-head { flex-direction: column; }
  .workspace-tabs button { padding: 9px 12px; font-size: 14px; }
  .workspace-card { padding: 20px; }
}

.stage-nav-hint { margin-top: 14px; color: #64748b; font-size: 12px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.project-progress { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
@media(max-width: 650px) {
  .project-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
}
button.project-progress-step {
  appearance: none;
  background: transparent;
  border: none;
  border-top: 3px solid #d9e3ed;
  padding: 8px 6px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  border-radius: 0 0 6px 6px;
  display: grid;
  gap: 5px;
  color: #8090a4;
}
button.project-progress-step:hover {
  background: #f0f7ff;
  border-color: #a8c8e8;
}
button.project-progress-step.done {
  border-color: var(--green);
  color: var(--navy);
}
button.project-progress-step.current {
  border-color: var(--green);
  color: var(--navy);
}
button.project-progress-step.current span {
  color: var(--green);
}
button.project-progress-step.inspecting {
  border-color: var(--blue) !important;
  background: #edf5fe;
  box-shadow: 0 2px 8px rgba(18, 87, 166, 0.1);
}
button.project-progress-step.inspecting small {
  color: var(--blue);
  font-weight: 700;
}

.stage-criteria-card { background: #f8fafc; border: 1px solid #d5e2ed; border-radius: 8px; padding: 18px; margin: 16px 0 20px; }
.stage-criteria-head { margin-bottom: 12px; }
.stage-criteria-head h4 { font: 600 17px/1.3 'Space Grotesk', sans-serif; color: var(--navy); margin: 6px 0 2px; }
.stage-pill { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: #e5f0fc; color: var(--blue); padding: 3px 8px; border-radius: 12px; }
.stage-pill-done { background: #e3f7e1; color: #176a34; }
.stage-pill-current { background: #e5f0fc; color: #0a4f9e; }
.stage-pill-upcoming { background: #f1f5f9; color: #64748b; }
.stage-pill-paused { background: #fff8e7; color: #8a580a; }
.stage-summary { font-size: 13px; color: #52657d; margin: 6px 0 0; line-height: 1.5; }
.stage-current-note { margin-top: 14px; padding: 10px 14px; background: #eff6ff; border-left: 3px solid var(--blue); border-radius: 0 6px 6px 0; font-size: 13px; }
.stage-current-note strong { color: var(--navy); display: block; margin-bottom: 4px; }
.stage-current-note p { margin: 0; color: #334155; }
.stage-chat-prompt { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #d5e2ed; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #64748b; }
.criteria-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.criteria-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: white; border: 1px solid #e1eaf2; border-radius: 6px; font-size: 13px; }
.criteria-check { width: 20px; height: 20px; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 700; background: #eef2f6; color: #8090a4; }
.criteria-item.is-done .criteria-check { background: #e3f7e1; color: #176a34; }
.criteria-text { flex: 1; min-width: 0; color: var(--navy); }
.criteria-item.is-done .criteria-text { color: #52657d; }
.criteria-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 12px; white-space: nowrap; }
.tag-client { background: #fef3e2; color: #8a580a; }
.tag-samir { background: #e5f0fc; color: #0a4f9e; }
.tag-together { background: #eaf4e4; color: #176a34; }
.tag-optional { background: #eef2f6; color: #52657d; }
.criteria-item.is-optional .criteria-check { background:#eef2f6; color:#60738c; }

.form-disclosure { border: 1px dashed #b9cbd9; border-radius: 6px; padding: 6px 14px 14px; margin: 8px 0; background: #fafbfc; }
.form-disclosure summary { font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; padding: 6px 0; }
.form-disclosure summary:hover { color: var(--blue); }
.form-disclosure[open] { background: white; border-style: solid; border-color: #cfdae5; }
.contact-confirm-card { background: #f0f7ff; border: 1px solid #cce2fa; border-radius: 6px; padding: 14px; margin-bottom: 12px; }
.contact-confirm-card p { margin: 0 0 4px; font-size: 14px; color: var(--navy); }
.contact-confirm-card small { color: #52657d; font-size: 12px; }

.admin-stage-controller { margin: 14px 0 16px; padding: 14px 16px; background: #f0f5fa; border: 1px solid #d5e2ed; border-radius: 8px; }
.admin-stage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
.admin-stage-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #52657d; }
.admin-stage-status { font-size: 12px; color: #334155; }
.admin-stage-status strong { color: var(--navy); }
.admin-stage-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-pill-btn { border: 1px solid #b9cbd9; background: white; color: var(--navy); border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; font-family: inherit; }
.stage-pill-btn:hover { background: #e5f0fc; border-color: var(--blue); color: var(--blue); }
.stage-pill-btn.current { border-color: var(--green); background: #f4faf2; color: #176a34; }
.stage-pill-btn.active { background: var(--blue); color: white; border-color: var(--blue); }
.stage-pill-btn.active:hover { background: #0c478c; color: white; }
.admin-stage-dropdown-row { margin: 10px 0; }
.admin-stage-select-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #475569; }
.admin-stage-select-label select { padding: 6px 10px; border: 1px solid #c9d8e5; border-radius: 6px; font-size: 12px; background: white; color: var(--navy); font-family: inherit; }
.admin-stage-card { background: white; border: 1px solid #d5e2ed; border-radius: 6px; padding: 14px; margin-top: 10px; }
.stage-info-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 10px; background: #e5f0fc; color: var(--blue); margin-bottom: 4px; }
.admin-stage-info h4 { margin: 4px 0 4px; font-size: 15px; color: var(--navy); font-family: 'Space Grotesk', sans-serif; }
.admin-stage-desc { margin: 0 0 10px; font-size: 13px; color: #475569; line-height: 1.45; }
.admin-stage-note-label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: #334155; margin-top: 10px; }
.admin-stage-note { width: 100%; border: 1px solid #c9d8e5; border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; box-sizing: border-box; resize: vertical; }
.admin-stage-note:focus { outline: none; border-color: var(--blue); }
.admin-stage-actions { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-stage-save-btn { min-height: 38px; padding: 8px 16px; font-size: 13px; margin-left: auto; }

.chat-direct-form { display: grid; gap: 8px; margin: 10px 0; }
.chat-direct-form textarea { width: 100%; border: 1px solid #c9d8e5; border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; resize: vertical; box-sizing: border-box; }
.chat-direct-form textarea:focus { outline: none; border-color: var(--blue); }
.chat-followup { background: #f0f7ff; border: 1px solid #cce2fa; border-radius: 6px; padding: 10px; margin: 10px 0; display: grid; gap: 6px; }
.chat-followup p { margin: 0; font-size: 12px; color: var(--navy); font-weight: 600; }
.chat-followup input { width: 100%; padding: 6px 8px; font: inherit; font-size: 13px; border: 1px solid #c9d8e5; border-radius: 4px; box-sizing: border-box; }

.contact-followup { margin-top: 10px; padding: 12px; background: #eef7ee; border: 1px solid #c4e5c4; border-radius: 6px; display: grid; gap: 8px; }
.contact-followup p { margin: 0; font-size: 13px; color: #176a34; font-weight: 600; }
.contact-followup-row { display: flex; gap: 8px; }
.contact-followup-row input { flex: 1; min-width: 0; padding: 8px 10px; font: inherit; font-size: 14px; border: 1px solid #b2d8b2; border-radius: 4px; }

/* Persistent bottom-right Chat Dock */
.chat-dock {
  position: fixed;
  bottom: 0;
  right: 24px;
  z-index: 1000;
  width: 380px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 30px rgba(8, 43, 87, 0.2);
  border-radius: 12px 12px 0 0;
  font-family: inherit;
  pointer-events: none;
}
.chat-dock * {
  pointer-events: auto;
}

.chat-dock-tab.chat-launcher {
  position: static !important;
  width: 100%;
  border-radius: 10px 10px 0 0 !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--navy) !important;
  color: #fff !important;
  border: 1px solid #1a3f6d !important;
  border-bottom: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
  font-weight: 700;
  font-size: 14px;
  box-sizing: border-box;
  transition: background 0.15s ease;
}
.chat-dock-tab.chat-launcher:hover {
  background: #0f3663 !important;
}
.chat-dock.open .chat-dock-tab {
  display: none !important;
}

.chat-dock-body.chat-panel {
  position: static !important;
  width: 100% !important;
  max-height: min(540px, calc(100vh - 40px)) !important;
  display: flex !important;
  flex-direction: column;
  background: #ffffff !important;
  border: 1px solid #c9d8e5 !important;
  border-bottom: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  box-shadow: none !important;
  box-sizing: border-box;
}
.chat-dock:not(.open) .chat-dock-body {
  display: none !important;
}

.chat-dock-head {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a385c;
  user-select: none;
}
.chat-dock-btn {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 1px 7px;
  line-height: 1;
  border-radius: 4px;
  opacity: 0.85;
  transition: all 0.15s ease;
}
.chat-dock-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
}
.chat-dock-toggle-icon {
  font-size: 11px;
  opacity: 0.8;
  margin-left: auto;
}

@media (max-width: 650px) {
  .chat-dock {
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }
}

.chat-unread-badge { background: #e53e3e; color: white; border-radius: 10px; padding: 2px 7px; font-size: 11px; font-weight: 700; margin-left: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.chat-panel-actions { display: flex; align-items: center; gap: 8px; }
.sound-toggle-btn { background: none; border: 0; color: #fff; cursor: pointer; font-size: 16px; padding: 2px; opacity: 0.85; transition: opacity 0.15s; }
.sound-toggle-btn:hover { opacity: 1; }

.chat-panel-stream { flex: 1; overflow-y: auto; padding: 14px; background: #fafcfe; display: flex; flex-direction: column; gap: 10px; min-height: 180px; max-height: 280px; }
.chat-msg-row { display: flex; flex-direction: column; max-width: 85%; }
.chat-msg-row.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg-row.theirs { align-self: flex-start; align-items: flex-start; }
.chat-msg-bubble { padding: 9px 13px; border-radius: 10px; font-size: 13px; line-height: 1.4; word-break: break-word; }
.chat-msg-row.mine .chat-msg-bubble { background: #e5f0fc; color: #082b57; border-bottom-right-radius: 2px; }
.chat-msg-row.theirs .chat-msg-bubble { background: #edf5e9; color: #176a34; border-bottom-left-radius: 2px; }
.chat-msg-meta { font-size: 10px; color: #8090a4; margin-top: 3px; display: flex; gap: 6px; align-items: center; }

.chat-panel-footer { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: #f0f5fa; border-top: 1px solid #dce7f2; font-size: 11px; }
.chat-response-badge { color: #176a34; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sound-checkbox-label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: #52657d; font-size: 11px; white-space: nowrap; user-select: none; }
.sound-checkbox-label input { width: 14px; height: 14px; margin: 0; cursor: pointer; accent-color: var(--blue); }
.stage-notify-label input { accent-color: var(--green); }

/* Toast alert banner */
.chat-toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.chat-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; background: #ffffff; color: #082b57; border: 1px solid #c9d8e5; border-left: 4px solid var(--green); border-radius: 8px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(8,43,87,0.18); max-width: 360px; animation: slideIn 0.25s ease-out; cursor: pointer; }
.chat-toast-icon { font-size: 20px; flex-shrink: 0; line-height: 1; }
.chat-toast-body { display: flex; flex-direction: column; gap: 2px; }
.chat-toast-body strong { font-size: 13px; color: var(--navy); }
.chat-toast-time { font-size: 11px; color: #176a34; font-weight: 600; }
.chat-toast-body p { margin: 3px 0 0; font-size: 12px; color: #52657d; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.chat-panel-head .sound-checkbox-label { color: #d0e2f5; font-size: 11px; }
.chat-panel-head .stage-notify-label { color: #b8d4f0; }
.chat-panel .chat-direct-form { padding: 10px 14px; margin: 0; }
.chat-panel .chat-client-link { display: block; text-align: center; font-size: 11px; padding: 4px 14px 10px; color: var(--blue); text-decoration: none; }
.chat-panel .chat-client-link:hover { text-decoration: underline; }

.response-time-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; color: #176a34; background: #eaf6ea; border: 1px solid #c3e5c3; border-radius: 10px; padding: 1px 7px; margin-left: 6px; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-website { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:18px 0; padding:16px; border:1px solid #cbdced; border-left:4px solid var(--green); background:#f7fbff; }
.project-website strong { color:var(--navy); font-size:14px; }
.project-website p { margin:5px 0 0; overflow-wrap:anywhere; font-size:13px; }
.project-website p a { color:#075bb5; }
.project-website-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.project-website-actions .portal-action, .project-website-actions .portal-refresh { white-space:nowrap; text-decoration:none; }
.project-website-empty { border-left-color:#8da6be; background:#f8fafc; }
@media(max-width:640px) { .project-website { align-items:flex-start; flex-direction:column; } .project-website-actions { width:100%; } }
.billing-details select { display:block; width:100%; max-width:100%; margin: .7rem 0 1.3rem; padding:.8rem; font:inherit; color:inherit; background:white; border:1px solid #b7cce5; border-radius:6px; }
.billing-details .workspace-controls { flex-wrap:wrap; gap:.6rem; }
.billing-receipt { border-top:1px solid #d6e3f3; padding:1rem 0; }
.billing-receipt summary, .workspace-card > summary { cursor:pointer; font-weight:600; }
.billing-receipt a { display:inline-block; margin:.4rem .4rem .4rem 0; }
.messaging-inbox { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); gap: 24px; }
.conversation-sidebar, .conversation-detail { min-width: 0; }
.conversation-sidebar input { width: 100%; box-sizing: border-box; margin: 8px 0 12px; }
.conversation-list { display: grid; gap: 8px; max-height: 560px; overflow-y: auto; }
.conversation-list button { text-align: left; padding: 14px; background: white; color: #0b2c55; border: 1px solid #d8e4ef; border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.conversation-list button[aria-pressed="true"] { background: #eaf4e3; border-color: #267a36; }
.conversation-list button[hidden] { display: none; }
.conversation-list small { display: block; margin-top: 6px; white-space: pre-wrap; }
.thread-unread { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; }
.conversation-detail .workspace-form, .conversation-detail textarea { max-width: 100%; box-sizing: border-box; }
@media (max-width: 700px) { .messaging-inbox { grid-template-columns: 1fr; } .conversation-list { max-height: 220px; } }
/* Account-wide admin preferences remain comfortably tappable on phones. */
.admin-alert-options { display: grid; gap: 12px; }
.admin-alert-options label { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.admin-alert-options input { width: 20px; height: 20px; flex-shrink: 0; }
#admin-notification-page .notification-settings { width: 100%; margin: 24px 0; }
.chat-panel .chat-direct-form .button { margin: 0; width: 100%; min-height: 42px; padding: 10px 16px; box-shadow: none; }
.chat-panel .chat-direct-form .button:disabled { opacity: .65; cursor: wait; }
.chat-send-status { margin: 0; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.45; color: #52657d; overflow-wrap: anywhere; }
.chat-send-status:empty { display: none; }
.chat-send-status[data-state="error"] { background: #fff6e6; color: #795314; }
.chat-send-status[data-state="success"] { background: #edf5e9; color: #176a34; }
.chat-check-replies { margin: 0 14px 8px; border: 0; background: none; color: var(--blue); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; min-height: 32px; }
.chat-guest-help { padding: 0 14px 10px; font-size: 11px; color: #52657d; }
.chat-guest-help summary { cursor: pointer; }
.chat-guest-help p { margin: 6px 0 0; }
.chat-dock-body.chat-panel { max-height: min(680px, calc(100dvh - 24px)) !important; overflow-y: auto; overscroll-behavior: contain; }
.chat-panel .chat-panel-stream { min-height: 120px; }
.chat-panel-head .chat-panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
/* Keep composing primary; optional contact and recovery controls stay collapsed. */
.chat-panel .chat-direct-form { grid-template-columns: minmax(0, 1fr) 84px; align-items: end; }
.chat-panel .chat-direct-form textarea { min-height: 60px; max-height: 140px; font-size: 16px; }
.chat-panel .chat-direct-form .button { min-height: 48px; padding: 8px; }
.chat-panel .chat-send-status { grid-column: 1 / -1; padding: 3px 0; }
.chat-panel .chat-send-status[data-state="success"] { background: transparent; }
.chat-panel .chat-send-status[data-state="error"] { padding: 8px; }
.chat-panel .chat-followup { margin: 0; padding: 0 14px; border: 0; background: white; }
.chat-panel .chat-followup[hidden] { display: none; }
.chat-panel .chat-followup summary, .chat-panel .chat-guest-help summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; font-size: 12px; }
.chat-panel .chat-followup details[open] { padding-bottom: 12px; }
.chat-panel .chat-followup input { margin: 8px 0; min-height: 44px; font-size: 16px; }
.chat-panel .chat-followup button { min-height: 44px; padding: 8px 14px; }
.chat-panel .chat-guest-help { border-top: 1px solid #e7eef5; margin-top: 4px; padding-bottom: 4px; }
.chat-panel .chat-check-replies { margin: 4px 0; min-height: 44px; }
.chat-panel .chat-client-link { padding: 10px 0; text-align: left; font-size: 12px; min-height: 44px; }
.admin-chat-controls { padding: 10px 12px; border-bottom: 1px solid #dce7f2; background: #fff; }
.admin-chat-controls > label { display: grid; gap: 5px; color: var(--navy); font-size: 12px; font-weight: 700; }
.admin-chat-controls select { width: 100%; min-height: 42px; padding: 7px 9px; border: 1px solid #c9d8e5; border-radius: 6px; background: white; color: var(--ink); font: inherit; font-size: 13px; }
.admin-chat-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.admin-chat-actions button { min-height: 38px; padding: 6px 10px; font-size: 12px; }
.admin-chat-actions button[hidden] { display: none; }
.chat-panel .admin-chat-empty { margin: auto; padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.chat-panel:has(.admin-chat-controls) .chat-panel-stream { min-height: 140px; max-height: 260px; }
.chat-dock-title { min-width: 0; }
.analytics-filters { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin:20px 0; }
.analytics-filters label { display:grid; gap:6px; }
.analytics-filters select,.analytics-filters input { max-width:100%; min-height:44px; padding:8px; font:inherit; background:white; color:var(--navy); border:1px solid var(--line); border-radius:7px; }
.analytics-filters [hidden] { display:none; }
.analytics-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:20px 0; }
.analytics-summary strong { display:block; font-size:28px; }
.analytics-summary span { font-size:14px; }
#admin-analytics-page .visitor-picker { max-width:100%; min-width:0; }
.analytics-table-scroll { max-width:100%; overflow-x:auto; margin:16px 0; }
.analytics-table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
.analytics-table th,.analytics-table td { padding:12px; border-bottom:1px solid #dce7f2; min-width:95px; }
.analytics-table td:first-child { min-width:180px; overflow-wrap:anywhere; }
.analytics-table td:last-child { max-width:240px; overflow-wrap:anywhere; }
.analytics-table button { max-width:260px; overflow-wrap:anywhere; }
#admin-analytics-page [data-timeline] { overflow-wrap:anywhere; scroll-margin-top:120px; }
