/* ============================================
   ISA — Suporte TI | Design System (Light Theme)
   ============================================ */

:root {
  /* Cores - Baseadas no chat.html */
  --primary: #0099ff;
  --header-bg: #0088cc;
  --bg-color: #ffffff;
  --chat-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --bot-bubble: #f0f0f0;
  --user-bubble: #0088cc;
  --user-text: #ffffff;
  --border: #e0e0e0;
  --input-bg: #f9f9f9;

  /* Sidebar Specifics (adapted for light theme) */
  --sidebar-bg: #f5f7fa;
  --sidebar-width: 300px;
  --sidebar-border: #e0e0e0;

  /* Accents */
  --accent-green: #10b981;
  --accent-green-bg: #d1fae5;
  --accent-orange: #f59e0b;
  --accent-orange-bg: #fef3c7;
  --accent-red: #ef4444;
  --accent-red-bg: #fee2e2;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

/* ============================================
   App Layout
   ============================================ */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ============================================
   Sidebar (Adapted for Light Theme)
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--sidebar-border);
  background: white;
}

.agent-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: white;
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
}

.status-dot.online {
  background: var(--accent-green);
}

.agent-info h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.agent-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: auto;
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

@media (min-width: 901px) {
  body:not(.is-widget) .sidebar-close-btn {
    display: none;
  }
}

/* User Panel */
.user-panel,
.equipment-panel,
.ticket-panel {
  padding: 16px 20px;
  border-bottom: 1px solid var(--sidebar-border);
}

.user-panel h3,
.equipment-panel h3,
.ticket-panel h3 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 8px;
}

.data-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.data-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
  font-weight: 500;
}

/* Loading Skeleton */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Permission Badges */
.permissions-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.perm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.perm-badge.granted {
  background: var(--accent-green-bg);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.perm-badge.denied {
  background: var(--accent-red-bg);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Ticket Card */
.ticket-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.ticket-number {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.ticket-status {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--accent-green-bg);
  color: #047857;
}

.ticket-desc {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ============================================
   Chat Container
   ============================================ */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--chat-bg);
}

/* Header */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 10;
  flex-shrink: 0;
  min-height: 56px;
  box-sizing: border-box;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  opacity: 0.9;
  transition: opacity 0.2s, background-color 0.2s;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}

.sidebar-toggle:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.sidebar-toggle svg {
  display: block;
  margin: auto;
}

.header-avatar {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.header-info h1 {
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
  margin-top: 2px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.4);
  display: inline-block;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
  height: 100%;
}

/* Alinhamento uniforme para qualquer item filho de header-actions (nativo ou injetado por hosts desktop) */
.header-actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0;
  line-height: 1;
}

.header-actions button,
.header-actions a,
.header-actions .refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-sm);
  opacity: 0.9;
  transition: opacity 0.2s, background-color 0.2s;
  box-sizing: border-box;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

.header-actions button:hover,
.header-actions a:hover,
.header-actions .refresh-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.header-actions svg {
  display: block;
  margin: auto;
  flex-shrink: 0;
}

.connection-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  flex-shrink: 0;
}

.connection-badge.connected {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}

/* ============================================
   Messages Area
   ============================================ */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px 10%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
  background: var(--chat-bg);
}

/* Scrollbar */
.messages-area::-webkit-scrollbar {
  width: 8px;
}

.messages-area::-webkit-scrollbar-track {
  background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* Brand Container (Hero) */
.brand-container {
  text-align: center;
  margin: 40px auto 30px;
  padding-bottom: 20px;
  animation: fadeIn 0.5s ease-out;
}

.brand-avatar {
  width: 105px;
  height: 105px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border: 4px solid white;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  font-size: 25px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 5px;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Message Bubbles */
.message {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.agent {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.msg-bubble {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message.agent .msg-bubble {
  background: var(--bot-bubble);
  color: var(--text-primary);
  border-top-left-radius: 2px;
}

.message.user .msg-bubble {
  background: var(--user-bubble);
  color: var(--user-text);
  border-top-right-radius: 2px;
}

.msg-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
  padding: 0 4px;
}

.message.user .msg-time {
  text-align: right;
}

/* Markdown Styles */
.msg-bubble p {
  margin-bottom: 8px;
}

.msg-bubble p:last-child {
  margin-bottom: 0;
}

.msg-bubble strong {
  font-weight: 700;
}

.msg-bubble code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

/* Streaming Token Cursor */
.msg-bubble.streaming-bubble::after {
  content: "▋";
  display: inline-block;
  vertical-align: baseline;
  margin-left: 2px;
  font-size: 0.85em;
  color: var(--primary, #0078d4);
  animation: blink-stream-cursor 0.8s infinite;
}

@keyframes blink-stream-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Acessibilidade para leitores de tela */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Typing Indicator (Modern & Premium Design)
   ============================================ */
.typing-indicator {
  display: flex;
  align-self: flex-start;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  animation: typingFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.typing-indicator .msg-avatar {
  box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.25);
  transition: transform 0.2s ease;
}

.typing-indicator .msg-bubble.typing-bubble {
  padding: 11px 18px;
  background: linear-gradient(145deg, #ffffff 0%, #f4f7fb 100%);
  border: 1px solid rgba(0, 153, 255, 0.18);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 4px 16px rgba(0, 153, 255, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: fit-content;
  position: relative;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 2px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #00aaff 0%, #0077dd 100%);
  border-radius: 50%;
  display: inline-block;
  animation: modernTypingWave 1.3s infinite ease-in-out both;
  box-shadow: 0 1px 3px rgba(0, 153, 255, 0.3);
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes modernTypingWave {
  0%,
  80%,
  100% {
    transform: translateY(0) scale(0.8);
    opacity: 0.35;
    box-shadow: none;
  }

  40% {
    transform: translateY(-5px) scale(1.15);
    opacity: 1;
    box-shadow: 0 3px 8px rgba(0, 153, 255, 0.55);
  }
}

@keyframes typingFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   Escalation Banner
   ============================================ */
.escalation-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 10% 20px;
  padding: 16px 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  color: #1e40af;
}

.escalation-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.escalation-text strong {
  display: block;
  margin-bottom: 4px;
}

.escalation-text p {
  font-size: 0.9rem;
  margin: 0 0 10px 0;
}

.escalation-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.escalation-btn:hover {
  background: #0077cc;
  transform: scale(1.03);
}

/* ============================================
   Input Area
   ============================================ */
.input-area {
  padding: 15px 10%;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper textarea {
  width: 100%;
  padding: 12px 45px 12px 20px;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--input-bg);
  resize: none;
  font-family: inherit;
  line-height: 1.5;
  height: 48px;
  /* Initial height */
  max-height: 120px;
}

.input-wrapper textarea:focus {
  border-color: var(--primary);
  background: white;
}

.send-button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.send-button:hover {
  background: #0077cc;
}

.send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.input-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Flow ended */
.input-area.flow-ended {
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
  }

  .messages-area {
    padding: 20px 15px;
  }

  .input-area {
    padding: 15px;
  }

  .escalation-banner {
    margin: 0 15px 20px;
  }
}

/* ============================================
   Widget Mode (embedded via iframe / desktop host)
   ============================================ */
.is-widget .sidebar-toggle {
  display: inline-flex !important;
}

.is-widget .sidebar {
  display: flex !important;
  position: fixed !important;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  background: var(--sidebar-bg, #f5f7fa);
}

.is-widget .sidebar.open {
  transform: translateX(0) !important;
}

.is-widget .app-container {
  height: 100vh;
  width: 100vw;
}

.is-widget .chat-header {
  padding: 8px 12px;
  gap: 8px;
  min-height: 52px;
}

.is-widget .chat-header .header-info h1 {
  font-size: 1rem;
}

.is-widget .chat-header .header-status {
  font-size: 0.75rem;
}

.is-widget .header-actions {
  gap: 6px;
}

.is-widget .header-actions button,
.is-widget .header-actions a,
.is-widget .header-actions .refresh-btn {
  width: 30px;
  height: 30px;
}

.is-widget .connection-badge {
  height: 24px;
  padding: 0 10px;
  font-size: 0.7rem;
}

.is-widget .messages-area {
  padding: 16px 12px;
}

.is-widget .brand-container {
  margin: 20px auto 16px;
}

.is-widget .brand-avatar {
  width: 64px;
  height: 64px;
}

.is-widget .brand-title {
  font-size: 20px;
}

.is-widget .brand-subtitle {
  font-size: 12px;
}

.is-widget .message {
  max-width: 90%;
}

.is-widget .input-area {
  padding: 10px 12px;
}

.is-widget .input-hint {
  display: none;
}

.is-widget .escalation-banner {
  margin: 0 12px 12px;
}

/* SSO Overlay */
#ssoOverlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.95);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}
.sso-card {
  background: #1e293b; padding: 3rem 2rem; border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  max-width: 400px; width: 90%;
}
.sso-card img { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1rem; border: 2px solid #3b82f6;}
.sso-card h2 { color: white; margin-bottom: 0.5rem; }
.sso-card p { color: #94a3b8; margin-bottom: 2rem; font-size: 0.95rem; }
.btn-msal {
  background: #0078D4; color: white; border: none; padding: 0.8rem 1.5rem;
  border-radius: 4px; font-weight: 600; cursor: pointer; display: inline-flex;
  align-items: center; gap: 10px; font-size: 1rem; width: 100%; justify-content: center;
  transition: background 0.2s;
}
.btn-msal:hover { background: #106ebe; }
.btn-msal:disabled { opacity: 0.7; cursor: not-allowed; }

/* High Priority Banner & Comunicado Overlay */
.hp-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.5vw, 24px);
  padding-top: max(clamp(10px, 2.5vw, 24px), env(safe-area-inset-top, 0px));
  padding-bottom: max(clamp(10px, 2.5vw, 24px), env(safe-area-inset-bottom, 0px));
  padding-left: max(clamp(10px, 2.5vw, 24px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(10px, 2.5vw, 24px), env(safe-area-inset-right, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.hp-overlay-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 580px;
  max-height: min(92dvh, 760px);
  background: #111b2e;
  border: 1.5px solid #ef4444;
  border-radius: 14px;
  padding: clamp(14px, 2.5vh, 22px) clamp(14px, 3vw, 22px) clamp(12px, 2vh, 18px);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.65);
  color: #f8fafc;
  text-align: center;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-overlay-card.is-aviso {
  border-color: #3b82f6;
  box-shadow: 0 20px 45px -10px rgba(59, 130, 246, 0.3);
}

.hp-overlay-card.is-alerta {
  border-color: #ef4444;
  box-shadow: 0 20px 45px -10px rgba(239, 68, 68, 0.3);
}

.hp-overlay-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.4vh, 12px);
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.hp-overlay-body::-webkit-scrollbar {
  width: 6px;
}
.hp-overlay-body::-webkit-scrollbar-track {
  background: transparent;
}
.hp-overlay-body::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.4);
  border-radius: 3px;
}

.hp-banner-icon {
  font-size: clamp(2rem, 5vh, 3.25rem);
  line-height: 1;
  margin: 0;
  flex-shrink: 0;
  user-select: none;
}

.hp-banner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.7rem, 2vw, 0.8rem);
  font-weight: 700;
  padding: clamp(3px, 0.7vh, 6px) clamp(10px, 2.5vw, 14px);
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  width: fit-content;
  max-width: 100%;
  flex-shrink: 0;
}

.hp-banner-badge.is-aviso {
  background: #1e3a8a;
  color: #93c5fd;
  border: 1px solid #3b82f6;
}

.hp-banner-badge.is-alerta {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #ef4444;
}

.hp-banner-incident {
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  color: #38bdf8;
  margin: 0;
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.hp-banner-title {
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  color: #ffffff;
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: break-word;
  flex-shrink: 0;
  max-width: 100%;
}

.hp-banner-description {
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 70px;
  max-height: clamp(140px, 42vh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #0b1329;
  padding: clamp(10px, 2vh, 16px) clamp(12px, 2.5vw, 18px);
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.hp-banner-description.is-alerta {
  background: #0f172a;
  border-color: rgba(239, 68, 68, 0.25);
}

.hp-banner-description::-webkit-scrollbar {
  width: 5px;
}
.hp-banner-description::-webkit-scrollbar-track {
  background: transparent;
}
.hp-banner-description::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}

.hp-desc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.hp-desc-label {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hp-copy-incident {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.hp-copy-incident:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.hp-desc-content {
  font-size: clamp(0.875rem, 2.2vw, 1rem);
  color: #f8fafc;
  line-height: 1.6;
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.hp-overlay-actions {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
  margin-top: clamp(8px, 1.8vh, 14px);
  padding-top: clamp(8px, 1.8vh, 14px);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.hp-btn {
  width: 100%;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: clamp(10px, 1.8vh, 14px) 12px;
  font-size: clamp(0.875rem, 2.2vw, 1.02rem);
  line-height: 1.3;
  transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.hp-btn:active {
  transform: scale(0.985);
}

.hp-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
}

.hp-btn-primary:hover {
  background: #1d4ed8;
}

.hp-btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: none;
}

.hp-btn-danger:hover {
  background: #b91c1c;
}

.hp-btn-secondary {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  font-weight: normal;
  font-size: clamp(0.82rem, 2vw, 0.9rem);
  min-height: 40px;
}

.hp-btn-secondary:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  border-color: #64748b;
}

/* 📱 Responsive rules for mobile devices (iPhone, Xiaomi, Samsung, Motorola, etc.) */
@media (max-width: 600px) {
  .hp-overlay {
    align-items: flex-start;
    padding: calc(6px + env(safe-area-inset-top, 0px)) calc(8px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(8px + env(safe-area-inset-left, 0px));
  }

  .hp-overlay-card {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 12px);
    border-radius: 12px;
    padding: 12px 10px 10px;
  }

  .hp-banner-description {
    padding: 10px 12px;
    min-height: 60px;
    max-height: clamp(120px, 44vh, 260px);
  }

  .hp-overlay-actions {
    margin-top: 8px;
    padding-top: 8px;
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(17, 27, 46, 0.95) 0%, #111b2e 30%);
  }
}

/* 🔍 Responsive rules for low-height screens & moderate zoom (150% - 250% zoom) */
@media (max-height: 650px) {
  .hp-overlay {
    align-items: flex-start;
    padding: 6px;
  }

  .hp-overlay-card {
    max-height: calc(100dvh - 12px);
    padding: 8px 10px 8px;
    border-radius: 10px;
  }

  .hp-overlay-body {
    gap: 4px;
  }

  .hp-banner-icon {
    font-size: 1.5rem;
    margin: 0;
  }

  .hp-banner-badge {
    padding: 2px 8px;
    font-size: 0.72rem;
  }

  .hp-banner-incident {
    font-size: 0.95rem;
  }

  .hp-banner-title {
    font-size: 0.98rem;
    line-height: 1.25;
  }

  .hp-banner-description {
    padding: 8px 10px;
    min-height: 50px;
    max-height: clamp(90px, 35vh, 180px);
  }

  .hp-desc-content {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  .hp-overlay-actions {
    margin-top: 6px;
    padding-top: 6px;
    gap: 4px;
  }

  .hp-btn {
    min-height: 38px;
    padding: 8px;
    font-size: 0.85rem;
  }

  .hp-btn-secondary {
    min-height: 34px;
    padding: 6px;
    font-size: 0.8rem;
  }
}

/* 🔍 Extreme zoom levels (300%, 400%, 500% zoom máximo) & viewports com altura reduzida (< 500px) */
@media (max-height: 500px), (max-width: 380px) {
  .hp-overlay {
    align-items: flex-start !important;
    padding: 4px !important;
  }

  .hp-overlay-card {
    margin: 4px auto !important;
    max-height: none !important; /* Libera a rolagem natural do card para nunca esmagar o texto */
    height: auto !important;
    overflow: visible !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }

  .hp-overlay-body {
    overflow: visible !important;
    flex: none !important;
    width: 100% !important;
    gap: 4px !important;
  }

  .hp-banner-icon {
    display: none !important; /* Oculta ícone decorativo para priorizar leitura imediata */
  }

  .hp-banner-badge {
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.4px !important;
  }

  .hp-banner-incident {
    font-size: 0.85rem !important;
  }

  .hp-banner-title {
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
    margin: 2px 0 !important;
  }

  .hp-banner-description {
    max-height: none !important; /* Expande a descrição completa confortavelmente */
    overflow: visible !important;
    padding: 8px !important;
    min-height: auto !important;
    border-radius: 6px !important;
  }

  .hp-desc-header {
    margin-bottom: 4px !important;
    gap: 4px !important;
  }

  .hp-desc-label {
    font-size: 0.78rem !important;
  }

  .hp-copy-incident {
    padding: 2px 6px !important;
    font-size: 0.72rem !important;
  }

  .hp-desc-content {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
  }

  .hp-overlay-actions {
    position: static !important;
    margin-top: 8px !important;
    padding-top: 6px !important;
    background: transparent !important;
    gap: 4px !important;
  }

  .hp-btn {
    min-height: 36px !important;
    padding: 6px 10px !important;
    font-size: 0.84rem !important;
  }

  .hp-btn-secondary {
    min-height: 32px !important;
    padding: 5px 8px !important;
    font-size: 0.78rem !important;
  }
}

/* ============================================
   ISA Security Classes & Layout Helpers
   ============================================ */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-inline-flex { display: inline-flex !important; }
.opacity-0 { opacity: 0 !important; }
.opacity-07 { opacity: 0.7 !important; }
.opacity-1 { opacity: 1 !important; }

.sso-error {
  color: #ef4444;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.new-conversation-container {
  width: 100%;
  text-align: center;
  padding: 8px 0;
}

.new-conversation-text {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 12px;
  font-weight: 500;
}

.new-conversation-btn {
  background: #0088cc;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.zoomable-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: block;
  cursor: zoom-in;
}

.textarea-auto {
  height: auto !important;
}

.markdown-list {
  list-style: none !important;
  padding-left: 0 !important;
}

.markdown-li {
  margin-bottom: 4px !important;
}

/* ============================================
   Sessão Concorrente & Resiliência Overlays
   ============================================ */
.session-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#sessionConflictOverlay {
  background-color: rgba(0, 0, 0, 0.85);
}

#sessionTerminatedOverlay {
  background-color: rgba(0, 0, 0, 0.85);
}

.session-overlay-card {
  background: #1a1a24;
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  border: 1px solid #3b3b4f;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-family: 'Outfit', sans-serif;
  color: #fff;
  animation: fadeIn 0.3s ease;
}

.session-overlay-title-warning {
  margin-top: 0;
  color: #ff9800;
  font-size: 20px;
}

.session-overlay-title-danger {
  margin-top: 0;
  color: #f44336;
  font-size: 20px;
}

.session-overlay-text {
  font-size: 14px;
  color: #ccc;
  margin: 15px 0 25px 0;
  line-height: 1.5;
}

.session-overlay-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-session-primary {
  background: #0078d4;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-session-primary:hover {
  background: #106ebe;
}

.btn-session-secondary {
  background: transparent;
  color: #ccc;
  border: 1px solid #3b3b4f;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-session-secondary:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.05);
}

/* Clickable Quick Reply Option Buttons */
.chat-option-btn {
  display: inline-block;
  background: var(--user-bubble, #0088cc);
  color: white !important;
  border: none;
  padding: 8px 16px;
  margin: 6px 8px 6px 0;
  border-radius: var(--radius-lg, 16px);
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.chat-option-btn:hover {
  background: #0077b3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.chat-option-btn:active {
  transform: translateY(0);
}

/* Custom Dropdown Styles for Software Filter */
.chat-select-container {
  margin: 10px 0 2px 0;
  display: block;
  width: 100%;
  max-width: 320px;
}

.chat-software-select {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--border, #e0e0e0);
  background-color: var(--input-bg, #f9f9f9);
  color: var(--text-primary, #333333);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-software-select:hover {
  border-color: var(--primary, #0099ff);
  box-shadow: var(--shadow-md);
}

.chat-software-select:focus {
  border-color: var(--primary, #0099ff);
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.2);
}

.chat-other-options-container {
  margin-top: 0px;
  display: block;
}

.chat-other-btn {
  background: transparent !important;
  color: var(--user-bubble, #0088cc) !important;
  border: 1px solid var(--user-bubble, #0088cc) !important;
  box-shadow: none !important;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  font-size: 0.75rem !important;
  padding: 5px 10px !important;
}

.chat-other-btn:hover {
  background: rgba(0, 136, 204, 0.05) !important;
  box-shadow: var(--shadow-sm) !important;
}

.chat-type-selection-btn {
  background: var(--user-bubble, #0088cc) !important;
  color: white !important;
  border: none !important;
  margin-top: 4px !important;
  margin-right: 8px !important;
  font-size: 0.9rem !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-weight: 500 !important;
}

.chat-type-selection-btn:hover {
  background: var(--user-hover, #0066aa) !important;
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px) !important;
}

.chat-type-selection-btn:active {
  background: var(--user-active, #004488) !important;
  box-shadow: var(--shadow-sm) !important;
  transform: translateY(0) !important;
}

.chat-option-btn.chat-option-locked,
.chat-type-selection-btn.chat-option-locked,
.chat-option-btn:disabled,
.chat-type-selection-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

/* ============================================
   Satisfaction Survey Modal (Pós-Resolução)
   ============================================ */
.survey-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: surveyFadeIn 0.3s ease-out;
  box-sizing: border-box;
}

@keyframes surveyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.survey-modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 620px;
  max-height: min(92vh, 820px);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 136, 204, 0.15);
  animation: surveySlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes surveySlideUp {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.survey-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
  color: #ffffff;
  position: relative;
}

.survey-header-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.survey-header-titles {
  flex: 1;
}

.survey-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.survey-modal-subtitle {
  font-size: 0.85rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
}

.survey-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.survey-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.survey-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.survey-modal-body::-webkit-scrollbar {
  width: 6px;
}

.survey-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.survey-question-group {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.survey-question-group:last-of-type {
  border-bottom: none;
  margin-bottom: 10px;
}

.survey-question-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Radio Chip Row (Perguntas 1 e 6) */
.survey-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.survey-radio-chip {
  cursor: pointer;
  position: relative;
  display: inline-flex;
}

.survey-radio-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.survey-radio-chip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.survey-radio-chip:hover span {
  border-color: #0088cc;
  background: #f0f7fc;
  color: #0088cc;
}

.survey-radio-chip input[type="radio"]:checked + span {
  background: #0088cc;
  border-color: #0088cc;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.35);
}

/* 1 to 5 Scale Container (Perguntas 2, 3, 4, 5) */
.survey-scale-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.survey-scale-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.survey-scale-chip {
  position: relative;
  display: flex;
  cursor: pointer;
}

.survey-scale-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.survey-scale-chip span {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 3px;
}

.survey-scale-chip small {
  display: block;
  font-size: 0.72rem;
  line-height: 1.15;
  opacity: 0.85;
}

.survey-scale-chip > span:first-of-type,
.survey-scale-chip input[type="radio"] ~ * {
  pointer-events: none;
}

/* Container wrapper styling for scale chip */
.survey-scale-chip {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 4px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #475569;
  transition: all 0.2s ease;
  user-select: none;
}

.survey-scale-chip:hover {
  border-color: #0088cc;
  background: #f0f7fc;
  color: #0088cc;
}

.survey-scale-chip.selected,
.survey-scale-chip:has(input[type="radio"]:checked) {
  background: #0088cc;
  border-color: #0088cc;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.35);
}

.survey-scale-chip.selected small,
.survey-scale-chip:has(input[type="radio"]:checked) small {
  opacity: 1;
  color: #ffffff;
}

/* NPS 0-10 Container (Pergunta 7) */
.survey-nps-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.survey-nps-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  padding: 0 2px;
}

.survey-nps-options {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
}

.survey-nps-chip {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  height: 38px;
  transition: all 0.2s ease;
  user-select: none;
}

.survey-nps-chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.survey-nps-chip span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  pointer-events: none;
}

.survey-nps-chip:hover {
  border-color: #0088cc;
  background: #f0f7fc;
}

.survey-nps-chip:hover span {
  color: #0088cc;
}

.survey-nps-chip.selected,
.survey-nps-chip:has(input[type="radio"]:checked) {
  background: #0088cc;
  border-color: #0088cc;
  box-shadow: 0 2px 8px rgba(0, 136, 204, 0.35);
}

.survey-nps-chip.selected span,
.survey-nps-chip:has(input[type="radio"]:checked) span {
  color: #ffffff;
  font-weight: 700;
}

/* Textareas (Perguntas 8 e 9) */
.survey-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  color: #1e293b;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  resize: vertical;
  min-height: 58px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.survey-textarea:focus {
  outline: none;
  border-color: #0088cc;
  box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.15);
}

.survey-textarea::placeholder {
  color: #94a3b8;
}

/* Actions Footer */
.survey-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.survey-btn {
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.survey-btn-secondary {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.survey-btn-secondary:hover {
  background: #e2e8f0;
  color: #334155;
}

.survey-btn-primary {
  background: #0088cc;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 136, 204, 0.3);
}

.survey-btn-primary:hover {
  background: #0066aa;
  box-shadow: 0 4px 10px rgba(0, 136, 204, 0.4);
  transform: translateY(-1px);
}

.survey-btn-primary:active {
  transform: translateY(0);
}

/* Error Alert */
.survey-error-alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: center;
}

/* Success Card */
.survey-success-card {
  text-align: center;
  padding: 36px 20px;
  animation: surveyFadeIn 0.3s ease-out;
}

.survey-success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.survey-success-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.survey-success-card p {
  font-size: 0.92rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .survey-modal-card {
    max-height: 96vh;
    border-radius: 12px;
  }

  .survey-modal-header {
    padding: 14px 16px;
  }

  .survey-modal-title {
    font-size: 1.05rem;
  }

  .survey-modal-body {
    padding: 14px 16px;
  }

  .survey-scale-options {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .survey-scale-chip {
    padding: 6px 2px;
  }

  .survey-scale-chip small {
    font-size: 0.65rem;
  }

  .survey-nps-options {
    gap: 2px;
  }

  .survey-nps-chip {
    height: 32px;
  }

  .survey-nps-chip span {
    font-size: 0.85rem;
  }

  .survey-actions {
    flex-direction: column-reverse;
  }

  .survey-btn {
    width: 100%;
  }
}



