/* ==========================================================================
   BELTORK MOTO CENTER - CENTRAL DE ATENDIMENTO WHATSAPP WEB
   chat.beltork.com.br
   ========================================================================== */

:root {
  --wpp-green: #25D366;
  --wpp-green-dark: #128C7E;
  --wpp-green-deep: #075E54;
  --wpp-teal: #00A884;
  --wpp-bg: #EFEAE2;
  --wpp-outgoing: #D9FDD3;
  --wpp-incoming: #FFFFFF;
  --wpp-sidebar-bg: #FFFFFF;
  --wpp-header-bg: #F0F2F5;
  --wpp-border: #E9EDEF;
  --wpp-text: #111B21;
  --wpp-text-muted: #667781;
  --primary-orange: #FF5500;
  --danger-red: #EF4444;
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  background: #D1D7DB;
  color: var(--wpp-text);
  -webkit-font-smoothing: antialiased;
}

/* APP CONTAINER FULL HEIGHT */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: #FFFFFF;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR (PAINEL ESQUERDO)
   ========================================================================== */
.chat-sidebar {
  width: 420px;
  min-width: 340px;
  max-width: 480px;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--wpp-border);
  background: var(--wpp-sidebar-bg);
  flex-shrink: 0;
  z-index: 20;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.brand-info h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--wpp-text);
  line-height: 1.2;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--wpp-teal);
}

.brand-badge i {
  font-size: 0.6rem;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

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

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--wpp-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--wpp-text);
}

.btn-icon.active {
  color: var(--primary-orange);
}

.btn-nova-conversa {
  background: #00A884;
  color: #FFFFFF;
  border: none;
  padding: 7px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 168, 132, 0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-nova-conversa:hover {
  background: #008f6f;
  transform: translateY(-1px);
}

/* BUSCA E FILTROS */
.sidebar-search-container {
  padding: 10px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--wpp-border);
  flex-shrink: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wpp-header-bg);
  border-radius: 8px;
  padding: 8px 14px;
}

.search-box i {
  color: var(--wpp-text-muted);
  font-size: 0.95rem;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  color: var(--wpp-text);
}

.sidebar-filters {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--wpp-border);
  overflow-x: auto;
  flex-shrink: 0;
}

.filter-pill {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--wpp-border);
  background: var(--wpp-header-bg);
  color: var(--wpp-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.filter-pill.active {
  background: #E7FCE8;
  border-color: #25D366;
  color: #0B6B38;
}

.filter-badge-urgent {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}

/* LISTA DE CONVERSAS */
.conversas-list {
  flex: 1;
  overflow-y: auto;
  background: #FFFFFF;
}

.conversa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}

.conversa-item:hover {
  background: #F5F6F6;
}

.conversa-item.active {
  background: #EBECEE;
}

.conversa-item.urgent {
  background: #FEF2F2;
  border-left: 4px solid #EF4444;
}

.conversa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #DFE5E7;
  color: #54656F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
}

.conversa-avatar.urgent-avatar {
  background: #FEE2E2;
  color: #EF4444;
}

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

.conversa-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.conversa-nome {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wpp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.conversa-hora {
  font-size: 0.72rem;
  color: var(--wpp-text-muted);
}

.conversa-item.active .conversa-hora {
  color: #00A884;
  font-weight: 600;
}

.conversa-preview-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.conversa-preview {
  font-size: 0.84rem;
  color: var(--wpp-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.badge-nao-lidas {
  background: #25D366;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-bot {
  background: #F0F2F5;
  color: #667781;
}

.badge-humano {
  background: #E0F2FE;
  color: #0369A1;
}

.badge-aguardando {
  background: #EF4444;
  color: #FFFFFF;
  animation: pulseRed 1.8s infinite;
}

@keyframes pulseRed {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ==========================================================================
   PAINEL PRINCIPAL DO CHAT (LADO DIREITO)
   ========================================================================== */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: var(--wpp-bg);
  position: relative;
  overflow: hidden;
}

/* TELA VAZIA (SEM CONVERSA SELECIONADA) */
.empty-state-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #F0F2F5;
  padding: 30px;
  text-align: center;
  border-bottom: 6px solid #25D366;
}

.empty-state-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #E1E9EC;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #54656F;
  margin-bottom: 24px;
}

.empty-state-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #41525D;
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 0.95rem;
  color: var(--wpp-text-muted);
  max-width: 480px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* CABEÇALHO DO CHAT ATIVO */
.chat-header {
  height: 64px;
  background: var(--wpp-header-bg);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wpp-border);
  flex-shrink: 0;
  z-index: 10;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #00A884;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.chat-header-info h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--wpp-text);
  line-height: 1.2;
}

.chat-header-sub {
  font-size: 0.78rem;
  color: var(--wpp-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-toggle-modo {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-toggle-modo.modo-humano {
  background: #E0F2FE;
  color: #0369A1;
  border-color: #BAE6FD;
}

.btn-toggle-modo.modo-humano:hover {
  background: #BAE6FD;
}

.btn-toggle-modo.modo-bot {
  background: #F1F5F9;
  color: #475569;
  border-color: #CBD5E1;
}

.btn-toggle-modo.modo-bot:hover {
  background: #E2E8F0;
}

/* ÁREA DE MENSAGENS (STREAM FIXO COM ROLAGEM) */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 5% 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-image: radial-gradient(#d3c6ba 1px, transparent 1px);
  background-size: 24px 24px;
  scroll-behavior: smooth;
}

.message-bubble {
  max-width: 65%;
  min-width: 80px;
  padding: 8px 12px 6px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.13);
  display: flex;
  flex-direction: column;
}

.message-inbound {
  align-self: flex-start;
  background: var(--wpp-incoming);
  color: var(--wpp-text);
  border-top-left-radius: 0;
}

.message-outbound {
  align-self: flex-end;
  background: var(--wpp-outgoing);
  color: var(--wpp-text);
  border-top-right-radius: 0;
}

.message-text {
  white-space: pre-wrap;
}

.message-meta {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--wpp-text-muted);
  margin-top: 2px;
  margin-left: 12px;
}

.message-outbound .message-meta i {
  color: #53BDEB;
}

/* ATALHOS RÁPIDOS */
.quick-replies-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: #F0F2F5;
  border-top: 1px solid var(--wpp-border);
  flex-shrink: 0;
  overflow-x: auto;
}

.btn-quick {
  background: #FFFFFF;
  border: 1px solid #D1D7DB;
  color: #111B21;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.15s ease;
}

.btn-quick:hover {
  background: #F7F8FA;
  border-color: #00A884;
  color: #00A884;
}

/* BARRA INFERIOR DE DIGITAÇÃO FIXA (NUNCA SOME) */
.chat-footer {
  background: #F0F2F5;
  padding: 10px 16px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  border-top: 1px solid var(--wpp-border);
  flex-shrink: 0;
  position: relative;
  z-index: 15;
}

.chat-input-wrapper {
  flex: 1;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  min-height: 44px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.chat-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--wpp-text);
  resize: none;
  max-height: 120px;
  line-height: 1.4;
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #00A884;
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 168, 132, 0.35);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-send:hover {
  background: #008f6f;
  transform: scale(1.05);
}

.btn-send:disabled {
  background: #CBD5E1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   POPOVER SELETOR DE EMOJIS
   ========================================================================== */
.emoji-picker-popover {
  position: absolute;
  bottom: 70px;
  left: 16px;
  width: 340px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--wpp-border);
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.emoji-picker-popover.active {
  display: flex;
}

.emoji-header {
  padding: 8px 12px;
  background: #F0F2F5;
  border-bottom: 1px solid var(--wpp-border);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--wpp-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 10px;
  max-height: 220px;
  overflow-y: auto;
}

.emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, transform 0.1s ease;
}

.emoji-btn:hover {
  background: #F0F2F5;
  transform: scale(1.2);
}

/* ==========================================================================
   MODAL NOVA CONVERSA
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 20, 26, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  background: var(--wpp-header-bg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wpp-border);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--wpp-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--wpp-text);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: #00A884;
}

.modal-footer {
  padding: 14px 20px;
  background: var(--wpp-header-bg);
  border-top: 1px solid var(--wpp-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #475569;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.btn-confirm {
  background: #00A884;
  color: #FFFFFF;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-confirm:hover {
  background: #008f6f;
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
  .chat-sidebar {
    width: 100%;
    max-width: 100%;
  }

  .chat-main {
    display: none;
    width: 100%;
  }

  .app-container.chat-opened .chat-sidebar {
    display: none;
  }

  .app-container.chat-opened .chat-main {
    display: flex;
  }

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

.btn-voltar-mobile {
  display: none;
}

/* ==========================================================================
   INTERATIVIDADE DO CABEÇALHO DO CLIENTE
   ========================================================================== */
.chat-header-user {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.chat-header-user:hover {
  background: rgba(0, 0, 0, 0.05);
}

.info-click-hint {
  color: #00A884;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.chat-header-user:hover .info-click-hint {
  opacity: 1;
}

/* ==========================================================================
   PAREDE DE LOGIN OBRIGATÓRIA (CENTRAL RESTRICTA)
   ========================================================================== */
.chat-login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 20%, #1A262C 0%, #0B141A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.chat-login-card {
  background: #111B21;
  border: 1px solid #222E35;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  padding: 36px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #E9EDEF;
  text-align: center;
}

.chat-login-brand img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #00A884;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 168, 132, 0.35);
}

.chat-login-brand h2 {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.chat-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #00A884;
  background: rgba(0, 168, 132, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  margin: 6px 0 12px;
}

.chat-login-brand p {
  font-size: 0.84rem;
  color: #8696A0;
  margin-bottom: 22px;
  line-height: 1.4;
}

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

.form-group-login label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #D1D7DB;
  margin-bottom: 6px;
}

.form-group-login label i {
  color: #00A884;
  margin-right: 4px;
}

.form-group-login input {
  width: 100%;
  height: 44px;
  background: #202C33;
  border: 1px solid #2A3942;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 0.92rem;
  color: #E9EDEF;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group-login input:focus {
  border-color: #00A884;
  box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.2);
}

.btn-chat-login {
  width: 100%;
  height: 46px;
  background: #00A884;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  transition: background 0.2s, transform 0.1s;
}

.btn-chat-login:hover {
  background: #008f6f;
  transform: translateY(-1px);
}

.chat-login-error {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: left;
}

.chat-login-footer {
  margin-top: 22px;
  font-size: 0.74rem;
  color: #667781;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   GAVETA LATERAL DIREITA: DADOS DO CLIENTE & PEDIDOS
   ========================================================================== */
.chat-contact-drawer {
  width: 380px;
  min-width: 320px;
  max-width: 420px;
  height: 100%;
  background: #FFFFFF;
  border-left: 1px solid var(--wpp-border);
  display: flex;
  flex-direction: column;
  z-index: 30;
  flex-shrink: 0;
  box-shadow: -2px 0 12px rgba(0,0,0,0.06);
}

.drawer-header {
  height: 64px;
  background: var(--wpp-header-bg);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--wpp-border);
  flex-shrink: 0;
}

.drawer-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--wpp-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
}

.drawer-profile {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 18px;
}

.drawer-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00A884 0%, #128C7E 100%);
  color: #FFFFFF;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 14px rgba(0, 168, 132, 0.35);
  border: 3px solid #FFFFFF;
}

.drawer-nome {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.drawer-telefone {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 12px;
}

.drawer-wpp-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #00A884;
  background: rgba(0, 168, 132, 0.1);
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.drawer-wpp-action:hover {
  background: #00A884;
  color: #FFFFFF;
}

.drawer-form {
  margin-bottom: 24px;
}

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

.form-group-drawer label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}

.form-group-drawer label i {
  color: #00A884;
}

.form-group-drawer input,
.form-group-drawer textarea {
  width: 100%;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: var(--font-family);
  color: #1E293B;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.form-group-drawer input:focus,
.form-group-drawer textarea:focus {
  border-color: #00A884;
  background: #FFFFFF;
}

.btn-salvar-drawer {
  width: 100%;
  height: 40px;
  background: #00A884;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
  margin-top: 6px;
}

.btn-salvar-drawer:hover {
  background: #008f6f;
}

.drawer-alert {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}

.drawer-alert.success {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.drawer-alert.error {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

.drawer-section-pedidos {
  border-top: 1px solid #F1F5F9;
  padding-top: 18px;
}

.drawer-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1E293B;
  margin-bottom: 12px;
}

.badge-pedidos-count {
  background: #FF5500;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.drawer-pedidos-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-pedido-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.drawer-pedido-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

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

.pedido-card-id {
  font-weight: 800;
  font-size: 0.84rem;
  color: #0F172A;
}

.pedido-card-status {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.pedido-status-pago {
  background: #DCFCE7;
  color: #15803D;
}

.pedido-status-pendente {
  background: #FEF3C7;
  color: #B45309;
}

.pedido-status-cancelado {
  background: #FEE2E2;
  color: #B91C1C;
}

.pedido-card-itens {
  font-size: 0.78rem;
  color: #64748B;
  line-height: 1.35;
  margin-bottom: 6px;
}

.pedido-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed #E2E8F0;
  padding-top: 6px;
}

.pedido-card-data {
  font-size: 0.72rem;
  color: #94A3B8;
}

.pedido-card-total {
  font-size: 0.92rem;
  font-weight: 800;
  color: #FF5500;
}

.drawer-empty-pedidos {
  text-align: center;
  padding: 20px 10px;
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 500;
}

