:root {
  --primary: #2563eb;
  --secondary: #0f766e;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0284c7;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --sidebar-bg: #111827;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06), transparent 260px),
    var(--bg);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: box-shadow 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

button:hover:not(:disabled) {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 32%),
    linear-gradient(135deg, #f8fafc 0%, #e0f2fe 48%, #f1f5f9 100%);
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
  display: grid;
  gap: 22px;
}

.login-panel h1,
.topbar h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--info);
  text-transform: uppercase;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #94a3b8;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

.tall-textarea {
  min-height: 180px;
}

.primary,
.secondary,
.ghost,
.danger,
.icon-button {
  border: 0;
  border-radius: 6px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 700;
  white-space: nowrap;
}

.primary {
  background: linear-gradient(135deg, var(--primary), #0f766e);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.secondary {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ghost,
.icon-button {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid #e2e8f0;
}

.error-text {
  margin: 0;
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: var(--sidebar-bg);
  color: #e2e8f0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: grid;
  gap: 4px;
  padding: 0 10px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.18);
}

.brand strong {
  font-size: 19px;
}

.brand span {
  color: #94a3b8;
  font-size: 13px;
}

nav {
  display: grid;
  gap: 16px;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-title {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0 10px;
}

.nav-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  padding: 0 10px;
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.28);
  color: #fff;
}

.nav-item:hover {
  background: rgba(226, 232, 240, 0.09);
  color: #fff;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 900;
}

.badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--warning);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
}

.workspace {
  min-width: 0;
  overflow-x: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  background: rgba(246, 247, 251, 0.9);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.ok {
  background: #dcfce7;
  color: #166534;
}

.status.warn {
  background: #fef3c7;
  color: #92400e;
}

.status.off {
  background: #fee2e2;
  color: #991b1b;
}

.view {
  min-width: 0;
  overflow-x: hidden;
  padding: 24px 28px 36px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.module-hero {
  min-width: 0;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 253, 250, 0.96)),
    #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.module-hero h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.module-hero p:last-child {
  max-width: 740px;
  margin: 8px 0 0;
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  letter-spacing: 0;
}

.card h2 {
  font-size: 18px;
}

.card h3 {
  font-size: 15px;
}

.stat {
  display: grid;
  gap: 8px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.stat span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.stat strong {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0;
}

.accent-blue {
  border-top: 3px solid #2563eb;
}

.accent-green {
  border-top: 3px solid #10b981;
}

.accent-purple {
  border-top: 3px solid #7c3aed;
}

.accent-orange {
  border-top: 3px solid #f59e0b;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress.tall {
  height: 14px;
}

.progress > i {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--success), var(--info));
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--text-muted);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8fafc;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
}

.config-layout,
.lab-layout {
  align-items: start;
}

.transcript-input {
  min-height: 330px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.transcript-result {
  display: grid;
  gap: 14px;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.result-summary .stat {
  min-height: 92px;
  padding: 14px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.summary-line:last-of-type {
  border-bottom: 0;
}

.summary-line span {
  color: var(--text-muted);
}

.score {
  width: 96px;
  height: 8px;
  display: inline-block;
  margin-right: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  vertical-align: middle;
}

.score i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #10b981);
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 16px;
  min-height: 560px;
}

.conversation-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.conversation-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 7px;
  text-align: left;
}

.conversation-item.active {
  border-color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.chat {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 520px;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.chat-head p {
  margin: 4px 0 0;
}

.chat-log {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 4px 10px 0;
  max-height: 510px;
}

.mini-chat {
  min-height: 260px;
  max-height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.bubble {
  max-width: 78%;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f1f5f9;
  line-height: 1.45;
}

.bubble.user {
  justify-self: end;
  background: #dbeafe;
}

.bubble.agent {
  justify-self: end;
  background: #dcfce7;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-top: 12px;
}

.muted {
  color: var(--text-muted);
}

.code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
}

.qr {
  width: min(260px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  justify-self: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 128px;
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  color: var(--text-muted);
}

.empty-state strong {
  color: var(--text);
}

.empty-state p {
  max-width: 420px;
  margin: 0;
}

.integration-card {
  min-height: 178px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.onboarding-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
}

.step-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 168px;
}

.step-card span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.step-card.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.toast.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.toast.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.is-busy .view {
  cursor: progress;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.filter-bar .input-search {
  flex: 1 1 240px;
  min-width: 200px;
}

.filter-bar select,
.filter-bar .input-search {
  width: auto;
}

.input-search {
  max-width: 420px;
}

.filter-spacer {
  flex: 1 1 auto;
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 14px;
}

.inline-field input {
  width: auto;
}

.conversation-accordion {
  display: grid;
  gap: 8px;
  align-content: start;
}

.conv-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.conv-card.open {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.conv-summary {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: transparent;
  border: none;
  text-align: left;
}

.conv-summary:hover:not(:disabled) {
  box-shadow: none;
  background: #f8fafc;
}

.conv-caret {
  color: var(--text-muted);
  font-size: 12px;
}

.conv-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.conv-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conv-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.conv-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.conv-body {
  padding: 4px 16px 14px;
  border-top: 1px solid var(--border);
}

.bubble-time {
  font-size: 11px;
  font-weight: 400;
}

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  background: rgba(15, 23, 42, 0.45);
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px 24px 24px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-head .icon-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 18px;
  line-height: 1;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.as-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.profile-card {
  border-left: 4px solid var(--primary);
}

.profile-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.profile-avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #0f766e);
}

.profile-meta {
  display: grid;
  gap: 8px;
}

.profile-meta h2 {
  margin: 0;
}

.profile-meta p {
  margin: 0;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Detalle a pantalla completa (lista -> detalle + Volver) */
.detail-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.detail-bar-head {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.detail-bar-head h2 {
  margin: 0;
  font-size: 20px;
}

.detail-bar-head p {
  margin: 0;
  font-size: 13px;
}

.list-rows {
  display: grid;
  gap: 8px;
  align-content: start;
}

.list-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.list-row:hover:not(:disabled) {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.list-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.list-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-row-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.list-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  white-space: nowrap;
}

.list-row-arrow {
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}

tr[data-open-contact],
tr[data-open-appt] {
  cursor: pointer;
}

/* Sub-pestañas por tema (Configuracion / Integracion) */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.tab {
  border: 0;
  border-radius: 7px;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 700;
  background: transparent;
  color: var(--text-muted);
}

.tab:hover:not(:disabled) {
  background: #f1f5f9;
  box-shadow: none;
}

.tab.active {
  background: linear-gradient(135deg, var(--primary), #0f766e);
  color: #fff;
}

.detail-form {
  max-width: 660px;
}

.tab-panel {
  margin-top: 16px;
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.switch-line:hover {
  border-color: var(--primary);
}

.switch-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.integration-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft, #f8fafc);
}

.integration-status strong {
  display: block;
  font-size: 0.98rem;
}

.integration-status .muted {
  margin: 2px 0 0;
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .conv-meta,
  .list-row-meta {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .split,
  .onboarding-flow {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .result-summary {
    grid-template-columns: 1fr;
  }
}

/* Panel Administrador: tarjetas de cliente y barra "gestionando" del sidebar (act-as). */
.nav-item-back {
  color: #fff;
  background: rgba(226, 232, 240, 0.08);
}

.nav-managing {
  display: grid;
  gap: 2px;
  padding: 10px 12px 2px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}

.nav-managing strong {
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
}

.client-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.client-card-id {
  flex: 1 1 auto;
  min-width: 0;
}

.client-card-id h3 {
  margin: 0;
  font-size: 16px;
}

.client-card-id p {
  margin: 2px 0 0;
}

.section-label {
  margin: 4px 0 0;
}

/* Home del Administrador: mini-stats por cliente, pastillas de integracion y avisos. */
.client-metrics {
  display: flex;
  gap: 8px;
}

.client-metric {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.client-metric span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-metric strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.int-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.int-chip.on {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

.int-chip.off {
  color: var(--text-muted);
  background: var(--bg);
  border-color: var(--border);
}

.attention-list {
  display: grid;
  gap: 10px;
}

.attention-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.attention-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.attention-name:hover {
  text-decoration: underline;
}

.attention-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Modal de acceso (credenciales del cliente sobre la tarjeta) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.modal-card {
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

/* Horario del negocio: rejilla de dias con check de "abierto" + horas (Config › Orbi) */
.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hours-day {
  flex: 1 1 150px;
  min-width: 140px;
}

/* Cuando el dia esta cerrado (check off), atenuamos sus horas para que se vea de un vistazo */
.hours-day:has(input:not(:checked)) ~ .hours-times {
  opacity: 0.45;
}

.hours-times {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hours-times input[type="time"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--text);
}

.hours-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Subtitulo ligero dentro de una tarjeta y etiqueta de grupo de campos */
.subsection {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.field-label {
  font-weight: 600;
  margin-bottom: -2px;
}

/* Bloque "Ajustes avanzados" plegable para no abrumar la configuracion */
details.advanced {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-soft, #f8fafc);
}

details.advanced > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: revert;
}

details.advanced[open] > summary {
  margin-bottom: 4px;
}

/* Aviso contextual (p.ej. reseñas en modo demo) destacado pero no alarmante */
.notice-line {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--warning);
  border-left-width: 4px;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.88rem;
  line-height: 1.45;
}
