/* ============================================================
   MV3 Finança — Design System
   ============================================================ */

:root {
  color-scheme: dark;
  /* Paleta alinhada a https://mv3.com.br/ (Elementor kit) */
  --bg-deep: #00101f;
  --bg-mid: #0a1628;
  --bg-accent: #152835;
  --gradient-page: linear-gradient(145deg, #00101f 0%, #0a1628 40%, #152835 70%, #001a49 100%);
  --gradient-accent: linear-gradient(135deg, #31ddf4 0%, #0eacba 45%, #0092b5 100%);
  --gradient-card: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
  --gradient-brand: linear-gradient(135deg, #31ddf4, #799fe3);

  --surface: rgba(35, 51, 82, 0.72);
  --surface-solid: #233352;
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(155, 189, 194, 0.22);
  --border-focus: rgba(49, 221, 244, 0.55);

  --text: #ffffff;
  --text-muted: #9bbdc2;
  --primary: #31ddf4;
  --primary-hover: #0eacba;
  --primary-glow: rgba(49, 221, 244, 0.35);
  --success: #22c55e;
  --danger: #ef4444;
  --danger-hover: #dc2626;

  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px -12px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 40px -16px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px var(--primary-glow);
  --border-strong: rgba(155, 189, 194, 0.35);
  --text-heading: #ffffff;
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;

  --header-h: 76px;
  --sidebar-w: 248px;
  --sidebar-w-compact: 72px;
  --transition: 0.2s ease;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-nav: 0.3s var(--ease-smooth);

  /* Modal proposta / nota */
  --pedido-prestador: #31ddf4;
  --pedido-prestador-soft: rgba(49, 221, 244, 0.16);
  --pedido-prestador-muted: #7ae8f7;
  --pedido-prestador-highlight: #d7f8fd;
  --pedido-tomador: #22c55e;
  --pedido-tomador-soft: rgba(34, 197, 94, 0.14);
  --pedido-tomador-muted: #86efac;
  --pedido-tomador-highlight: #dcfce7;
  --pedido-discriminacao: #faad02;
  --pedido-discriminacao-soft: rgba(250, 173, 2, 0.14);
  --pedido-discriminacao-muted: #ffbc7d;
  --pedido-pagamento: #799fe3;
  --pedido-pagamento-soft: rgba(121, 159, 227, 0.14);
  --pedido-pagamento-muted: #a8c4f0;
  --pedido-money: #86efac;
  --pedido-total: #31ddf4;
  --pedido-surface: rgba(0, 16, 31, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--gradient-page);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: rgba(49, 221, 244, 0.2);
}

::selection {
  background: rgba(49, 221, 244, 0.35);
  color: #fff;
}

/* ---- Scrollbar (tema escuro) ---- */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
  background-clip: padding-box;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(49, 221, 244, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(14, 172, 186, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 0%, rgba(250, 173, 2, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .app-header {
  z-index: 0;
}

/* ---- Acessibilidade ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.noscript-warning {
  position: relative;
  z-index: 1000;
  margin: 0;
  padding: 1rem 1.25rem;
  text-align: center;
  font-weight: 600;
  color: #fff;
  background: #b91c1c;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.required {
  color: #f87171;
}

/* ---- Tipografia ---- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

/* ---- Brand / Logo ---- */
.brand-logo {
  display: block;
  width: min(320px, 92vw);
  height: auto;
  margin: 0 auto 1.25rem;
  object-fit: contain;
  mix-blend-mode: screen;
}

.brand-logo-sm {
  width: auto;
  height: 64px;
  margin: 0;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  margin-top: 0.25rem;
}

/* ---- Login ---- */
.page-login {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  animation: fadeUp 0.5s ease-out;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

/* ---- Glass Card ---- */
.glass-card {
  position: relative;
  background: var(--gradient-card);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card {
  background: var(--gradient-card);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-group input,
.form-group textarea,
.form-group select,
.search-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 16, 31, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.search-box input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover,
.search-box input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible,
.search-box input:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(0, 16, 31, 0.7);
}

/* Campo de senha com botão de visualizar */
.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 2.85rem;
}

/* Esconde o olho nativo do Edge/IE — usamos o botão customizado */
.password-field input::-ms-reveal,
.password-field input::-ms-clear,
.form-group input[type="password"]::-ms-reveal,
.form-group input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle:focus-visible {
  outline: none;
  color: var(--text);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  pointer-events: none;
}

.password-toggle[aria-pressed="true"] {
  color: var(--text);
}

a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.form-group textarea {
  resize: vertical;
  min-height: 88px;
}

.form-group input[type="date"],
.form-group input[type="month"],
.form-group input[type="datetime-local"],
.modal-form input[type="date"],
.modal-form input[type="month"],
.modal-form input[type="datetime-local"],
.nota-form-field input[type="date"],
.nota-form-field input[type="month"] {
  color-scheme: dark;
  padding-right: 2.6rem;
}

/* Ícone do calendário visível no tema escuro (Chrome, Edge, Safari) */
.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="month"]::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.modal-form input[type="date"]::-webkit-calendar-picker-indicator,
.modal-form input[type="month"]::-webkit-calendar-picker-indicator,
.modal-form input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.nota-form-field input[type="date"]::-webkit-calendar-picker-indicator,
.nota-form-field input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  width: 1.15rem;
  height: 1.15rem;
  margin-inline-end: 0.1rem;
  filter: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover,
.form-group input[type="month"]::-webkit-calendar-picker-indicator:hover,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
.modal-form input[type="date"]::-webkit-calendar-picker-indicator:hover,
.modal-form input[type="month"]::-webkit-calendar-picker-indicator:hover,
.modal-form input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
.nota-form-field input[type="date"]::-webkit-calendar-picker-indicator:hover,
.nota-form-field input[type="month"]::-webkit-calendar-picker-indicator:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

/* Campos numéricos: sem setas — apenas digitação manual */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.form-group input[type="date"]::-moz-calendar-picker-indicator,
.form-group input[type="month"]::-moz-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-moz-calendar-picker-indicator,
.modal-form input[type="date"]::-moz-calendar-picker-indicator,
.modal-form input[type="month"]::-moz-calendar-picker-indicator,
.modal-form input[type="datetime-local"]::-moz-calendar-picker-indicator,
.nota-form-field input[type="date"]::-moz-calendar-picker-indicator,
.nota-form-field input[type="month"]::-moz-calendar-picker-indicator {
  opacity: 1;
  filter: invert(1) brightness(1.8);
  cursor: pointer;
}

.input-uppercase {
  text-transform: uppercase;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-uf {
  grid-template-columns: 1fr 100px;
}

.form-row-endereco {
  grid-template-columns: 1fr 110px;
}

.form-group-grow {
  min-width: 0;
}

.form-group-uf input {
  text-align: center;
}

.form-group-numero {
  max-width: 120px;
}

@media (max-width: 600px) {
  .form-row,
  .form-row-uf,
  .form-row-endereco {
    grid-template-columns: 1fr;
  }

  .form-group-numero {
    max-width: none;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition), background var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  color: #fff;
  margin-top: 0.5rem;
}

.btn-gradient {
  background: var(--gradient-accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 20px -4px var(--primary-glow);
}

.btn-gradient:hover:not(:disabled) {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 12px 30px -6px var(--primary-glow);
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: transparent;
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-success {
  background: transparent;
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.5);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn-success:hover:not(:disabled) {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.btn-edit {
  background: transparent;
  color: #7ae8f7;
  border: 1px solid rgba(49, 221, 244, 0.5);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn-edit:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---- Alerts ---- */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
  animation: fadeIn 0.25s ease;
}

.alert.show {
  display: block;
}

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

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.page-app {
  overflow-x: clip;
}

body.cliente-edit-from-detail .app-shell,
body.cliente-edit-from-detail .skip-link {
  display: none !important;
}

/* ---- App Layout ---- */
.app-header {
  background: rgba(0, 16, 31, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-brand {
  display: flex;
  align-items: center;
}

.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex-shrink: 0;
}

.app-header .user-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0;
  max-width: 14rem;
}

.app-header .user-display-name {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .user-display-email {
  color: var(--text-muted);
  font-size: 0.74rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .user-header-role {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.28rem 0.55rem;
}

.app-header .user-email {
  color: var(--text-muted);
  font-size: 0.82rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.app-container--narrow {
  max-width: 720px;
}

.app-container--wide {
  max-width: 1440px;
  width: 100%;
}

.clients-section {
  margin-bottom: 1.5rem;
  padding: 1.75rem;
  animation: fadeUp 0.4s ease-out;
}

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--header-h));
}

.app-sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  position: sticky;
  top: var(--header-h);
  align-self: flex-start;
  height: calc(100vh - var(--header-h));
  background: rgba(0, 16, 31, 0.72);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 50;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-nav), flex-basis var(--transition-nav);
  will-change: width, flex-basis;
}

.app-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.85rem 0.85rem 0.35rem;
}

.app-sidebar-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.85;
  padding-left: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.18s var(--ease-smooth), max-width var(--transition-nav);
  max-width: 8rem;
}

.app-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.app-sidebar-toggle:hover,
.app-sidebar-toggle:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  outline: none;
}

.app-sidebar-toggle-icon {
  display: block;
  transition: transform var(--transition);
}

.app-shell--sidebar-collapsed .app-sidebar-toggle-icon {
  transform: rotate(180deg);
}

.app-main {
  flex: 1;
  min-width: 0;
}

.app-main .app-container {
  max-width: none;
  width: 100%;
  padding: 1.75rem 2rem 3rem;
}

.app-main-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-height: 0;
  padding: 0.35rem 0.85rem 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-nav-heading {
  margin: 0 0 0.5rem;
  padding: 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.85;
  max-height: 2rem;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.18s var(--ease-smooth), max-height var(--transition-nav),
    margin var(--transition-nav), padding var(--transition-nav);
}

.app-nav-heading--admin {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-main-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.72rem 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition),
    gap var(--transition-nav), padding var(--transition-nav);
}

.app-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  opacity: 0.9;
  transition: background var(--transition), color var(--transition);
}

.app-nav-svg {
  display: block;
}

.app-nav-label {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  max-width: 12rem;
  transition: opacity 0.18s var(--ease-smooth), max-width var(--transition-nav),
    transform var(--transition-nav);
}

.app-main-nav-btn:hover,
.app-main-nav-btn:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.app-main-nav-btn:hover .app-nav-icon,
.app-main-nav-btn:focus-visible .app-nav-icon {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

.app-main-nav-btn.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(49, 221, 244, 0.22) 0%, rgba(49, 221, 244, 0.06) 100%);
  box-shadow: inset 3px 0 0 var(--primary);
}

.app-main-nav-btn.is-active .app-nav-icon {
  background: rgba(49, 221, 244, 0.28);
  color: #b8f3fb;
  opacity: 1;
}

.app-view.hidden {
  display: none;
}

.clients-status-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.28rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.clients-status-tab {
  flex: 1;
  padding: 0.62rem 0.85rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.clients-status-tab:hover,
.clients-status-tab:focus-visible {
  color: var(--text);
  outline: none;
}

.clients-status-tab.is-active {
  background: rgba(49, 221, 244, 0.18);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(49, 221, 244, 0.25);
}

.inactive-clients-section {
  margin-top: 0;
  opacity: 0.92;
  padding: 1.75rem;
  animation: fadeUp 0.4s ease-out;
}

.client-item--inactive {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(0, 16, 31, 0.35);
}

.client-item--inactive .client-item-header h3 {
  color: var(--text-muted);
}

.client-status-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.client-status-badge--inactive {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.clients-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.clients-toolbar-left {
  flex: 1;
}

.card-title-inline {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.btn-new-client {
  width: auto;
  white-space: nowrap;
  margin-top: 0;
}

@media (max-width: 640px) {
  .app-header .user-identity,
  .app-header .user-header-role {
    display: none;
  }

  .clients-toolbar {
    flex-direction: column;
  }

  .btn-new-client {
    width: 100%;
  }
}

/* ---- Client List ---- */
.client-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.client-item {
  display: flex;
  flex-direction: column;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.client-item--clickable {
  cursor: pointer;
}

.client-item--clickable:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.client-item:hover {
  border-color: rgba(49, 221, 244, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(49, 221, 244, 0.15);
}

.client-item--inactive {
  opacity: 0.78;
}

.client-item-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.15rem 0.75rem;
}

.client-item-avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.client-item-heading {
  min-width: 0;
  flex: 1;
}

.client-item-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.client-item-location {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.client-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.25rem 1.15rem 1rem;
}

.client-item-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.client-item-row + .client-item-row {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.client-item-row-label {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.client-item-row-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  min-width: 0;
}

.client-item-row-value--mono {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.client-item-row-value--email {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.client-item-contacts {
  margin-top: 0.15rem;
}

.client-item-contacts-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.client-item-roles {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.client-item-roles-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.client-item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 1.6rem;
}

.client-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  background: rgba(49, 221, 244, 0.14);
  border: 1px solid rgba(49, 221, 244, 0.28);
  color: #b8f3fb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-role-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

.client-role-chip--comercial {
  background: rgba(250, 173, 2, 0.14);
  border: 1px solid rgba(250, 173, 2, 0.35);
  color: #ffbc7d;
}

.client-role-chip--gerente {
  background: rgba(121, 159, 227, 0.14);
  border: 1px solid rgba(121, 159, 227, 0.35);
  color: #a8c4f0;
}

.client-chip--more {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text-muted);
  font-weight: 600;
}

.client-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  padding: 0.72rem 1.15rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
}

.client-item-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: #7ae8f7;
  transition: color var(--transition);
}

.client-item:hover .client-item-cta {
  color: #b8f3fb;
}

.client-item-edit {
  flex-shrink: 0;
}

.client-item-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.client-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.client-contact-card {
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-sm);
}

.client-contact-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #86efac;
  margin-bottom: 0.65rem;
}

.client-mv3-contacts {
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, rgba(49, 221, 244, 0.12) 0%, rgba(14, 172, 186, 0.08) 100%);
  border: 1px solid rgba(49, 221, 244, 0.28);
  border-radius: var(--radius-sm);
}

.client-mv3-contacts-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7ae8f7;
  margin-bottom: 0.65rem;
}

.client-mv3-contacts-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mv3-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mv3-contact-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.mv3-contact-type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mv3-contact-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.mv3-contact-cargo {
  font-size: 0.82rem;
  color: #a8c4f0;
}

.mv3-contact-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.client-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.client-meta-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.empty-state-hint {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

.search-box {
  margin-bottom: 1.25rem;
}

.client-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Modal ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 16, 31, 0.75);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(1280px, 96vw);
  max-height: calc(100vh - 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s ease-out;
}

.modal-panel--cliente-form {
  width: min(920px, 96vw);
}

.cliente-form-steps {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.cliente-form-step {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.55rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.cliente-form-step:hover,
.cliente-form-step:focus-visible {
  color: var(--text);
  outline: none;
}

.cliente-form-step.is-active {
  background: rgba(49, 221, 244, 0.2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(49, 221, 244, 0.28);
}

.cliente-form-panels {
  flex-shrink: 0;
}

.cliente-form-panel {
  display: none;
}

.cliente-form-panel.is-active {
  display: block;
}

.cliente-form-panel.modal-contacts-panel.is-active {
  display: flex;
  flex-direction: column;
}

.cliente-form-panel .modal-section-title {
  margin-bottom: 1rem;
}

.cliente-form-panel.modal-contacts-panel .contacts-duo-grid {
  grid-template-columns: 1fr 1fr;
}

.cliente-form-footer {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cliente-form-footer-actions {
  display: flex;
  gap: 0.75rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.cliente-form-prev {
  margin-right: auto;
}

.mv3-cnpj-faturamento-ativo {
  border-color: rgba(134, 239, 172, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.2);
}

.mv3-faturamento-hint {
  margin: 0 0 0.85rem;
}

.mv3-faturamento-preview {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: #86efac;
  font-weight: 600;
}

.contact-mv3-badge--faturamento {
  background: rgba(134, 239, 172, 0.14);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.28);
}

.contact-profile-card--faturamento {
  margin-bottom: 0.85rem;
  background: linear-gradient(165deg, rgba(34, 197, 94, 0.1) 0%, rgba(0, 16, 31, 0.78) 58%, rgba(0, 16, 31, 0.9) 100%);
  border-color: rgba(34, 197, 94, 0.24);
}

.contact-profile-card--faturamento::before {
  background: #22c55e;
}

.modal-form {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-body-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  align-items: start;
  flex-shrink: 0;
}

.modal-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7ae8f7;
  margin-bottom: 0.85rem;
}

.modal-fields-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 1rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field-span-3 {
  grid-column: span 3;
}

.field-span-2 {
  grid-column: span 2;
}

.mv3-contatos-form-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.mv3-contato-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.mv3-contato-card--comercial {
  background: linear-gradient(165deg, rgba(0, 205, 255, 0.14) 0%, rgba(0, 16, 31, 0.58) 52%, rgba(0, 16, 31, 0.82) 100%);
  border: 1px solid rgba(0, 205, 255, 0.28);
}

.mv3-contato-card--tecnico {
  background: linear-gradient(165deg, rgba(14, 172, 186, 0.14) 0%, rgba(0, 16, 31, 0.58) 52%, rgba(0, 16, 31, 0.82) 100%);
  border: 1px solid rgba(14, 172, 186, 0.28);
}

.mv3-contato-card--filled.mv3-contato-card--comercial {
  border-color: rgba(0, 205, 255, 0.45);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}

.mv3-contato-card--filled.mv3-contato-card--tecnico {
  border-color: rgba(14, 172, 186, 0.45);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.12);
}

.mv3-contato-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.15rem 0.85rem;
}

.mv3-contato-card-avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mv3-contato-card--comercial .mv3-contato-card-avatar {
  background: rgba(0, 205, 255, 0.16);
  border-color: rgba(0, 205, 255, 0.28);
}

.mv3-contato-card--tecnico .mv3-contato-card-avatar {
  background: rgba(14, 172, 186, 0.16);
  border-color: rgba(14, 172, 186, 0.28);
}

.mv3-contato-card-intro {
  min-width: 0;
}

.mv3-contato-card-summary {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mv3-contato-card--filled .mv3-contato-card-summary {
  color: var(--text);
  font-weight: 600;
}

.mv3-contato-card-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 0.75rem;
  padding: 0 1.15rem 1.1rem;
}

.mv3-contato-card-fields .form-group:first-child,
.mv3-contato-card-fields .form-group:last-child {
  grid-column: 1 / -1;
}

.mv3-contato-card-fields .form-group label {
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.mv3-contato-card-fields input[readonly] {
  background: rgba(0, 16, 31, 0.45);
  color: var(--text-muted);
  cursor: default;
}

.mv3-contato-card-fields input[readonly]:not(:placeholder-shown) {
  color: var(--text);
}

.mv3-contato-card-fields .mv3-contact-select:disabled {
  opacity: 0.92;
  cursor: not-allowed;
  background: rgba(0, 16, 31, 0.5);
}

.mv3-contato-card-note {
  margin: 0 1.15rem 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #93c5fd;
  background: rgba(0, 205, 255, 0.1);
  border: 1px solid rgba(0, 205, 255, 0.22);
}

.cliente-form-panel[data-panel="contatos_mv3"] {
  background: transparent;
  border: none;
  padding: 0;
}

.cliente-form-panel[data-panel="contatos_mv3"] .modal-section-title {
  margin-bottom: 1rem;
}

.mv3-contatos-grid {
  align-items: start;
}

.mv3-contato-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.mv3-contato-heading {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a8c4f0;
  margin: 0 0 0.15rem;
}

.modal-form-main,
.modal-contacts-panel {
  min-width: 0;
  overflow: visible;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
}

.contacts-duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

.contact-block {
  background: rgba(49, 221, 244, 0.06);
  border: 1px solid rgba(49, 221, 244, 0.18);
  border-radius: 8px;
  padding: 0.9rem;
  height: fit-content;
}

.contact-block-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a8c4f0;
  margin-bottom: 0.65rem;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.contact-fields .form-group:first-child {
  grid-column: 1 / -1;
}

.contact-fields .form-group:last-child {
  grid-column: 1 / -1;
}

.mv3-autocomplete-wrap {
  position: relative;
}

.mv3-autocomplete-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: rgba(12, 18, 38, 0.98);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  max-height: 220px;
  overflow-y: auto;
}

.mv3-autocomplete-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}

.mv3-autocomplete-list li:hover,
.mv3-autocomplete-list li:focus {
  background: rgba(49, 221, 244, 0.15);
  outline: none;
}

.mv3-ac-nome {
  font-size: 0.9rem;
  color: var(--text);
}

.mv3-ac-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.client-contact-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.cliente-form-panel[data-panel="contatos"] .client-contact-block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.cliente-form-panel[data-panel="contatos"] .client-contact-block-header .field-hint {
  margin: 0;
  flex: 1;
}

.client-contact-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cliente-contatos-list {
  display: grid;
  gap: 0.85rem;
}

.cliente-contato-row {
  padding: 0.85rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cliente-contato-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.cliente-contato-row-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.cliente-contato-row-fields {
  display: grid;
  gap: 0.65rem;
}

.cliente-contato-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.cliente-contato-row-fields .form-group--full {
  grid-column: 1 / -1;
}

.cliente-contato-row-fields textarea {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(12, 18, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
}

.cliente-contato-row-fields textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

@media (max-width: 520px) {
  .cliente-contato-pair {
    grid-template-columns: 1fr;
  }
}

.cliente-contatos-stack {
  display: grid;
  gap: 1rem;
}

.client-contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

@media (max-width: 900px) {
  .client-contact-fields {
    grid-template-columns: 1fr;
  }
}

.modal-panel .form-group {
  margin-bottom: 0;
}

.modal-panel .form-group label {
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.modal-panel .form-group input {
  padding: 0.72rem 0.95rem;
  font-size: 0.95rem;
}

.modal-panel .form-group select {
  width: 100%;
  padding: 0.72rem 0.95rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(35, 51, 82, 0.6);
  color: var(--text);
}

.modal-panel--compact {
  max-width: 28rem;
}

.minha-conta-perfil {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(35, 51, 82, 0.45);
}

.minha-conta-nome {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.minha-conta-email {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.minha-conta-papel {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.minha-conta-modal--forced .modal-backdrop {
  pointer-events: none;
}

.minha-conta-modal--forced .modal-close,
body.minha-conta-force-active #minha-conta-cancel {
  display: none !important;
}

#minha-conta-force-hint:not(.hidden) {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  font-size: 0.9rem;
  line-height: 1.4;
}

.usuario-form-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.usuarios-section {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 1.75rem;
  animation: fadeUp 0.4s ease-out;
}

.mv3-dados-section {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 1.75rem;
  animation: fadeUp 0.4s ease-out;
}

.mv3-dados-admin-hint {
  margin: 0 0 1rem;
}

.mv3-dados-list {
  margin-top: 0.25rem;
}

.mv3-dados-cards {
  display: grid;
  gap: 0.85rem;
}

.mv3-dados-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.35);
}

.mv3-dados-card--inactive {
  opacity: 0.72;
}

.mv3-dados-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.mv3-dados-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.mv3-dados-card-doc {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.mv3-dados-card-meta {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.mv3-dados-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-muted);
}

.mv3-dados-status-badge--active {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.mv3-dados-preview {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(49, 221, 244, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(49, 221, 244, 0.08);
}

.mv3-dados-preview-title {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mv3-dados-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
}

.mv3-dados-preview-grid > div {
  min-width: 0;
}

.mv3-dados-preview-span {
  grid-column: 1 / -1;
}

.mv3-dados-preview-grid dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.mv3-dados-preview-grid dd {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

@media (max-width: 900px) {
  .mv3-dados-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .mv3-dados-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .mv3-dados-preview-grid {
    grid-template-columns: 1fr;
  }
}

.usuario-list {
  margin-top: 0.25rem;
}

.usuario-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.35);
}

.usuario-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.usuario-table thead th {
  padding: 0.7rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.usuario-table thead th:last-child,
.usuario-th-actions {
  width: 6.25rem;
  text-align: right;
}

.usuario-row {
  transition: background var(--transition);
}

.usuario-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.usuario-row--self {
  background: rgba(49, 221, 244, 0.08);
}

.usuario-row--self:hover {
  background: rgba(49, 221, 244, 0.11);
}

.usuario-cell {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.usuario-row:last-child .usuario-cell {
  border-bottom: none;
}

.usuario-cell--role {
  width: 10.5rem;
}

.usuario-cell--actions {
  width: 6.25rem;
  text-align: right;
  white-space: nowrap;
}

.usuario-cell--actions .btn-edit {
  min-width: 4.75rem;
}

.usuario-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.usuario-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-accent);
}

.usuario-avatar--admin {
  background: linear-gradient(145deg, #fbbf24, #d97706);
}

.usuario-avatar--comercial {
  background: linear-gradient(145deg, #0eacba, #067c8c);
}

.usuario-avatar--gerente_projetos {
  background: linear-gradient(145deg, #7ae8f7, #0092b5);
}

.usuario-avatar--financeiro {
  background: linear-gradient(145deg, #0eacba, #067c8c);
}

.usuario-user-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.usuario-item-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.usuario-item-email {
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-all;
}

.usuario-item-meta {
  font-size: 0.78rem;
  color: #7ae8f7;
}

.usuario-mv3-fields .field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.usuario-form-fields .usuario-mv3-fields.hidden {
  display: none;
}

.usuario-self-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b8f3fb;
  background: rgba(49, 221, 244, 0.22);
  border: 1px solid rgba(129, 140, 248, 0.35);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.usuario-role-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  background: rgba(0, 16, 31, 0.35);
}

.usuario-role-badge--admin { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.usuario-role-badge--comercial { color: #86efac; border-color: rgba(134, 239, 172, 0.35); }
.usuario-role-badge--gerente_projetos { color: #93c5fd; border-color: rgba(147, 197, 253, 0.35); }
.usuario-role-badge--financeiro { color: #a8c4f0; border-color: rgba(196, 181, 253, 0.35); }

.usuario-empty-state {
  padding: 2rem 1rem;
}

.usuario-delete-details {
  margin-top: 0.5rem;
}

.usuario-edit-footer {
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .usuario-table thead {
    display: none;
  }

  .usuario-table,
  .usuario-table tbody,
  .usuario-row,
  .usuario-cell {
    display: block;
    width: 100%;
  }

  .usuario-row {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .usuario-row:last-child {
    border-bottom: none;
  }

  .usuario-cell {
    padding: 0.25rem 1rem;
    border-bottom: none;
  }

  .usuario-cell--role,
  .usuario-cell--actions {
    width: auto;
    text-align: left;
  }

  .usuario-cell--actions {
    padding-top: 0.5rem;
    padding-bottom: 0.65rem;
  }
}

.modal-footer {
  flex-shrink: 0;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.modal-form .status-details + .modal-footer {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
  margin-top: 0;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .modal-panel {
    max-height: calc(100vh - 1rem);
  }

  .modal-body-grid {
    grid-template-columns: 1fr;
  }

  .modal-fields-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-span-3,
  .field-span-2,
  .mv3-contato-col {
    grid-column: 1 / -1;
  }

  .mv3-contatos-form-duo {
    grid-template-columns: 1fr;
  }

  .contacts-duo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .modal-fields-grid {
    grid-template-columns: 1fr;
  }

  .cliente-form-panel.modal-contacts-panel .contacts-duo-grid {
    grid-template-columns: 1fr;
  }

  .cliente-form-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  justify-content: flex-end;
}

.modal-footer.form-actions {
  margin-top: 0.85rem;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
  width: auto;
  margin-top: 0;
}

/* ---- Field hints & loading ---- */
.field-hint {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.field-hint-loading {
  color: var(--text-muted);
}

.field-hint-success {
  color: #86efac;
}

.field-hint-error {
  color: #fca5a5;
}

.loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.hidden {
  display: none !important;
}

/* ---- Status zones: ativar / desativar (edit mode) ---- */
.status-details {
  flex-shrink: 0;
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 1;
  clear: both;
}

.status-details.hidden {
  display: none;
}

.status-details-summary {
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}

.status-details-summary::-webkit-details-marker {
  display: none;
}

.status-details-body {
  padding: 0 0.85rem 0.85rem;
}

.status-details-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.status-confirm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}

.status-confirm-row .form-group {
  flex: 0 1 220px;
  margin-bottom: 0;
}

.deactivate-details {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.deactivate-summary {
  color: #fca5a5;
}

.deactivate-zone-text strong {
  color: #fca5a5;
}

.btn-deactivate-confirm {
  flex-shrink: 0;
  padding: 0.72rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 0;
}

.activate-details {
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

.activate-summary {
  color: #86efac;
}

.activate-zone-text strong {
  color: #86efac;
}

.btn-activate-confirm {
  flex-shrink: 0;
  padding: 0.72rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 0;
}

.btn-deactivate-confirm:disabled,
.btn-activate-confirm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .status-confirm-row {
    flex-direction: column;
    align-items: stretch;
  }

  .status-confirm-row .form-group {
    flex: 1 1 auto;
    max-width: none;
  }

  .btn-deactivate-confirm,
  .btn-activate-confirm {
    width: 100%;
  }
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* ---- Cliente Detail Page ---- */
.cliente-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.95rem 0.48rem 0.72rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cliente-back-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.cliente-back-link-text {
  color: inherit;
}

@media (hover: hover) {
  .cliente-back-link {
    transition:
      color var(--transition),
      background var(--transition),
      border-color var(--transition),
      box-shadow var(--transition);
  }

  .cliente-back-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  }

  .cliente-back-link:hover .cliente-back-link-icon {
    color: var(--text);
    transform: translateX(-2px);
  }
}

.cliente-back-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.cliente-back-link:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .cliente-back-link,
  .cliente-back-link-icon {
    transition: none;
  }

  .cliente-back-link:active {
    transform: none;
  }
}

.cliente-detail-card {
  padding: 0;
  overflow: hidden;
  animation: fadeUp 0.4s ease-out;
}

.cliente-hero {
  position: relative;
  padding: 1.75rem 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(49, 221, 244, 0.14) 0%, rgba(0, 205, 255, 0.08) 55%, transparent 100%);
}

.cliente-hero-glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 172, 186, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.cliente-detail-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cliente-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.btn-config {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
}

.btn-config:hover:not(:disabled),
.btn-config:focus-visible {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.7);
}

.btn-config-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.cliente-config-panel {
  width: min(540px, 96vw);
  padding: 0;
  overflow: hidden;
}

.cliente-config-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.35rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(49, 221, 244, 0.1) 0%, transparent 100%);
}

.cliente-config-header-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.cliente-config-avatar {
  flex-shrink: 0;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 12px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.cliente-config-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7ae8f7;
}

.cliente-config-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cliente-config-client-name {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.cliente-config-close {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cliente-config-form {
  display: flex;
  flex-direction: column;
}

.cliente-config-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem 1.35rem 0.25rem;
}

.cliente-config-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.38);
  overflow: hidden;
}

.cliente-config-card--relatorio {
  border-color: rgba(250, 173, 2, 0.22);
  background: linear-gradient(160deg, rgba(250, 173, 2, 0.07) 0%, rgba(0, 16, 31, 0.38) 55%);
}

.cliente-config-card--prazo {
  border-color: rgba(49, 221, 244, 0.25);
  background: linear-gradient(160deg, rgba(49, 221, 244, 0.08) 0%, rgba(0, 16, 31, 0.38) 55%);
}

.cliente-readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fde68a;
  background: rgba(250, 173, 2, 0.12);
  border: 1px solid rgba(250, 173, 2, 0.32);
  border-radius: 999px;
  white-space: nowrap;
}

.cliente-readonly-badge-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.cliente-readonly-hint {
  margin: 0.45rem 0 0;
  max-width: 36rem;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(253, 230, 138, 0.88);
}

.password-requirements {
  margin: 0.65rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(35, 51, 82, 0.45);
}

.password-requirements-title {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.password-requirements-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.password-req {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: rgba(226, 232, 240, 0.82);
}

.password-req-mark {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.9);
}

.password-req.is-ok {
  color: #86efac;
}

.password-req.is-ok .password-req-mark {
  color: #4ade80;
}

.cliente-config-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.65rem;
}

.cliente-config-card-icon {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1rem;
  line-height: 1;
}

.cliente-config-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.cliente-config-card-desc {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cliente-config-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
}

.cliente-config-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cliente-config-select {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 16, 31, 0.55);
  color: var(--text);
  font-size: 0.9rem;
}

.cliente-config-select:focus {
  outline: none;
  border-color: rgba(250, 173, 2, 0.55);
  box-shadow: 0 0 0 3px rgba(250, 173, 2, 0.15);
}

.cliente-prazo-dias-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 11rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.55);
  overflow: hidden;
}

.cliente-prazo-dias-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.cliente-prazo-dias-input:focus {
  outline: none;
}

.cliente-prazo-dias-wrap:focus-within {
  border-color: rgba(49, 221, 244, 0.55);
  box-shadow: 0 0 0 3px rgba(49, 221, 244, 0.15);
}

.cliente-prazo-dias-suffix {
  padding: 0 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.cliente-prazo-segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.cliente-prazo-segment {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.35);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.cliente-prazo-segment:hover {
  border-color: rgba(49, 221, 244, 0.35);
  background: rgba(49, 221, 244, 0.06);
}

.cliente-prazo-segment:has(input:checked) {
  border-color: rgba(49, 221, 244, 0.6);
  background: rgba(49, 221, 244, 0.14);
  box-shadow: inset 0 0 0 1px rgba(49, 221, 244, 0.2);
}

.cliente-prazo-segment-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.cliente-prazo-segment:has(input:checked) .cliente-prazo-segment-label {
  color: #b8f3fb;
}

.cliente-prazo-segment-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.cliente-config-footnote {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cliente-config-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.35rem 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

@media (max-width: 520px) {
  .cliente-config-header {
    padding: 1.1rem 1.1rem 1rem;
  }

  .cliente-config-stack {
    padding: 1rem 1.1rem 0.15rem;
  }

  .cliente-config-footer {
    padding: 0.9rem 1.1rem 1.1rem;
    flex-direction: column-reverse;
  }

  .cliente-config-footer .btn {
    width: 100%;
  }

  .cliente-prazo-segmented {
    grid-template-columns: 1fr;
  }

  .cliente-prazo-dias-wrap {
    max-width: none;
  }
}

/* legado — mantido para compatibilidade */
.cliente-relatorios-panel {
  width: min(540px, 96vw);
}

.cliente-relatorio-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cliente-relatorio-chip--semanal {
  background: rgba(250, 173, 2, 0.16);
  color: #ffbc7d;
  border: 1px solid rgba(250, 173, 2, 0.35);
}

.cliente-relatorio-chip--quinzenal {
  background: rgba(251, 191, 36, 0.14);
  color: #ffbc7d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.cliente-relatorio-chip--mensal {
  background: rgba(14, 172, 186, 0.16);
  color: #a8c4f0;
  border: 1px solid rgba(14, 172, 186, 0.35);
}

.cliente-detail-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.cliente-hero-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 42rem;
}

.info-tiles {
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem 1.75rem 0.5rem;
}

.info-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.info-tile-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.info-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.info-tile-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.info-tile-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

.cliente-nav-grid {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem 1.75rem 1.75rem;
}

.cliente-nav-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

button.cliente-nav-card {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

button.cliente-nav-card:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.cliente-nav-card--cliente {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14) 0%, rgba(0, 16, 31, 0.5) 100%);
  border-color: rgba(34, 197, 94, 0.22);
}

.cliente-nav-card--mv3 {
  background: linear-gradient(135deg, rgba(49, 221, 244, 0.16) 0%, rgba(0, 16, 31, 0.5) 100%);
  border-color: rgba(49, 221, 244, 0.24);
}

.cliente-nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.cliente-nav-card--cliente:hover {
  border-color: rgba(34, 197, 94, 0.45);
}

.cliente-nav-card--mv3:hover {
  border-color: rgba(49, 221, 244, 0.45);
}

.cliente-nav-card-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cliente-nav-card-body {
  flex: 1;
  min-width: 0;
}

.cliente-nav-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.cliente-nav-card-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.cliente-nav-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform var(--transition), color var(--transition);
}

.cliente-nav-card:hover .cliente-nav-card-arrow {
  transform: translate(3px, -3px);
  color: var(--text);
}

/* ---- Contact panels & cards ---- */
.contact-panel-backdrop {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.contact-panel-modal {
  max-width: 40rem;
  width: min(96vw, 40rem);
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.contact-panel-modal--cliente {
  border-top: 3px solid #22c55e;
}

.contact-panel-modal--mv3 {
  border-top: 3px solid #31ddf4;
}

.contact-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
}

.contact-panel-modal--cliente .contact-panel-header {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12) 0%, transparent 100%);
}

.contact-panel-modal--mv3 .contact-panel-header {
  background: linear-gradient(180deg, rgba(49, 221, 244, 0.14) 0%, transparent 100%);
}

.contact-panel-header-main {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-width: 0;
}

.contact-panel-header-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact-panel-modal--cliente .contact-panel-header-icon {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.28);
}

.contact-panel-modal--mv3 .contact-panel-header-icon {
  background: rgba(49, 221, 244, 0.18);
  border-color: rgba(49, 221, 244, 0.32);
}

.contact-panel-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ae8f7;
  margin-bottom: 0.2rem;
}

.contact-panel-modal--cliente .contact-panel-eyebrow {
  color: #86efac;
}

.contact-panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.contact-panel-subtitle {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-panel-close {
  margin-top: -0.15rem;
}

.contact-panel-body {
  overflow-y: auto;
  padding: 1.15rem 1.5rem 1.5rem;
}

.contact-panel-count {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.contact-profile-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(35, 51, 82, 0.55) 0%, rgba(0, 16, 31, 0.82) 100%);
  border: 1px solid rgba(155, 189, 194, 0.18);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.contact-profile-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
  opacity: 0.85;
}

.contact-profile-card:hover {
  border-color: rgba(49, 221, 244, 0.28);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.contact-profile-card--cliente {
  background: linear-gradient(165deg, rgba(34, 197, 94, 0.12) 0%, rgba(0, 16, 31, 0.78) 58%, rgba(0, 16, 31, 0.9) 100%);
  border-color: rgba(34, 197, 94, 0.26);
}

.contact-profile-card--cliente::before {
  background: #22c55e;
}

.contact-profile-card--comercial {
  background: linear-gradient(165deg, rgba(49, 221, 244, 0.12) 0%, rgba(0, 16, 31, 0.78) 58%, rgba(0, 16, 31, 0.9) 100%);
  border-color: rgba(49, 221, 244, 0.26);
}

.contact-profile-card--comercial::before {
  background: #31ddf4;
}

.contact-profile-card--tecnico {
  background: linear-gradient(165deg, rgba(250, 173, 2, 0.1) 0%, rgba(0, 16, 31, 0.78) 58%, rgba(0, 16, 31, 0.9) 100%);
  border-color: rgba(250, 173, 2, 0.24);
}

.contact-profile-card--tecnico::before {
  background: #faad02;
}

.contact-profile-card--empty {
  padding: 1.1rem 1.25rem 1.25rem;
}

.contact-card-index {
  position: absolute;
  top: 0.95rem;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(155, 189, 194, 0.55);
}

.contact-mv3-card-head {
  padding: 1.05rem 1.25rem 0 1.35rem;
}

.contact-mv3-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact-mv3-badge--comercial {
  color: #31ddf4;
  background: rgba(49, 221, 244, 0.12);
  border: 1px solid rgba(49, 221, 244, 0.28);
}

.contact-mv3-badge--tecnico {
  color: #faad02;
  background: rgba(250, 173, 2, 0.12);
  border: 1px solid rgba(250, 173, 2, 0.28);
}

.contact-mv3-empty-text {
  padding: 0.5rem 1.25rem 1.25rem 1.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-hero {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.1rem 1.25rem 0.9rem 1.35rem;
}

.contact-profile-card--empty .contact-hero,
.contact-mv3-card-head + .contact-hero {
  padding-top: 0.7rem;
}

.contact-avatar {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #00101f;
  background: linear-gradient(145deg, #7ae8f7, #31ddf4);
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 16, 31, 0.35);
}

.contact-hero--cliente .contact-avatar {
  color: #fff;
  background: linear-gradient(145deg, #4ade80, #16a34a);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28);
}

.contact-hero--comercial .contact-avatar {
  color: #00101f;
  background: linear-gradient(145deg, #7ae8f7, #31ddf4);
  box-shadow: 0 6px 16px rgba(49, 221, 244, 0.22);
}

.contact-hero--tecnico .contact-avatar {
  color: #00101f;
  background: linear-gradient(145deg, #ffbc7d, #faad02);
  box-shadow: 0 6px 16px rgba(250, 173, 2, 0.22);
}

.contact-hero-text {
  min-width: 0;
}

.contact-hero-name {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.contact-hero-role {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.contact-fields {
  display: grid;
  gap: 0.5rem;
  padding: 0 1.15rem 1.2rem 1.35rem;
}

.contact-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: rgba(0, 16, 31, 0.48);
  border: 1px solid rgba(155, 189, 194, 0.14);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: default;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

button.contact-field--copy {
  cursor: pointer;
}

button.contact-field--copy:hover,
button.contact-field--copy:focus-visible {
  border-color: rgba(49, 221, 244, 0.4);
  background: rgba(49, 221, 244, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.contact-profile-card--tecnico button.contact-field--copy:hover,
.contact-profile-card--tecnico button.contact-field--copy:focus-visible {
  border-color: rgba(250, 173, 2, 0.4);
  background: rgba(250, 173, 2, 0.1);
}

.contact-field--static {
  align-items: flex-start;
}

.contact-field--copied {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.contact-field-icon {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #31ddf4;
  background: rgba(49, 221, 244, 0.12);
  border: 1px solid rgba(49, 221, 244, 0.22);
}

.contact-profile-card--cliente .contact-field-icon {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.contact-profile-card--tecnico .contact-field-icon {
  color: #faad02;
  background: rgba(250, 173, 2, 0.12);
  border-color: rgba(250, 173, 2, 0.22);
}

.contact-field-icon-svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

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

.contact-field-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-field-value {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-field--email .contact-field-value,
.contact-field--phone .contact-field-value {
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, monospace;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}

.contact-field-value--multiline {
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: unset;
}

.contact-field-action {
  flex-shrink: 0;
  min-width: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.55;
  display: grid;
  place-items: center;
  transition: opacity var(--transition), color var(--transition);
}

.contact-field-copy-icon {
  width: 1rem;
  height: 1rem;
  display: block;
}

button.contact-field--copy:hover .contact-field-action,
button.contact-field--copy:focus-visible .contact-field-action,
.contact-field--copied .contact-field-action {
  opacity: 1;
  color: #31ddf4;
}

.contact-profile-card--tecnico button.contact-field--copy:hover .contact-field-action,
.contact-profile-card--tecnico button.contact-field--copy:focus-visible .contact-field-action {
  color: #faad02;
}

.contact-field--copied .contact-field-action {
  color: #86efac;
}

.contact-empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.contact-empty-state--panel {
  padding: 2.5rem 1.25rem 2rem;
}

.contact-empty-ring {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.02);
}

.contact-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.contact-empty-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 22rem;
  margin: 0 auto 1.15rem;
  line-height: 1.5;
}

.contact-empty-cta {
  margin-top: 0.25rem;
}

.contact-empty-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.65;
}

.cliente-contatos-stack,
.mv3-contacts-stack {
  display: grid;
  gap: 0.9rem;
}

/* Legacy row styles (kept for compatibility) */
.contact-rows {
  display: grid;
  gap: 0.65rem;
  padding: 0 1.35rem 1.35rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

.contact-row-icon {
  font-size: 1rem;
  line-height: 1.4;
}

.contact-row-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-row-value,
.contact-row-link {
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}

.contact-row-value--multiline {
  white-space: pre-wrap;
  line-height: 1.45;
}

.contact-row-link:hover {
  color: #7ae8f7;
  text-decoration: underline;
}

.detail-fields {
  display: grid;
  gap: 0.75rem;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
}

.detail-empty {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---- Cliente Dashboard (tela cheia) ---- */
.cliente-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeUp 0.4s ease-out;
}

.cliente-overview {
  padding: 0;
  overflow: hidden;
}

.cliente-workspace {
  padding: 0;
  overflow: hidden;
}

.cliente-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 16, 31, 0.3);
}

.cliente-workspace-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.cliente-workspace-body {
  padding: 1.5rem;
}

.cliente-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cliente-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 16, 31, 0.45);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.cliente-tab:hover {
  color: var(--text);
  border-color: rgba(49, 221, 244, 0.4);
}

.cliente-tab--active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient-accent);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.cliente-tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.cliente-panel {
  min-width: 0;
}

.nota-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(0, 16, 31, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.nota-form-hint {
  grid-column: 1 / -1;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

.nota-form-hint--pedido {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(121, 159, 227, 0.28);
  background: rgba(121, 159, 227, 0.08);
  color: #ddd6fe;
}

.nota-view-body {
  padding: 0 1.25rem 0.25rem;
}

.nota-view-detalhes {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.35);
}

.nota-view-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0;
}

.nota-view-item + .nota-view-item {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.35rem;
  padding-top: 0.7rem;
}

.nota-view-item dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.nota-view-item dd {
  margin: 0;
  font-weight: 600;
}

.nota-row--emitida-de-pedido {
  cursor: default;
}

.notas-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lista-filtros {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
}

.lista-filtros-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.lista-filtro-busca {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.7rem;
  background: rgba(12, 18, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lista-filtro-busca:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.lista-filtro-busca-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--text-muted);
}

.lista-filtro-busca-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.lista-filtro-busca-input::placeholder {
  color: var(--text-muted);
}

.lista-filtro-busca-input:focus {
  outline: none;
}

.lista-filtro-busca-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.lista-filtros-bar {
  width: 100%;
}

.lista-filtros-clear {
  flex-shrink: 0;
  white-space: nowrap;
}

.notas-controls-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  flex: 1;
  min-width: 0;
}

.lista-filtros-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  width: 100%;
}

.notas-select--status {
  width: min(100%, 11rem);
}

.lista-status-select-field {
  min-width: 0;
}

.lista-sort-menu {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  position: relative;
}

.lista-sort-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lista-sort-dropdown {
  position: relative;
  min-width: 0;
}

.lista-sort-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 11.5rem;
  max-width: min(100%, 16rem);
  padding: 0.48rem 0.7rem;
  background: rgba(12, 18, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lista-sort-trigger:hover,
.lista-sort-trigger:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  outline: none;
}

.lista-sort-trigger.is-open {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.lista-sort-trigger-text {
  min-width: 0;
  text-align: left;
}

.lista-sort-trigger-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lista-sort-trigger-icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.lista-sort-trigger.is-open .lista-sort-trigger-icon {
  transform: rotate(180deg);
}

.lista-sort-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 40;
  width: min(18.5rem, calc(100vw - 2rem));
  max-height: min(24rem, 60vh);
  overflow: auto;
  padding: 0.45rem;
  background: rgba(10, 16, 34, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.lista-sort-group + .lista-sort-group {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lista-sort-group-label {
  padding: 0.2rem 0.55rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lista-sort-options {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lista-sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.lista-sort-option:hover,
.lista-sort-option:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.lista-sort-option.is-active {
  background: rgba(49, 221, 244, 0.14);
  border-color: rgba(49, 221, 244, 0.35);
}

.lista-sort-option-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.lista-sort-option-label {
  font-weight: 600;
  line-height: 1.25;
}

.lista-sort-option-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.lista-sort-option-check {
  flex-shrink: 0;
  color: #7ae8f7;
  font-size: 0.85rem;
  font-weight: 700;
}

.notas-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  min-width: 0;
}

.notas-inline-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.notas-select {
  width: auto;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  background: rgba(12, 18, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
}

.notas-select--ano {
  width: 5.5rem;
}

.notas-select--sort {
  width: min(100%, 13.5rem);
}

.notas-generate-btn {
  flex-shrink: 0;
  white-space: nowrap;
  width: auto;
  margin-top: 0;
  padding: 0.32rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #7ae8f7;
  background: transparent;
  border: 1px solid rgba(49, 221, 244, 0.45);
  box-shadow: none;
}

.notas-generate-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: none;
  filter: none;
}

.notas-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.notas-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.notas-year-total {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: right;
}

.nota-edit-panel {
  width: min(520px, 96vw);
  padding: 1.25rem 1.5rem;
}

.nota-edit-footer {
  justify-content: space-between;
  gap: 0.75rem;
}

.nota-edit-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-left: auto;
}

.nota-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.nota-form-field {
  margin-bottom: 0;
  min-width: 0;
}

.nota-form-field label {
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.nota-form-field input {
  background: rgba(12, 18, 38, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
  color-scheme: dark;
}

.nota-form-action {
  display: flex;
  align-items: flex-end;
}

.nota-form-action .btn {
  width: 100%;
  min-height: 2.75rem;
  white-space: nowrap;
}

.notas-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.notas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.notas-table th,
.notas-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.notas-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(9, 15, 32, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.notas-table tbody tr {
  transition: background var(--transition);
}

.notas-table tbody tr:hover {
  background: rgba(49, 221, 244, 0.07);
}

.form-field--readonly,
.modal-panel .form-field--readonly {
  opacity: 0.88;
  cursor: default;
}

.notas-row--clickable {
  cursor: pointer;
}

.notas-row--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

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

.pedido-detail-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

/* ——— Painel de visualização da proposta ——— */
#pedido-view-modal,
#nota-view-modal,
#pedido-edit-modal,
#pedido-form-modal {
  align-items: flex-start;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) 0.75rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

.pedido-view-panel {
  width: min(720px, 96vw);
  max-height: calc(100dvh - 2.75rem);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(49, 221, 244, 0.06) inset;
}

.pedido-view-hero {
  position: relative;
  flex-shrink: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(49, 221, 244, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(35, 51, 82, 0.55), rgba(0, 16, 31, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pedido-view-hero--parcela-1 {
  background: linear-gradient(135deg, rgba(250, 173, 2, 0.16), rgba(0, 16, 31, 0.25));
}

.pedido-view-hero--parcela-2 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(0, 16, 31, 0.25));
}

.pedido-view-hero--parcela-3 {
  background: linear-gradient(135deg, rgba(121, 159, 227, 0.14), rgba(0, 16, 31, 0.25));
}

.pedido-view-hero--parcela-4 {
  background: linear-gradient(135deg, rgba(121, 159, 227, 0.14), rgba(0, 16, 31, 0.25));
}

.pedido-view-hero--parcela-5,
.pedido-view-hero--parcela-6,
.pedido-view-hero--parcela-other {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.14), rgba(0, 16, 31, 0.25));
}

.pedido-view-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pedido-view-hero-bar-leading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.pedido-view-bar-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button.pedido-view-bar-ref {
  font: inherit;
  cursor: pointer;
}

button.pedido-view-bar-ref:hover,
button.pedido-view-bar-ref:focus-visible {
  border-color: rgba(49, 221, 244, 0.4);
  background: rgba(49, 221, 244, 0.12);
  outline: none;
}

.pedido-view-hero-bar-leading .nota-status-chip {
  flex-shrink: 0;
}

.pedido-view-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pedido-view-close {
  position: static;
  flex-shrink: 0;
}

.pedido-view-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pedido-view-numero {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.15;
}

.pedido-view-servico {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pedido-view-body {
  flex: 1;
  min-height: 0;
  padding: 1.35rem 1.5rem 0.75rem;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: linear-gradient(180deg, rgba(0, 16, 31, 0.15), transparent 2.5rem);
}

.pedido-view-parties {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pedido-view-detalhes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ——— Cards do modal (padrão unificado) ——— */
.pedido-view-section {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: var(--pedido-surface);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

@supports (backdrop-filter: blur(8px)) {
  .pedido-view-section {
    backdrop-filter: blur(8px);
  }
}

.pedido-party-card .pedido-view-section-head {
  align-items: center;
}

.pedido-view-section-content {
  padding: 0 1.15rem 1.05rem;
}

.pedido-view-section-content--solo {
  padding-top: 0;
}

.pedido-view-section-content--solo .pedido-detail-list {
  padding: 0.85rem 0 0.15rem;
}

.pedido-view-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem 0 0.15rem;
  margin: 0;
  list-style: none;
}

.pedido-view-metric {
  flex: 1 1 7.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.pedido-view-metric--valor {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.04));
  border-color: rgba(34, 197, 94, 0.22);
}

.pedido-view-metric--total {
  background: linear-gradient(135deg, var(--pedido-pagamento-soft), rgba(121, 159, 227, 0.04));
  border-color: rgba(121, 159, 227, 0.22);
}

.pedido-view-metric--pct {
  background: linear-gradient(135deg, var(--pedido-discriminacao-soft), rgba(250, 173, 2, 0.03));
  border-color: rgba(250, 173, 2, 0.2);
}

.pedido-view-metric--status {
  background: linear-gradient(135deg, var(--pedido-prestador-soft), rgba(49, 221, 244, 0.03));
  border-color: rgba(49, 221, 244, 0.2);
}

.pedido-view-metric-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pedido-view-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.pedido-view-metric--valor .pedido-view-metric-value {
  color: var(--pedido-money);
}

.pedido-view-metric--total .pedido-view-metric-value {
  color: var(--pedido-total);
}

.pedido-view-metric-value--chip {
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
}

.pedido-view-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pedido-view-section-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.pedido-view-section-head-text {
  min-width: 0;
}

.pedido-view-section-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pedido-view-section-highlight {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

button.pedido-view-section-highlight {
  margin: 0.25rem 0 0;
}

.pedido-view-section-body {
  padding: 1rem 1.15rem;
}

.pedido-view-section-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.pedido-view-section-empty {
  margin: 0;
  padding: 0.9rem 1.15rem 1.05rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.pedido-view-section--prestador {
  border-left: 4px solid var(--pedido-prestador);
}

.pedido-view-section--prestador .pedido-view-section-head {
  background: linear-gradient(90deg, var(--pedido-prestador-soft) 0%, transparent 72%);
}

.pedido-view-section--prestador .pedido-view-section-icon {
  background: rgba(49, 221, 244, 0.2);
  border-color: rgba(49, 221, 244, 0.35);
  box-shadow: 0 8px 20px rgba(49, 221, 244, 0.15);
}

.pedido-view-section--prestador .pedido-view-section-title {
  color: var(--pedido-prestador-muted);
}

.pedido-view-section--prestador .pedido-view-section-highlight {
  color: var(--pedido-prestador-highlight);
}

.pedido-view-section--tomador {
  border-left: 4px solid var(--pedido-tomador);
}

.pedido-view-section--tomador .pedido-view-section-head {
  background: linear-gradient(90deg, var(--pedido-tomador-soft) 0%, transparent 72%);
}

.pedido-view-section--tomador .pedido-view-section-icon {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.12);
}

.pedido-view-section--tomador .pedido-view-section-title {
  color: var(--pedido-tomador-muted);
}

.pedido-view-section--tomador .pedido-view-section-highlight {
  color: var(--pedido-tomador-highlight);
}

.pedido-view-section--discriminacao {
  border-left: 4px solid var(--pedido-discriminacao);
}

.pedido-view-section--discriminacao .pedido-view-section-head {
  background: linear-gradient(90deg, var(--pedido-discriminacao-soft) 0%, transparent 72%);
}

.pedido-view-section--discriminacao .pedido-view-section-icon {
  background: rgba(250, 173, 2, 0.16);
  border-color: rgba(250, 173, 2, 0.3);
  box-shadow: 0 8px 20px rgba(250, 173, 2, 0.12);
}

.pedido-view-section--discriminacao .pedido-view-section-title {
  color: var(--pedido-discriminacao-muted);
}

.pedido-view-section--pagamento {
  border-left: 4px solid var(--pedido-pagamento);
}

.pedido-view-section--pagamento .pedido-view-section-head {
  background: linear-gradient(90deg, var(--pedido-pagamento-soft) 0%, transparent 72%);
}

.pedido-view-section--pagamento .pedido-view-section-icon {
  background: rgba(121, 159, 227, 0.16);
  border-color: rgba(121, 159, 227, 0.3);
  box-shadow: 0 8px 20px rgba(121, 159, 227, 0.12);
}

.pedido-view-section--pagamento .pedido-view-section-title {
  color: var(--pedido-pagamento-muted);
}

.pedido-view-section .pedido-detail-list {
  padding: 0.5rem 0 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.pedido-view-hero--compact {
  padding: 1.1rem 1.35rem 1rem;
}

.pedido-view-hero--compact .pedido-view-numero {
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
}

.pedido-view-hero--compact .pedido-view-hero-bar {
  margin-bottom: 0.75rem;
}

.pedido-view-hero--bar-only {
  padding-bottom: 1.1rem;
}

.pedido-view-hero--bar-only::after {
  content: '';
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(49, 221, 244, 0.45), rgba(250, 173, 2, 0.35), transparent);
}

.pedido-view-hero--bar-only .pedido-view-hero-main {
  display: none;
}

.pedido-view-hero--bar-only .pedido-view-hero-bar {
  margin-bottom: 0;
}

.pedido-form-panel {
  width: min(560px, 96vw);
}

.pedido-form-panel .pedido-form-body {
  flex: 1;
  min-height: 0;
  padding: 1.15rem 1.35rem 0.25rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.pedido-form-hint {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(49, 221, 244, 0.08);
  border: 1px solid rgba(49, 221, 244, 0.18);
  border-radius: var(--radius-sm);
}

.pedido-form-hint strong {
  color: var(--text);
}

.pedido-type-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.28rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pedido-type-tab {
  flex: 1;
  padding: 0.62rem 0.85rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.pedido-type-tab:hover,
.pedido-type-tab:focus-visible {
  color: var(--text);
  outline: none;
}

.pedido-type-tab.is-active {
  background: rgba(49, 221, 244, 0.18);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(49, 221, 244, 0.25);
}

.pedido-tipo-panel.hidden {
  display: none;
}

.pedido-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.pedido-fields-grid .form-group {
  margin-bottom: 0;
}

.pedido-fields-grid + .form-group,
.pedido-fields-grid + .pedido-fields-grid {
  margin-top: 0.85rem;
}

@media (max-width: 520px) {
  .pedido-fields-grid,
  .pedido-fields-grid--meses {
    grid-template-columns: 1fr;
  }
}

.pedido-readonly-value {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: #a8c4f0;
  background: rgba(0, 16, 31, 0.45);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pedidos-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
}

.pedidos-summary--notas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.pedidos-summary-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 7rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 16, 31, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pedidos-summary-card--emitida {
  border-color: rgba(121, 159, 227, 0.28);
  background: rgba(121, 159, 227, 0.06);
}

.pedidos-summary-card--emitida .pedidos-summary-value {
  color: #a8c4f0;
}

.pedidos-summary-card--emitida.pedidos-summary-card--valor .pedidos-summary-value {
  color: #a8c4f0;
}

.pedidos-summary-card--paga {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.06);
}

.pedidos-summary-card--paga .pedidos-summary-value,
.pedidos-summary-card--paga.pedidos-summary-card--valor .pedidos-summary-value {
  color: #86efac;
}

.pedidos-summary-card--valor .pedidos-summary-value {
  color: #86efac;
}

.pedidos-summary-card--pendente .pedidos-summary-value {
  color: #ffbc7d;
}

.pedidos-summary-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pedidos-summary-value {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.funcionario-nome-text {
  font-weight: 600;
  color: var(--text);
}

.funcionarios-table .funcionario-col-nome {
  min-width: 10rem;
}

.funcionarios-table .funcionario-col-observacao {
  min-width: 12rem;
  max-width: 24rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.funcionarios-geral-section {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 1.75rem;
  animation: fadeUp 0.4s ease-out;
}

.funcionarios-geral-hint {
  margin: -0.5rem 0 1rem;
}

.funcionarios-geral-filtros {
  margin-bottom: 1rem;
}

.funcionarios-geral-list {
  min-height: 12rem;
}

.funcionarios-geral-table-wrap {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.funcionarios-geral-table {
  width: auto;
  max-width: 100%;
  table-layout: auto;
}

.funcionarios-geral-table th,
.funcionarios-geral-table td {
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.funcionarios-geral-table .funcionario-col-nome {
  min-width: 6rem;
  max-width: 14rem;
  white-space: normal;
}

.funcionarios-geral-table th:nth-child(2),
.funcionarios-geral-table td:nth-child(2) {
  min-width: 5rem;
  max-width: 10rem;
}

.funcionarios-geral-table th:nth-child(3),
.funcionarios-geral-table td:nth-child(3) {
  min-width: 8rem;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funcionario-geral-col-empresas {
  width: 4.5rem;
  min-width: 4.5rem;
  text-align: center;
}

.funcionario-geral-empresas-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #b8f3fb;
  background: rgba(49, 221, 244, 0.18);
  border: 1px solid rgba(49, 221, 244, 0.28);
}

.funcionario-geral-empresas-badge--empty {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
  font-weight: 500;
}

.funcionarios-geral-table .pedido-col-acoes-header,
.funcionarios-geral-table .pedido-col-acoes {
  width: 6.5rem;
  min-width: 6.5rem;
  text-align: right;
}

.funcionarios-geral-loading {
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.funcionarios-geral-table-wrap--warning .notas-empty {
  color: #ffbc7d;
}

.funcionario-geral-cliente-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.funcionario-geral-cliente-link:hover {
  text-decoration: underline;
}

.funcionario-geral-nome-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.funcionario-geral-nome-btn .funcionario-nome-text {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(0, 205, 255, 0.35);
  text-underline-offset: 0.14em;
}

.funcionario-geral-nome-btn:hover .funcionario-nome-text,
.funcionario-geral-nome-btn:focus-visible .funcionario-nome-text {
  text-decoration-color: currentColor;
}

.funcionario-geral-cliente-resumo {
  color: var(--text);
  line-height: 1.45;
}

.funcionario-geral-cliente-mais {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.funcionarios-geral-table .funcionario-geral-col-telefone {
  white-space: nowrap;
  width: 10.5rem;
  min-width: 10.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.funcionarios-geral-table .funcionario-geral-col-telefone a {
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

.funcionarios-geral-table .funcionario-geral-col-telefone a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.funcionario-geral-detalhe-field .detail-value--telefone {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.funcionario-geral-empresa-item {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.funcionario-geral-empresa-item + .funcionario-geral-empresa-item {
  margin-top: 0.35rem;
}

.funcionario-geral-modal-panel {
  width: min(100%, 40rem);
}

.funcionario-geral-modal-body {
  padding: 0 1.5rem 1.25rem;
  max-height: min(68vh, 36rem);
  overflow: auto;
}

.funcionario-geral-detalhe {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.funcionario-geral-detalhe-pairs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.funcionario-geral-detalhe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
}

.funcionario-geral-detalhe-meta {
  display: block;
}

.funcionario-geral-detalhe-field {
  min-width: 0;
}

.funcionario-geral-detalhe-field .detail-value a {
  color: #7ae8f7;
  text-decoration: none;
}

.funcionario-geral-detalhe-field .detail-value a:hover {
  text-decoration: underline;
}

.funcionario-geral-detalhe-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.funcionario-geral-detalhe-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.funcionario-geral-clientes-table-wrap {
  margin-top: 0.25rem;
}

.funcionario-geral-clientes-table th:last-child,
.funcionario-geral-clientes-table td:last-child {
  width: 42%;
}

.funcionario-geral-cliente-obs-cell {
  color: var(--text-muted);
  line-height: 1.45;
}

.funcionario-geral-cliente-obs-cell .funcionario-geral-cliente-obs--empty {
  font-style: italic;
}

.funcionario-geral-modal-footer {
  padding: 0 1.5rem 1.25rem;
  justify-content: flex-end;
}

.funcionario-row--clickable {
  cursor: pointer;
  transition: background-color var(--transition);
}

.funcionario-row--clickable:hover,
.funcionario-row--clickable:focus-visible {
  background: rgba(49, 221, 244, 0.08);
  outline: none;
}

.funcionario-geral-nome-link {
  color: #b8f3fb;
  font-weight: 600;
}

.funcionario-row--clickable:hover .funcionario-geral-nome-link,
.funcionario-row--clickable:focus-visible .funcionario-geral-nome-link {
  color: #d7f8fd;
  text-decoration: underline;
}

.funcionario-geral-modal-cargo {
  margin: 0 0 0.35rem;
  color: var(--text);
}

.funcionario-geral-modal-label {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.funcionario-geral-modal-subtitle {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.funcionario-geral-clientes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.funcionario-geral-cliente-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.35);
}

.funcionario-geral-cliente-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.funcionario-geral-cliente-cargo {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.funcionario-geral-cliente-obs {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.funcionario-geral-cliente-obs--empty {
  font-style: italic;
}

.funcionario-combobox-wrap {
  position: relative;
}

.funcionario-combobox-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 14rem;
  overflow: auto;
  background: rgba(12, 18, 38, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.funcionario-combobox-list.hidden {
  display: none;
}

.funcionario-combobox-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.funcionario-combobox-option:hover,
.funcionario-combobox-option:focus-visible {
  background: rgba(0, 205, 255, 0.12);
}

.funcionario-combobox-option-nome {
  font-weight: 600;
}

.funcionario-combobox-option-meta,
.funcionario-combobox-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.funcionario-combobox-empty {
  padding: 0.65rem 0.75rem;
}

.funcionarios-geral-table .funcionario-geral-col-cliente {
  min-width: 11rem;
}

.funcionarios-geral-col-clientes {
  min-width: 12rem;
}

.funcionario-geral-clientes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  line-height: 1.45;
}

.funcionario-geral-sep {
  color: var(--text-muted);
}

.funcionario-geral-badge {
  display: inline-flex;
  margin-left: 0.45rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 205, 255, 0.12);
  border: 1px solid rgba(0, 205, 255, 0.22);
  vertical-align: middle;
}

.funcionario-geral-obs-item + .funcionario-geral-obs-item {
  margin-top: 0.35rem;
}

.funcionario-geral-obs-cliente {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.25rem;
}

.pedido-view-footer {
  flex-shrink: 0;
  padding: 1rem 1.5rem 1.25rem;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 16, 31, 0.72);
}

@supports (backdrop-filter: blur(12px)) {
  .pedido-view-footer {
    backdrop-filter: blur(12px);
  }
}

/* ——— Tabela de pedidos ——— */
.pedidos-table-wrap {
  border-radius: var(--radius-sm);
}

.pedidos-table tbody tr.pedido-row--parcela-1 td.pedido-col-nota {
  box-shadow: inset 3px 0 0 #faad02;
}

.pedidos-table tbody tr.pedido-row--parcela-2 td.pedido-col-nota {
  box-shadow: inset 3px 0 0 #fbbf24;
}

.pedidos-table tbody tr.pedido-row--parcela-3 td.pedido-col-nota {
  box-shadow: inset 3px 0 0 #0eacba;
}

.pedidos-table tbody tr.pedido-row--parcela-4 td.pedido-col-nota {
  box-shadow: inset 3px 0 0 #0eacba;
}

.pedidos-table tbody tr.pedido-row--parcela-5 td.pedido-col-nota,
.pedidos-table tbody tr.pedido-row--parcela-6 td.pedido-col-nota,
.pedidos-table tbody tr.pedido-row--parcela-other td.pedido-col-nota {
  box-shadow: inset 3px 0 0 #f472b6;
}

.pedidos-table tbody tr.pedido-row:hover {
  background: rgba(49, 221, 244, 0.06);
}

.pedido-numero-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.pedido-col-nota {
  width: 1%;
  white-space: nowrap;
  padding-left: 0.85rem;
  vertical-align: top;
}

.pedido-col-proposta {
  min-width: 6.5rem;
  white-space: nowrap;
  vertical-align: top;
}

.pedido-numero-text {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.pedido-col-servico {
  max-width: 14rem;
  line-height: 1.4;
}

.pedido-pct-chip {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(49, 221, 244, 0.15);
  color: #7ae8f7;
}

.pedido-valor-chip {
  font-weight: 700;
  color: #86efac;
  white-space: nowrap;
}

.pedido-valor-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.pedido-valor-total-ref {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.pedido-col-prazo,
.pedido-col-vencimento {
  white-space: nowrap;
}

.pedido-vencimento-data {
  color: var(--text);
}

.pedido-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pedido-status--pendente {
  background: rgba(251, 191, 36, 0.15);
  color: #ffbc7d;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.pedido-status--pedido {
  background: rgba(49, 221, 244, 0.15);
  color: #7ae8f7;
  border: 1px solid rgba(49, 221, 244, 0.25);
}

.pedido-status--vencido {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.pedidos-table tbody tr.pedido-row--vencido:hover {
  background: rgba(248, 113, 113, 0.08);
}

.pedido-col-status {
  width: 1%;
  white-space: nowrap;
}

.pedido-parcela-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pedido-parcela-badge--p1 {
  background: rgba(250, 173, 2, 0.14);
  color: #ffbc7d;
  border-color: rgba(250, 173, 2, 0.28);
}

.pedido-parcela-badge--p2 {
  background: rgba(251, 191, 36, 0.14);
  color: #ffbc7d;
  border-color: rgba(251, 191, 36, 0.28);
}

.pedido-parcela-badge--p3 {
  background: rgba(121, 159, 227, 0.14);
  color: #a8c4f0;
  border-color: rgba(121, 159, 227, 0.28);
}

.pedido-parcela-badge--p4 {
  background: rgba(121, 159, 227, 0.14);
  color: #a8c4f0;
  border-color: rgba(121, 159, 227, 0.28);
}

.pedido-parcela-badge--p5,
.pedido-parcela-badge--p6,
.pedido-parcela-badge--p-other {
  background: rgba(244, 114, 182, 0.14);
  color: #f9a8d4;
  border-color: rgba(244, 114, 182, 0.28);
}

.pedido-parcela-badge--lg {
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .pedido-view-section .pedido-detail-list {
    grid-template-columns: 1fr;
  }

  .pedido-view-hero-main {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pedido-col-pagamento {
  max-width: 11rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pedidos-table tbody tr.pedido-row:hover .pedido-col-pagamento {
  color: var(--text);
}

.pedido-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

button.pedido-detail-item--copy,
button.copyable-field {
  cursor: pointer;
}

button.pedido-detail-item--copy:hover,
button.pedido-detail-item--copy:focus-visible,
button.pedido-view-section-highlight:hover,
button.pedido-view-section-highlight:focus-visible,
button.pedido-view-section-text:hover,
button.pedido-view-section-text:focus-visible,
button.pedido-view-metric-copy:hover,
button.pedido-view-metric-copy:focus-visible {
  border-color: rgba(49, 221, 244, 0.35);
  background: rgba(49, 221, 244, 0.08);
  outline: none;
}

.pedido-detail-item.is-copied,
button.copyable-field.is-copied {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.copyable-field-action {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  opacity: 0.45;
  transition: opacity var(--transition), color var(--transition);
}

.copyable-field-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
}

button.copyable-field:hover .copyable-field-action,
button.copyable-field:focus-visible .copyable-field-action,
.copyable-field.is-copied .copyable-field-action {
  opacity: 1;
  color: #31ddf4;
}

.copyable-field.is-copied .copyable-field-action {
  color: #86efac;
}

.pedido-view-section-highlight.copyable-field {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 100%;
  margin: 0.25rem 0 0;
  padding: 0.15rem 0.35rem 0.15rem 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
  text-align: left;
}

.pedido-view-section-text.copyable-field {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.15rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
  text-align: left;
}

.pedido-view-metric-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  position: relative;
}

.pedido-view-metric-copy .copyable-field-action {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
}

@media (hover: hover) {
  .pedido-detail-item {
    transition: background var(--transition), border-color var(--transition);
  }

  .pedido-view-section:hover .pedido-detail-item {
    background: rgba(255, 255, 255, 0.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pedido-detail-item {
    transition: none;
  }
}

.pedido-detail-item--wide {
  grid-column: 1 / -1;
}

.pedido-detail-item--featured {
  background: linear-gradient(135deg, var(--pedido-discriminacao-soft), rgba(250, 173, 2, 0.02));
  border-color: rgba(250, 173, 2, 0.2);
}

.pedido-detail-item--featured .pedido-detail-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 1.02rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pedido-detail-item-icon {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.05rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.pedido-detail-item-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.pedido-detail-item dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pedido-detail-item dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.pedido-detail-value--money,
.pedido-detail-value--money strong {
  color: var(--pedido-money);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pedido-detail-value--total,
.pedido-detail-value--total strong {
  color: var(--pedido-total);
}

.pedido-detail-link {
  color: var(--pedido-discriminacao-muted);
  text-decoration: none;
  word-break: break-word;
}

@media (hover: hover) {
  .pedido-detail-link:hover {
    color: var(--text);
    text-decoration: underline;
  }
}

.pedido-detail-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.notas-col-proposta,
.notas-col-numero {
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
  width: 1%;
}

.notas-col-proposta {
  color: #a8c4f0;
}

.notas-col-proposta .pedido-numero-text {
  font-variant-numeric: tabular-nums;
}

.notas-col-numero {
  color: var(--text);
}

.notas-col-numero .pedido-numero-text--nota {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.btn-icon-edit {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
}

.btn-icon-edit:hover,
.btn-icon-edit:focus-visible {
  color: var(--text);
  border-color: var(--accent);
  outline: none;
}

.pedido-col-acoes-header {
  text-align: right;
  width: 9.5rem;
}

.pedido-col-acoes {
  text-align: right;
  width: 9.5rem;
}

.pedidos-acoes-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pedido-acoes-toolbar {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 16, 31, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pedido-acao-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 1.85rem;
  padding: 0.3rem 0.5rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.pedido-acao-btn:last-child {
  border-right: 0;
}

.pedido-acao-btn--editar:hover:not(:disabled),
.pedido-acao-btn--editar:focus-visible:not(:disabled) {
  background: rgba(49, 221, 244, 0.14);
  color: var(--text);
  outline: none;
}

.pedido-acao-btn--emitir {
  color: #a8c4f0;
}

.pedido-acao-btn--emitir:hover:not(:disabled),
.pedido-acao-btn--emitir:focus-visible:not(:disabled) {
  background: rgba(121, 159, 227, 0.18);
  color: #ede9fe;
  outline: none;
}

.pedido-acao-btn--reverter {
  color: #a8c4f0;
}

.pedido-acao-btn--reverter:hover:not(:disabled),
.pedido-acao-btn--reverter:focus-visible:not(:disabled) {
  background: rgba(121, 159, 227, 0.18);
  color: #ede9fe;
  outline: none;
}

.pedido-acao-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pedido-acao-icon {
  flex-shrink: 0;
  font-size: 0.8rem;
  line-height: 1;
}

.pedido-acao-label {
  letter-spacing: 0.01em;
}

.pedidos-table .pedido-acoes-toolbar:has(.pedido-acao-btn:only-child) .pedido-acao-btn {
  min-width: 6.5rem;
}

@media (max-width: 1100px) {
  .pedido-acao-label {
    display: none;
  }

  .pedido-acao-btn {
    min-width: 1.85rem;
    padding-inline: 0.4rem;
  }

  .pedidos-table .pedido-acoes-toolbar:has(.pedido-acao-btn:only-child) .pedido-acao-btn {
    min-width: 1.85rem;
  }
}

.emitir-nota-confirm-panel {
  width: min(26.5rem, calc(100vw - 1.5rem));
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.emitir-nota-confirm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.emitir-nota-confirm-header-text {
  min-width: 0;
  flex: 1;
}

.emitir-nota-confirm-close {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.emitir-nota-confirm-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a8c4f0;
}

.emitir-nota-confirm-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.emitir-nota-confirm-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.35rem 1.75rem 1.5rem;
}

.emitir-nota-confirm-proposta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(49, 221, 244, 0.1);
  border: 1px solid rgba(49, 221, 244, 0.24);
}

.emitir-nota-confirm-proposta-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7ae8f7;
}

.emitir-nota-confirm-proposta-valor {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 1rem;
}

.emitir-nota-confirm-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.55;
}

.emitir-nota-confirm-campo {
  margin-bottom: 0;
}

.emitir-nota-confirm-campo label {
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
}

.emitir-nota-confirm-panel .emitir-nota-numero-input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.emitir-nota-confirm-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.emitir-nota-pdf-campo {
  margin-bottom: 0;
}

.emitir-nota-pdf-field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.emitir-nota-pdf-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group .emitir-nota-pdf-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.emitir-nota-pdf-dropzone {
  display: block;
  cursor: pointer;
}

.emitir-nota-pdf-dropzone-visual {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.75rem;
  padding: 0.95rem 1rem;
  border: 1.5px dashed rgba(248, 113, 113, 0.38);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(248, 113, 113, 0.1), transparent 55%),
    rgba(0, 16, 31, 0.55);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.emitir-nota-pdf-dropzone:hover .emitir-nota-pdf-dropzone-visual,
.emitir-nota-pdf-dropzone:focus-within .emitir-nota-pdf-dropzone-visual {
  border-color: rgba(252, 165, 165, 0.62);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(248, 113, 113, 0.16), transparent 55%),
    rgba(0, 16, 31, 0.72);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.emitir-nota-pdf-dropzone.is-dragover .emitir-nota-pdf-dropzone-visual {
  border-color: #fca5a5;
  border-style: solid;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(248, 113, 113, 0.22), transparent 55%),
    rgba(0, 16, 31, 0.78);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18);
  transform: translateY(-1px);
}

.emitir-nota-pdf-dropzone.has-file .emitir-nota-pdf-dropzone-visual {
  border-style: solid;
  border-color: rgba(74, 222, 128, 0.42);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(74, 222, 128, 0.12), transparent 55%),
    rgba(0, 16, 31, 0.62);
}

.emitir-nota-pdf-dropzone.has-file:hover .emitir-nota-pdf-dropzone-visual,
.emitir-nota-pdf-dropzone.has-file:focus-within .emitir-nota-pdf-dropzone-visual {
  border-color: rgba(134, 239, 172, 0.58);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.12);
}

.emitir-nota-pdf-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.24);
}

.emitir-nota-pdf-dropzone.has-file .emitir-nota-pdf-dropzone-icon {
  color: #bbf7d0;
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.28);
}

.emitir-nota-pdf-dropzone-icon svg {
  display: block;
}

.emitir-nota-pdf-dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.emitir-nota-pdf-dropzone-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.emitir-nota-pdf-filename {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
  word-break: break-all;
}

.emitir-nota-pdf-dropzone.has-file .emitir-nota-pdf-filename {
  color: #86efac;
  font-weight: 600;
}

.emitir-nota-pdf-dropzone-badge {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.emitir-nota-pdf-dropzone.has-file .emitir-nota-pdf-dropzone-badge {
  color: #bbf7d0;
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.28);
}

.emitir-nota-pdf-clear {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.emitir-nota-pdf-clear:hover,
.emitir-nota-pdf-clear:focus-visible {
  color: #fecaca;
  outline: none;
}

.pedido-acao-btn--pdf {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.1);
}

.pedido-acao-btn--pdf:hover:not(:disabled),
.pedido-acao-btn--pdf:focus-visible:not(:disabled) {
  background: rgba(248, 113, 113, 0.22);
  color: #fff1f2;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.35);
}

.pedido-acao-btn--pdf.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.pedido-acao-icon--svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pedido-acao-icon--svg svg {
  display: block;
}

.pedidos-table .pedido-acoes-toolbar:has(.pedido-acao-btn--pdf:only-child) .pedido-acao-btn--pdf {
  min-width: 7.25rem;
  padding-inline: 0.65rem;
}

.emitir-nota-confirm-resumo {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.35);
  overflow: hidden;
}

.emitir-nota-confirm-resumo-titulo {
  margin: 0;
  padding: 0.7rem 1.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.emitir-nota-confirm-resumo-lista {
  margin: 0;
  padding: 0.35rem 0;
}

.emitir-nota-confirm-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.15rem;
}

.emitir-nota-confirm-item + .emitir-nota-confirm-item {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0;
  padding-top: 0.7rem;
}

.emitir-nota-confirm-item dt {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.emitir-nota-confirm-item dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
}

.emitir-nota-confirm-error {
  margin: -0.35rem 0 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.45;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.emitir-nota-confirm-footer {
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0;
  padding: 1.15rem 1.75rem 1.5rem;
}

body.modal-open .app-container > #alert {
  position: relative;
  z-index: 250;
}

.notas-col-preco {
  font-weight: 600;
  color: #86efac;
  white-space: nowrap;
}

.notas-col-data {
  white-space: nowrap;
  color: var(--text-muted);
}

.notas-col-paga-em--set {
  color: #86efac;
  font-weight: 600;
}

.notas-col-pct {
  width: 4.5rem;
  white-space: nowrap;
}

.pedido-col-pagamento {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notas-col-acoes {
  width: 1%;
  white-space: nowrap;
}

.notas-col-status {
  width: 1%;
  white-space: nowrap;
}

.nota-status-cell {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nota-status-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.3;
}

.btn-nota-status-action {
  padding: 0.22rem 0.5rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.btn-nota-status-action:hover,
.btn-nota-status-action:focus-visible {
  background: rgba(34, 197, 94, 0.18);
  border-color: #86efac;
  outline: none;
}

.btn-nota-status-action--reverter {
  border-color: rgba(121, 159, 227, 0.4);
  background: rgba(121, 159, 227, 0.1);
  color: #a8c4f0;
}

.btn-nota-status-action--reverter:hover,
.btn-nota-status-action--reverter:focus-visible {
  background: rgba(121, 159, 227, 0.18);
  border-color: #a8c4f0;
}

.notas-status-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nota-status-chip--emitida {
  background: rgba(121, 159, 227, 0.16);
  color: #a8c4f0;
  border: 1px solid rgba(121, 159, 227, 0.35);
}

.nota-status-chip--paga {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.nota-status-chip--vencida {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.nota-row--paga {
  background: rgba(34, 197, 94, 0.04);
}

.nota-row--vencida {
  background: rgba(239, 68, 68, 0.04);
}

.nota-paga-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.nota-status-readonly {
  margin-top: 0.35rem;
}

.notas-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem !important;
}

.panel-placeholder {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.25);
}

.panel-placeholder--warning {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #ffbc7d;
  text-align: left;
  padding: 1.25rem;
}

.panel-placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.panel-placeholder-hint {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cliente-overview .info-tiles {
  padding: 1.25rem 1.75rem 0.5rem;
}

.cliente-overview .cliente-nav-grid {
  padding: 0.5rem 1.75rem 1.5rem;
}

@media (min-width: 720px) {
  .cliente-overview .info-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cliente-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .nota-form-hint,
  .nota-form-actions {
    grid-column: 1 / -1;
  }

  .nota-form-field--wide {
    grid-column: 1 / 3;
  }

  .nota-form-actions {
    justify-content: flex-end;
  }

  .nota-form-action .btn {
    width: auto;
    min-width: 9.5rem;
  }
}

@media (max-width: 719px) {
  .cliente-workspace-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ——— Log de auditoria ——— */
.log-section {
  margin-top: 1.25rem;
}

.log-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.log-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.log-section-count {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.log-section-error {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
}

.system-log-list .log-section {
  padding: 1.35rem 1.5rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.log-admin-section .log-section-head {
  margin-bottom: 1rem;
}

.log-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.log-table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: auto;
}

.log-table th,
.log-table td {
  padding: 0.85rem 1.15rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-table th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

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

.log-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.log-col-data {
  width: 1%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.log-col-usuario {
  width: 12%;
  min-width: 7.5rem;
  max-width: 11rem;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-col-acao,
.log-col-entidade {
  width: 1%;
  white-space: nowrap;
  vertical-align: top;
}

.log-acao-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.log-acao-chip--criar { background: rgba(34, 197, 94, 0.12); color: #86efac; border-color: rgba(34, 197, 94, 0.25); }
.log-acao-chip--editar { background: rgba(250, 173, 2, 0.12); color: #ffbc7d; border-color: rgba(250, 173, 2, 0.25); }
.log-acao-chip--excluir { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.25); }
.log-acao-chip--desativar { background: rgba(251, 191, 36, 0.12); color: #ffbc7d; border-color: rgba(251, 191, 36, 0.25); }
.log-acao-chip--ativar { background: rgba(34, 197, 94, 0.1); color: #86efac; border-color: rgba(34, 197, 94, 0.2); }
.log-acao-chip--login,
.log-acao-chip--logout { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.25); }
.log-acao-chip--emitir { background: rgba(121, 159, 227, 0.12); color: #a8c4f0; border-color: rgba(121, 159, 227, 0.25); }
.log-acao-chip--marcar_paga { background: rgba(34, 197, 94, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
.log-acao-chip--configurar { background: rgba(49, 221, 244, 0.12); color: #7ae8f7; border-color: rgba(49, 221, 244, 0.25); }
.log-acao-chip--default { background: rgba(148, 163, 184, 0.1); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.2); }

.log-table caption {
  padding: 0;
}

.log-col-resumo {
  width: auto;
  min-width: 14rem;
}

.log-resumo-text {
  display: block;
  color: var(--text);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-usuario-nome {
  display: block;
  line-height: 1.4;
}

.log-resumo-cliente {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.loading--compact {
  padding: 1rem;
  font-size: 0.88rem;
}

/* ——— Log admin (página completa) ——— */
.log-admin-section {
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.85rem;
  animation: fadeUp 0.4s ease-out;
}

.log-page-toolbar {
  margin-bottom: 1.35rem;
}

.log-page-subtitle {
  margin-top: 0.35rem;
  margin-bottom: 0;
  max-width: 42rem;
  line-height: 1.5;
}

.system-log-list {
  margin: 0;
}

.log-admin-panel {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.log-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.85rem;
}

.log-stat-card {
  position: relative;
  padding: 1rem 1.15rem 1rem 2.75rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 16, 31, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.log-stat-icon {
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  display: flex;
  color: var(--text-muted);
  opacity: 0.85;
}

.log-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.log-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.log-stat-value--text {
  font-size: 0.92rem;
  font-weight: 600;
}

.log-stat-card--criar { border-color: rgba(34, 197, 94, 0.22); }
.log-stat-card--emitir { border-color: rgba(121, 159, 227, 0.22); }
.log-stat-card--login { border-color: rgba(148, 163, 184, 0.22); }
.log-stat-card--ultima { grid-column: span 1; }

.log-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 16, 31, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.log-toolbar-top {
  width: 100%;
}

.log-toolbar-busca {
  flex: 1 1 16rem;
  min-width: 0;
}

.log-filtros-bar {
  width: 100%;
}

.log-filtros-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
}

.log-filter-menu,
.log-sort-menu {
  min-width: 0;
}

.log-filter-panel .lista-sort-option {
  width: 100%;
}

.log-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.log-quick-chip {
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.log-quick-chip:hover,
.log-quick-chip:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.log-quick-chip.is-active {
  background: rgba(49, 221, 244, 0.18);
  border-color: rgba(49, 221, 244, 0.45);
  color: #b8f3fb;
}

.log-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.log-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(250, 173, 2, 0.28);
  background: rgba(250, 173, 2, 0.1);
  color: #bae6fd;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.log-active-filter-tag-x {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.85;
}

.log-active-filters-clear {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
}

.log-date-group-row td {
  padding: 0.65rem 1.15rem 0.35rem;
  border-bottom: none;
  background: transparent;
}

.log-date-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.log-row--clickable {
  cursor: pointer;
}

.log-row--clickable:hover,
.log-row--clickable:focus-visible {
  background: rgba(49, 221, 244, 0.08);
  outline: none;
}

.log-row-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #93c5fd;
  font-weight: 600;
}

.log-card--clickable {
  cursor: pointer;
}

.log-card--clickable:hover,
.log-card--clickable:focus-visible {
  border-color: rgba(49, 221, 244, 0.35);
  background: rgba(49, 221, 244, 0.06);
  outline: none;
}

.log-detalhe-panel {
  max-width: 52rem;
  width: min(96vw, 52rem);
}

.log-detalhe-modal-body {
  padding: 0 1.35rem 1.35rem;
  max-height: min(70vh, 42rem);
  overflow: auto;
}

.log-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.log-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.log-detail-resumo {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.log-detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}

.log-detail-facts div {
  margin: 0;
}

.log-detail-facts dt {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.log-detail-facts dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
}

.log-detail-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.log-detail-cliente-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: #93c5fd;
  text-decoration: none;
}

.log-detail-cliente-link:hover {
  text-decoration: underline;
}

.log-detail-alert {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #ffbc7d;
  font-size: 0.84rem;
}

.log-diff-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.log-diff-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.log-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.log-diff-table th,
.log-diff-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-diff-table thead th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.log-diff-table tbody th[scope="row"] {
  width: 28%;
  min-width: 8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.log-diff-row.is-changed .log-diff-after {
  color: #86efac;
  font-weight: 600;
}

.log-diff-row.is-changed .log-diff-before {
  color: #fca5a5;
}

.log-diff-empty,
.log-diff-hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.log-detalhes-toggle {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0;
  border: none;
  background: none;
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.log-detalhes-row td {
  padding-top: 0;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.log-detalhes-panel {
  margin: 0 0 0.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.log-detalhes-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.log-detalhes-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-resumo-cliente-link {
  text-decoration: none;
}

.log-resumo-cliente-link:hover,
.log-resumo-cliente-link:focus-visible {
  color: #93c5fd;
  text-decoration: underline;
}

.log-table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2.25rem 1rem !important;
}

.log-table-empty strong {
  display: block;
  color: var(--text);
  font-style: normal;
  margin-bottom: 0.35rem;
}

.log-table-empty-hint {
  display: block;
  font-size: 0.84rem;
  font-style: normal;
  opacity: 0.9;
}

.log-table-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 0.65rem;
  color: var(--text-muted);
  opacity: 0.65;
}

.log-cards {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
}

.log-card {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.log-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.log-card-head time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.log-card-resumo {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.log-card-usuario {
  font-size: 0.82rem;
  font-weight: 600;
}

.log-card-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.35rem 0.15rem 0.15rem;
}

.log-card-detalhes {
  margin-top: 0.45rem;
}

.log-cards-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.log-cards-empty strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.log-cards--mobile {
  margin-top: 0.5rem;
}

.log-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
  flex-shrink: 0;
}

.log-filtros-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  flex: 0 1 auto;
}

.log-filtro-select-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  min-width: 0;
}

.log-filtro-select {
  min-width: 9.5rem;
  max-width: 12rem;
}

.log-filtro-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.log-col-data-full {
  display: none;
}

.log-entidade-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.log-entidade-chip--cliente { color: #93c5fd; border-color: rgba(0, 205, 255, 0.25); }
.log-entidade-chip--pedido { color: #a8c4f0; border-color: rgba(121, 159, 227, 0.25); }
.log-entidade-chip--nota { color: #86efac; border-color: rgba(34, 197, 94, 0.25); }
.log-entidade-chip--sessao { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.25); }
.log-entidade-chip--usuario { color: #ffbc7d; border-color: rgba(251, 191, 36, 0.25); }
.log-entidade-chip--mv3_dados_fiscal { color: #7ae8f7; border-color: rgba(49, 221, 244, 0.25); }

.log-section-count-meta {
  color: var(--text-muted);
  font-weight: 500;
}

.log-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.log-pagination-range,
.log-pagination-page {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.log-pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.log-load-more {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
  padding-bottom: 0.15rem;
}

.system-log-list .log-section {
  margin-top: 0;
}

@media (max-width: 720px) {
  .log-admin-section {
    padding: 1.35rem 1.15rem;
  }

  .log-toolbar {
    padding: 0.9rem;
  }

  .system-log-list .log-section {
    padding: 1.1rem 1rem;
  }

  .log-table-wrap--desktop {
    display: none;
  }

  .log-cards--mobile {
    display: flex;
  }

  .log-table th,
  .log-table td {
    padding: 0.75rem 0.85rem;
  }

  .log-toolbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .log-filtros-inline {
    width: 100%;
  }

  .log-filter-menu,
  .log-sort-menu {
    flex: 1 1 calc(50% - 0.5rem);
  }

  .log-stat-card--ultima {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   MV3 Finança — Professional polish layer
   ============================================================ */

.login-page {
  flex-direction: column;
  gap: 1.5rem;
}

.login-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.login-footer p {
  margin: 0;
}

@media (max-width: 960px) {
  .app-sidebar-toggle {
    display: none;
  }

  .app-sidebar {
    flex-basis: var(--sidebar-w-compact);
    width: var(--sidebar-w-compact);
  }

  .app-sidebar-header {
    justify-content: center;
    padding: 0.75rem 0.5rem 0.25rem;
  }

  .app-sidebar-title,
  .app-nav-heading,
  .app-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .app-nav-heading--admin {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .app-main-nav {
    padding: 0.5rem 0.5rem 1rem;
    align-items: center;
  }

  .app-main-nav-btn {
    justify-content: center;
    padding: 0.65rem;
    width: 100%;
  }

  .app-main .app-container {
    padding: 1.25rem 1rem 2.5rem;
  }
}

.app-shell--sidebar-collapsed .app-sidebar {
  flex-basis: var(--sidebar-w-compact);
  width: var(--sidebar-w-compact);
}

.app-shell--sidebar-collapsed .app-sidebar-header {
  justify-content: center;
  padding: 0.75rem 0.5rem 0.25rem;
}

.app-shell--sidebar-collapsed .app-sidebar-title {
  opacity: 0;
  max-width: 0;
}

.app-shell--sidebar-collapsed .app-nav-label {
  opacity: 0;
  max-width: 0;
  transform: translateX(-6px);
}

.app-shell--sidebar-collapsed .app-nav-heading {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
}

.app-shell--sidebar-collapsed .app-nav-heading--admin {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.app-shell--sidebar-collapsed .app-main-nav {
  padding: 0.5rem 0.5rem 1rem;
  align-items: center;
}

.app-shell--sidebar-collapsed .app-main-nav-btn {
  justify-content: center;
  gap: 0;
  padding: 0.65rem;
  width: 100%;
}

.app-shell--sidebar-collapsed .app-sidebar-toggle {
  margin-left: 0;
}

@media (prefers-reduced-motion: reduce) {
  .app-sidebar,
  .app-sidebar-title,
  .app-nav-heading,
  .app-nav-label,
  .app-main-nav-btn,
  .app-sidebar-toggle-icon {
    transition: none;
  }
}

.app-header-brand--cliente {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.cliente-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  opacity: 1;
  transition: opacity var(--transition);
}

.cliente-header-logo:hover {
  opacity: 1;
}

.cliente-header-logo .brand-logo-sm {
  height: 64px;
  width: auto;
}

.app-header-brand-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cliente-header-logo,
  .app-header-brand-sep {
    display: none;
  }
}

.usuario-role-badge,
.user-header-role {
  font-size: 0.75rem;
}

.cliente-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
  opacity: 0.85;
}

.cliente-tab-svg {
  display: block;
}

.cliente-tab--active .cliente-tab-icon {
  opacity: 1;
}

@media (max-width: 720px) {
  .cliente-form-steps {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .cliente-form-step {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0.65rem 0.75rem;
    font-size: 0.78rem;
  }
}

.panel-placeholder--warning {
  border-left: 3px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.06);
}

.panel-placeholder--warning p {
  max-width: 42ch;
  line-height: 1.55;
}

.brand-logo {
  mix-blend-mode: normal;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.15));
}

.page-login .brand-logo {
  mix-blend-mode: screen;
}

.contact-panel-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: rgba(49, 221, 244, 0.18);
  border: 1px solid rgba(49, 221, 244, 0.28);
  font-size: 1.1rem;
  line-height: 1;
}

.contact-panel-header-icon--mv3 {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
}

.app-container::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 2.5rem;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  opacity: 0.5;
}
