o/* ===== RESET & BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow: hidden; margin: 0; padding: 0; height: 100%; }
body.login-body { overflow: auto; height: auto; min-height: 100vh; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: #ddd; background: #111; }

/* ===== LAYOUT ===== */
.layout { display: grid; grid-template-columns: 220px 1fr; height: 100vh; overflow: hidden; }
.main-content { overflow-y: auto; padding: 24px; background: #111; }
.main-content:has(.conv-layout) { overflow: hidden; padding: 0; height: 100%; }

/* ===== SIDEBAR ===== */
.sidebar { background: #1a1a1a; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid #2a2a2a; }
.sidebar-logo { padding: 16px; border-bottom: 1px solid #2a2a2a; }
.sidebar-logo img { height: 36px; object-fit: contain; }
.sidebar-tenant { padding: 6px 16px; font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: #888; text-decoration: none; font-size: 13px; border-right: 2px solid transparent; transition: all 0.15s; }
.nav-item:hover { background: #242424; color: #fff; }
.nav-item.active { background: #242424; color: #fff; border-right-color: #E8520A; }
.nav-item i { font-size: 17px; }
.nav-divider { height: 1px; background: #2a2a2a; margin: 6px 0; }
.badge { margin-left: auto; background: #E8520A; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 10px; }
.badge-blue { margin-left: auto; background: #1e3a5f; color: #7eb8f7; font-size: 11px; padding: 1px 6px; border-radius: 10px; }
.sidebar-footer { border-top: 1px solid #2a2a2a; padding: 12px 16px; display: flex; align-items: center; gap: 8px; margin-top: auto; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #E8520A; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { display: block; font-size: 13px; color: #ddd; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 11px; color: #555; }
.btn-logout { color: #555; font-size: 18px; text-decoration: none; }
.btn-logout:hover { color: #E8520A; }

/* ===== LOGIN ===== */
.login-body { background: #111; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-container { width: 100%; max-width: 380px; padding: 16px; }
.login-card { background: #1a1a1a; border-radius: 12px; padding: 40px 32px; border: 1px solid #2a2a2a; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 48px; object-fit: contain; }
.login-title { text-align: center; color: #fff; font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.login-subtitle { text-align: center; color: #555; font-size: 13px; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: #888; font-size: 13px; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 10px 12px; background: #111; border: 1px solid #333; border-radius: 8px; color: #fff; font-size: 14px; outline: none; box-sizing: border-box; display: block; }
.form-group input:focus { border-color: #E8520A; }
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #111 inset;
  -webkit-text-fill-color: #fff;
  border-color: #333;
  transition: background-color 5000s ease-in-out 0s;
}
.btn-login { width: 100%; padding: 11px; background: #E8520A; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 8px; }
.btn-login:hover { background: #c94008; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert-danger { background: #3d1515; color: #f87171; border: 1px solid #7f1d1d; }

/* ===== BOTÕES ===== */
.btn { padding: 6px 14px; font-size: 12px; border: 1px solid #333; border-radius: 6px; background: #2a2a2a; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: #ccc; }
.btn:hover { background: #333; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-primary { background: #E8520A; color: #fff; border-color: #E8520A; }
.btn-primary:hover { background: #c94008; }
.btn-danger { background: #3d1515; color: #f87171; border-color: #7f1d1d; }
.btn-success { background: #14532d; color: #86efac; border-color: #166534; }
.btn-icon { padding: 8px; }

/* ===== TAGS ===== */
.tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; display: inline-flex; align-items: center; gap: 3px; }
.tag-mine { background: #3a1f00; color: #fb923c; }
.tag-queue { background: #3a1f00; color: #fb923c; }
.tag-bot { background: #1e3a5f; color: #7eb8f7; }
.tag-other { background: #14532d; color: #86efac; }
.stage-lead { background: #1e3a5f; color: #7eb8f7; }
.stage-negotiating { background: #3a1f00; color: #fb923c; }
.stage-client { background: #14532d; color: #86efac; }
.stage-lost { background: #2a2a2a; color: #666; }

/* ===== CONVERSAS ===== */
.conv-layout { display: grid; grid-template-columns: 260px 1fr 300px; height: 100%; margin: 0; overflow: hidden; }
.conv-list { border-right: 1px solid #2a2a2a; display: flex; flex-direction: column; background: #1a1a1a; overflow: hidden; }
.conv-list-header { padding: 16px; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; justify-content: space-between; }
.conv-list-header span { font-size: 15px; font-weight: 600; color: #fff; }
.conv-filters { display: flex; gap: 4px; }
.filter-btn { padding: 4px 10px; font-size: 12px; border: 1px solid #333; border-radius: 20px; background: transparent; cursor: pointer; color: #888; }
.filter-btn.active { background: #E8520A; color: #fff; border-color: #E8520A; }
.conv-search { padding: 10px 12px; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; gap: 8px; }
.conv-search i { color: #555; font-size: 16px; }
.conv-search input { border: none; outline: none; font-size: 13px; flex: 1; background: transparent; color: #ccc; }
.conv-search input::placeholder { color: #555; }
#conv-items { flex: 1; overflow-y: auto; }
.conv-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #222; cursor: pointer; }
.conv-item:hover { background: #222; }
.conv-item.active { background: #222; border-left: 3px solid #E8520A; }
.conv-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.dot-green { background: #22C55E; }
.dot-orange { background: #F97316; }
.dot-blue { background: #3B82F6; }
.dot-gray { background: #444; }
.conv-avatar { width: 36px; height: 36px; border-radius: 50%; background: #2a2a2a; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #888; flex-shrink: 0; }
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; margin-bottom: 3px; }
.conv-name { font-size: 13px; font-weight: 500; color: #eee; }
.conv-time { font-size: 11px; color: #555; }
.conv-preview { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.conv-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.conv-empty { padding: 32px; text-align: center; color: #555; font-size: 13px; }

/* Chat */
.conv-chat { display: flex; flex-direction: column; background: #111; overflow: hidden; }
.conv-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.conv-placeholder i { color: #333; }
.conv-placeholder p { font-size: 14px; color: #444; }
.chat-header { background: #1a1a1a; border-bottom: 1px solid #2a2a2a; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: #E8520A; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.chat-info { flex: 1; }
.chat-name { font-size: 14px; font-weight: 600; color: #fff; }
.chat-sub { font-size: 12px; color: #666; }
.chat-actions { display: flex; gap: 6px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-loading { text-align: center; color: #555; font-size: 13px; padding: 20px; }
.ticket-bar { background: #1a1a1a; border-bottom: 1px solid #2a2a2a; padding: 8px 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #888; }
.ticket-bar strong { color: #E8520A; }

/* Mensagens */
.msg-row { display: flex; }
.msg-left { justify-content: flex-start; }
.msg-right { justify-content: flex-end; }
.msg-bubble { max-width: 65%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-wrap: break-word; }
.bubble-client { background: #2d1f0e; color: #fb923c; border-radius: 12px 12px 2px 12px; }
.bubble-bot { background: #1a2a3a; color: #93c5fd; border-radius: 12px 12px 2px 12px; }
.bubble-att { background: #3a1f00; color: #fb923c; border-radius: 12px 12px 2px 12px; }
.bubble-out { background: #3a2e00; color: #fbbf24; border-radius: 12px; }
.msg-sender { font-size: 11px; color: #555; margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.sender-bot { color: #3B82F6; }
.sender-att { color: #E8520A; }
.sender-out { color: #d97706; }
.msg-time { font-size: 11px; color: #444; margin-top: 3px; }
.msg-system { text-align: center; font-size: 12px; color: #444; padding: 6px; }
.chat-input-area { background: #1a1a1a; border-top: 1px solid #2a2a2a; padding: 12px 16px; }
.sensitive-alert { background: #3a1f00; color: #fb923c; font-size: 12px; padding: 6px 12px; border-radius: 6px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
#chat-input { flex: 1; border: 1px solid #333; border-radius: 8px; padding: 8px 12px; font-size: 13px; resize: none; outline: none; font-family: inherit; max-height: 120px; background: #111; color: #eee; }
#chat-input:focus { border-color: #E8520A; }
#chat-input::placeholder { color: #444; }
.chat-locked { background: #1a1a1a; border-top: 1px solid #2a2a2a; padding: 12px 16px; text-align: center; font-size: 13px; color: #555; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ===== TICKETS / ORÇAMENTOS / CONTATOS / PRODUTOS ===== */
.tickets-layout { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 48px); margin: -24px; }
.tickets-list { border-right: 1px solid #2a2a2a; display: flex; flex-direction: column; background: #1a1a1a; overflow: hidden; }
.ticket-counts { display: flex; border-bottom: 1px solid #2a2a2a; }
.count-item { flex: 1; text-align: center; padding: 12px 4px; text-decoration: none; color: #666; border-bottom: 2px solid transparent; }
.count-item:hover { background: #222; color: #ccc; }
.count-item.active { border-bottom-color: #E8520A; color: #E8520A; }
.count-item.count-sla { color: #f87171; }
.count-num { display: block; font-size: 20px; font-weight: 600; color: #eee; }
.count-label { display: block; font-size: 11px; }
.ticket-filters { padding: 10px 12px; border-bottom: 1px solid #2a2a2a; display: flex; gap: 8px; }
.filter-search { flex: 1; display: flex; align-items: center; gap: 6px; background: #222; border-radius: 6px; padding: 6px 10px; }
.filter-search i { color: #555; font-size: 15px; }
.filter-search input { border: none; background: none; outline: none; font-size: 13px; flex: 1; color: #ccc; }
.filter-search input::placeholder { color: #555; }
#filter-priority, #filter-lgpd, #filter-category { border: 1px solid #333; border-radius: 6px; padding: 6px 8px; font-size: 12px; outline: none; background: #222; color: #ccc; }
#ticket-items, #contact-items, #product-items, #quote-items { flex: 1; overflow-y: auto; }
.ticket-item { padding: 12px 14px; border-bottom: 1px solid #222; cursor: pointer; }
.ticket-item:hover { background: #222; }
.ticket-item.active { background: #222; border-left: 3px solid #E8520A; }
.ticket-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ticket-code { font-size: 13px; font-weight: 600; color: #eee; }
.ticket-contact { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.ticket-item-bottom { display: flex; align-items: center; gap: 6px; }
.ticket-category { font-size: 11px; color: #555; flex: 1; }
.ticket-time { font-size: 11px; color: #444; }
.ticket-attendant { font-size: 11px; color: #22C55E; display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.sla-badge { background: #3d1515; color: #f87171; font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }

/* Status */
.ticket-status { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.status-open { background: #1e3a5f; color: #7eb8f7; }
.status-progress { background: #3a1f00; color: #fb923c; }
.status-waiting { background: #3a2e00; color: #fbbf24; }
.status-resolved { background: #14532d; color: #86efac; }
.status-closed, .status-draft { background: #2a2a2a; color: #666; }
.status-sent { background: #1e3a5f; color: #7eb8f7; }

/* Prioridade */
.ticket-priority { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.prio-urgent, .priority-urgent { background: #3d1515; color: #f87171; }
.prio-high, .priority-high { background: #3a1f00; color: #fb923c; }
.prio-normal, .priority-normal { background: #14532d; color: #86efac; }
.prio-low, .priority-low { background: #2a2a2a; color: #666; }

/* Detalhe */
.ticket-detail { display: flex; flex-direction: column; background: #111; overflow: hidden; }
.ticket-detail-header { background: #1a1a1a; border-bottom: 1px solid #2a2a2a; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.ticket-detail-code { font-size: 16px; font-weight: 600; color: #fff; }
.ticket-detail-contact { font-size: 13px; color: #666; display: flex; align-items: center; gap: 4px; margin-top: 2px; flex-wrap: wrap; }
.ticket-detail-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ticket-detail-meta { background: #1a1a1a; border-bottom: 1px solid #2a2a2a; padding: 10px 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sla-info, .att-info { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; }
.ticket-status-badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: #2a2a2a; color: #888; }
.ticket-questionnaire { background: #1a1a1a; border-bottom: 1px solid #2a2a2a; padding: 12px 16px; }
.section-title { font-size: 12px; font-weight: 600; color: #555; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.qa-row { display: flex; gap: 12px; margin-bottom: 6px; font-size: 13px; }
.qa-q { color: #666; min-width: 140px; }
.qa-a { color: #ddd; font-weight: 500; }
.ticket-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ticket-reply { background: #1a1a1a; border-top: 1px solid #2a2a2a; padding: 12px 16px; }
#ticket-input { width: 100%; border: 1px solid #333; border-radius: 8px; padding: 10px 12px; font-size: 13px; resize: vertical; outline: none; font-family: inherit; background: #111; color: #eee; }
#ticket-input::placeholder { color: #444; }
#ticket-input:focus { border-color: #E8520A; }
.ticket-reply-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ticket-reply-hint { font-size: 12px; color: #555; display: flex; align-items: center; gap: 4px; }
.ticket-closed-msg { background: #1a1a1a; border-top: 1px solid #2a2a2a; padding: 16px; text-align: center; font-size: 13px; color: #555; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ===== ORÇAMENTOS ===== */
.quote-items-section { flex: 1; overflow-y: auto; padding: 16px; }
.quote-table { width: 100%; border-collapse: collapse; background: #1a1a1a; border-radius: 8px; overflow: hidden; border: 1px solid #2a2a2a; margin-bottom: 16px; }
.quote-table th { background: #222; padding: 10px 12px; font-size: 12px; color: #666; text-align: left; border-bottom: 1px solid #2a2a2a; font-weight: 500; }
.quote-table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #222; vertical-align: middle; color: #ccc; }
.quote-table tr:last-child td { border-bottom: none; }
.qty-input, .price-input { width: 70px; border: 1px solid #333; border-radius: 4px; padding: 4px 6px; font-size: 13px; text-align: right; background: #111; color: #eee; }
.add-item-row { margin-bottom: 12px; }
.quote-totals { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; color: #666; border-bottom: 1px solid #222; }
.total-row:last-child { border-bottom: none; }
.total-final { font-size: 16px; font-weight: 600; color: #fff; padding-top: 10px; margin-top: 4px; }
.quote-notes { background: #3a2e00; border: 1px solid #4a3a00; border-radius: 6px; padding: 10px 14px; font-size: 13px; color: #fbbf24; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 8px; }
.quote-save-row { display: flex; justify-content: flex-end; }

/* ===== CONTATOS ===== */
.contact-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.contact-section { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px; padding: 14px; }
.contact-section textarea { width: 100%; border: 1px solid #333; border-radius: 6px; padding: 8px 10px; font-size: 13px; resize: vertical; outline: none; font-family: inherit; background: #111; color: #eee; }
.contact-section textarea::placeholder { color: #444; }
.contact-section textarea:focus { border-color: #E8520A; }
.timeline-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: #888; border-bottom: 1px solid #222; }
.timeline-item:last-child { border-bottom: none; }
.timeline-item i { font-size: 15px; color: #444; flex-shrink: 0; }
.timeline-item span:nth-child(2) { flex: 1; }

/* ===== PRODUTOS ===== */
.product-icon { width: 36px; height: 36px; border-radius: 8px; background: #222; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #555; flex-shrink: 0; }
.import-form .form-group { margin-bottom: 12px; }
.import-form label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.import-option { border: 1px solid #2a2a2a; border-radius: 8px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: #1a1a1a; }
.import-option:hover { border-color: #E8520A; background: #2a1a0a; }
.import-option span { font-size: 14px; font-weight: 500; color: #ddd; }
.import-option small { font-size: 12px; color: #666; }

/* ===== DASHBOARD ===== */
.dashboard { display: flex; flex-direction: column; gap: 20px; }
.dash-alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; font-size: 13px; }
.dash-alert i { font-size: 18px; flex-shrink: 0; }
.dash-alert a { margin-left: auto; }
.dash-alert-danger { background: #3d1515; color: #f87171; border: 1px solid #7f1d1d; }
.dash-alert-warning { background: #3a1f00; color: #fb923c; border: 1px solid #92400e; }
.dash-cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; }
.dash-card { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.dash-card-warning { border-color: #92400e; background: #2a1a0a; }
.dash-card-info { border-color: #1e3a5f; background: #111e30; }
.dash-card-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.dash-card-body { flex: 1; min-width: 0; }
.dash-card-value { font-size: 26px; font-weight: 700; color: #fff; line-height: 1; }
.dash-card-label { font-size: 12px; color: #666; margin-top: 3px; }
.dash-card-link { color: #555; font-size: 16px; padding: 4px; text-decoration: none; }
.dash-card-link:hover { color: #E8520A; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-panel { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 10px; padding: 16px; }
.dash-panel-title { font-size: 12px; font-weight: 600; color: #555; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.dash-today-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.today-stat { text-align: center; padding: 12px 8px; background: #222; border-radius: 8px; }
.today-num { font-size: 28px; font-weight: 700; line-height: 1; }
.today-label { font-size: 11px; color: #555; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 3px; }
.prio-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.prio-label { font-size: 12px; font-weight: 500; width: 60px; flex-shrink: 0; }
.prio-bar-wrap { flex: 1; height: 8px; background: #222; border-radius: 4px; overflow: hidden; }
.prio-bar { height: 100%; border-radius: 4px; }
.prio-count { font-size: 13px; font-weight: 600; width: 24px; text-align: right; flex-shrink: 0; color: #eee; }
.attendant-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #222; }
.attendant-row:last-child { border-bottom: none; }
.activity-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #222; }
.activity-row:last-child { border-bottom: none; }
.page-title { font-size: 20px; font-weight: 600; margin-bottom: 24px; color: #fff; }

.conv-detail { border-left: 1px solid #2a2a2a; background: #1a1a1a; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 16px; gap: 12px; flex-shrink: 0; }
.conv-detail-section { background: #222; border-radius: 8px; padding: 12px; }
.conv-detail-title { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.conv-detail-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #aaa; padding: 3px 0; }
.conv-detail-row strong { color: #ddd; }
.conv-detail-avatar { width: 48px; height: 48px; border-radius: 50%; background: #E8520A; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; margin: 0 auto 8px; }

/* Scrollbar customizada */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

.detail-header { display:flex; flex-direction:column; align-items:center; gap:6px; padding-bottom:12px; border-bottom:0.5px solid #2a2a2a; }
.detail-name { font-size:15px; font-weight:500; color:#fff; }
.detail-phone { font-size:12px; color:#666; }
.detail-badges { display:flex; gap:6px; flex-wrap:wrap; justify-content:center; margin-top:4px; }
.detail-badge { font-size:11px; padding:2px 8px; border-radius:20px; display:inline-flex; align-items:center; gap:3px; }
.detail-badge-green { background:#1a3a1a; color:#4ade80; border:0.5px solid #2a5a2a; }
.detail-badge-warn  { background:#3a2a0a; color:#fbbf24; border:0.5px solid #5a4a1a; }
.detail-badge-blue  { background:#1a2a3a; color:#7eb8f7; border:0.5px solid #2a3a5a; }
.detail-metrics { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.detail-metric { background:#111; border-radius:8px; padding:10px; border:0.5px solid #2a2a2a; }
.detail-metric-label { font-size:11px; color:#555; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:4px; }
.detail-metric-value { font-size:22px; font-weight:500; color:#fff; }
.detail-profile-btn { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; padding:8px; border-radius:8px; background:transparent; border:0.5px solid #2a2a2a; color:#666; font-size:12px; cursor:pointer; text-decoration:none; margin-top:4px; }
.detail-profile-btn:hover { background:#222; color:#aaa; }



/* Impersonate bar */
body.has-impersonate-bar { background: #E8520A; }
body.has-impersonate-bar .layout { margin-top: 36px; height: calc(100vh - 36px); overflow: hidden; }



/* ===== BOTAPP WAITING HUMAN NOTIFICATIONS ===== */
.badge.badge-danger,
#badge-conversations.badge-danger {
  background: #dc2626 !important;
  color: #fff !important;
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(220,38,38,0.65);
  animation: botappPulseBadge 1.15s infinite;
}

body.has-waiting-human .nav-item[href*="/admin/conversations"] {
  color: #fff;
}

body.has-waiting-human .nav-item[href*="/admin/conversations"] i {
  color: #fb923c;
}

#botapp-waiting-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  width: min(360px, calc(100vw - 40px));
  background: linear-gradient(135deg, #3d1515 0%, #1f1212 100%);
  border: 1px solid #7f1d1d;
  border-left: 4px solid #E8520A;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.55);
  padding: 14px 14px 12px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: botappToastIn .18s ease-out;
}

#botapp-waiting-toast .toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #E8520A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(232,82,10,.65);
  animation: botappPulseBadge 1.15s infinite;
}

#botapp-waiting-toast .toast-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

#botapp-waiting-toast .toast-text {
  font-size: 12px;
  color: #f3c2b1;
  line-height: 1.35;
}

#botapp-waiting-toast .toast-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#botapp-waiting-toast .toast-btn {
  border: 0;
  background: #E8520A;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}

#botapp-waiting-toast .toast-btn.secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.conv-item.conv-waiting {
  background: linear-gradient(90deg, rgba(232,82,10,.16), rgba(26,26,26,0));
  border-left: 3px solid #E8520A;
}

.conv-item.conv-waiting.active {
  border-left-color: #ff6a1a;
}

.conv-item.conv-waiting .conv-name {
  color: #fff;
  font-weight: 700;
}

.tag-waiting,
.badge-waiting {
  background: #E8520A !important;
  color: #fff !important;
  border: 0 !important;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dot-waiting {
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34,197,94,.7);
  animation: botappPulseDot 1.1s infinite;
}

.pulse-waiting {
  animation: botappPulseWaiting 1.05s infinite;
}

@keyframes botappPulseBadge {
  0%   { box-shadow: 0 0 0 0 rgba(232,82,10,.65); transform: scale(1); }
  70%  { box-shadow: 0 0 0 8px rgba(232,82,10,0); transform: scale(1.03); }
  100% { box-shadow: 0 0 0 0 rgba(232,82,10,0); transform: scale(1); }
}

@keyframes botappPulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.7); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

@keyframes botappPulseWaiting {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%      { opacity: .62; transform: translateY(-1px); }
}

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

