:root {
  --bg-main: #090a10;
  --bg-card: #0e111a;
  --bg-card-border: #1c2236;
  --bg-input: #141824;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-green: #00f5a0;
  --accent-cyan: #06b6d4;
  --accent-violet: #7c3aed;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --brand-gradient: linear-gradient(135deg, #00f5a0 0%, #06b6d4 50%, #7c3aed 100%);
  --bubble-received: #161b2a;
  --bubble-sent: #064e3b;
  --bubble-sent-text: #ecfdf5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* =================================================== */
/* 1. TELA DE ENTRADA / CADASTRO / LOGIN (AUTH SCREEN) */
/* =================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top center, rgba(124, 58, 237, 0.15), transparent 60%),
              radial-gradient(circle at bottom center, rgba(0, 245, 160, 0.08), transparent 50%),
              var(--bg-main);
}

.glass-panel {
  background: rgba(14, 17, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 32px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.25);
  animation: fadeIn 0.4s ease-out;
}

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

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 245, 160, 0.4);
  background: #000;
  border: 2px solid rgba(0, 245, 160, 0.5);
}

.auth-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.auth-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pulse-dot.green {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 245, 160, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 245, 160, 0); }
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent-green);
  box-shadow: 0 2px 10px rgba(0, 245, 160, 0.2);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.form-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-control:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(0, 245, 160, 0.15);
}

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

.input-prefix {
  position: absolute;
  left: 12px;
  color: var(--accent-green);
  font-weight: 700;
  pointer-events: none;
}

.input-control.has-prefix {
  padding-left: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 10px 16px;
}

.btn-primary {
  background: var(--accent-green);
  color: #090a10;
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(0, 245, 160, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
}

.btn-success {
  background: #22c55e;
  color: #052e16;
  font-weight: 700;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-accent-gold {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  font-weight: 700;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 12px 18px;
  font-size: 15px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 14px 0;
  color: var(--text-muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--bg-card-border);
}

.auth-divider span {
  padding: 0 8px;
}

.auth-features-list {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}


/* =================================================== */
/* 2. APLICATIVO PRINCIPAL (APP WRAPPER) */
/* =================================================== */
.app-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HEADER DO APP */
.app-header {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 245, 160, 0.3);
  border: 1px solid rgba(0, 245, 160, 0.4);
}

.app-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-brand-info h2 {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
}

.protocol-tag {
  font-size: 9px;
  color: var(--accent-green);
  text-transform: uppercase;
  font-weight: 700;
}

/* SCROLL SUAVE DAS ABAS NO CELULAR */
.app-nav-scroll-wrapper {
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-nav-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.app-nav {
  display: inline-flex;
  gap: 6px;
  background: var(--bg-main);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--bg-card-border);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-btn.active {
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent-green);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  border: 1px solid var(--bg-card-border);
  padding: 4px 10px 4px 4px;
  border-radius: 30px;
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-green);
  color: #090a10;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
}

.user-handle {
  font-size: 10px;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.online-indicator {
  width: 7px;
  height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 6px 10px;
}


/* =================================================== */
/* 3. LAYOUT MESSENGER (CHATS & CANAIS) */
/* =================================================== */
.app-main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.app-view {
  display: none;
  width: 100%;
  height: 100%;
}

.app-view.active {
  display: flex;
}

.messenger-layout {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* COLUNA ESQUERDA: SIDEBAR */
.conversations-sidebar {
  width: 340px;
  background: var(--bg-card);
  border-right: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-top {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg-card-border);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: 8px;
  padding: 8px 10px 8px 30px;
  font-size: 13px;
  color: var(--text-main);
  font-family: inherit;
}

.filter-pills {
  display: flex;
  gap: 6px;
}

.filter-pill {
  flex: 1;
  background: transparent;
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 0;
  border-radius: 6px;
  cursor: pointer;
}

.filter-pill.active {
  background: rgba(0, 245, 160, 0.12);
  color: var(--accent-green);
  border-color: rgba(0, 245, 160, 0.3);
}

.conversations-scroll-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-item:hover, .chat-item:active {
  background: rgba(255, 255, 255, 0.04);
}

.chat-item.active {
  background: rgba(0, 245, 160, 0.08);
  border-left: 3px solid var(--accent-green);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.channel-avatar {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
}

.direct-avatar {
  background: var(--accent-green);
  color: #090a10;
}

.chat-item-content {
  flex: 1;
  min-width: 0;
}

.chat-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.chat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-time {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-channel-members {
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 10px;
}

.chat-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
}

.empty-hint-card {
  padding: 14px;
  margin: 10px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px dashed rgba(124, 58, 237, 0.3);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.sidebar-actions {
  padding: 10px 14px;
  border-top: 1px solid var(--bg-card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* COLUNA DIREITA: CHAT ATIVO */
.active-chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
}

.active-chat-header {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.active-chat-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-back-mobile {
  display: none;
  background: rgba(0, 245, 160, 0.12);
  border: 1px solid rgba(0, 245, 160, 0.3);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
}

.active-chat-meta h3 {
  font-size: 15px;
  font-weight: 700;
}

.chat-status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.shield-badge {
  color: var(--accent-green);
  font-weight: 600;
}

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

.active-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon-round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.messages-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-bubble {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.message-bubble.received {
  align-self: flex-start;
  background: var(--bubble-received);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
  border-bottom-left-radius: 4px;
}

.message-bubble.sent {
  align-self: flex-end;
  background: var(--bubble-sent);
  color: var(--bubble-sent-text);
  border-bottom-right-radius: 4px;
}

.message-bubble.system-message {
  align-self: center;
  max-width: 85%;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
  text-align: center;
  font-size: 12px;
  border-radius: 20px;
  padding: 6px 14px;
}

.message-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 2px;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-muted);
}

.message-status {
  color: var(--accent-green);
  font-weight: 700;
}

.chat-input-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--bg-card-border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-attach {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
}

.chat-textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-main);
  font-family: inherit;
  resize: none;
  max-height: 100px;
}

/* =================================================== */
/* 4. ABAS DE NEGÓCIOS & LIVE SHOPPING */
/* =================================================== */
.panel-container {
  max-width: 840px;
  margin: 20px auto;
  width: 100%;
  padding: 0 16px;
  overflow-y: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-header h2 {
  font-size: 22px;
  font-weight: 800;
}

.subtitle {
  color: var(--text-muted);
  font-size: 13px;
}

.badge-zero-cost {
  background: rgba(0, 245, 160, 0.15);
  border: 1px solid rgba(0, 245, 160, 0.4);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.studio-card, .broadcast-composer-card, .smart-link-card {
  padding: 20px;
  margin-bottom: 16px;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.invite-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.product-item-card {
  background: var(--bg-input);
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.product-item-card.active-featured {
  border-color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.05);
}

.product-badge-featured {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-gold);
}

.price-live {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent-green);
}

.price-old {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.product-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* CRM TABLE */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.leads-table th, .leads-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg-card-border);
}

.leads-table th {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.badge-member {
  background: rgba(0, 245, 160, 0.15);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
}

.badge-shield {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
}

.badge-blind {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 8px;
}

/* MEU PLANO STATS */
.grid-3-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.stat-big-value {
  font-size: 26px;
  font-weight: 800;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.text-green { color: var(--accent-green); }
.text-gold { color: var(--accent-gold); }
.text-cyan { color: var(--accent-cyan); }

/* ASAAS INSTRUCTIONS */
.asaas-instructions {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #cffafe;
}

.link-display-box {
  display: flex;
  gap: 8px;
  margin: 14px 0 18px 0;
}

.font-mono { font-family: var(--font-mono); }

.smart-link-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--bg-card-border);
  padding-top: 14px;
}

.perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

/* MODAIS */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.modal-dialog {
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-call-card {
  width: 100%;
  max-width: 380px;
  padding: 24px 16px;
  text-align: center;
}

.call-badge-live {
  display: inline-block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.call-timer {
  display: block;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent-green);
  font-weight: 700;
  margin-bottom: 16px;
}

.call-avatar-pulse {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f5a0, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px auto;
  box-shadow: 0 0 24px rgba(0, 245, 160, 0.4);
  animation: pulse 2s infinite;
}

.call-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-call-round {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-mic, .btn-cam {
  background: var(--bg-input);
  color: #fff;
  border: 1px solid var(--bg-card-border);
}

.btn-mic.active {
  background: rgba(0, 245, 160, 0.2);
  border-color: var(--accent-green);
}

.btn-hangup {
  background: var(--accent-red);
  color: #fff;
}

.users-results-list {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-input);
}


/* =================================================== */
/* 5. RESPONSIVIDADE MOBILE (CELULAR) - CRUCIAL */
/* =================================================== */
@media (max-width: 768px) {
  .app-header {
    padding: 0 10px;
    height: 58px;
  }
  
  .app-brand-info,
  .user-meta {
    display: none;
  }

  .nav-btn span.icon + span {
    display: inline;
  }

  .grid-2-cols {
    grid-template-columns: 1fr;
  }

  /* FLUXO WHATSAPP MOBILE: ALTERNAR LISTA E CHAT */
  .messenger-layout .conversations-sidebar {
    width: 100%;
    display: flex;
  }

  .messenger-layout .active-chat-window {
    display: none;
    width: 100%;
  }

  .messenger-layout.chat-open .conversations-sidebar {
    display: none !important;
  }

  .messenger-layout.chat-open .active-chat-window {
    display: flex !important;
  }

  .btn-back-mobile {
    display: inline-flex !important;
  }

  .message-bubble {
    max-width: 85%;
  }
}
