/* Gusi assistant — Gráfica Magro (imprenta). Variants: layout=page | layout=embed */
.gusi-assistant {
  --gusi-yellow: #f6d76b;
  --gusi-pink: #e65297;
  --gusi-yellow-light: rgba(246, 215, 107, 0.28);
  --gusi-pink-light: rgba(230, 82, 151, 0.18);
  --gusi-body-font: 'Plus Jakarta Sans', sans-serif;
  --gusi-font-small: clamp(0.7rem, 2vw, 12px);
  --gusi-font-base: clamp(0.8rem, 2.2vw, 14px);
  --gusi-font-big: clamp(0.85rem, 2.5vw, 16px);
  --gusi-touch-min: min(44px, 12vmin);
  /* Dark GM theme (portal + landing embed) */
  --gusi-surface: #0a0a0a;
  --gusi-surface-card: #111111;
  --gusi-surface-elevated: #1a1a1a;
  --gusi-text: #f0f0f0;
  --gusi-text-muted: #b0b0b0;
  --gusi-text-key: #f6d76b;
  --gusi-border: rgba(230, 82, 151, 0.35);
  --gusi-border-subtle: rgba(255, 255, 255, 0.1);
  font-family: var(--gusi-body-font);
  color: var(--gusi-text);
}

.gusi-assistant *,
.gusi-assistant *::before,
.gusi-assistant *::after {
  box-sizing: border-box;
}

/* Mobile tabs (Chat | Resumen) */
.gusi-mobile-tabs {
  display: none;
  flex-shrink: 0;
  gap: 0;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(230, 82, 151, 0.35);
}
.gusi-mobile-tab {
  position: relative;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gusi-text);
  font-weight: 600;
  font-size: var(--gusi-font-base);
  padding: 0.65rem 1rem;
  min-height: var(--gusi-touch-min);
  cursor: pointer;
}
.gusi-mobile-tab.active {
  background: linear-gradient(135deg, #000 0%, var(--gusi-pink) 100%);
  color: #fff;
}
.gusi-tab-badge {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--gusi-yellow);
  box-shadow: 0 0 0 2px rgba(246, 215, 107, 0.35);
  flex-shrink: 0;
  animation: gusi-tab-badge-pulse 1.5s ease-in-out infinite;
}
.gusi-tab-badge[hidden] {
  display: none !important;
}
@keyframes gusi-tab-badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.15); }
}
.gusi-summary-nudge {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(246, 215, 107, 0.35);
  background: rgba(246, 215, 107, 0.1);
  color: var(--gusi-text);
  font-size: var(--gusi-font-small);
  line-height: 1.45;
  cursor: pointer;
}
.gusi-summary-nudge[hidden] {
  display: none !important;
}
.gusi-summary-nudge strong {
  color: var(--gusi-yellow);
}
@media (min-width: 992px) {
  .gusi-tab-badge,
  .gusi-summary-nudge {
    display: none !important;
  }
}

.gusi-assistant-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
  min-height: 280px;
}
.gusi-summary-col,
.gusi-chat-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* Cards */
.gusi-chat-card,
.gusi-summary-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--gusi-pink-light);
  border: 1px solid rgba(230, 82, 151, 0.35);
  display: flex;
  flex-direction: column;
  width: 100%;
}
.gusi-chat-card {
  max-height: min(calc(100dvh - 160px), 75dvh);
  min-height: 280px;
  background: var(--gusi-surface-card);
}
.gusi-summary-card {
  border-left: 4px solid var(--gusi-yellow);
  background: var(--gusi-surface-card);
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gusi-panel-header {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #000 0%, #2d1b2d 50%, var(--gusi-pink) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(230, 82, 151, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.gusi-panel-header .gusi-panel-title {
  font-weight: 700;
  font-size: var(--gusi-font-big);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gusi-panel-header .gusi-panel-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.gusi-panel-body {
  padding: 1.25rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--gusi-surface-card);
  color: var(--gusi-text);
}
.gusi-chat-usage {
  flex-shrink: 0;
}
.gusi-chat-usage .progress {
  height: 6px;
  background: var(--gusi-yellow-light);
}
.gusi-chat-usage .progress-bar {
  background: var(--gusi-pink);
}
.gusi-chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gusi-yellow) var(--gusi-yellow-light);
}
.gusi-chat-scroll::-webkit-scrollbar { width: 10px; }
.gusi-chat-scroll::-webkit-scrollbar-track { background: var(--gusi-yellow-light); border-radius: 5px; }
.gusi-chat-scroll::-webkit-scrollbar-thumb { background: var(--gusi-yellow); border-radius: 5px; }

.gusi-chat-intro {
  font-size: var(--gusi-font-small);
  margin: 0 0 0.25rem;
  line-height: 1.4;
  color: var(--gusi-text-muted);
  flex-shrink: 0;
}
.gusi-canva-guide {
  color: var(--gusi-text-muted);
}
.gusi-chat-messages {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem 0;
}
.gusi-msg-wrap { display: flex; width: 100%; }
.gusi-msg-wrap.gusi-msg-user { justify-content: flex-end; }
.gusi-msg-wrap.gusi-msg-assistant { justify-content: flex-start; }
.gusi-msg {
  max-width: 88%;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: var(--gusi-font-small);
  line-height: 1.45;
  word-break: break-word;
}
.gusi-msg-user-bubble {
  background: var(--gusi-pink);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.gusi-msg-assistant-bubble {
  background: rgba(246, 215, 107, 0.12);
  color: var(--gusi-text);
  border: 1px solid rgba(246, 215, 107, 0.25);
  border-bottom-left-radius: 4px;
}
.gusi-msg-markdown .gusi-md-code { background: rgba(255,255,255,0.1); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; color: var(--gusi-text); }
.gusi-msg-markdown .gusi-md-h2 { font-size: 1em; font-weight: 700; margin: 0.5em 0 0.25em; color: var(--gusi-text); }
.gusi-msg-markdown .gusi-md-h3 { font-size: 0.95em; font-weight: 700; margin: 0.5em 0 0.2em; color: var(--gusi-text); }
.gusi-msg-markdown .gusi-md-h4 { font-size: 0.9em; font-weight: 700; margin: 0.4em 0 0.2em; color: var(--gusi-text); }
.gusi-msg-markdown .gusi-md-ul { margin: 0.25em 0; padding-left: 1.2em; }
.gusi-msg-markdown .gusi-md-li { margin-bottom: 0.15em; }
.gusi-msg-markdown strong { font-weight: 700; }
.gusi-msg-markdown em { font-style: italic; }

.gusi-input-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(230, 82, 151, 0.35);
  flex-shrink: 0;
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
}
.gusi-input-wrap textarea {
  font-size: 16px;
  min-height: var(--gusi-touch-min);
  flex: 1 1 0;
  min-width: 0;
  border: none;
  resize: none;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gusi-text);
}
.gusi-input-wrap textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.gusi-btn-send {
  background: var(--gusi-pink);
  color: #fff;
  border: 1px solid var(--gusi-pink);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  min-height: var(--gusi-touch-min);
  flex: 0 0 auto;
  max-width: 35%;
  min-width: 4rem;
  cursor: pointer;
}
.gusi-btn-send:hover:not(:disabled) {
  background: #d14487;
  border-color: #d14487;
}
.gusi-btn-send:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Summary panel */
.gusi-summary-scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.gusi-summary-body {
  padding: 1.25rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: var(--gusi-font-small);
  color: var(--gusi-text);
  scrollbar-width: thin;
  scrollbar-color: var(--gusi-yellow) rgba(246, 215, 107, 0.15);
}
.gusi-summary-empty { color: var(--gusi-text-muted); line-height: 1.5; margin: 0; }
.gusi-summary-list { list-style: none; padding: 0; margin: 0; }
.gusi-summary-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(246, 215, 107, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.gusi-summary-item:last-child { border-bottom: none; }
.gusi-summary-item-key {
  font-weight: 600;
  color: var(--gusi-text-key);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.gusi-summary-item-value { color: var(--gusi-text); line-height: 1.4; }
.gusi-summary-sublist { list-style: none; padding-left: 0; margin: 0.35rem 0 0; }
.gusi-summary-sublist li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.9em;
  line-height: 1.4;
}
.gusi-summary-sublist li::before {
  content: "• ";
  position: absolute;
  left: 0;
  color: var(--gusi-pink);
  font-weight: 700;
}
.gusi-summary-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(246, 215, 107, 0.15);
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--gusi-surface-card);
  color: var(--gusi-text);
}
.gusi-btn-confirm {
  background: var(--gusi-pink);
  border: 1px solid var(--gusi-pink);
  color: #fff;
  font-weight: 600;
  min-height: 44px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
}
.gusi-btn-confirm:hover:not(:disabled) { background: #d14487; border-color: #d14487; }
.gusi-btn-confirm:disabled { opacity: 0.55; cursor: not-allowed; }
.gusi-btn-confirm-wa { background: #25D366; border-color: #25D366; }
.gusi-btn-confirm-wa:hover:not(:disabled) { background: #20BD5A; border-color: #20BD5A; }
.gusi-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(246, 215, 107, 0.4);
  background: rgba(246, 215, 107, 0.08);
  color: var(--gusi-yellow);
  font-size: var(--gusi-font-base);
  font-weight: 600;
  font-family: var(--gusi-body-font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.gusi-btn-secondary:hover {
  background: rgba(246, 215, 107, 0.16);
  border-color: var(--gusi-yellow);
  color: #fff;
}
.gusi-btn-secondary-accent {
  border-color: rgba(230, 82, 151, 0.5);
  background: rgba(230, 82, 151, 0.15);
  color: #ffb8d9;
}
.gusi-btn-secondary-accent:hover {
  background: rgba(230, 82, 151, 0.28);
  border-color: var(--gusi-pink);
  color: #fff;
}
.gusi-footer-meta {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(246, 215, 107, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.gusi-memory-hint {
  margin: 0;
  font-size: var(--gusi-font-small);
  color: var(--gusi-text-muted);
  line-height: 1.4;
}
.gusi-outreach-preview {
  white-space: pre-wrap;
  max-height: 120px;
  overflow: auto;
  font-size: var(--gusi-font-small);
  color: var(--gusi-text-muted);
  margin: 0;
  display: none;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--gusi-border-subtle);
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.gusi-order-feedback {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: var(--gusi-font-small);
  color: #bbf7d0;
}
.gusi-order-feedback a { font-weight: 600; color: #86efac; }

/* Bootstrap overrides inside Gusi (dark GM theme) */
.gusi-assistant .text-muted {
  color: var(--gusi-text-muted) !important;
}
.gusi-assistant .text-success {
  color: #86efac !important;
}
.gusi-assistant .text-warning {
  color: #fcd34d !important;
}
.gusi-assistant .text-danger {
  color: #f87171 !important;
}
.gusi-assistant .form-check-label,
.gusi-assistant .form-check-label span,
.gusi-assistant #gusiAgreeLabel span {
  color: var(--gusi-text);
}
.gusi-assistant #gusiUsageText,
.gusi-assistant #gusiConfirmStatus {
  color: var(--gusi-text);
}
.gusi-assistant .form-select,
.gusi-assistant .form-control {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--gusi-text);
}
.gusi-assistant .form-select:focus,
.gusi-assistant .form-control:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--gusi-pink);
  color: var(--gusi-text);
  box-shadow: 0 0 0 0.2rem rgba(230, 82, 151, 0.25);
}
.gusi-assistant .form-check-input {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}
.gusi-assistant .form-check-input:checked {
  background-color: var(--gusi-pink);
  border-color: var(--gusi-pink);
}
.gusi-assistant .progress {
  background: rgba(255, 255, 255, 0.1);
}
/* Page layout */
.gusi-layout-page .gusi-assistant-layout {
  flex: 0 0 auto;
  min-height: 200px;
}
@media (min-width: 992px) {
  .gusi-layout-page .gusi-summary-col.gusi-tab-hidden,
  .gusi-layout-page .gusi-chat-col.gusi-tab-hidden {
    display: flex !important;
  }
  .gusi-layout-page .gusi-assistant-layout {
    flex-wrap: nowrap;
    min-height: 720px;
  }
  .gusi-layout-page .gusi-summary-col {
    flex: 0 0 min(360px, 34%);
    max-width: 360px;
  }
  .gusi-layout-page .gusi-chat-col { flex: 1; min-width: 0; }
  .gusi-layout-page .gusi-chat-card {
    flex: 1;
    min-height: 700px;
    max-height: 85vh;
  }
  .gusi-layout-page .gusi-chat-scroll { min-height: 420px; }
}
@media (max-width: 991px) {
  .gusi-layout-page .gusi-mobile-tabs {
    display: flex;
  }
  .gusi-layout-page .gusi-assistant-layout {
    flex-direction: column;
    min-height: 0;
  }
  .gusi-layout-page .gusi-summary-col.gusi-tab-hidden,
  .gusi-layout-page .gusi-chat-col.gusi-tab-hidden {
    display: none;
  }
  .gusi-layout-page .gusi-summary-col:not(.gusi-tab-hidden),
  .gusi-layout-page .gusi-chat-col:not(.gusi-tab-hidden) {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .gusi-layout-page .gusi-chat-card,
  .gusi-layout-page .gusi-summary-card {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
}

/* Page layout — same dark GM shell as embed on portal */
.gusi-layout-page {
  color: var(--gusi-text);
}
.gusi-layout-page .gusi-summary-card {
  background: rgba(246, 215, 107, 0.06);
  border-color: rgba(246, 215, 107, 0.25);
}

/* Embed layout (landing GM) — full width, chat arriba / resumen abajo */
.gusi-layout-embed {
  width: 100%;
  min-width: 0;
  background: var(--gm-dark, #111);
  border: 1px solid rgba(230, 82, 151, 0.3);
  border-radius: 1rem;
  overflow: visible;
  color: #fff;
}
.gusi-layout-embed .gusi-mobile-tabs {
  display: none !important;
}
.gusi-layout-embed .gusi-embed-header {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #000 0%, var(--gusi-pink) 100%);
  font-weight: 600;
  font-size: 0.9375rem;
}
.gusi-layout-embed .gusi-embed-inner {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.gusi-layout-embed .gusi-assistant-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-height: 0;
}
.gusi-layout-embed .gusi-chat-col {
  order: 1;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}
.gusi-layout-embed .gusi-summary-col {
  order: 2;
  width: 100%;
  flex: 0 0 auto;
  display: flex !important;
  flex-direction: column;
}
@media (min-width: 1200px) {
  .gusi-layout-embed .gusi-assistant-layout {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.25rem;
  }
  .gusi-layout-embed .gusi-chat-col {
    order: 0;
    flex: 1 1 0;
    min-width: 0;
  }
  .gusi-layout-embed .gusi-summary-col {
    order: 0;
    flex: 0 0 min(380px, 36%);
    max-width: 380px;
    min-width: min(100%, 18rem);
  }
  .gusi-layout-embed .gusi-chat-card {
    min-height: min(68dvh, 40rem);
    max-height: min(78dvh, 46rem);
    height: 100%;
  }
  .gusi-layout-embed .gusi-summary-card {
    min-height: min(68dvh, 40rem);
    max-height: min(78dvh, 46rem);
    height: 100%;
  }
  .gusi-layout-embed .gusi-summary-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
}
.gusi-layout-embed .gusi-summary-col.gusi-tab-hidden,
.gusi-layout-embed .gusi-chat-col.gusi-tab-hidden {
  display: flex !important;
}
.gusi-layout-embed .gusi-chat-card {
  width: 100%;
  min-height: min(52dvh, 30rem);
  max-height: min(62dvh, 36rem);
}
.gusi-layout-embed .gusi-summary-card {
  width: 100%;
  min-height: auto;
  max-height: none;
  height: auto;
}
.gusi-layout-embed .gusi-chat-scroll {
  min-height: 12rem;
}
.gusi-layout-embed .gusi-canva-guide {
  display: none;
}
.gusi-layout-embed .gusi-chat-intro {
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}
.gusi-layout-embed .gusi-pedido-bar {
  padding: 0.5rem 0.65rem 0.4rem;
  flex-shrink: 0;
}
.gusi-layout-embed .gusi-summary-body {
  padding: 0.85rem 1rem;
  max-height: none;
  overflow: visible;
}
.gusi-layout-embed .gusi-summary-footer {
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.gusi-layout-embed .gusi-btn-send {
  max-width: 9rem;
  font-size: 0.8125rem;
}
.gusi-layout-embed .gusi-panel-body {
  padding: 0.85rem 1rem;
  gap: 0.75rem;
}
.gusi-layout-embed .gusi-msg {
  max-width: 94%;
}
.gusi-layout-embed .gusi-summary-card {
  background: rgba(246, 215, 107, 0.06);
  border-color: rgba(246, 215, 107, 0.25);
}
.gusi-layout-embed .gusi-summary-body { color: var(--gm-gray-light, #ccc); }
.gusi-layout-embed .gusi-summary-item-value { color: #eee; }
.gusi-layout-embed .gusi-summary-empty { color: var(--gm-gray-light, #aaa); }
.gusi-layout-embed .gusi-msg-assistant-bubble {
  background: rgba(255, 255, 255, 0.06);
  color: #eee;
  border-color: rgba(255, 255, 255, 0.1);
}
.gusi-layout-embed .gusi-msg-user-bubble {
  background: rgba(230, 82, 151, 0.25);
}
.gusi-layout-embed .gusi-chat-intro,
.gusi-layout-embed .gusi-canva-guide { color: var(--gm-gray-light, #aaa); }
.gusi-layout-embed .gusi-input-wrap textarea {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.gusi-layout-embed .gusi-input-wrap textarea::placeholder { color: rgba(255,255,255,0.45); }
.gusi-layout-embed .gusi-mobile-tab {
  background: rgba(255, 255, 255, 0.06);
  color: #eee;
}
.gusi-layout-embed .gusi-summary-footer .form-check-label { color: #eee; font-size: var(--gusi-font-small); }
.gusi-layout-embed .gusi-footer-meta {
  border-top-color: rgba(246, 215, 107, 0.2);
}
.gusi-layout-embed .gusi-memory-hint {
  color: var(--gm-gray-light, #aaa);
}
.gusi-layout-embed .gusi-btn-secondary {
  border-color: rgba(246, 215, 107, 0.4);
  background: rgba(246, 215, 107, 0.08);
  color: var(--gusi-yellow);
}
.gusi-layout-embed .gusi-btn-secondary:hover {
  background: rgba(246, 215, 107, 0.16);
  border-color: var(--gusi-yellow);
  color: #fff;
}
.gusi-layout-embed .gusi-btn-secondary-accent {
  border-color: rgba(230, 82, 151, 0.5);
  background: rgba(230, 82, 151, 0.15);
  color: #ffb8d9;
}
.gusi-layout-embed .gusi-btn-secondary-accent:hover {
  background: rgba(230, 82, 151, 0.28);
  border-color: var(--gusi-pink);
  color: #fff;
}
.gusi-layout-embed .gusi-outreach-preview {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.5rem;
  padding: 0.75rem;
  color: var(--gm-gray-light, #ccc);
}
.gusi-login-banner {
  background: rgba(246, 215, 107, 0.12);
  border: 1px solid rgba(246, 215, 107, 0.35);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: var(--gusi-text);
}
.gusi-login-banner a { color: var(--gusi-yellow); font-weight: 600; }
.gusi-agree-error { border-color: #f87171 !important; background: rgba(248, 113, 113, 0.12) !important; }
.gusi-agree-error-msg { font-size: 0.8125rem; color: #f87171; margin: 0; font-weight: 600; }

.gusi-pedido-bar {
  padding: 0.65rem 0.75rem 0.5rem;
  border-bottom: 1px solid var(--gusi-border-subtle);
  background: rgba(0, 0, 0, 0.25);
  color: var(--gusi-text);
}
.gusi-layout-page .gusi-pedido-bar {
  margin-bottom: 0.5rem;
  border: 1px solid var(--gusi-border-subtle);
  border-radius: 0.5rem;
  border-bottom: 1px solid var(--gusi-border-subtle);
}
.gusi-pedido-bar label {
  color: var(--gusi-text);
}
/* Pedido select — GM dark/pink theme; overrides Bootstrap + portal form-select */
.gusi-assistant .gusi-pedido-select,
.gusi-assistant #gusiPedidoSelect {
  --gusi-pedido-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23f6d76b' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: dark;
  max-width: 100%;
  width: 100%;
  padding: 0.45rem 2.1rem 0.45rem 0.75rem;
  border: 1px solid var(--gusi-border);
  border-radius: 8px;
  font-family: var(--gusi-body-font);
  font-size: var(--gusi-font-base);
  font-weight: 500;
  line-height: 1.4;
  color: var(--gusi-text);
  background-color: var(--gusi-surface-elevated);
  background-image: var(--gusi-pedido-select-chevron),
    linear-gradient(135deg, #0a0a0a 0%, #2d1b2d 55%, rgba(230, 82, 151, 0.22) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: right 0.65rem center, 0 0;
  background-size: 14px 10px, 100% 100%;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.gusi-assistant .gusi-pedido-select:hover,
.gusi-assistant #gusiPedidoSelect:hover {
  border-color: rgba(230, 82, 151, 0.6);
  background-color: #222;
}
.gusi-assistant .gusi-pedido-select:focus,
.gusi-assistant #gusiPedidoSelect:focus {
  outline: none;
  border-color: var(--gusi-pink);
  color: var(--gusi-text);
  background-color: var(--gusi-surface-elevated);
  background-image: var(--gusi-pedido-select-chevron),
    linear-gradient(135deg, #0a0a0a 0%, #2d1b2d 55%, rgba(230, 82, 151, 0.28) 100%);
  box-shadow: 0 0 0 0.2rem rgba(230, 82, 151, 0.25);
}
.gusi-assistant .gusi-pedido-select option,
.gusi-assistant #gusiPedidoSelect option {
  background-color: var(--gusi-surface-elevated);
  color: var(--gusi-text);
}
.gusi-assistant .gusi-pedido-select option:checked,
.gusi-assistant #gusiPedidoSelect option:checked {
  background: linear-gradient(135deg, #1a1a1a 0%, rgba(230, 82, 151, 0.35) 100%);
  color: #fff;
}
/* Portal GM theme sets `background` on all .form-select — restore pedido styling */
body.portal-theme-grafica main.container .gusi-assistant .gusi-pedido-select,
body.portal-theme-grafica main.container .gusi-assistant #gusiPedidoSelect {
  color: var(--gusi-text);
  background-color: var(--gusi-surface-elevated);
  background-image: var(--gusi-pedido-select-chevron),
    linear-gradient(135deg, #0a0a0a 0%, #2d1b2d 55%, rgba(230, 82, 151, 0.22) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: right 0.65rem center, 0 0;
  background-size: 14px 10px, 100% 100%;
  border-color: var(--gusi-border);
}
body.portal-theme-grafica main.container .gusi-assistant .gusi-pedido-select:focus,
body.portal-theme-grafica main.container .gusi-assistant #gusiPedidoSelect:focus {
  color: var(--gusi-text);
  background-color: var(--gusi-surface-elevated);
  border-color: var(--gusi-pink);
}
.gusi-pedido-badge {
  color: var(--gusi-yellow);
  font-weight: 600;
}

/* Page intro (portal /asistente/) on dark GM theme */
body.portal-theme-grafica .gusi-page-intro {
  color: var(--gm-text, #f5f5f5);
}
body.portal-theme-grafica .gusi-page-intro .text-muted {
  color: var(--gm-text-muted, #b0b0b0) !important;
}
body.portal-theme-grafica .gusi-page-intro a {
  color: var(--gm-accent-yellow, #f6d76b);
}
body.portal-theme-grafica .gusi-page-intro a:hover {
  color: var(--gm-accent-pink, #e65297);
}
body.portal-theme-grafica .gusi-page-intro h1 {
  color: #fff;
}

@media (max-width: 576px) {
  .gusi-panel-body { padding: 0.5rem 0.75rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); }
  .gusi-summary-footer { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .gusi-btn-confirm { min-height: 38px; font-size: 0.9rem; }
  .gusi-assistant .gusi-pedido-select,
  .gusi-assistant #gusiPedidoSelect {
    min-height: var(--gusi-touch-min);
    font-size: max(16px, var(--gusi-font-base));
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
  .gusi-pedido-bar {
    padding: 0.55rem 0.65rem 0.45rem;
  }
  .gusi-layout-embed .gusi-embed-header {
    padding: 0.65rem 0.75rem;
    font-size: 0.875rem;
  }
  .gusi-layout-embed .gusi-embed-inner {
    padding: 0.65rem;
  }
  .gusi-layout-embed .gusi-chat-scroll {
    min-height: 10rem;
  }
  .gusi-layout-embed .gusi-input-wrap textarea {
    min-height: 3rem;
    font-size: 16px;
  }
  .gusi-layout-embed .gusi-btn-send {
    max-width: 42%;
    min-width: 3.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.8125rem;
  }
  .gusi-layout-embed .gusi-mobile-tab {
    padding: 0.6rem 0.65rem;
    font-size: 0.8125rem;
  }
}
