/* resources/css/components.css */

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

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

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* SisZap Design System - Prototype Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ===== TRANSITIONS ===== */
.transition-all {
  transition: all 0.2s ease-in-out;
}

/* ===== FOCUS STATES ===== */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* ===== DISABLED STATES ===== */
button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== ERROR STATES ===== */
.error-input {
  border-color: #ba1a1a !important;
  background-color: #fff8f7;
}

.error-text {
  color: #ba1a1a;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ===== LOADING STATES ===== */
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -50px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.animate-fadeUp { animation: fadeUp 0.22s ease; }

/* Scrollbar (prototype) */
.design-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
.design-scrollbar::-webkit-scrollbar-track { background: transparent; }
.design-scrollbar::-webkit-scrollbar-thumb { background: #D7DBE6; border-radius: 99px; }

/* ===== DESIGN SYSTEM (SisZap) ===== */

/* Card Primary */
.card-primary {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #E8EAF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.card-primary:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Legacy alias */
.card-neumorphic,
.card-neumorphic:hover {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid #E8EAF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.card-neumorphic:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Button Primary */
button.btn-primary, a.btn-primary, .btn-primary {
  padding: 12px 18px;
  border-radius: 12px;
  background: #0f2091;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.btn-primary:hover, a.btn-primary:hover, .btn-primary:hover {
  background: #0c1a73;
  box-shadow: 0 4px 12px rgba(15, 32, 145, 0.15);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Legacy alias */
.btn-neumorphic-primary {
  padding: 12px 18px;
  border-radius: 14px;
  background: #0f2091;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Button Secondary */
button.btn-secondary, a.btn-secondary, .btn-secondary {
  padding: 12px 18px;
  border-radius: 12px;
  background: #F0F2F7;
  color: #3A4154;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1px solid #E8EAF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.btn-secondary:hover, a.btn-secondary:hover, .btn-secondary:hover {
  background: #F7F8FB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Legacy alias */
.btn-neumorphic-secondary {
  padding: 12px 18px;
  border-radius: 14px;
  background: #F0F2F7;
  color: #3A4154;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1px solid #E8EAF0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Input Primary */
input.input-primary, .input-primary {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #E2E5EE;
  border-radius: 11px;
  background: #F7F8FB;
  color: #3A4154;
  font-size: 14px;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: none;
  transition: all 0.2s ease-in-out;
}

input.input-primary:focus, .input-primary:focus {
  outline: none;
  border-color: #4353E8;
  box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.1);
}

/* Legacy alias */
.input-neumorphic {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E8EAF0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #3A4154;
  font-size: 13px;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

/* Textarea Primary */
textarea.textarea-primary, .textarea-primary {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E2E5EE;
  border-radius: 11px;
  background: #F7F8FB;
  color: #3A4154;
  font-size: 14px;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: none;
  transition: all 0.2s ease-in-out;
  resize: vertical;
}

textarea.textarea-primary:focus, .textarea-primary:focus {
  outline: none;
  border-color: #4353E8;
  box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.1);
}

/* Legacy alias */
.textarea-neumorphic {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E8EAF0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #3A4154;
  font-size: 13px;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  resize: vertical;
}

/* Select Primary */
select.select-primary, .select-primary {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 14px;
  border: 1px solid #E2E5EE;
  border-radius: 11px;
  background: #F7F8FB url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' 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 12px center;
  background-size: 20px;
  color: #3A4154;
  font-size: 14px;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  appearance: none;
}

select.select-primary:focus, .select-primary:focus {
  outline: none;
  border-color: #4353E8;
  box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.1);
}

/* Legacy alias — same as .select-primary */
.select-neumorphic {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E8EAF0;
  border-radius: 12px;
  background: #FFFFFF url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' 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 12px center;
  background-size: 20px;
  color: #3A4154;
  font-size: 13px;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  appearance: none;
  padding-right: 40px;
}

/* Neumorphic Option Block (for grouped options) */
.option-block-neumorphic {
  background: rgb(245, 247, 252);
  border-radius: 16px;
  padding: 16px;
  border: none;
  box-shadow: rgb(196, 200, 212) 4px 4px 12px, rgb(255, 255, 255) -2px -2px 6px;
  transition: all 0.2s ease-in-out;
}

.option-block-neumorphic:hover {
  box-shadow: rgb(196, 200, 212) 5px 5px 14px, rgb(255, 255, 255) -2px -2px 6px;
  transform: translateY(-1px);
}

/* Neumorphic Alert Box */
.alert-neumorphic {
  border-radius: 16px;
  padding: 16px;
  border: none;
  box-shadow: rgb(196, 200, 212) 4px 4px 12px, rgb(255, 255, 255) -2px -2px 6px;
}

.alert-neumorphic.success {
  background: rgb(220, 245, 235);
  color: rgb(15, 110, 70);
}

.alert-neumorphic.error {
  background: rgb(255, 235, 238);
  color: rgb(160, 20, 30);
}

/* ===== SisZap Design System — componentes (CSS puro, sem diretivas de build do Tailwind) =====
   O Tailwind CDN injeta o <style> dele no FIM do <head> (depois deste arquivo) e sem
   cascade layers. Por isso nada aqui fica em cascade layer (perderia para o preflight) e os
   seletores de botão/input são qualificados por elemento (button.x, input.x) para
   vencer o preflight/forms do Tailwind em empates de especificidade.
   Regra prática: utilitários Tailwind no MESMO elemento de uma classe do DS só
   sobrescrevem com "!" (ex.: class="btn-nm-primary !px-6"). */

  /* Base compartilhada de todos os botões .btn-nm-* */
  button[class*="btn-nm-"],
  a[class*="btn-nm-"],
  [class*="btn-nm-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-family: Figtree, Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
  }

  [class*="btn-nm-"] .material-symbols-outlined {
    font-size: 18px;
  }

  [class*="btn-nm-"]:disabled,
  [class*="btn-nm-"][aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
  }

  [class*="btn-nm-"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.25);
  }

  /* Primary Button */
  button.btn-nm-primary, a.btn-nm-primary, .btn-nm-primary {
    background: #0f2091;
    color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  button.btn-nm-primary:hover, a.btn-nm-primary:hover, .btn-nm-primary:hover {
    background: #0c1a73;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(15, 32, 145, 0.2);
    transform: translateY(-1px);
  }

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

  /* Secondary Button */
  button.btn-nm-secondary, a.btn-nm-secondary, .btn-nm-secondary {
    background: #F0F2F7;
    color: #3A4154;
    border-color: #E8EAF0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  button.btn-nm-secondary:hover, a.btn-nm-secondary:hover, .btn-nm-secondary:hover {
    background: #F7F8FB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
  }

  /* Card */
  .card-nm {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #E8EAF0;
    box-shadow: 0 4px 14px rgba(20, 23, 31, 0.07), 0 1px 3px rgba(20, 23, 31, 0.04);
    transition: box-shadow 0.2s ease-in-out;
  }

  .card-nm:hover {
    box-shadow: 0 6px 20px rgba(20, 23, 31, 0.09), 0 2px 6px rgba(20, 23, 31, 0.05);
  }

  /* Input */
  input.input-nm, .input-nm {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: #FFFFFF;
    color: #3A4154;
    font-family: Figtree, Inter, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid #E2E5EE;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
  }

  input.input-nm::placeholder, .input-nm::placeholder {
    color: #9CA3AF;
    font-weight: 500;
  }

  input.input-nm.is-error, .input-nm.is-error {
    border-color: #D1383E;
    background: #FFF5F5;
  }

  input.input-nm:focus, .input-nm:focus {
    outline: none;
    border-color: #4353E8;
    box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.1);
  }

  /* Formulários inset (Design System — neumorfismo leve) */
  .form-field {
    margin-bottom: 1rem;
  }

  .form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #5A6172;
    margin-bottom: 6px;
  }

  .form-label-error {
    color: #D1383E;
  }

  input.input-inset, select.input-inset, .input-inset {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 13px;
    padding: 0 13px;
    font-size: 14px;
    background: #E8EBF1;
    color: #14171F;
    font-family: Figtree, sans-serif;
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff;
    transition: box-shadow 0.2s ease, background 0.2s ease;
  }

  .input-inset::placeholder {
    color: #9CA3AF;
    font-weight: 500;
  }

  input.input-inset:focus, select.input-inset:focus, .input-inset:focus {
    outline: none;
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px rgba(67, 83, 232, 0.22);
  }

  .input-inset.is-error {
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px #D1383E;
  }

  .input-inset-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    border-radius: 14px;
    padding: 0 13px;
    background: #E8EBF1;
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff;
    transition: box-shadow 0.2s ease;
  }

  .input-inset-wrap:focus-within {
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px rgba(67, 83, 232, 0.22);
  }

  .input-inset-wrap.is-error {
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px #D1383E;
  }

  .input-inset-wrap .input-inset-inner {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #14171F;
    font-family: Figtree, sans-serif;
    height: 100%;
    padding: 0;
    box-shadow: none;
  }

  .input-inset-wrap .input-inset-inner:focus {
    outline: none;
    box-shadow: none;
  }

  .input-inset-wrap .input-inset-inner::placeholder {
    color: #9CA3AF;
  }

  .form-error-msg {
    font-size: 11.5px;
    font-weight: 600;
    color: #D1383E;
    margin-top: 5px;
  }

  .form-hint {
    font-size: 11px;
    font-weight: 600;
    color: #B6BCCB;
    margin-top: 4px;
  }

  .card-auth {
    background: #FFFFFF;
    border: none;
    border-radius: 20px;
    box-shadow: 6px 6px 16px #c4c8d4, -2px -2px 8px #ffffff;
    padding: 28px;
  }

  .btn-auth {
    width: 100%;
    height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: #0f2091;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    font-family: Figtree, sans-serif;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(15, 32, 145, 0.35), -3px -3px 8px #ffffff;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .btn-auth:hover {
    background: #FFFFFF;
    color: #0f2091;
    border-color: #0f2091;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 32, 145, 0.18);
  }

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

  .btn-auth:focus-visible {
    outline: none;
    box-shadow: 5px 5px 14px rgba(15, 32, 145, 0.4), -3px -3px 8px #ffffff, 0 0 0 3px rgba(67, 83, 232, 0.22);
  }

  .alert-inset-error {
    background: #FFF5F5;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #D1383E;
    box-shadow: inset 2px 2px 6px rgba(209, 56, 62, 0.08), inset -2px -2px 6px #ffffff;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  /* Textarea */
  textarea.textarea-nm, .textarea-nm {
    width: 100%;
    min-height: 84px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #FFFFFF;
    color: #3A4154;
    font-family: Figtree, Inter, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #E2E5EE;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    resize: vertical;
  }

  textarea.textarea-nm::placeholder, .textarea-nm::placeholder {
    color: #9CA3AF;
    font-weight: 500;
  }

  textarea.textarea-nm.is-error, .textarea-nm.is-error, textarea.textarea-nm.border-error {
    border-color: #D1383E;
    background: #FFF5F5;
  }

  textarea.textarea-nm:focus, .textarea-nm:focus {
    outline: none;
    border-color: #4353E8;
    box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.1);
  }

  /* Select */
  select.select-nm, .select-nm {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background-color: #FFFFFF;
    color: #3A4154;
    font-family: Figtree, Inter, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    border: 1px solid #E2E5EE;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' 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 12px center;
    background-size: 20px;
    padding-right: 40px;
  }

  select.select-nm.is-error, .select-nm.is-error, select.select-nm.border-error {
    border-color: #D1383E;
  }

  select.select-nm:focus, .select-nm:focus {
    outline: none;
    border-color: #4353E8;
    box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.1);
  }

  /* Badge */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    background: #F0F2F7;
    color: #5A6172;
  }

  .badge .material-symbols-outlined {
    font-size: 14px;
  }

  .badge-success { background: #E8F8EF; color: #178A46; }
  .badge-warning { background: #FFF7DE; color: #B45309; }
  .badge-error { background: #F8D2D4; color: #B02A30; }
  .badge-info { background: #EEF0FE; color: #4353E8; }
  .badge-secondary { background: #F0F2F7; color: #5A6172; }
  .badge-primary { background: #E8EBFA; color: #0f2091; }

  .badge--sm { padding: 2px 8px; font-size: 10px; }
  .badge--lg { padding: 6px 12px; font-size: 12.5px; }

  .badge__dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: currentColor;
    flex-shrink: 0;
  }

  /* Page shell */
  .page-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
    padding: 1rem 2rem;
    background: #FFFFFF;
    border-bottom: 1px solid #E8EAF0;
    flex-shrink: 0;
  }

  @media (min-width: 1024px) {
    .page-header {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
      min-height: 68px;
      padding: 0 2rem;
    }
  }

  .page-header__main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
  }

  @media (min-width: 1024px) {
    .page-header__main {
      flex-wrap: nowrap;
    }
  }

  .page-header__title-group {
    min-width: 0;
  }

  .page-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f2091; /* primary */
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .page-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9CA3AF;
    margin-top: 2px;
  }

  .page-header__search {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
  }

  .page-header__end {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  @media (min-width: 1024px) {
    .page-header__end {
      flex-wrap: nowrap;
      justify-content: flex-end;
      flex-shrink: 0;
    }
  }

  .page-header__tabs {
    display: none;
  }

  @media (min-width: 768px) {
    .page-header__tabs {
      display: block;
    }
  }

  .page-header__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid #E8EAF0;
  }

  .page-header__user-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #14171F;
    text-align: right;
    line-height: 1.2;
  }

  .page-header__user-role {
    font-size: 10px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #F0F2F7;
    border-radius: 10px;
    padding: 3px;
  }

  .nav-tabs__item {
    padding: 0.4rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #6B7280;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
  }

  .nav-tabs__item:hover {
    color: #14171F;
    background: rgba(255, 255, 255, 0.6);
  }

  .nav-tabs__item--active {
    background: #FFFFFF;
    color: #0f2091;
    box-shadow: 0 1px 3px rgba(20, 23, 31, 0.08);
  }

  .search-input {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    height: 42px;
    border-radius: 14px;
    padding: 0 13px;
    background: #E8EBF1;
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff;
    transition: box-shadow 0.2s ease;
    width: 100%;
  }

  .search-input:focus-within {
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px rgba(67, 83, 232, 0.22);
  }

  .search-input__icon {
    color: #9CA3AF;
    font-size: 18px;
    flex-shrink: 0;
  }

  input.search-input__field, .search-input__field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #14171F;
    font-family: Figtree, sans-serif;
    min-width: 0;
  }

  input.search-input__field:focus, .search-input__field:focus {
    outline: none;
  }

  input.search-input__field::placeholder, .search-input__field::placeholder {
    color: #9CA3AF;
    font-weight: 500;
  }

  button.icon-btn, a.icon-btn, .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid #E8EAF0;
    background: #FFFFFF;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(20, 23, 31, 0.05);
  }

  button.icon-btn:hover, a.icon-btn:hover, .icon-btn:hover {
    background: #F7F8FB;
    color: #14171F;
  }

  .page-section-title,
  .dashboard-section-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9CA3AF;
    margin-bottom: 0.75rem;
  }

  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: end;
  }

  @media (min-width: 768px) {
    .form-grid--filters {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (min-width: 1024px) {
    .form-grid--filters {
      grid-template-columns: 1.1fr 1.1fr 1.4fr auto;
      gap: 1rem;
    }

    .form-grid--filters-2 {
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
    }
  }

  textarea.textarea-inset, .textarea-inset {
    width: 100%;
    border: none;
    border-radius: 13px;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.5;
    background: #E8EBF1;
    color: #14171F;
    font-family: Figtree, sans-serif;
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff;
    resize: vertical;
    transition: box-shadow 0.2s ease;
  }

  textarea.textarea-inset:focus, .textarea-inset:focus {
    outline: none;
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px rgba(67, 83, 232, 0.22);
  }

  .textarea-inset.is-error {
    box-shadow: inset 3px 3px 7px #c4c8d4, inset -3px -3px 7px #ffffff, 0 0 0 2px #D1383E;
  }

  .form-actions {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    height: 100%;
  }

  .form-actions .btn-nm-primary,
  .form-actions .btn-nm-secondary {
    height: 42px;
    min-height: 42px;
    flex: 1;
    white-space: nowrap;
  }

  .form-grid .form-field {
    margin-bottom: 0;
  }

  select.input-inset {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' 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 12px center;
    background-size: 18px;
    padding-right: 36px;
  }

  button.btn-nm-ghost, a.btn-nm-ghost, .btn-nm-ghost {
    background: #FFFFFF;
    color: #3A4154;
    border-color: #E2E5EE;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  button.btn-nm-ghost:hover, a.btn-nm-ghost:hover, .btn-nm-ghost:hover {
    background: #F7F8FB;
    color: #14171F;
  }

  button.btn-nm-danger, a.btn-nm-danger, .btn-nm-danger {
    background: #D1383E;
    color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(209, 56, 62, 0.2);
  }

  button.btn-nm-danger:hover, a.btn-nm-danger:hover, .btn-nm-danger:hover {
    background: #B02A30;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(209, 56, 62, 0.22);
    transform: translateY(-1px);
  }

  button.btn-nm-text, a.btn-nm-text, .btn-nm-text {
    height: auto;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 10px;
    background: transparent;
    color: #4353E8;
    box-shadow: none;
  }

  button.btn-nm-text:hover, a.btn-nm-text:hover, .btn-nm-text:hover {
    background: #EEF0FE;
  }

  button.btn-nm-sm, a.btn-nm-sm, .btn-nm-sm {
    height: 36px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 11px;
    gap: 5px;
  }

  button.btn-nm-sm .material-symbols-outlined, a.btn-nm-sm .material-symbols-outlined, .btn-nm-sm .material-symbols-outlined {
    font-size: 16px;
  }

  button.btn-nm-lg, a.btn-nm-lg, .btn-nm-lg,
  .btn-auth {
    height: 46px;
  }

  /* Botão de ícone quadrado (ações de linha) */
  button.btn-nm-icon, a.btn-nm-icon, .btn-nm-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
    background: transparent;
    color: #9CA3AF;
    box-shadow: none;
  }

  button.btn-nm-icon:hover, a.btn-nm-icon:hover, .btn-nm-icon:hover {
    background: #F0F2F7;
    color: #14171F;
  }

  .btn-nm-icon--danger:hover { background: #FEF1F2 !important; color: #D1383E !important; }
  .btn-nm-icon--primary:hover { background: #EEF0FE !important; color: #4353E8 !important; }

  .page-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem 2rem 2rem 2rem;
  }

  /* Dashboard layout */
  .dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1600px;
    width: 100%;
  }

  .dashboard-grid-kpi {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  @media (min-width: 768px) {
    .dashboard-grid-kpi {
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
    }
  }

  @media (min-width: 1024px) {
    .dashboard-grid-kpi {
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
    }
  }

  .dashboard-grid-2-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
  }

  @media (min-width: 1024px) {
    .dashboard-grid-2-1 {
      grid-template-columns: 2fr 1fr;
      gap: 1.5rem;
    }
  }

  .dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  @media (min-width: 1024px) {
    .dashboard-grid-2 {
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
    }
  }

  .dashboard-grid-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  @media (min-width: 1024px) {
    .dashboard-grid-bottom {
      grid-template-columns: 2fr 1fr;
      gap: 1.5rem;
    }
  }

  .dashboard-full-width {
    grid-column: 1 / -1;
  }

  .card-nm-flush {
    padding: 0;
    overflow: hidden;
  }

  .card-nm-head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E8EAF0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }

  .card-nm-body {
    padding: 1rem 1.5rem 1.25rem;
  }

  .card-kpi {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 1.25rem 1.375rem;
    border: 1px solid #E8EAF0;
    box-shadow: 0 4px 14px rgba(20, 23, 31, 0.07), 0 1px 3px rgba(20, 23, 31, 0.04);
    height: 100%;
  }

  /* Tab pills (legacy) */
  button.tab-pill, .tab-pill {
    flex: 1;
    border: none;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    height: 32px;
    font-size: 12.5px;
  }

  button.tab-pill-active, .tab-pill-active {
    background: #0f2091;
    color: #FFFFFF;
  }

  button.tab-pill-inactive, .tab-pill-inactive {
    background: #F0F2F7;
    color: #6B7280;
  }

  /* Chat — lista de atendimentos */
  .chat-list-column {
    width: 336px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-right: 1px solid #E8EAF0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chat-list-header {
    padding: 18px 16px 0;
  }

  .chat-list-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 12px;
  }

  .chat-list-header__title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #14171F;
  }

  .chat-status-badge {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f2091;
    background: #E8EBFA;
    border-radius: 99px;
    padding: 4px 10px;
    white-space: nowrap;
  }

  .chat-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    border: 1px solid #E8EAF0;
    border-radius: 12px;
    padding: 0 12px;
    background: #F7F8FB;
    margin-bottom: 0;
  }

  .chat-search-bar__field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13.5px;
    color: #14171F;
    font-family: Figtree, sans-serif;
    min-width: 0;
  }

  .chat-search-bar__field:focus {
    outline: none;
  }

  .chat-search-bar__field::placeholder {
    color: #9CA3AF;
  }

  .chat-inbox-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .chat-inbox-filters__select {
    height: 34px !important;
    min-height: 34px;
    padding: 0 8px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
  }

  .chat-queue-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
  }

  .chat-queue-tabs__item {
    flex: 1;
    height: 32px;
    border: none;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    background: #F0F2F7;
    color: #6B7280;
    white-space: nowrap;
    padding: 0 6px;
  }

  .chat-queue-tabs__item:hover {
    color: #14171F;
    background: #E8EAF0;
  }

  .chat-queue-tabs__item--active,
  .chat-queue-tabs__item--active:visited,
  .chat-queue-tabs__item--active:hover,
  .chat-queue-tabs__item--active .chat-queue-tabs__label,
  .chat-queue-tabs__item--active .chat-queue-tabs__sep,
  .chat-queue-tabs__item--active .chat-queue-tabs__count,
  .chat-queue-tabs__item--active [data-tab-count] {
    color: #FFFFFF;
  }

  .chat-queue-tabs__item--active,
  .chat-queue-tabs__item--active:visited {
    background: #0f2091;
  }

  .chat-queue-tabs__item--active:hover {
    background: #0c1a73;
  }

  .chat-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #FFFFFF;
  }

  .chat-list-items {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .chat-list-empty {
    padding: 40px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #9CA3AF;
  }

  .chat-list-item {
    display: block;
    padding: 14px 18px;
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #F2F4F8;
    background: #FFFFFF;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: none;
  }

  .chat-list-item:hover {
    background: #F7F8FB;
    box-shadow: none;
  }

  /* Etiqueta "Novo" (Comercial): já respondida = azul claro */
  .chat-list-item--novo {
    --novo-bg: #E8F5FE;
    --novo-bg-hover: #DCEFFC;
    background: var(--novo-bg);
  }

  .chat-list-item--novo:hover {
    background: var(--novo-bg-hover);
  }

  /* Etiqueta "Novo" sem resposta do atendente: cor de atenção */
  .chat-list-item--novo-attention {
    --novo-attention-bg: #FEF3C7;
    --novo-attention-bg-hover: #FDE9A8;
    --novo-attention-border: #F59E0B;
    background: var(--novo-attention-bg);
    box-shadow: inset 3px 0 0 var(--novo-attention-border);
  }

  .chat-list-item--novo-attention:hover {
    background: var(--novo-attention-bg-hover);
  }

  /* Recebida por reatribuição e ainda sem resposta do novo atendente */
  .chat-list-item--transfer {
    --transfer-bg: #F3E8FF;
    --transfer-bg-hover: #EDE0FE;
    --transfer-border: #7C3AED;
    background: var(--transfer-bg);
    box-shadow: inset 3px 0 0 var(--transfer-border);
  }

  .chat-list-item--transfer:hover {
    background: var(--transfer-bg-hover);
  }

  .chat-list-item--active {
    background: #EEF0FE;
    border-color: #F2F4F8;
    box-shadow: none;
  }

  .chat-list-item--active:hover {
    background: #EEF0FE;
  }

  .chat-list-item--resolved {
    opacity: 0.72;
  }

  .chat-list-item__row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
  }

  .chat-list-item__body {
    flex: 1;
    min-width: 0;
  }

  .chat-list-item__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .chat-list-item__meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .chat-list-item__name {
    font-size: 14px;
    font-weight: 700;
    color: #14171F;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .chat-list-item__time {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .chat-list-item__preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
  }

  .chat-list-item__preview {
    font-size: 12.5px;
    font-weight: 500;
    color: #6B7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }

  .chat-list-item__pending-mark {
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    background: #0f2091;
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
  }

  .chat-list-item__unread-badge {
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    background: #22C55E;
    color: #FFFFFF;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
    line-height: 1;
  }

  .chat-list-item__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
  }

  .chat-list-chip {
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 99px;
    padding: 3px 8px;
    line-height: 1.2;
  }

  .chat-list-chip--neutral {
    color: #5A6172;
    background: #F0F2F7;
  }

  .chat-list-chip--tag {
    background: color-mix(in srgb, var(--tag-color, #4353E8) 14%, #FFFFFF);
    color: color-mix(in srgb, var(--tag-color, #4353E8) 78%, #14171F);
    border: 1px solid color-mix(in srgb, var(--tag-color, #4353E8) 28%, transparent);
  }

  .chat-list-chip--warning {
    color: #B45309;
    background: #FEF3C7;
  }

  .chat-list-chip--muted {
    color: #6B7280;
    background: #F0F2F7;
  }

  .chat-list-chip--agent {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0F2091;
    background: #EEF0FE;
    border: 1px solid #C5CBF5;
  }

  .chat-list-chip--transfer {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6D28D9;
    background: #F3E8FF;
    border: 1px solid #DDD6FE;
  }

  /* Avatar */
  .contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    background: #EEF0FE;
    color: #4353E8;
  }

  .contact-avatar--lg {
    width: 68px;
    height: 68px;
    font-size: 26px;
    font-weight: 800;
  }

  .contact-avatar--pending {
    background: #F8D2D4;
    color: #D1383E;
  }

  .contact-avatar--active {
    background: #E8EBFA;
    color: #0f2091;
  }

  .contact-avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .contact-row__name {
    font-size: 14px;
    font-weight: 700;
    color: #14171F;
    line-height: 1.2;
  }

  .contact-row__meta {
    font-size: 12px;
    font-weight: 500;
    color: #9CA3AF;
    margin-top: 1px;
  }

  /* Tabela de dados */
  .data-table-wrap {
    overflow: hidden;
  }

  .data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
  }

  .data-table thead tr {
    background: #F7F8FB;
    border-bottom: 1px solid #E8EAF0;
  }

  .data-table th {
    padding: 12px 16px;
    font-size: 10.5px;
    font-weight: 800;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .data-table td {
    padding: 14px 16px;
    font-size: 13px;
    color: #3A4154;
    vertical-align: middle;
  }

  .data-table tbody tr {
    border-bottom: 1px solid #F0F2F7;
    transition: background-color 0.15s ease;
  }

  .data-table tbody tr:hover {
    background: #F7F8FB;
  }

  .data-table tbody tr:last-child {
    border-bottom: none;
  }

  .data-table__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 12px 16px;
    background: #F7F8FB;
    border-top: 1px solid #E8EAF0;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
  }

  .table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .data-table tbody tr:hover .table-actions {
    opacity: 1;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    background: #EEF0FE;
    color: #4353E8;
  }

  .status-pill__dot {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #22C55E;
  }

  /* Painel do contato */
  .contact-panel-shell {
    position: relative;
    flex-shrink: 0;
    width: 296px;
    transition: width 0.28s ease;
    overflow: visible;
  }

  .contact-panel-shell--collapsed {
    width: 0;
  }

  .contact-panel {
    width: 296px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-left: 1px solid #E8EAF0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.28s ease, opacity 0.22s ease;
    animation: slideInRight 0.22s ease;
  }

  .contact-panel-shell--collapsed .contact-panel {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
  }

  .contact-panel__toggle {
    position: absolute;
    left: -30px;
    top: 72px;
    z-index: 20;
    width: 30px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #FFFFFF;
    border: 1px solid #E8EAF0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    color: #6B7280;
    box-shadow: -2px 0 8px rgba(15, 32, 145, 0.08);
    transition: background 0.15s ease, color 0.15s ease;
  }

  .contact-panel__toggle:hover {
    background: #F7F8FB;
    color: #0f2091;
  }

  .contact-panel__toggle-icon {
    font-size: 20px;
    transition: transform 0.28s ease;
  }

  .contact-panel-shell--collapsed .contact-panel__toggle-icon {
    transform: rotate(180deg);
  }

  .contact-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 0;
  }

  .contact-panel__title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #5A6172;
    text-transform: uppercase;
  }

  .contact-panel__identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid #F0F2F7;
    text-align: center;
  }

  .contact-panel__name {
    font-size: 16.5px;
    font-weight: 800;
    color: #14171F;
    margin-top: 10px;
    line-height: 1.2;
  }

  .contact-panel__phone {
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
    margin-top: 2px;
  }

  .contact-panel__email {
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    margin-top: 2px;
  }

  .contact-panel__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
  }

  .contact-panel__grid {
    padding: 14px 18px;
    border-bottom: 1px solid #F0F2F7;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .contact-panel__field {
    min-width: 0;
  }

  .contact-panel__label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }

  .contact-panel__value {
    font-size: 13.5px;
    font-weight: 700;
    color: #14171F;
    word-break: break-word;
  }

  .contact-panel__section {
    padding: 14px 18px;
    border-bottom: 1px solid #F0F2F7;
  }

  .contact-panel__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }

  .contact-panel__section:last-child {
    border-bottom: none;
  }

  .contact-panel__notes-box {
    border: 1.5px dashed #D1D5DB;
    border-radius: 14px;
    background: linear-gradient(180deg, #FAFBFD 0%, #F3F5F9 100%);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-style 0.2s ease;
  }

  /* Aberto — sem nota */
  .contact-panel__notes-box--open {
    border-style: dashed;
    border-color: #C5CAD6;
    background: linear-gradient(180deg, #FCFCFE 0%, #F5F7FA 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .contact-panel__notes-box--open .contact-panel__notes-input::placeholder {
    color: #6B7280;
    font-style: italic;
  }

  /* Preenchido — com nota salva */
  .contact-panel__notes-box--filled {
    border-style: solid;
    background: linear-gradient(180deg, #FFFCF5 0%, #FFF4D6 100%);
    border-color: #F0C35A;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.85) inset,
      0 4px 14px rgba(245, 158, 11, 0.08);
  }

  .contact-panel__notes-box--focus {
    border-style: solid;
    border-color: #4353E8;
    box-shadow: 0 0 0 3px rgba(67, 83, 232, 0.14);
    background: #FFFFFF;
  }

  .contact-panel__notes-box--focus.contact-panel__notes-box--filled {
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF0 100%);
    border-color: #4353E8;
  }

  .contact-panel__notes-box--focus.contact-panel__notes-box--open {
    background: #FFFFFF;
    border-color: #4353E8;
  }

  .contact-panel__notes-box--dirty {
    border-color: #4353E8;
  }

  .contact-panel__notes-state {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }

  .contact-panel__notes-state--open {
    background: #EEF0F5;
    color: #6B7280;
    border: 1px solid #DDE1EA;
  }

  .contact-panel__notes-state--filled {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FCD34D;
  }

  .contact-panel__notes-state--focus {
    background: rgba(67, 83, 232, 0.1);
    color: #4353E8;
    border: 1px solid rgba(67, 83, 232, 0.25);
  }

  .contact-panel__notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px 0;
  }

  .contact-panel__notes-toolbar-left {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
  }

  .contact-panel__notes-icon {
    font-size: 16px;
    color: #9CA3AF;
    transition: color 0.2s ease;
  }

  .contact-panel__notes-box--open .contact-panel__notes-icon {
    color: #9CA3AF;
  }

  .contact-panel__notes-box--filled .contact-panel__notes-icon {
    color: #D97706;
  }

  .contact-panel__notes-hint {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9CA3AF;
  }

  .contact-panel__notes-box--open .contact-panel__notes-hint {
    color: #6B7280;
  }

  .contact-panel__notes-box--filled .contact-panel__notes-hint {
    color: #B45309;
  }

  .contact-panel__notes-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(67, 83, 232, 0.22);
    border-radius: 999px;
    background: rgba(67, 83, 232, 0.08);
    color: #4353E8;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  }

  .contact-panel__notes-ai-btn .material-symbols-outlined {
    font-size: 15px;
  }

  .contact-panel__notes-ai-btn:hover {
    background: rgba(67, 83, 232, 0.14);
    border-color: rgba(67, 83, 232, 0.35);
  }

  .contact-panel__notes-ai-btn:active {
    transform: scale(0.97);
  }

  .contact-panel__notes-ai-btn:disabled,
  .contact-panel__notes-ai-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #F0F2F7;
    border-color: #E8EAF0;
    color: #9CA3AF;
  }

  .contact-panel__notes-ai-btn:disabled:active,
  .contact-panel__notes-ai-btn--disabled:active {
    transform: none;
  }

  .contact-panel__notes-ai-label {
    line-height: 1;
  }

  .contact-panel__notes-input {
    width: 100%;
    min-height: 96px;
    padding: 8px 12px 6px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #374151;
    line-height: 1.55;
    resize: vertical;
    font-family: inherit;
    transition: color 0.15s ease;
  }

  .contact-panel__notes-input:focus {
    outline: none;
  }

  .contact-panel__notes-box--filled .contact-panel__notes-input {
    color: #1F2937;
    font-weight: 600;
  }

  .contact-panel__notes-input::placeholder {
    color: #9CA3AF;
    font-weight: 500;
  }

  .contact-panel__notes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px 10px;
  }

  .contact-panel__notes-preview {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #B45309;
    letter-spacing: 0.02em;
  }

  .contact-panel__notes-preview .material-symbols-outlined {
    font-size: 14px;
  }

  .contact-panel__notes-preview.hidden {
    display: none;
  }

  .contact-panel__notes-counter {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    color: #9CA3AF;
    font-variant-numeric: tabular-nums;
  }

  .contact-panel__notes-box--filled .contact-panel__notes-counter {
    color: #D97706;
  }

  .contact-panel__save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: #4353E8;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  }

  .contact-panel__save-btn:hover:not(:disabled) {
    background: #3644D4;
    box-shadow: 0 4px 12px rgba(67, 83, 232, 0.22);
  }

  .contact-panel__save-btn:active:not(:disabled) {
    transform: scale(0.98);
  }

  .contact-panel__save-btn:disabled {
    background: #E8EAF0;
    color: #9CA3AF;
    cursor: not-allowed;
  }

  .contact-panel__save-btn--dirty:not(:disabled) {
    background: #4353E8;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(67, 83, 232, 0.18);
  }

  .contact-panel__save-icon {
    font-size: 17px;
  }

  .contact-panel__save-status {
    font-size: 10.5px;
    font-weight: 700;
    color: #9CA3AF;
  }

  .contact-panel__save-status--pending {
    color: #6B7280;
  }

  .contact-panel__save-status--ok {
    color: #16A34A;
  }

  .contact-panel__save-status--error {
    color: #DC2626;
  }

  .contact-panel__notes {
    margin-top: 8px;
    padding: 12px 14px;
    background: #F7F8FB;
    border: 1px solid #E8EAF0;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 500;
    color: #6B7280;
    line-height: 1.5;
  }

  .contact-panel__tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .contact-panel__tag-empty {
    font-size: 11.5px;
    font-weight: 600;
    color: #9CA3AF;
  }

  .contact-panel__sector-pill {
    cursor: default;
  }

  .contact-panel__tag-wrap {
    position: relative;
    max-width: 100%;
  }

  .contact-panel__tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    color: #1F2937;
    background: color-mix(in srgb, var(--tag-color, #4353E8) 14%, #FFFFFF);
    border: 1px solid color-mix(in srgb, var(--tag-color, #4353E8) 32%, transparent);
  }

  .contact-panel__tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tag-color, #4353E8);
    flex-shrink: 0;
  }

  .contact-panel__tag-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
  }

  .contact-panel__link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11.5px;
    font-weight: 700;
    color: #4353E8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .contact-panel__link:hover {
    color: #0f2091;
  }

  .contact-panel__tag-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 99px;
    background: #FFFFFF;
    color: #DC2626;
    border: 1px solid #FECACA;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .contact-panel__tag-wrap:hover .contact-panel__tag-remove {
    display: flex;
  }

  /* Modal de etiquetas */
  .tags-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  .tags-modal.hidden {
    display: none;
  }

  .tags-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
  }

  .tags-modal__card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: min(80vh, 520px);
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #E8EAF0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
  }

  .tags-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid #F0F2F7;
  }

  .tags-modal__title {
    font-size: 16px;
    font-weight: 800;
    color: #14171F;
    line-height: 1.2;
  }

  .tags-modal__subtitle {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
  }

  .tags-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: #F3F4F6;
    color: #6B7280;
    cursor: pointer;
  }

  .tags-modal__close:hover {
    background: #E5E7EB;
  }

  .tags-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
  }

  .tags-modal__group + .tags-modal__group {
    margin-top: 16px;
  }

  .tags-modal__group-title {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9CA3AF;
    margin-bottom: 8px;
  }

  .tags-modal__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  button.tags-modal__chip, .tags-modal__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--tag-color, #4353E8) 28%, #E5E7EB);
    background: #FFFFFF;
    color: #374151;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 100%;
  }

  .tags-modal__chip:hover {
    border-color: color-mix(in srgb, var(--tag-color, #4353E8) 45%, #E5E7EB);
    background: color-mix(in srgb, var(--tag-color, #4353E8) 8%, #FFFFFF);
  }

  .tags-modal__chip--selected {
    border-color: var(--tag-color, #4353E8);
    background: color-mix(in srgb, var(--tag-color, #4353E8) 16%, #FFFFFF);
    color: #111827;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag-color, #4353E8) 18%, transparent);
  }

  .tags-modal__chip-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--tag-color, #4353E8);
    flex-shrink: 0;
  }

  .tags-modal__chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tags-modal__chip-check {
    font-size: 16px;
    color: var(--tag-color, #4353E8);
    flex-shrink: 0;
  }

  .tags-modal__footer {
    padding: 12px 18px 16px;
    border-top: 1px solid #F0F2F7;
    display: flex;
    justify-content: flex-end;
  }

  button.tags-modal__done, .tags-modal__done {
    padding: 9px 16px;
    border: none;
    border-radius: 10px;
    background: #4353E8;
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
  }

  button.tags-modal__done:hover, .tags-modal__done:hover {
    background: #3644D4;
  }

/* ===== CONTACT FORM TAGS ===== */
.contact-form-tags {
  min-width: 0;
}

.contact-form-tags__search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.contact-form-tags__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #9CA3AF;
  pointer-events: none;
}

input.contact-form-tags__search, .contact-form-tags__search {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 38px;
  border: 1px solid #E8EBF1;
  border-radius: 11px;
  background: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  color: #14171F;
}

input.contact-form-tags__search:focus, .contact-form-tags__search:focus {
  outline: none;
  border-color: #0f2091;
  box-shadow: 0 0 0 3px rgba(15, 32, 145, 0.12);
}

.contact-form-tags__tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.contact-form-tags__tabs::-webkit-scrollbar {
  display: none;
}

button.contact-form-tags__tab, .contact-form-tags__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 12px;
  border: 1px solid #E8EBF1;
  border-radius: 999px;
  background: #FFFFFF;
  color: #5A6172;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.contact-form-tags__tab:hover {
  border-color: #D5DAE6;
  background: #F7F8FB;
}

.contact-form-tags__tab--active {
  border-color: #0f2091;
  background: #E8EBFA;
  color: #0c1a73;
}

.contact-form-tags__tab-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0f2091;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.contact-form-tags__panels {
  border: 1px solid #E8EBF1;
  border-radius: 14px;
  background: #F9FAFC;
  padding: 12px;
  max-height: 220px;
  overflow-y: auto;
}

.contact-form-tags__panel {
  display: none;
}

.contact-form-tags__panel--active {
  display: block;
}

.contact-form-tags__chips {
  gap: 6px;
}

.contact-form-tags__chip {
  padding: 6px 10px;
  font-size: 11.5px;
  max-width: 100%;
}

.contact-form-tags__empty {
  font-size: 12px;
  font-weight: 600;
  color: #9CA3AF;
  text-align: center;
  padding: 12px 4px;
}

.contact-form-tags__selected {
  margin-bottom: 10px;
}

.contact-form-tags__selected-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9CA3AF;
  margin-bottom: 6px;
}

.contact-form-tags__selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-form-tags__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: #EEF0FE;
  color: #4353E8;
  font-size: 11.5px;
  font-weight: 700;
}

.contact-form-tags__pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6B7280;
  cursor: pointer;
}

.contact-form-tags__pill-remove:hover {
  background: rgba(67, 83, 232, 0.12);
  color: #4353E8;
}

.form-label__icon {
  font-size: 15px;
  color: #9CA3AF;
  vertical-align: middle;
}

.form-label--inline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-card--form {
  margin: 0;
}

@media (max-width: 639px) {
  .modal-card--form {
    width: 100%;
  }
}

/* ===== TOGGLE SWITCH (SisZap Design System) ===== */
.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: #C9CEDC;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.toggle-switch.active {
  background: #0f2091;
}

.toggle-switch.active::after {
  transform: translateX(16px);
}

button.toggle-switch {
  border: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: #C9CEDC;
}

button.toggle-switch.active {
  background: #0f2091;
}

.shortcut-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 7px;
  background: #EEF0FE;
  color: #4353E8;
  font-family: 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

/* ===== MESSAGE BUBBLES (SisZap Design System) ===== */
.msg-bubble-inbound {
  background: #FFFFFF;
  border: 1px solid #E8EAF0;
  border-radius: 14px 14px 14px 4px;
}

.msg-bubble-outbound {
  background: #DCF7E3;
  border: 1px solid #C5EDD2;
  border-radius: 14px 14px 4px 14px;
}

.msg-bubble-note {
  background: #FFF7DE;
  border: 1px dashed #E5CE8F;
  border-radius: 14px;
}

.msg-bubble-system {
  background: #ECEEF4;
  border-radius: 99px;
  text-align: center;
  padding: 6px 16px;
  font-size: 12px;
  color: #5A6172;
}

.chat-day-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
  width: 100%;
}

.chat-day-separator::before,
.chat-day-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E2E5EE;
}

.chat-day-separator__label {
  flex-shrink: 0;
  background: #ECEEF4;
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #5A6172;
  letter-spacing: 0.01em;
}

/* ===== SLA BADGE ===== */
.sla-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.sla-badge.ok {
  background: #E8EBFA;
  color: #0f2091;
}

.sla-badge.warning {
  background: #FFF7DE;
  color: #D97706;
}

.sla-badge.critical {
  background: #FEF1F2;
  color: #D1383E;
}

/* ===== SECTOR TAG ===== */
.sector-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 99px;
  background: #F0F2F7;
  color: #5A6172;
  font-size: 11px;
  font-weight: 600;
}

/* ===== ACTION TAG CHIPS ===== */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  background: #EEF0FE;
  color: #4353E8;
  font-size: 11.5px;
  font-weight: 600;
}

.tag-chip .remove-btn {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.tag-chip .remove-btn:hover {
  opacity: 1;
}

/* ===== MODAL DIALOG (SisZap Design System) ===== */
.modal-backdrop {
  background: rgba(16, 18, 28, 0.42);
}

.modal-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 64px rgba(16, 18, 28, 0.25);
  animation: pop 0.15s ease;
}

button.modal-close-btn, .modal-close-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F0F2F7;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  color: #5A6172;
  transition: background 0.15s;
}

button.modal-close-btn:hover, .modal-close-btn:hover {
  background: #E8EAF0;
}

.chat-media-modal__toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-self: flex-end;
}

.chat-media-modal__download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.chat-media-modal__download:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ===== KPI CARD ===== */
.kpi-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid #E8EAF0;
  padding: 18px;
}

.kpi-card .kpi-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.kpi-card .kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #5A6172;
  margin-top: 4px;
}

/* ===== MASTER-DETAIL LAYOUT ===== */
.master-detail {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.master-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #E8EAF0;
  background: #FFFFFF;
  overflow: hidden;
}

.master-panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid #F2F4F8;
  flex-shrink: 0;
}

.master-panel-list {
  flex: 1;
  overflow-y: auto;
}

.master-panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #F2F4F8;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.master-panel-item:hover {
  background: #F7F8FB;
}

.master-panel-item.active {
  background: #EEF0FE;
  border-left: 3px solid #4353E8;
  padding-left: 15px;
}

.detail-panel {
  flex: 1;
  overflow-y: auto;
  background: #F4F6FA;
  padding: 24px;
}

/* ===== FLOW TIMELINE (SisZap Design System) ===== */
.flow-timeline {
  position: relative;
  padding-left: 28px;
}

.flow-timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #E8EAF0;
}

.flow-timeline-node {
  position: relative;
  margin-bottom: 20px;
}

.flow-timeline-node::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4353E8;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px #4353E8;
}

.flow-timeline-node.trigger::before {
  background: #0f2091;
  box-shadow: 0 0 0 2px #0f2091;
}

.flow-timeline-node.end::before {
  background: #9CA3AF;
  box-shadow: 0 0 0 2px #9CA3AF;
}

/* ===== Kanban ===== */
.kanban-column { width: 280px; min-width: 280px; background: #fff; border: 1px solid #E8EAF0; border-radius: 14px; display: flex; flex-direction: column; max-height: 100%; }
.kanban-column-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #F0F1F5; }
.kanban-column-title { font-weight: 800; font-size: 13px; color: #1f2430; flex: 1; }
.kanban-column-count { font-size: 11px; font-weight: 700; color: #8a90a2; background: #F2F3F7; border-radius: 999px; padding: 1px 8px; }
.kanban-col-menu { border: 0; background: transparent; color: #9aa0b0; cursor: pointer; font-size: 16px; }
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 40px; }
.kanban-card { background: #fff; border: 1px solid #E8EAF0; border-radius: 11px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); cursor: grab; }
.kanban-card-title { font-weight: 700; font-size: 13px; color: #1f2430; }
.kanban-card-sub { font-size: 11.5px; color: #8a90a2; margin-top: 2px; }
.kanban-card-preview { font-size: 11.5px; color: #6b7180; margin-top: 4px; }
.kanban-due { display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 700; color: #b54708; background: #fef3c7; border-radius: 6px; padding: 1px 6px; }
.kanban-add-card { margin: 8px 10px 12px; border: 1px dashed #D6D9E3; background: transparent; color: #6b7180; border-radius: 9px; padding: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.kanban-add-card:hover { background: #F7F8FB; }

/* ===== Kanban — Fase C (modais, swatches, contato, cor de coluna) ===== */
.kanban-col-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.kanban-column-head { cursor: grab; }

.kanban-modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(16,24,40,.45); padding: 16px; }
.kanban-modal-overlay.hidden { display: none; }
.kanban-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 440px; box-shadow: 0 20px 48px rgba(16,24,40,.24); display: flex; flex-direction: column; max-height: 90vh; }
.kanban-modal-sm { max-width: 360px; }
.kanban-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #F0F1F5; }
.kanban-modal-title { font-size: 15px; font-weight: 800; color: #1f2430; }
.kanban-modal-x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: #9aa0b0; cursor: pointer; }
.kanban-modal-body { padding: 16px 18px; overflow-y: auto; }
.kanban-modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid #F0F1F5; }
.kanban-field-label { display: block; font-size: 11px; font-weight: 700; color: #6b7180; margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.kanban-field-label:first-child { margin-top: 0; }
.kanban-input { width: 100%; border: 1px solid #E2E5EE; border-radius: 10px; padding: 8px 11px; font-size: 13px; color: #1f2430; }
.kanban-input:focus { outline: none; border-color: #9CB4FF; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
textarea.kanban-input { resize: vertical; }

.kanban-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.kanban-swatch { width: 24px; height: 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.kanban-swatch.is-selected { border-color: #1f2430; }
.kanban-swatch-none { background: #fff; border: 1px dashed #C7CBD6; position: relative; }
.kanban-swatch-none::after { content: '∅'; color: #9aa0b0; font-size: 12px; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.kanban-swatch-none.is-selected { border: 2px solid #1f2430; }

.kanban-contact-picker { position: relative; }
.kanban-contact-results { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: #fff; border: 1px solid #E2E5EE; border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12); max-height: 200px; overflow-y: auto; z-index: 5; }
.kanban-contact-results.hidden, .kanban-contact-chosen.hidden { display: none; }
.kanban-contact-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 11px; font-size: 12.5px; color: #1f2430; cursor: pointer; }
.kanban-contact-item:hover { background: #F7F8FB; }
.kanban-contact-chosen { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 8px 11px; background: #F2F5FF; border: 1px solid #DCE4FF; border-radius: 10px; font-size: 12.5px; color: #29418f; font-weight: 600; }
.kanban-contact-clear { border: 0; background: transparent; color: #6b7180; font-size: 16px; cursor: pointer; }

.kanban-btn-primary { background: var(--color-primary, #2f6bff); color: #fff; border: 0; border-radius: 10px; padding: 8px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.kanban-btn-primary:hover { opacity: .9; }
.kanban-btn-ghost { background: transparent; color: #6b7180; border: 0; border-radius: 10px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.kanban-btn-ghost:hover { background: #F2F3F7; }
.kanban-btn-danger { background: #FEECEC; color: #d92d20; border: 0; border-radius: 10px; padding: 8px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.kanban-btn-danger:hover { background: #FCD9D9; }
.kanban-btn-danger.hidden { display: none; }

/* ===== Contato compartilhado (WhatsApp contacts) ===== */
.shared-contact-card {
  min-width: 240px;
  max-width: 300px;
  background: #fff;
  border: 1px solid #E8EAF0;
  border-radius: 14px;
  overflow: hidden;
}
.shared-contact-card + .shared-contact-card { margin-top: 8px; }
.shared-contact-card--out {
  background: #F7FBF8;
  border-color: #C5EDD2;
}
.shared-contact-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 10px;
}
.shared-contact-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #EEF0FE;
  color: #4353E8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shared-contact-card__name {
  font-size: 14px;
  font-weight: 700;
  color: #1f2430;
  line-height: 1.3;
}
.shared-contact-card__phone {
  font-size: 12.5px;
  color: #3d4454;
  margin-top: 2px;
}
.shared-contact-card__meta {
  font-size: 11px;
  color: #8B90A0;
  margin-top: 1px;
}
.shared-contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}
.shared-contact-card__btn {
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: #0F2091;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.shared-contact-card__btn:disabled { opacity: .6; cursor: default; }
.shared-contact-card__link {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  background: #EEF0FE;
  color: #0F2091;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.shared-contact-card__status {
  font-size: 11.5px;
  font-weight: 700;
  color: #2f6b4f;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
