/* ── FORMS ── */
.form-group { margin-bottom:15px; }

.form-label {
  display:block;
  font-family:'JetBrains Mono',monospace;
  font-size:10.5px;
  color:var(--text3);
  text-transform:uppercase;
  letter-spacing:.9px;
  margin-bottom:7px;
}

input, textarea, select {
  width:100%;
  padding:11px 14px;
  background:var(--bg);
  border:1px solid var(--border2);
  border-radius:var(--radius-sm);
  color:var(--text);
  font-family:'DM Sans',sans-serif;
  font-size:14px;
  outline:none;
  transition:border-color .18s, box-shadow .18s;
}

input:focus, textarea:focus, select:focus {
  border-color:var(--blue);
  box-shadow:0 0 0 3px var(--blue-dim);
}

input::placeholder, textarea::placeholder { color:var(--text3); }

textarea { resize:vertical; min-height:120px; line-height:1.65; }

select { cursor:pointer; }
select option { background:var(--surface); }

.form-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px;
}

.prompt-tools {
  display:flex;
  justify-content:flex-end;
  margin:-2px 0 8px;
}

.prompt-tag {
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(59,130,246,.25);
  background:var(--blue-dim);
  color:#93c5fd;
  border-radius:999px;
  padding:5px 11px;
  font-family:'JetBrains Mono',monospace;
  font-size:11px;
  letter-spacing:.5px;
  text-transform:uppercase;
  cursor:pointer;
  transition:all .16s;
}

.prompt-tag:hover {
  border-color:rgba(59,130,246,.5);
  box-shadow:0 0 14px rgba(59,130,246,.2);
}

.prompt-tag:disabled {
  opacity:.7;
  cursor:wait;
  box-shadow:none;
}

.prompt-tag.loading::before {
  content:'';
  width:10px; height:10px;
  border:2px solid rgba(147,197,253,.35);
  border-top-color:#93c5fd;
  border-radius:50%;
  animation:spin .65s linear infinite;
}

/* ── BUTTONS ── */
.btn {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:9px 18px;
  border-radius:var(--radius-sm);
  border:1px solid transparent;
  font-family:'DM Sans',sans-serif;
  font-size:13.5px;
  font-weight:600;
  cursor:pointer;
  transition:all .17s;
  white-space:nowrap;
  line-height:1;
}

.btn-primary {
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
  box-shadow:0 0 20px var(--blue-glow);
}

.btn-primary:hover {
  background:#2563eb;
  box-shadow:0 0 28px rgba(59,130,246,.45);
  transform:translateY(-1px);
}

.btn-secondary {
  background:var(--surface2);
  color:var(--text);
  border-color:var(--border2);
}

.btn-secondary:hover { background:var(--surface3); border-color:#334155; }

.btn-danger {
  background:var(--red-dim);
  color:var(--red);
  border-color:rgba(239,68,68,.2);
}

.btn-danger:hover { background:rgba(239,68,68,.22); border-color:var(--red); }

.btn-success {
  background:var(--green-dim);
  color:var(--green);
  border-color:rgba(34,197,94,.2);
}

.btn-ghost {
  background:transparent;
  color:var(--text2);
  border-color:var(--border);
}

.btn-ghost:hover { background:var(--surface2); color:var(--text); }

.btn-sm { padding:7px 13px; font-size:12.5px; }
.btn-xs { padding:5px 10px; font-size:12px; }

.btn-icon {
  width:32px; height:32px;
  padding:0;
  justify-content:center;
  border:1px solid var(--border2);
  background:var(--surface2);
  color:var(--text2);
  border-radius:var(--radius-xs);
}

.btn-icon:hover { border-color:#334155; color:var(--text); }

.btn-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }

.wa-audio-player {
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(34,197,94,.25);
  background:linear-gradient(180deg, rgba(22,163,74,.14), rgba(15,23,42,.28));
}

.wa-audio-play {
  width:34px;
  height:34px;
  border:none;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#22c55e;
  color:#fff;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:filter .16s ease, transform .16s ease;
}

.wa-audio-play:hover {
  filter:brightness(1.06);
  transform:translateY(-1px);
}

.wa-audio-main {
  flex:1;
  min-width:140px;
  display:flex;
  flex-direction:column;
  gap:5px;
}

.wa-audio-seek {
  width:100%;
  accent-color:#22c55e;
  margin:0;
}

.wa-audio-time {
  font-size:11px;
  color:#d1fae5;
  font-family:'JetBrains Mono',monospace;
}

/* ── TABLE ── */
.tbl-wrap { overflow-x:auto; }

table.tbl {
  width:100%;
  border-collapse:collapse;
}

.tbl thead tr { border-bottom:1px solid var(--border); }

.tbl th {
  padding:10px 14px;
  text-align:left;
  font-family:'JetBrains Mono',monospace;
  font-size:10.5px;
  color:var(--text3);
  text-transform:uppercase;
  letter-spacing:.9px;
  font-weight:400;
  white-space:nowrap;
}

.tbl td {
  padding:13px 14px;
  font-size:13.5px;
  border-bottom:1px solid rgba(31,45,66,.5);
  color:#cbd5e1;
  vertical-align:middle;
}

.tbl tbody tr:last-child td { border-bottom:none; }
.tbl tbody tr:hover td { background:rgba(255,255,255,.02); }

.order-restaurant-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:14px;
}

.order-restaurant-card {
  background:var(--surface2);
  border:1px solid var(--border2);
  border-radius:16px;
  padding:14px;
}

.order-restaurant-card.selectable {
  cursor:pointer;
  transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.order-restaurant-card.selectable:hover {
  border-color:rgba(88,166,255,.45);
  transform:translateY(-1px);
}

.order-restaurant-card.active {
  border-color:rgba(88,166,255,.55);
  box-shadow:0 8px 24px rgba(8,47,73,.22);
}

.order-restaurant-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.order-restaurant-title {
  font-size:15px;
  font-weight:700;
  color:var(--text);
}

.order-restaurant-sub {
  font-size:12px;
  color:var(--text3);
  margin-top:2px;
}

.order-variable-chip-wrap {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:10px;
}

.order-variable-chip {
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  font-family:'JetBrains Mono',monospace;
  font-size:10.5px;
  color:#dbeafe;
  background:rgba(88,166,255,.12);
  border:1px solid rgba(88,166,255,.24);
}

.order-entry-list {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.order-entry {
  border:1px solid rgba(148,163,184,.14);
  border-radius:12px;
  background:rgba(255,255,255,.02);
  padding:10px;
}

.order-entry-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.order-entry-id {
  font-family:'JetBrains Mono',monospace;
  font-size:11px;
  color:#dbeafe;
}

.order-entry-meta {
  font-size:12px;
  color:var(--text3);
}

.order-entry-fields {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:8px;
}

.order-entry-field {
  display:grid;
  grid-template-columns:minmax(110px,160px) 1fr;
  gap:8px;
  align-items:flex-start;
  background:rgba(15,23,42,.26);
  border:1px solid rgba(148,163,184,.16);
  border-radius:10px;
  padding:7px 8px;
}

.order-entry-field-label {
  font-family:'JetBrains Mono',monospace;
  font-size:10.5px;
  color:var(--text3);
  margin-bottom:0;
  text-transform:none;
  letter-spacing:.2px;
}

.order-entry-field-value {
  font-size:12.8px;
  color:var(--text2);
  line-height:1.45;
  word-break:break-word;
}

.order-entry-foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:8px;
}

.order-entry-actions {
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.order-restaurant-hint {
  font-size:12px;
  color:var(--text3);
  margin-top:8px;
}

.order-detail-head {
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.order-detail-sub {
  margin-top:4px;
  font-size:12px;
  color:var(--text3);
}

.order-column-tools {
  margin-bottom:12px;
}

.order-view-tabs-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.order-view-tabs {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:0;
  flex:1;
}

.order-view-tab {
  border:1px solid var(--border2);
  background:var(--surface2);
  color:var(--text2);
  border-radius:999px;
  padding:6px 12px;
  font-size:12px;
  cursor:pointer;
}

.order-view-tab.active {
  border-color:rgba(88,166,255,.55);
  color:#dbeafe;
  background:rgba(88,166,255,.16);
}

.order-view-tab.add {
  border-style:dashed;
}

.order-view-edit-btn {
  border-radius:999px;
  flex-shrink:0;
}

.order-column-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
}

.order-column-item {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:var(--text2);
}

.order-column-item input {
  width:14px;
  height:14px;
}

.order-detail-table-wrap .tbl td.order-variable-cell {
  max-width:220px;
  min-width:140px;
  white-space:normal;
}

.order-actions-cell {
  min-width:140px;
}

.order-actions-group {
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.order-status-trigger {
  border:none;
  background:transparent;
  padding:0;
  margin:0;
  cursor:pointer;
}

.order-status-trigger:hover {
  filter:brightness(1.06);
}

.order-action-icon-btn {
  width:30px;
  height:30px;
  padding:0;
  border:1px solid var(--border2);
  border-radius:10px;
  background:rgba(15,23,42,.48);
  color:var(--text2);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:all .18s ease;
}

.order-action-icon-btn:hover {
  color:#e2e8f0;
  border-color:rgba(88,166,255,.45);
  background:rgba(59,130,246,.16);
  transform:translateY(-1px);
}

.order-action-icon-btn .pro-icon svg {
  width:15px;
  height:15px;
}

.order-view-modal-card {
  width:min(620px,94vw);
}

.order-view-columns-wrap {
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface2);
  padding:10px;
  max-height:320px;
  overflow:auto;
}

.order-view-columns-wrap .order-column-list {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:8px;
}

.order-view-order-wrap {
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface2);
  padding:10px;
  max-height:260px;
  overflow:auto;
}

.order-view-order-list {
  display:flex;
  flex-direction:column;
  gap:8px;
}

.order-view-order-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border:1px solid var(--border2);
  border-radius:8px;
  background:rgba(15,23,42,.35);
}

.order-view-order-meta {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.order-view-order-check {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:16px;
  height:16px;
  flex-shrink:0;
}

.order-view-order-check input {
  width:14px;
  height:14px;
}

.order-view-order-index {
  font-family:'JetBrains Mono',monospace;
  font-size:11px;
  color:var(--text3);
  min-width:24px;
}

.order-view-order-label {
  font-size:12px;
  color:var(--text2);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.order-view-order-actions {
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}

.order-view-order-btn {
  width:24px;
  height:24px;
  border:1px solid var(--border2);
  border-radius:7px;
  background:var(--surface);
  color:var(--text2);
  cursor:pointer;
  font-size:12px;
  line-height:1;
}

.order-view-order-btn:disabled {
  opacity:.45;
  cursor:not-allowed;
}

.order-view-filter-wrap {
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface2);
  padding:10px;
}

.order-view-filter-toggle {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--text2);
}

.order-view-filter-toggle input {
  width:14px;
  height:14px;
}

.order-view-filter-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
  margin-top:10px;
}

.order-view-filter-help {
  margin-top:8px;
  font-size:11.5px;
  color:var(--text3);
  line-height:1.5;
}

.schema-editor-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
}

.schema-editor-grid .form-group textarea {
  min-height:160px;
  font-family:'JetBrains Mono',monospace;
  font-size:12px;
}

.schema-help-text {
  font-size:12px;
  color:var(--text3);
  line-height:1.6;
}

.schema-builder-row {
  display:grid;
  grid-template-columns:minmax(180px,1fr) 140px auto auto;
  gap:8px;
  align-items:end;
  margin-bottom:10px;
}

.schema-builder-required {
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:36px;
  font-size:12px;
  color:var(--text2);
}

.schema-builder-required input {
  width:14px;
  height:14px;
}

.schema-variable-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.schema-variable-tag {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 9px;
  border-radius:999px;
  background:rgba(59,130,246,.12);
  border:1px solid rgba(59,130,246,.25);
  color:#dbeafe;
  font-size:11.5px;
}

.schema-variable-tag.active {
  border-color:rgba(250,204,21,.55);
  box-shadow:0 0 0 1px rgba(250,204,21,.25) inset;
}

.schema-variable-tag strong {
  font-weight:700;
}

.schema-variable-type {
  font-family:'JetBrains Mono',monospace;
  font-size:10px;
  color:#bfdbfe;
  opacity:.9;
}

.schema-variable-required {
  color:#facc15;
  font-family:'JetBrains Mono',monospace;
  font-size:10px;
}

.schema-tag-btn {
  border:none;
  background:transparent;
  color:#e2e8f0;
  cursor:pointer;
  font-size:11px;
  padding:0 2px;
}

.schema-tag-btn:hover {
  color:#fff;
}

.schema-advanced-box {
  margin-top:12px;
  border:1px dashed rgba(148,163,184,.35);
  border-radius:10px;
  padding:10px;
  background:rgba(15,23,42,.18);
}

.schema-advanced-box summary {
  cursor:pointer;
  font-size:12px;
  color:var(--text2);
  margin-bottom:8px;
}

@media (max-width: 900px) {
  .schema-builder-row {
    grid-template-columns:1fr;
  }
  .order-entry-field {
    grid-template-columns:1fr;
  }
  .order-detail-head {
    flex-direction:column;
    align-items:flex-start;
  }
}

/* ── BADGES ── */
.badge {
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 9px;
  border-radius:20px;
  font-family:'JetBrains Mono',monospace;
  font-size:11px;
  font-weight:500;
  white-space:nowrap;
}

.badge-green  { background:var(--green-dim); color:var(--green); border:1px solid rgba(34,197,94,.2); }
.badge-red    { background:var(--red-dim);   color:var(--red);   border:1px solid rgba(239,68,68,.2); }
.badge-amber  { background:var(--amber-dim); color:var(--amber); border:1px solid rgba(245,158,11,.2); }
.badge-blue   { background:var(--blue-dim);  color:#93c5fd;      border:1px solid rgba(59,130,246,.2); }
.badge-purple { background:var(--purple-dim);color:var(--purple);border:1px solid rgba(96,165,250,.2); }

/* ── CHAT ── */
.chat-box {
  height:210px;
  overflow-y:auto;
  background:var(--bg);
  border:1px solid var(--border2);
  border-radius:var(--radius-sm);
  padding:14px;
  margin-bottom:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.msg { display:flex; flex-direction:column; gap:3px; }

.msg-sender {
  font-family:'JetBrains Mono',monospace;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:1.2px;
  color:var(--text3);
}

.msg.user { align-items:flex-end; }
.msg.user .msg-sender { color:var(--blue); }
.msg.ai   { align-items:flex-start; }
.msg.ai   .msg-sender { color:var(--green); }

.msg-bubble {
  padding:9px 13px;
  border-radius:10px;
  font-size:13.5px;
  line-height:1.55;
  max-width:90%;
}

.msg.user .msg-bubble {
  background:var(--blue-dim);
  border:1px solid rgba(59,130,246,.18);
}

.msg.ai .msg-bubble {
  background:var(--surface2);
  border:1px solid var(--border2);
}

.chat-row { display:flex; gap:8px; }
.chat-row input { flex:1; }

/* Setup Assistant Popup */
.setup-assistant-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(14,165,233,.45);
  background:
    radial-gradient(circle at 28% 26%, rgba(147,197,253,.36), transparent 42%),
    linear-gradient(145deg, rgba(14,165,233,.28), rgba(59,130,246,.22));
  color: #dbeafe;
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 10px 30px rgba(2,6,23,.4);
}

.setup-assistant-fab:hover {
  border-color: rgba(147,197,253,.9);
  box-shadow: 0 16px 40px rgba(2,6,23,.58);
  transform: translateY(-1px);
}

.setup-assistant-fab-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.16);
}

.setup-assistant-fab-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.setup-assistant-fab-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
}

.setup-assistant-popup {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 1300;
  width: min(390px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: 0 20px 44px rgba(2,6,23,.52);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.setup-assistant-popup.open { display: flex; }

.setup-assistant-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(15,23,42,.55);
}

.setup-assistant-popup-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
}

.setup-assistant-popup-close {
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  border-radius: 8px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 12px;
}

.setup-assistant-popup-close:hover { color: var(--text); border-color: var(--blue); }

.setup-assistant-popup-chat {
  height: 300px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.setup-assistant-popup-row {
  padding: 10px 12px 8px;
  border-top: 1px solid var(--border);
}

.setup-assistant-popup-note {
  font-size: 11px;
  color: var(--text3);
  padding: 0 12px 10px;
  line-height: 1.5;
}

html[dir="rtl"] .setup-assistant-fab {
  right: auto;
  left: 18px;
}

html[dir="rtl"] .setup-assistant-popup {
  right: auto;
  left: 18px;
}

/* ── VOICE ── */
.voice-btn {
  width:100%;
  padding:14px;
  background:var(--green-dim);
  border:1px solid rgba(34,197,94,.2);
  border-radius:var(--radius-sm);
  color:var(--green);
  cursor:pointer;
  font-family:'DM Sans',sans-serif;
  font-size:14px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  transition:all .18s;
  margin-top:8px;
}

.voice-btn:hover {
  background:rgba(34,197,94,.18);
  box-shadow:0 0 20px rgba(34,197,94,.15);
}

.voice-btn.active {
  background:var(--red-dim);
  border-color:rgba(239,68,68,.3);
  color:var(--red);
}

/* ── TWILIO BOX ── */
.twilio-row { display:flex; gap:9px; align-items:center; }
.twilio-row input { flex:1; font-family:'JetBrains Mono',monospace; font-size:12px; }

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(300px, 1fr);
  gap: 14px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekday {
  font-size: 10.5px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .7px;
  text-align: center;
  padding-bottom: 4px;
}

.calendar-day {
  border: 1px solid var(--border2);
  border-radius: 10px;
  min-height: 72px;
  padding: 8px;
  background: var(--surface2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.calendar-day:hover {
  border-color: rgba(59,130,246,.35);
}

.calendar-day.muted {
  opacity: .4;
}

.calendar-day.active {
  border-color: rgba(59,130,246,.65);
  background: rgba(59,130,246,.12);
}

.calendar-day-number {
  font-size: 12px;
  color: var(--text2);
}

.calendar-day-count {
  margin-top: 8px;
  font-size: 11px;
  color: var(--blue);
}

.appointment-split-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.appointment-split-tab {
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}

.appointment-split-tab.active {
  border-color: rgba(59,130,246,.55);
  color: #dbe9ff;
  background: rgba(59,130,246,.15);
}

.appointment-panel {
  display: none;
}

.appointment-panel.active {
  display: block;
}

.appointment-request-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.appointment-request-card {
  border: 1px solid var(--border2);
  border-radius: 9px;
  background: var(--surface2);
  padding: 8px 10px;
}

.appointment-request-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.appointment-request-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.appointment-request-meta {
  font-size: 10.5px;
  color: var(--text3);
  margin-bottom: 0;
}

.appointment-request-collapsible {
  padding: 0;
  overflow: hidden;
}

.appointment-request-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.appointment-request-summary::-webkit-details-marker {
  display: none;
}

.appointment-request-summary-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.appointment-request-body {
  border-top: 1px dashed var(--border2);
  padding: 8px 10px 10px;
}

.appointment-request-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.appointment-request-grid input,
.appointment-request-grid textarea {
  min-height: 30px;
  font-size: 12px;
  padding: 6px 8px;
}

.appointment-request-grid textarea {
  min-height: 52px;
  grid-column: 1 / -1;
}

.appointment-request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.appointment-request-plain .admin-user-email {
  font-size: 12px;
}

.appointment-request-plain .admin-user-status {
  font-size: 10.5px;
}

.appointment-request-empty {
  color: var(--text3);
  font-size: 12px;
  border: 1px dashed var(--border2);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.agent-actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-action-item {
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--surface2);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.agent-action-item.is-off {
  opacity: 0.72;
}

.agent-action-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(59,130,246,.14);
  color: #dbe9ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agent-action-body {
  min-width: 0;
  flex: 1;
}

.agent-action-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.agent-action-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text3);
  line-height: 1.5;
}

.agent-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.agent-action-config {
  margin-top: 10px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
}

.agent-action-config-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.agent-action-config-note {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.5;
}

.agent-action-prompt-box {
  width: 100%;
  min-height: 150px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
}

.agent-action-config-actions {
  margin-top: 10px;
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── EMPTY STATE ── */
.empty {
  text-align:center;
  padding:52px 20px;
  color:var(--text3);
}

.empty-icon { font-size:36px; margin-bottom:10px; opacity:.35; }
.empty-text { font-size:13.5px; }

/* ── SECTION LABEL ── */
.section-lbl {
  font-family:'JetBrains Mono',monospace;
  font-size:10.5px;
  color:var(--text3);
  text-transform:uppercase;
  letter-spacing:1.4px;
  margin-bottom:13px;
  display:flex;
  align-items:center;
  gap:10px;
}

.section-lbl::after { content:''; flex:1; height:1px; background:var(--border); }

/* ── LOADING ── */
.spin {
  display:inline-block;
  width:14px; height:14px;
  border:2px solid rgba(59,130,246,.3);
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin .65s linear infinite;
}

@keyframes spin { to { transform:rotate(360deg); } }

/* ── TOAST ── */
#toast {
  position:fixed;
  bottom:calc(22px + env(safe-area-inset-bottom, 0px));
  right:22px;
  left:auto;
  top:auto;
  background:var(--surface);
  border:1px solid var(--border2);
  border-radius:var(--radius-sm);
  padding:11px 18px;
  font-size:13.5px;
  display:flex;
  align-items:center;
  gap:10px;
  z-index:9999;
  opacity:0;
  transform:translateY(12px);
  transition:all .28s cubic-bezier(.4,0,.2,1);
  pointer-events:none;
  box-shadow:0 10px 36px rgba(0,0,0,.45);
  max-width:320px;
}

#toast.show { opacity:1; transform:translateY(0); }
#toast.ok   { border-left:3px solid var(--green); }
#toast.err  { border-left:3px solid var(--red); }
#toast.ok .toast-icon::before { content:'✓'; color:var(--green); }
#toast.err .toast-icon::before { content:'✕'; color:var(--red); }
.toast-icon { font-family:'JetBrains Mono',monospace; font-size:13px; font-weight:700; }

