:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --soft: #f7f7f5;
  --paper: #ffffff;
  --accent: #c7f36b;
  --accent-deep: #77a72d;
  --danger: #c2413a;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px rgba(17, 24, 39, .04);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
}
body.menu-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
button:focus-visible, .nav-link:focus-visible { outline: 3px solid rgba(119, 167, 45, .48); outline-offset: 2px; }
[hidden] { display: none !important; }

.auth-shell {
  align-items: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(199, 243, 107, .3), transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(17, 24, 39, .09), transparent 34%),
    #f4f5f1;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}
.auth-card { background: #fff; border: 1px solid #dfe3da; border-radius: 22px; box-shadow: 0 24px 80px rgba(17, 24, 39, .12); max-width: 470px; padding: clamp(26px, 5vw, 42px); width: 100%; }
.auth-brand { align-items: center; display: flex; font-size: 17px; font-weight: 780; gap: 10px; margin-bottom: 36px; }
.auth-copy h1 { font-size: clamp(32px, 7vw, 45px); letter-spacing: -.052em; line-height: .98; margin: 0 0 14px; }
.auth-copy p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0; }
.auth-tabs { background: #f1f2ef; border-radius: 10px; display: grid; gap: 4px; grid-template-columns: 1fr 1fr; margin: 28px 0 22px; padding: 4px; }
.auth-tab { background: transparent; border: 0; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 720; padding: 10px; }
.auth-tab.active { background: #fff; box-shadow: 0 1px 3px rgba(17, 24, 39, .1); color: var(--ink); }
.auth-form { display: grid; gap: 8px; }
.auth-form h2 { font-size: 22px; margin: 8px 0 2px; }
.auth-form label { font-size: 12px; font-weight: 720; margin-top: 8px; }
.auth-optional { color: var(--muted); font-size: 10px; font-weight: 600; margin-left: 4px; text-transform: uppercase; }
.auth-form input { background: #fff; border: 1px solid #d7dbe0; border-radius: 9px; color: var(--ink); min-height: 46px; outline: none; padding: 11px 12px; width: 100%; }
.auth-form input:focus { border-color: #171717; box-shadow: 0 0 0 3px rgba(23, 23, 23, .08); }
.auth-submit { margin-top: 15px; width: 100%; }
.auth-help, .auth-bootstrap-note { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 2px 0 4px; }
.auth-feedback { background: #fff1f0; border: 1px solid #f1cbc7; border-radius: 8px; color: #9f312a; font-size: 12px; line-height: 1.45; margin: 16px 0 0; padding: 10px 12px; }
.auth-bootstrap-note { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; }
.auth-bootstrap-note code { color: #3f4650; }
.auth-field { display: grid; gap: 8px; }
.auth-link { background: transparent; border: 0; color: #52613f; font-size: 12px; font-weight: 720; justify-self: center; padding: 8px; }
.account-type-picker { border: 0; display: grid; gap: 8px; margin: 10px 0 2px; padding: 0; }
.account-type-picker legend { font-size: 12px; font-weight: 720; margin-bottom: 8px; }
.account-type-picker label { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; display: flex; gap: 10px; margin: 0; padding: 11px; }
.account-type-picker label:has(input:checked) { background: #f3f7e9; border-color: #9bb76c; }
.account-type-picker input { min-height: 0; padding: 0; width: auto; }
.account-type-picker span { display: grid; gap: 3px; }
.account-type-picker small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.auth-form .legal-acceptance { align-items: flex-start; display: flex; font-weight: 500; gap: 9px; line-height: 1.45; margin-top: 12px; }
.auth-form .legal-acceptance input { accent-color: #171717; flex: 0 0 auto; min-height: 0; width: auto; }
.legal-acceptance a { color: #42582c; font-weight: 750; }
.auth-divider { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 10px; margin: 18px 0 10px; }
.auth-divider::before, .auth-divider::after { background: var(--line); content: ''; height: 1px; flex: 1; }
.invite-code-box { background: #f3f7e9; border: 1px dashed #9bb76c; border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; font-weight: 750; letter-spacing: .03em; margin: 16px 0 8px; overflow-wrap: anywhere; padding: 16px; text-align: center; }
.modal { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 90px rgba(17, 24, 39, .25); color: var(--ink); max-width: min(560px, calc(100vw - 28px)); padding: 0; width: 100%; }
.modal::backdrop { backdrop-filter: blur(3px); background: rgba(17, 24, 39, .48); }
.modal-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding: 22px 24px 18px; }
.modal-header h2 { font-size: 24px; letter-spacing: -.035em; margin: 2px 0 0; }
.modal-body { padding: 22px 24px 24px; }
.billing-plans { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0; }
.billing-plan { border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 9px; padding: 16px; }
.billing-plan strong { font-size: 18px; }
.billing-plan span { color: var(--muted); font-size: 13px; }
.billing-plan button { margin-top: 6px; width: 100%; }
.billing-actions { border-top: 1px solid var(--line); display: flex; justify-content: flex-end; margin: 2px 0 16px; padding-top: 14px; }
.billing-actions button { color: var(--danger); }
.plans-page-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin: 20px auto; max-width: 560px; padding: 26px; }
.plans-page-card .billing-plans { grid-template-columns: 1fr; }
.billing-plan-featured { border-color: rgba(150, 216, 67, .72); box-shadow: 0 14px 36px rgba(17, 24, 39, .08); }
.billing-plan-featured small { color: var(--muted); font-size: 13px; }

.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: #171717;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { align-items: center; display: flex; font-size: 17px; font-weight: 750; gap: 10px; letter-spacing: -.02em; padding: 2px 8px 28px; }
.brand-mark { align-items: center; background: var(--accent); border-radius: 8px; color: #171717; display: inline-flex; height: 30px; justify-content: center; width: 30px; }
.nav-label { color: #898989; font-size: 11px; font-weight: 700; letter-spacing: .08em; margin: 16px 10px 8px; text-transform: uppercase; }
.nav-link { align-items: center; border-radius: 8px; color: #bdbdbd; display: flex; font-size: 14px; gap: 10px; margin-bottom: 3px; padding: 10px 11px; text-decoration: none; }
.nav-link:hover, .nav-link.active { background: #292929; color: #fff; }
.nav-icon { align-items: center; border: 1px solid #4a4a4a; border-radius: 5px; display: inline-flex; font-size: 9px; height: 20px; justify-content: center; width: 20px; }
.nav-link.active .nav-icon { background: var(--accent); border-color: var(--accent); color: #171717; }
.sidebar-note { border-top: 1px solid #303030; color: #939393; font-size: 12px; line-height: 1.6; margin-top: auto; padding: 18px 8px 0; }
.sidebar-backdrop { display: none; }

.main { min-width: 0; }
.topbar {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(247, 247, 245, .94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(20px, 4vw, 48px);
  position: sticky;
  top: 0;
  transition: box-shadow .2s ease, border-color .2s ease;
  z-index: 30;
}
.has-unsaved .topbar { border-bottom-color: #bfdc7e; box-shadow: 0 8px 25px rgba(84, 108, 38, .1); }
.operational-route .save-state, .operational-route #save-button { display: none; }
.topbar-title, .topbar-actions { align-items: center; display: flex; gap: 12px; }
.topbar-title strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.eyebrow { color: var(--muted); display: block; font-size: 11px; margin-bottom: 2px; text-transform: uppercase; }
.menu-button { background: #fff; border: 1px solid var(--line); border-radius: 8px; display: none; height: 40px; width: 40px; }
.save-state { color: var(--muted); font-size: 11px; max-width: 220px; text-align: right; }
.status-pill { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; display: inline-flex; font-size: 12px; font-weight: 650; gap: 8px; padding: 8px 11px; white-space: nowrap; }
.status-dot { background: #d0d5dd; border-radius: 50%; height: 8px; width: 8px; }
.status-pill.connected .status-dot { background: #35a65b; box-shadow: 0 0 0 4px #e7f8ec; }
.account-menu { align-items: center; border-right: 1px solid var(--line); display: flex; gap: 10px; padding-right: 12px; }
.account-menu span { display: grid; line-height: 1.2; max-width: 160px; text-align: right; }
.account-menu strong, .account-menu small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu strong { font-size: 11px; }
.account-menu small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.account-logout { background: transparent; border: 0; color: #626973; font-size: 11px; font-weight: 700; padding: 5px; }
.account-logout:hover { color: var(--ink); }

.content { margin: 0 auto; max-width: 1180px; padding: 42px clamp(20px, 4vw, 48px) 80px; }
.content-form { display: contents; }
.route-conversas .content { max-width: 1560px; padding-top: 26px; }
.view { animation: view-in .18s ease; }
@keyframes view-in { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.view-header { align-items: flex-start; display: flex; gap: 32px; justify-content: space-between; margin-bottom: 26px; }
.view-kicker { color: var(--accent-deep); display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 8px; text-transform: uppercase; }
.view-header h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 650; letter-spacing: -.045em; line-height: 1; margin: 0 0 11px; }
.view-header p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; max-width: 680px; }
.operation-control { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: flex; gap: 24px; min-width: 300px; padding: 15px 16px; }

.primary-button, .secondary-button { align-items: center; border-radius: 8px; display: inline-flex; font-weight: 700; justify-content: center; min-height: 42px; padding: 9px 16px; }
.primary-button { background: #171717; border: 1px solid #171717; color: #fff; }
.primary-button:hover { background: #303030; }
.primary-button:disabled { background: #8b8b8b; border-color: #8b8b8b; cursor: default; opacity: .58; }
.secondary-button { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.secondary-button:hover { background: #fafafa; border-color: #c6cad0; }

.metrics { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 19px; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.metric-value { font-size: 29px; font-weight: 680; letter-spacing: -.035em; margin-top: 11px; }
.metric-help { color: var(--muted); font-size: 11px; margin-top: 6px; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-top: 16px; overflow: hidden; }
.panel:first-of-type { margin-top: 0; }
.panel-heading { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; padding: 22px 24px; }
.panel-heading h2 { font-size: 20px; letter-spacing: -.025em; margin: 0 0 6px; }
.panel-heading p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; max-width: 650px; }
.panel-badge { background: #f0f5e8; border: 1px solid #dce8c1; border-radius: 999px; color: #526631; font-size: 11px; font-weight: 700; padding: 6px 9px; white-space: nowrap; }
.panel-body { padding: 24px; }
.panel-footer { align-items: center; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; padding: 16px 24px; }
.compact-panel .panel-heading { border-bottom: 0; }
.section-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(280px, .75fr); }

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 7px 0 0; }
.required-mark { color: #8b5f10; font-size: 11px; font-weight: 600; }
input[type="text"], input[type="number"], input[type="time"], input[type="tel"], input[type="datetime-local"], select, textarea { background: #fff; border: 1px solid #d7dbe0; border-radius: 8px; color: var(--ink); outline: none; padding: 11px 12px; width: 100%; }
textarea { line-height: 1.5; min-height: 112px; resize: vertical; }
textarea[readonly] { background: #f4f5f3; color: #3f4650; cursor: default; }
input:focus, select:focus, textarea:focus { border-color: #171717; box-shadow: 0 0 0 3px rgba(23, 23, 23, .08); }
.toggle-line { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.toggle-copy strong { display: block; font-size: 14px; }
.toggle-copy span { color: var(--muted); display: block; font-size: 12px; line-height: 1.45; margin-top: 4px; }
.switch { display: inline-flex; flex: 0 0 auto; position: relative; }
.switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.switch span { background: #d1d5db; border-radius: 999px; height: 26px; position: relative; transition: .18s ease; width: 46px; }
.switch span::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); content: ""; height: 20px; left: 3px; position: absolute; top: 3px; transition: .18s ease; width: 20px; }
.switch input:checked + span { background: #171717; }
.switch input:checked + span::after { transform: translateX(20px); }
.field label.switch { display: inline-flex; margin-bottom: 0; }

.audience-grid { align-items: start; grid-template-columns: minmax(0, .8fr) minmax(360px, 1.2fr); }
.audience-contact-picker { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.audience-contact-picker-head { align-items: flex-start; background: #fafafa; border-bottom: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; padding: 14px 15px; }
.audience-contact-picker-head h3 { font-size: 14px; margin: 0 0 4px; }
.audience-contact-picker-head p { color: var(--muted); font-size: 11px; margin: 0; }
.audience-contact-picker-head > span { background: #f0f5e8; border: 1px solid #dce8c1; border-radius: 999px; color: #526631; flex: 0 0 auto; font-size: 10px; font-weight: 750; padding: 5px 8px; }
.audience-contact-search { border-bottom: 1px solid var(--line); display: grid; gap: 6px; padding: 12px 14px; }
.audience-contact-search span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.audience-contact-search input { min-height: 38px; padding: 8px 10px; }
.audience-contact-options { display: grid; max-height: 270px; overflow: auto; }
.audience-contact-option { align-items: center; border-bottom: 1px solid #f0f1f2; cursor: pointer; display: grid; gap: 10px; grid-template-columns: auto auto minmax(0, 1fr); margin: 0; padding: 11px 14px; }
.audience-contact-option:last-child { border-bottom: 0; }
.audience-contact-option:hover { background: #fafcf6; }
.audience-contact-option:has(input:checked) { background: #f3f7e9; }
.audience-contact-option input { accent-color: #171717; height: 16px; width: 16px; }
.audience-contact-option .conversation-avatar { height: 32px; width: 32px; }
.audience-contact-copy { min-width: 0; }
.audience-contact-copy strong, .audience-contact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audience-contact-copy strong { font-size: 12px; }
.audience-contact-copy small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.audience-contact-empty { color: var(--muted); font-size: 12px; margin: 0; padding: 20px 14px; text-align: center; }

.schedule { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.schedule-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 18px; grid-template-columns: minmax(150px, 1fr) minmax(240px, 1fr); padding: 12px 14px; }
.schedule-row:last-child { border-bottom: 0; }
.day-toggle { align-items: center; display: flex; font-size: 13px; font-weight: 650; gap: 10px; }
.day-toggle input { accent-color: #171717; height: 16px; width: 16px; }
.time-range { align-items: center; color: var(--muted); display: grid; font-size: 12px; gap: 9px; grid-template-columns: 1fr auto 1fr; }
.time-range input { padding: 8px 9px; }
.schedule-preview { background: #f1f5e9; border: 1px solid #dbe7c5; border-radius: 12px; color: #364121; min-height: 260px; padding: 20px; }
.schedule-preview p { line-height: 1.65; margin: 24px 0; white-space: pre-wrap; }
.schedule-preview small { color: #65704f; line-height: 1.5; }
.preview-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.rule-list { display: grid; gap: 14px; }
.rule-card { background: #fafafa; border: 1px solid var(--line); border-radius: 11px; padding: 16px; }
.rule-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.rule-title { align-items: center; display: flex; gap: 10px; min-width: 0; }
.rule-position { align-items: center; background: #171717; border-radius: 7px; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 12px; font-weight: 750; height: 28px; justify-content: center; width: 28px; }
.rule-summary { min-width: 0; }
.rule-summary strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-summary span { color: var(--muted); display: block; font-size: 11px; margin-top: 3px; }
.rule-actions { display: flex; gap: 6px; }
.icon-button { background: #fff; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); height: 32px; min-width: 32px; padding: 0 9px; }
.icon-button:hover { border-color: #aeb4bc; }
.icon-button.danger { color: var(--danger); }
.icon-button:disabled { cursor: default; opacity: .35; }
.rule-grid { display: grid; gap: 14px; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); }
.rule-grid .field { margin: 0; }
.rule-response { grid-column: 1 / -1; }
.rule-response textarea { min-height: 92px; }
.rule-action-field { grid-column: 3; }
.rule-footer { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; margin-top: 16px; padding-top: 13px; }
.rule-footer small { color: var(--muted); }
.add-rule { margin-top: 14px; width: 100%; }

.messages-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
.message-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.message-card { background: #fafafa; border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.message-card.wide { grid-column: 1 / -1; }
.message-card label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.message-card small { color: var(--muted); display: block; line-height: 1.45; margin-bottom: 10px; }
.preview-column { min-width: 0; }
.preview { background: #efeae2; border-radius: 12px; min-height: 310px; padding: 18px; }
.preview-top { align-items: center; color: #39433f; display: flex; font-size: 12px; font-weight: 700; gap: 9px; margin-bottom: 20px; }
.avatar { align-items: center; background: #171717; border-radius: 50%; color: #fff; display: inline-flex; height: 32px; justify-content: center; width: 32px; }
.bubble { background: #d9fdd3; border-radius: 8px 0 8px 8px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); font-size: 13px; line-height: 1.5; margin-left: auto; max-width: 90%; padding: 10px 12px 18px; position: relative; white-space: pre-wrap; }
.bubble::after { bottom: 5px; color: #66766f; content: "agora"; font-size: 9px; position: absolute; right: 7px; }
.preview-select { margin-top: 16px; }

.details-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.detail { border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
.detail span { color: var(--muted); display: block; font-size: 10px; margin-bottom: 7px; text-transform: uppercase; }
.detail strong { font-size: 18px; }
.qr-box { border-top: 1px solid var(--line); padding: 24px; text-align: center; }
.qr-box img { background: #fff; border: 1px solid var(--line); border-radius: 10px; max-width: 260px; padding: 8px; width: 100%; }
.global-feedback { background: #fff2f1; border: 1px solid #efc1bd; border-radius: 10px; color: var(--danger); font-size: 13px; margin-bottom: 18px; padding: 12px 14px; }
.toast { background: #171717; border-radius: 9px; bottom: 24px; color: #fff; font-size: 13px; left: 50%; opacity: 0; padding: 12px 16px; pointer-events: none; position: fixed; transform: translate(-50%, 10px); transition: .2s ease; z-index: 90; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

.agenda-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.agenda-subnav { border-bottom: 1px solid var(--line); display: flex; gap: 24px; margin: -4px 0 24px; }
.agenda-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: -1px; padding: 11px 2px 12px; }
.agenda-tab:hover { color: var(--ink); }
.agenda-tab.active { border-bottom-color: #171717; color: var(--ink); }
.agenda-layout { align-items: start; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 340px; }
.calendar-panel { border-color: #dde2d8; border-radius: 18px; min-width: 0; }
.calendar-body { background: #fbfcf9; padding: 20px 22px 26px; }
.calendar-heading { align-items: center; }
.calendar-legend { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 11px; gap: 12px; }
.calendar-legend span { align-items: center; display: inline-flex; gap: 5px; white-space: nowrap; }
.legend-dot { background: #aeb4bc; border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.legend-dot.confirmed { background: #40925c; }
.legend-dot.scheduled { background: #d28b2d; }
.legend-dot.awaiting { background: #7357b5; }
.agenda-sidebar { min-width: 0; }
.agenda-sidebar .panel:first-child { margin-top: 0; }
.agenda-sidebar .panel-heading { padding: 18px; }
.agenda-sidebar .panel-heading h2 { font-size: 17px; }
.compact-fields { padding: 0 18px 18px; }
.field-row { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manual-service-fields { grid-template-columns: minmax(0, 1.6fr) minmax(140px, .4fr); }
.field-row .field { margin-bottom: 15px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 42px; }
.input-suffix span { color: var(--muted); font-size: 11px; pointer-events: none; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.check-row { align-items: flex-start; background: #f8f8f6; border: 1px solid var(--line); border-radius: 9px; display: flex; gap: 10px; margin-bottom: 14px; padding: 12px; }
.check-row input { accent-color: #171717; flex: 0 0 auto; height: 16px; margin: 2px 0 0; width: 16px; }
.check-row strong, .check-row small { display: block; }
.check-row strong { font-size: 12px; }
.check-row small { color: var(--muted); font-size: 10px; line-height: 1.4; margin-top: 3px; }
.wide-button { width: 100%; }
.inline-note { color: var(--muted); font-size: 10px; line-height: 1.45; margin: 10px 0 0; text-align: center; }
.service-list { display: grid; gap: 10px; padding: 0 18px 18px; }
.service-catalog-panel { animation: view-in .18s ease; }
.service-explainer { background: #eff6e4; border: 1px solid #d8e7bc; border-radius: 14px; padding: 24px; }
.service-explainer h2 { font-size: 25px; letter-spacing: -.035em; margin: 0 0 8px; }
.service-explainer p { color: #566541; line-height: 1.55; margin: 0; max-width: 760px; }
.service-catalog { margin-top: 18px; }
.service-list-wide { gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 24px; }
.service-list-wide .service-row { padding: 16px; }
.service-list-wide .service-row-head > input { font-size: 14px; padding: 10px 11px; }
.service-list-wide .service-row-controls { gap: 12px; margin-top: 14px; }
.service-list-wide .service-row-controls label { font-size: 11px; font-weight: 650; }
.service-list-wide .service-row-controls input { font-size: 12px; padding: 9px; }
.service-row { background: #fafafa; border: 1px solid var(--line); border-radius: 9px; padding: 11px; }
.service-row-head { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; }
.service-row-head > input { font-size: 12px; font-weight: 700; padding: 8px 9px; }
.mini-toggle { align-items: center; color: var(--muted); display: inline-flex; font-size: 10px; gap: 4px; }
.mini-toggle input { accent-color: #171717; }
.service-row-controls { align-items: end; display: grid; gap: 7px; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; margin-top: 9px; }
.service-row-controls label { color: var(--muted); font-size: 9px; }
.service-row-controls label span { align-items: center; display: flex; gap: 3px; margin-top: 4px; }
.service-row-controls input { font-size: 11px; padding: 7px; }
.service-row-controls .icon-button { font-size: 10px; }
.service-row-controls.service-details { align-items: start; grid-template-columns: 1fr 1fr; }
.service-row-controls.service-details label { color: var(--ink); }
.service-row-controls.service-details input { margin-top: 5px; width: 100%; }

.assistant-hero { align-items: center; background: #eef4e5; border: 1px solid #d9e6c4; border-radius: 16px; display: flex; gap: 28px; justify-content: space-between; margin-bottom: 18px; padding: 26px; }
.assistant-hero h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; margin: 0 0 9px; }
.assistant-hero p { color: var(--muted); line-height: 1.55; margin: 0; max-width: 720px; }
.menu-primer { align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr); margin: 0 0 28px; padding: 22px 24px; }
.menu-primer h2 { font-size: 19px; letter-spacing: -.025em; margin: 0 0 7px; }
.menu-primer p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; max-width: 620px; }
.menu-primer-preview { background: #f1f5e9; border: 1px solid #dbe7c5; border-radius: 10px; color: #364121; font-size: 12px; line-height: 1.65; min-height: 120px; padding: 15px 17px; white-space: pre-wrap; }
.onboarding-list { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.onboarding-list a { align-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); display: flex; font-size: 13px; font-weight: 650; gap: 10px; padding: 12px; text-decoration: none; }
.onboarding-list a::before { align-items: center; border: 1px solid #b9bec5; border-radius: 50%; color: transparent; content: "✓"; display: inline-flex; flex: 0 0 auto; font-size: 10px; height: 18px; justify-content: center; width: 18px; }
.onboarding-list a.completed { background: #f3f7ed; border-color: #d4e2bd; color: #47572c; }
.onboarding-list a.completed::before { background: #60793a; border-color: #60793a; color: #fff; }
.conversation-contact-panel { animation: view-in .18s ease; }
.empty-copy { color: var(--muted); font-size: 12px; margin: 0; }
.danger-button { background: #fff; border: 1px solid #e8b8b4; border-radius: 8px; color: var(--danger); font-weight: 700; min-height: 42px; padding: 9px 16px; }
.danger-button:hover { background: #fff5f4; }

.app-dialog { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 30px 90px rgba(17, 24, 39, .25); color: var(--ink); max-height: calc(100vh - 40px); max-width: min(540px, calc(100vw - 28px)); padding: 0; width: 100%; }
.app-dialog::backdrop { backdrop-filter: blur(3px); background: rgba(17, 24, 39, .48); }
.dialog-head { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; padding: 22px 24px 18px; }
.dialog-head h2 { font-size: 24px; letter-spacing: -.035em; margin: 0; }
.dialog-close { background: #f5f5f3; border: 0; border-radius: 8px; color: var(--muted); font-size: 25px; height: 34px; line-height: 1; width: 34px; }
.dialog-body { padding: 22px 24px; }
.dialog-fields .field { margin-bottom: 16px; }
.dialog-actions { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 9px; justify-content: flex-end; padding: 16px 24px; }
.split-actions { justify-content: space-between; }
.dialog-feedback { background: #fff2f1; border: 1px solid #efc1bd; border-radius: 8px; color: var(--danger); font-size: 12px; padding: 10px 11px; }
.appointment-details { margin: 0; }
.appointment-details div { border-bottom: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: 90px minmax(0, 1fr); padding: 12px 0; }
.appointment-details div:last-child { border-bottom: 0; }
.appointment-details dt { color: var(--muted); font-size: 11px; }
.appointment-details dd { font-size: 13px; font-weight: 650; margin: 0; text-align: right; }
.appointment-status { background: #f0f1f2; border-radius: 999px; display: inline-block; font-size: 10px; padding: 5px 8px; }
.appointment-status.status-confirmed { background: #e8f6ec; color: #34774a; }
.appointment-status.status-scheduled { background: #fff4df; color: #8b5b1a; }
.appointment-status.status-awaiting_confirmation { background: #f0ebfb; color: #674c9e; }
.appointment-status.status-cancelled { color: #787f89; text-decoration: line-through; }

.day-actions-dialog { max-width: min(610px, calc(100vw - 28px)); }
.day-action-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.day-action-card { align-items: center; background: #f8f9f6; border: 1px solid #e1e5dd; border-radius: 13px; color: var(--ink); display: flex; gap: 14px; min-height: 112px; padding: 18px; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.day-action-card:hover { border-color: #bfc8b4; box-shadow: 0 10px 24px rgba(31, 40, 27, .08); transform: translateY(-1px); }
.day-action-card-primary { background: #182018; border-color: #182018; color: #fff; }
.day-action-card-primary:hover { border-color: #344431; }
.day-action-icon { align-items: center; background: rgba(96, 121, 58, .13); border-radius: 10px; display: inline-flex; flex: 0 0 auto; font-size: 24px; height: 42px; justify-content: center; width: 42px; }
.day-action-card-primary .day-action-icon { background: rgba(255, 255, 255, .13); }
.day-action-card strong, .day-action-card small { display: block; }
.day-action-card strong { font-size: 14px; line-height: 1.3; }
.day-action-card small { color: var(--muted); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.day-action-card-primary small { color: rgba(255, 255, 255, .7); }
.day-appointments-panel { min-height: 180px; }
.day-list-back { background: transparent; border: 0; color: #536942; font-size: 12px; font-weight: 700; margin: -4px 0 13px; padding: 4px 0; }
.day-list-summary { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.day-appointment-list { display: grid; gap: 8px; max-height: min(420px, 55vh); overflow-y: auto; padding-right: 2px; }
.day-appointment-item { align-items: center; background: #fbfcfa; border: 1px solid #e4e8e0; border-radius: 11px; color: var(--ink); display: grid; gap: 12px; grid-template-columns: 48px minmax(0, 1fr) auto 12px; min-height: 68px; padding: 12px 14px; text-align: left; }
.day-appointment-item:hover { background: #f4f7f1; border-color: #cdd5c8; }
.day-appointment-time { font-size: 13px; font-weight: 760; }
.day-appointment-main { min-width: 0; }
.day-appointment-main strong, .day-appointment-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-appointment-main strong { font-size: 13px; }
.day-appointment-main small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.day-appointment-arrow { color: #8d9788; font-size: 22px; }
.day-list-empty { align-items: center; background: #f7f9f5; border: 1px dashed #d8ded3; border-radius: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; justify-content: center; min-height: 130px; text-align: center; }
.day-list-empty strong { color: var(--ink); font-size: 14px; }
.day-list-empty span { font-size: 11px; }
.day-list-loading { animation: day-list-pulse 1s ease-in-out infinite; background: #eef1eb; border-radius: 11px; min-height: 130px; }
@keyframes day-list-pulse { 50% { opacity: .5; } }

/* Calendar workspace: spacious headers, soft lanes and appointment cards. */
.fc { --fc-border-color: #e8ebe4; --fc-button-bg-color: transparent; --fc-button-border-color: transparent; --fc-button-text-color: #5d645b; --fc-button-hover-bg-color: #ecefe8; --fc-button-hover-border-color: transparent; --fc-button-active-bg-color: #171a17; --fc-button-active-border-color: #171a17; --fc-event-text-color: #171717; font-size: 12px; }
.fc .fc-toolbar { gap: 18px; margin-bottom: 22px; }
.fc .fc-toolbar-title { font-size: 22px; font-weight: 680; letter-spacing: -.04em; text-transform: capitalize; }
.fc .fc-button-group { background: #f0f2ed; border-radius: 10px; gap: 2px; padding: 3px; }
.fc .fc-button { border-radius: 8px !important; box-shadow: none !important; font-size: 11px; font-weight: 720; padding: 7px 10px; text-transform: capitalize; }
.fc .fc-today-button { background: #fff; border: 1px solid #dde1da; color: #30362e; margin-left: 6px !important; }
.fc .fc-today-button:disabled { opacity: .42; }
.fc .fc-scrollgrid { background: #fff; border: 1px solid #e4e8e0; border-radius: 14px; overflow: hidden; }
.fc .fc-col-header { background: #f7f8f5; }
.fc .fc-col-header-cell { border-bottom: 0; }
.fc .fc-col-header-cell-cushion { color: inherit; padding: 11px 5px 12px; text-decoration: none; width: 100%; }
.calendar-day-heading { align-items: center; color: #747b72; display: inline-flex; flex-direction: column; gap: 5px; min-width: 42px; }
.calendar-day-weekday { font-size: 9px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.calendar-day-number { align-items: center; border-radius: 50%; color: #353b33; display: inline-flex; font-size: 15px; height: 31px; justify-content: center; width: 31px; }
.calendar-day-heading.is-today .calendar-day-weekday { color: #587922; }
.calendar-day-heading.is-today .calendar-day-number { background: var(--accent); color: #1d2710; }
.fc .fc-timegrid-axis { background: #fafbf8; }
.fc .fc-timegrid-slot { border-color: #f0f2ed; height: 2.85em; }
.fc .fc-timegrid-slot-minor { border-top-style: dashed; }
.fc .fc-timegrid-slot-label { border-color: transparent; }
.fc .fc-timegrid-slot-label-cushion { color: #92988f; font-size: 9px; font-variant-numeric: tabular-nums; padding: 0 9px 0 5px; }
.fc .fc-daygrid-day-number { align-items: center; border-radius: 50%; color: #3d433b; display: inline-flex; font-weight: 700; height: 29px; justify-content: center; margin: 5px; padding: 0; text-decoration: none; width: 29px; }
.fc .fc-day-today { background: rgba(199, 243, 107, .075) !important; }
.fc .fc-day-today .fc-daygrid-day-number { background: var(--accent); color: #1d2710; }
.fc .fc-timegrid-now-indicator-line { border-color: #e95e52; border-width: 2px; }
.fc .fc-timegrid-now-indicator-arrow { border-color: #e95e52; border-bottom-color: transparent; border-top-color: transparent; }
.fc .appointment-event { border: 0; border-radius: 9px; box-shadow: 0 2px 6px rgba(17, 24, 39, .07); color: #76501e; cursor: pointer; overflow: hidden; padding: 0; }
.fc .appointment-event::before { background: currentColor; content: ""; inset: 0 auto 0 0; opacity: .8; position: absolute; width: 3px; }
.fc .appointment-event.status-scheduled { background: #fff0d2; color: #9a621d; }
.fc .appointment-event.status-awaiting_confirmation { background: #eee9fb; color: #684da0; }
.fc .appointment-event.status-confirmed { background: #e3f4e7; color: #347849; }
.fc .appointment-event.status-cancelled { background: #eef0f2; color: #818890; opacity: .58; text-decoration: line-through; }
.fc .appointment-event.status-held { background: #eff1ef; color: #70776e; }
.fc .fc-event-main { color: inherit; }
.calendar-event-card { display: grid; gap: 1px; min-width: 0; padding: 6px 7px 6px 9px; }
.calendar-event-time { font-size: 9px; font-variant-numeric: tabular-nums; letter-spacing: .015em; opacity: .78; }
.calendar-event-customer { color: #20251f; font-size: 11px; font-weight: 760; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event-service { font-size: 9px; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc .calendar-block { background: repeating-linear-gradient(135deg, rgba(80, 85, 92, .11), rgba(80, 85, 92, .11) 6px, rgba(80, 85, 92, .035) 6px, rgba(80, 85, 92, .035) 12px); cursor: pointer; opacity: 1; }

.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.section-tabs { border-bottom: 1px solid var(--line); display: flex; gap: 26px; margin: -8px 0 28px; overflow-x: auto; }
.section-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); flex: 0 0 auto; font-size: 13px; font-weight: 750; margin-bottom: -1px; padding: 12px 2px 13px; }
.section-tab:hover, .section-tab.active { color: var(--ink); }
.section-tab.active { border-bottom-color: var(--ink); }
.section-panel { animation: view-in .18s ease; }

.overview-queue { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.queue-card { background: #171717; border-radius: 12px; color: #fff; padding: 18px; text-decoration: none; transition: transform .15s ease; }
.queue-card:hover { transform: translateY(-2px); }
.queue-card span, .queue-card small { color: #aaa; display: block; font-size: 11px; }
.queue-card strong { display: block; font-size: 28px; margin: 10px 0 6px; }
.queue-card:nth-child(2) { background: #dff6ac; color: #263411; }
.queue-card:nth-child(2) span, .queue-card:nth-child(2) small { color: #627445; }

.inbox-view-header { align-items: center; margin-bottom: 18px; }
.inbox-view-header h1 { font-size: 36px; }
.inbox-shell { background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); display: grid; grid-template-columns: 310px minmax(440px, 1fr) 260px; height: calc(100vh - 220px); height: calc(100dvh - 220px); min-height: 420px; overflow: hidden; }
.conversation-column, .contact-column { background: #fbfbfa; min-width: 0; overflow: hidden; }
.conversation-column { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.contact-column { border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 20px; }
.conversation-tools { border-bottom: 1px solid var(--line); padding: 14px; }
.inbox-search input, .contacts-toolbar input { background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: text; padding: 10px 11px; width: 100%; }
.inbox-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-bottom: 2px; }
.inbox-filter { background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 6px 9px; }
.inbox-filter.active { background: #171717; border-color: #171717; color: #fff; }
.conversation-list { overflow-y: auto; }
.conversation-item { align-items: center; background: transparent; border: 0; border-bottom: 1px solid #eeeeeb; display: grid; gap: 10px; grid-template-columns: 40px minmax(0, 1fr) auto; padding: 13px 14px; text-align: left; width: 100%; }
.conversation-item:hover, .conversation-item.active { background: #f1f5e9; }
.conversation-avatar, .contact-avatar { align-items: center; background: #222; border-radius: 50%; color: #fff; display: inline-flex; font-size: 13px; font-weight: 800; height: 40px; justify-content: center; width: 40px; }
.conversation-copy { min-width: 0; }
.conversation-copy strong, .conversation-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy strong { font-size: 13px; }
.conversation-copy span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.conversation-meta { align-items: flex-end; display: flex; flex-direction: column; gap: 7px; }
.conversation-meta time { color: #8b919a; font-size: 9px; }
.unread-badge { align-items: center; background: #171717; border-radius: 999px; color: #fff; display: inline-flex; font-size: 9px; height: 19px; justify-content: center; min-width: 19px; padding: 0 5px; }
.inbox-loading, .inbox-empty-copy { color: var(--muted); font-size: 12px; padding: 28px 18px; text-align: center; }

.chat-column { background: #f2efe9; min-width: 0; overflow: hidden; position: relative; }
.chat-empty { align-items: center; display: flex; flex-direction: column; height: 100%; justify-content: center; padding: 30px; text-align: center; }
.chat-empty h2 { font-size: 18px; margin: 14px 0 7px; }
.chat-empty p { color: var(--muted); font-size: 12px; margin: 0; }
.empty-icon { align-items: center; background: #171717; border-radius: 50%; color: var(--accent); display: inline-flex; font-size: 22px; height: 54px; justify-content: center; width: 54px; }
.chat-active { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100%; min-height: 0; overflow: hidden; }
.chat-header { align-items: center; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--line); display: flex; gap: 11px; min-height: 68px; padding: 12px 15px; }
.chat-back { display: none; }
.chat-contact-copy { flex: 1 1 140px; min-width: 0; }
.chat-contact-copy strong, .chat-contact-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-contact-copy strong { font-size: 13px; }
.chat-contact-copy span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.conversation-state { background: #eef1eb; border-radius: 999px; color: #57634d; font-size: 9px; font-weight: 800; padding: 6px 8px; text-transform: uppercase; white-space: nowrap; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-left: auto; }
.chat-details, .context-close { display: none; }
.compact-button { font-size: 10px; min-height: 32px; padding: 6px 9px; }
.message-timeline { overflow-y: auto; padding: 20px 22px; }
.message-row { display: flex; margin: 8px 0; }
.message-row.outbound { justify-content: flex-end; }
.message-bubble { background: #fff; border-radius: 4px 11px 11px 11px; box-shadow: 0 1px 2px rgba(17, 24, 39, .08); max-width: min(76%, 560px); overflow: hidden; padding: 9px 10px 7px; }
.message-row.outbound .message-bubble { background: #dcf7b8; border-radius: 11px 4px 11px 11px; }
.message-bubble.bot-message { border: 1px solid #cce5a5; }
.message-author { color: #6c773f; display: block; font-size: 9px; font-weight: 800; margin-bottom: 5px; text-transform: uppercase; }
.message-text { font-size: 12px; line-height: 1.48; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-text a { color: #2262a6; text-decoration: underline; }
.message-media { display: block; margin-bottom: 7px; max-height: 360px; max-width: 100%; }
.video-note-media { aspect-ratio: 1; border-radius: 50%; height: 210px; object-fit: cover; width: 210px; }
.media-kind-label { color: #66705f; display: block; font-size: 9px; font-weight: 800; margin: 2px 0 6px; text-transform: uppercase; }
.message-media-error { border-left: 3px solid #c66b55; color: #7a3d31; font-size: 11px; margin-bottom: 7px; padding: 6px 8px; }
img.message-media { border-radius: 7px; object-fit: contain; }
.sticker-media { background: transparent; box-shadow: none; max-height: 180px; max-width: 180px; }
.document-card { align-items: center; background: rgba(255, 255, 255, .55); border: 1px solid rgba(0, 0, 0, .08); border-radius: 8px; color: var(--ink); display: flex; font-size: 11px; gap: 8px; padding: 10px; text-decoration: none; }
.shared-contact-card, .shared-location-card { align-items: center; background: rgba(255, 255, 255, .62); border: 1px solid rgba(0, 0, 0, .08); border-radius: 9px; color: var(--ink); display: flex; gap: 10px; min-width: 220px; padding: 11px; text-decoration: none; }
.shared-contact-card > div { display: grid; gap: 7px; }
.shared-contact-card strong, .shared-contact-card small, .shared-location-card strong, .shared-location-card small { display: block; }
.shared-contact-card small, .shared-location-card small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.shared-content-icon { align-items: center; background: #171717; border-radius: 50%; color: #dff6ac; display: inline-flex; flex: 0 0 32px; font-size: 16px; height: 32px; justify-content: center; width: 32px; }
.message-footer { align-items: center; color: #7d857f; display: flex; font-size: 8px; gap: 6px; justify-content: flex-end; margin-top: 5px; }
.message-status.failed { color: var(--danger); font-weight: 800; }
.attachment-preview { background: #fff; border-top: 1px solid var(--line); font-size: 11px; padding: 10px 14px; }
.composer { background: #fff; border-top: 1px solid var(--line); padding: 10px 12px 12px; }
.composer select { font-size: 10px; margin-bottom: 7px; padding: 7px 9px; width: auto; }
.composer textarea { border: 0; box-shadow: none; min-height: 50px; padding: 7px 4px; resize: none; }
.composer textarea:focus { box-shadow: none; }
.composer-actions { align-items: center; display: flex; gap: 8px; }
.attachment-button { align-items: center; background: #f5f5f3; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; display: inline-flex; font-size: 20px; height: 34px; justify-content: center; list-style: none; width: 34px; }
.attachment-button input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.sticker-button { font-size: 15px; }
.attachment-menu { position: relative; }
.attachment-menu summary::-webkit-details-marker { display: none; }
.attachment-menu-popover { background: #fff; border: 1px solid var(--line); border-radius: 11px; bottom: 42px; box-shadow: 0 18px 45px rgba(17, 24, 39, .18); display: grid; left: 0; min-width: 230px; overflow: hidden; padding: 6px; position: absolute; z-index: 20; }
.attachment-menu-popover label, .attachment-menu-popover button { align-items: center; background: transparent; border: 0; border-radius: 7px; color: var(--ink); cursor: pointer; display: flex; font: inherit; font-size: 11px; gap: 9px; padding: 9px 10px; text-align: left; width: 100%; }
.attachment-menu-popover label:hover, .attachment-menu-popover button:hover { background: #f1f5e9; }
.attachment-menu-popover label span, .attachment-menu-popover button span { align-items: center; color: #506329; display: inline-flex; flex: 0 0 25px; font-size: 11px; font-weight: 800; justify-content: center; }
.attachment-menu-popover input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.composer-hint { color: var(--muted); font-size: 9px; margin-right: auto; }
.composer .primary-button { min-height: 34px; padding: 6px 13px; }

.structured-message-dialog { max-width: 500px; width: calc(100% - 28px); }
.structured-message-dialog form { display: grid; gap: 14px; }
.structured-message-dialog header, .structured-message-dialog footer { align-items: center; display: flex; justify-content: space-between; }
.structured-message-dialog header h2 { font-size: 20px; margin: 3px 0 0; }
.structured-message-dialog footer { gap: 8px; justify-content: flex-end; margin-top: 5px; }
.structured-message-dialog label { color: var(--ink); font-size: 11px; font-weight: 700; }
.structured-message-dialog input { margin-top: 6px; width: 100%; }
.location-coordinate-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.location-current-button { justify-self: start; }
.optional-label { color: var(--muted); font-weight: 500; }

.context-block { border-bottom: 1px solid var(--line); padding: 0 0 18px; margin-bottom: 18px; }
.context-block:last-child { border-bottom: 0; }
.context-label { color: var(--muted); display: block; font-size: 9px; font-weight: 800; letter-spacing: .07em; margin-bottom: 8px; text-transform: uppercase; }
.context-block h2 { font-size: 17px; margin: 0 0 5px; overflow-wrap: anywhere; }
.context-block p { color: var(--muted); font-size: 11px; margin: 0; }
.context-block .automation-reason { margin-top: 6px; }
.context-block strong { font-size: 12px; }
.text-button { background: transparent; border: 0; color: #4f6c23; font-size: 10px; font-weight: 750; margin-top: 8px; padding: 0; text-align: left; }
.context-danger .text-button { color: var(--danger); }
.context-appointment { background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; margin-top: 8px; padding: 10px; }
.context-appointment strong, .context-appointment span { display: block; }
.context-appointment span { color: var(--muted); margin-top: 4px; }

.contacts-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; padding: 16px 18px; }
.contacts-toolbar input { max-width: 380px; }
.contacts-toolbar span { color: var(--muted); font-size: 11px; }
.contacts-list { min-height: 220px; }
.contact-row { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: minmax(180px, 1fr) minmax(140px, .7fr) auto; padding: 14px 18px; }
.contact-row:last-child { border-bottom: 0; }
.contact-primary { align-items: center; display: flex; gap: 11px; min-width: 0; }
.contact-primary strong, .contact-primary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-primary strong { font-size: 13px; }
.contact-primary span, .contact-automation { color: var(--muted); font-size: 10px; margin-top: 3px; }
.contact-row-actions { display: flex; gap: 7px; }
.contact-dialog { max-width: 480px; }

.quick-reply-list { display: grid; gap: 12px; margin-bottom: 14px; }
.quick-reply-row { align-items: end; background: #fafafa; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 12px; grid-template-columns: minmax(150px, .45fr) minmax(240px, 1fr) auto; padding: 14px; }
.quick-reply-row .field { margin: 0; }
.quick-reply-row textarea { min-height: 76px; }
.technical-diagnostics summary { cursor: pointer; font-weight: 700; margin-bottom: 18px; }
.technical-diagnostics > button { margin-top: 18px; }
.assistant-simulator-dialog { width: min(680px, calc(100vw - 28px)); }
.assistant-simulator { background: #f4f1ea; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: 10px; height: min(440px, 52vh); overflow-y: auto; padding: 16px; }
.simulator-bubble { border-radius: 14px; line-height: 1.45; max-width: 82%; padding: 11px 13px; white-space: normal; }
.simulator-bubble.assistant { align-self: flex-start; background: #fff; }
.simulator-bubble.customer { align-self: flex-end; background: #ddf7c8; }
.simulator-bubble.error { align-self: center; background: #fff0ee; color: #a12c22; }
.assistant-simulator-composer { display: grid; gap: 10px; grid-template-columns: 1fr auto; margin-top: 12px; }
.appointment-detail-actions { flex-wrap: wrap; }
.context-appointment { background: #f8f8f6; border: 1px solid var(--line); border-radius: 10px; color: inherit; cursor: pointer; display: flex; flex-direction: column; margin-top: 8px; padding: 10px; text-align: left; width: 100%; }
.context-appointment:hover { border-color: #8ba46d; }
.message-retry { background: transparent; border: 0; color: #a12c22; cursor: pointer; font-size: 11px; font-weight: 700; padding: 0 0 0 5px; }
.contacts-archive-filter { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: 7px; }

@media (max-width: 1420px) {
  .inbox-shell { grid-template-columns: minmax(280px, 310px) minmax(0, 1fr); position: relative; }
  .contact-column { display: none; }
  .chat-details { display: inline-flex; }
  .inbox-shell.show-contact-context .contact-column {
    bottom: 0;
    box-shadow: -18px 0 45px rgba(17, 24, 39, .16);
    display: block;
    max-width: 92%;
    position: absolute;
    right: 0;
    top: 0;
    width: 320px;
    z-index: 8;
  }
  .context-close { display: inline-flex; margin: -8px 0 16px auto; }
}

@media (max-width: 1060px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand-name, .nav-link span:last-child, .nav-label, .sidebar-note { display: none; }
  .nav-link { justify-content: center; padding-inline: 8px; }
  .section-grid, .messages-layout { grid-template-columns: 1fr; }
  .menu-primer { grid-template-columns: 1fr; }
  .metrics, .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-grid { grid-template-columns: 1fr 1fr; }
  .rule-response { grid-column: 1 / -1; }
  .preview-column { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
  .preview-select { margin-top: 0; }
  .agenda-layout { grid-template-columns: 1fr; }
  .agenda-sidebar { display: block; }
  .agenda-sidebar .panel { margin-top: 0; }
  .service-list-wide { grid-template-columns: 1fr; }
  .overview-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .contact-column { display: none; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { box-shadow: 18px 0 50px rgba(0, 0, 0, .22); left: 0; padding-inline: 18px; position: fixed; transform: translateX(-110%); transition: transform .2s ease; width: min(280px, 84vw); }
  .sidebar.open { transform: translateX(0); }
  .brand { justify-content: flex-start; }
  .brand-name, .nav-link span:last-child, .nav-label, .sidebar-note { display: initial; }
  .nav-link { justify-content: flex-start; padding-inline: 11px; }
  .sidebar-backdrop { background: rgba(17, 24, 39, .45); border: 0; display: block; inset: 0; position: fixed; z-index: 45; }
  .topbar { padding: 10px 14px; }
  .menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .save-state { display: none; }
  .account-menu { border-right: 0; padding-right: 0; }
  .account-menu span { display: none; }
  .status-pill { padding-inline: 9px; }
  .status-pill span:last-child { display: none; }
  .content { padding: 30px 15px 70px; }
  .route-conversas .content { height: calc(100vh - 72px); height: calc(100dvh - 72px); overflow: hidden; padding-bottom: 12px; }
  .route-conversas .operational-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .view-header { gap: 20px; }
  .view-header h1 { font-size: 34px; }
  .operation-control { align-items: flex-start; min-width: 0; width: 100%; }
  .view[data-view="inicio"] .view-header { flex-direction: column; }
  .agenda-header { flex-direction: column; }
  .panel-heading, .panel-body { padding: 19px; }
  .schedule-row { align-items: start; grid-template-columns: 1fr; }
  .message-grid, .preview-column { grid-template-columns: 1fr; }
  .message-card.wide { grid-column: auto; }
  .rule-head, .rule-footer { align-items: stretch; flex-direction: column; }
  .rule-actions { justify-content: flex-end; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid .field, .rule-keywords-field, .rule-response, .rule-action-field { grid-column: auto; }
  .agenda-sidebar { grid-template-columns: 1fr; }
  .calendar-heading { align-items: flex-start; }
  .calendar-body { padding: 14px 10px 18px; }
  .fc .fc-toolbar { align-items: center; display: grid; gap: 10px; grid-template-columns: auto 1fr; }
  .fc .fc-toolbar-chunk { display: flex; justify-content: flex-start; }
  .fc .fc-toolbar-chunk:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .fc .fc-toolbar-chunk:nth-child(3) { grid-column: 1 / -1; justify-content: stretch; }
  .fc .fc-toolbar-chunk:nth-child(3) .fc-button-group { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .fc .fc-toolbar-title { font-size: 19px; text-align: left; }
  .fc .fc-timegrid-slot { height: 3.25em; }
  .calendar-day-heading { flex-direction: row; justify-content: center; }
  .calendar-day-number { height: 28px; width: 28px; }
  .inbox-view-header { align-items: stretch; flex-direction: column; }
  .inbox-shell { display: block; flex: 1 1 auto; height: auto; min-height: 0; overflow: hidden; }
  .conversation-contact-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .conversation-column { border: 0; height: 100%; min-height: 0; }
  .chat-column { height: 100%; min-height: 0; }
  .inbox-shell.chat-open .conversation-column { display: none; }
  .inbox-shell:not(.chat-open) .chat-column { display: none; }
  .chat-header { flex-wrap: wrap; }
  .chat-back { display: inline-block; }
  .chat-actions { flex-basis: 100%; margin-left: 51px; }
  .message-timeline { min-height: 0; overscroll-behavior: contain; }
  .message-bubble { max-width: 88%; }
  .composer-hint { display: none; }
  .contact-row { grid-template-columns: 1fr; }
  .contact-row-actions { justify-content: flex-start; }
  .quick-reply-row { grid-template-columns: 1fr; }
  .assistant-simulator-composer { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .billing-plans { grid-template-columns: 1fr; }
  .topbar-title strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-actions { gap: 7px; }
  .primary-button { min-height: 40px; padding-inline: 13px; }
  .metrics, .details-grid { grid-template-columns: 1fr 1fr; }
  .onboarding-list { grid-template-columns: 1fr; }
  .metric { padding: 15px; }
  .metric-value { font-size: 24px; }
  .panel-heading { flex-direction: column; }
  .time-range { grid-template-columns: 1fr; }
  .time-range span { display: none; }
  .agenda-actions { width: 100%; }
  .agenda-subnav { gap: 18px; overflow-x: auto; }
  .agenda-tab { flex: 0 0 auto; }
  .agenda-actions button { flex: 1; }
  .field-row { grid-template-columns: 1fr; }
  .manual-service-fields { grid-template-columns: 1fr; }
  .service-row-controls { grid-template-columns: 1fr 1fr; }
  .service-row-controls .icon-button { grid-column: 1 / -1; width: 100%; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .day-action-grid { grid-template-columns: 1fr; }
  .day-action-card { min-height: 94px; }
  .day-appointment-item { grid-template-columns: 44px minmax(0, 1fr) 12px; }
  .day-appointment-item .appointment-status { display: none; }
  .overview-queue { grid-template-columns: 1fr 1fr; }
  .section-tabs { gap: 18px; }
  .conversation-state { display: none; }
  .chat-actions { margin-left: 0; }
}
body.billing-blocked .sidebar,
body.billing-blocked .content,
body.billing-blocked .status-pill,
body.billing-blocked .menu-button { display: none !important; }
