:root {
  --bg: #05070d;
  --bg-alt: #0a0e18;
  --surface: #10141f;
  --surface-2: #151a28;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e7eaf3;
  --text-muted: #8992a8;
  --text-faint: #5b6478;

  --primary: #6366f1;
  --primary-2: #06b6d4;
  --primary-grad: linear-gradient(135deg, #7c3aed 0%, #6366f1 50%, #06b6d4 100%);
  --primary-soft: rgba(99, 102, 241, 0.14);

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.14);
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, 0.14);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

::selection {
  background: rgba(99, 102, 241, 0.35);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.hidden { display: none !important; }

.screen { min-height: 100vh; }

/* ============ LOGIN ============ */
.login-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
}

.bg-grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 100%);
}

.bg-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: drift 14s ease-in-out infinite alternate;
}

.bg-glow-1 {
  top: -180px;
  left: -140px;
  background: #6366f1;
}

.bg-glow-2 {
  bottom: -220px;
  right: -160px;
  background: #06b6d4;
  animation-delay: -7s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(16, 20, 31, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  padding: 44px 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.02);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
}

.brand-mark svg { width: 26px; height: 26px; color: #fff; }

.login-card h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
}

.input-group { margin-bottom: 4px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin: 16px 0 7px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}

.input-wrap input {
  padding-left: 40px;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

input::placeholder { color: var(--text-faint); }

input:focus, select:focus {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238992a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
  color-scheme: dark;
}

select option {
  background-color: var(--surface-2);
  color: var(--text);
}

.btn-primary {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
  background: var(--primary-grad);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary svg { width: 17px; height: 17px; transition: transform 0.15s; }

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:hover svg { transform: translateX(3px); }

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

.btn-glow:hover { box-shadow: 0 12px 28px rgba(99, 102, 241, 0.4); }

.error-msg {
  color: var(--danger);
  font-size: 12.5px;
  margin: 10px 0 0;
  min-height: 16px;
}

.success-msg {
  color: var(--success);
  font-size: 13px;
  margin: 12px 0 0;
  min-height: 16px;
}

.hint {
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

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

/* ============ APP SHELL ============ */
.app-shell { background: var(--bg); }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 264px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
}

.sidebar.open { transform: translateX(0); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-mark-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.brand-mark-sm svg { width: 18px; height: 18px; }

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.menu-item.active {
  background: var(--primary-soft);
  color: #c7d2fe;
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-footer {
  padding: 16px 14px 20px;
  border-top: 1px solid var(--border);
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 10px;
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  overflow: hidden;
}

.admin-chip-text strong { font-size: 13px; color: var(--text); }
.admin-chip-text span { font-size: 11px; color: var(--success); }

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #fca5b5;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s;
}

.btn-logout svg { width: 16px; height: 16px; }
.btn-logout:hover { background: rgba(244, 63, 94, 0.16); }

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.menu-overlay.open { display: block; }

.main-area { min-height: 100vh; }

.topbar {
  background: rgba(10, 14, 24, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.menu-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}

.menu-btn span {
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.content-wide {
  max-width: none;
}

.page-heading { margin-bottom: 24px; }

.page-heading h3 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.page-heading strong { color: #c7d2fe; }

.page-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-heading-action {
  width: auto;
  margin-top: 0;
  padding: 11px 20px;
  flex-shrink: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.15s, border-color 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-card-clickable {
  position: relative;
  width: 100%;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.stat-card-clickable:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}

.stat-card-hint {
  position: absolute;
  bottom: 12px;
  right: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.15s;
}

.stat-card-clickable:hover .stat-card-hint { opacity: 1; }

.stat-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px var(--surface);
  animation: badgePulse 1.6s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 0 rgba(244, 63, 94, 0.5); }
  50% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px rgba(244, 63, 94, 0); }
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 28px; height: 28px; }

.stat-icon-indigo { background: var(--primary-soft); color: #a5b4fc; }
.stat-icon-cyan { background: rgba(6, 182, 212, 0.14); color: #67e8f9; }
.stat-icon-violet { background: rgba(168, 85, 247, 0.14); color: #d8b4fe; }
.stat-icon-emerald { background: var(--success-soft); color: #6ee7b7; }
.stat-icon-rose { background: rgba(244, 63, 94, 0.12); color: #fb7185; }
.stat-icon-amber { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }

.verm-stats { margin-bottom: 24px; }

.stat-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  display: block;
  font-size: 34px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.inv-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: var(--radius-md);
  max-width: 860px;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th, td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

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

.row-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.row-valor { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

#inv-table-body tr, #vermelinho-table-body tr {
  cursor: pointer;
  transition: background 0.12s;
}

#inv-table-body tr:hover, #vermelinho-table-body tr:hover, #operador-table-body tr:hover { background: rgba(255, 255, 255, 0.025); }
#vermelinho-table-body tr, #operador-table-body tr { cursor: pointer; }

.btn-del, .btn-del-verm {
  background: none;
  border: 1px solid transparent;
  color: var(--text-faint);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-del svg, .btn-del-verm svg { width: 18px; height: 18px; }

.btn-del:hover, .btn-del-verm:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.25);
}

.empty-msg {
  text-align: center;
  color: var(--text-faint);
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-msg svg { width: 40px; height: 40px; opacity: 0.5; }
.empty-msg p { margin: 0; font-size: 14px; }

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 10px;
  animation: fadeIn 0.15s ease-out;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon.success { background: var(--success-soft); color: var(--success); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.06); }
.modal-icon.error { background: var(--danger-soft); color: var(--danger); box-shadow: 0 0 0 8px rgba(244, 63, 94, 0.06); }

.modal-icon svg { width: 28px; height: 28px; }

.modal-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.modal-message {
  margin: 0 0 26px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }

.modal-actions .btn-primary { margin-top: 0; }

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

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

/* STATUS BADGE */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-credenciamento { background: var(--info-soft); color: #7dd3fc; }
.status-disponivel { background: rgba(6, 182, 212, 0.14); color: #67e8f9; }
.status-andamento { background: var(--warning-soft); color: #fbbf24; }
.status-finalizado { background: var(--success-soft); color: #6ee7b7; }

/* MODAL DE DETALHES */
.modal-box-lg {
  max-width: 1040px;
  width: 98vw;
  text-align: left;
  padding: 0;
  max-height: 97vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-box-header {
  padding: 20px 36px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-box-body {
  padding: 16px 36px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-box-footer {
  padding: 14px 36px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-nome {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 22px;
  margin-bottom: 4px;
}

.detail-field {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.detail-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-size: 14.5px;
  color: var(--text);
  font-weight: 600;
}

.detail-select,
.detail-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.detail-feedback {
  min-height: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  text-align: center;
  margin: 0 0 12px;
}

.detail-feedback.error { color: var(--danger); }

.modal-actions-row { flex-direction: row; }
.modal-actions-row button { flex: 1; margin-top: 0; }
.modal-actions-row .btn-save-wide { flex: 2; }

@media (max-width: 780px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .detail-grid { grid-template-columns: 1fr; }
  .modal-actions-row { flex-direction: column; }
  .btn-save-wide { flex: 1; }
}

/* DADOS DO PAGAMENTO */
.payment-group {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 14px 16px 16px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
}

.payment-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.payment-group-title svg { width: 15px; height: 15px; }

.payment-group label { margin-top: 10px; }

.payment-group-standalone {
  grid-column: auto;
  margin-top: 0;
  padding: 0;
  background: none;
  border: none;
}

.payment-group-title-lg {
  font-size: 15px;
  margin-bottom: 0;
}

/* RESUMO COMPACTO DE PAGAMENTO (no modal principal) */
.payment-summary-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
}

.payment-summary-bar-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-summary-bar-icon svg { width: 19px; height: 19px; }

.payment-summary-bar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-summary-bar-text strong { font-size: 13.5px; color: var(--text); }
.payment-summary-bar-text span { font-size: 12.5px; color: var(--text-muted); }

.btn-view-pagamentos {
  width: auto;
  margin-top: 0;
  padding: 9px 16px;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .payment-summary-bar { flex-wrap: wrap; }
  .btn-view-pagamentos { width: 100%; }
}

/* ASSISTENTE DE PEDIDOS (WIZARD) */
.wizard-step .btn-step {
  margin-top: 12px;
}

.pedido-fields-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr 1fr 1.2fr;
  gap: 0 14px;
  margin-top: 4px;
}

.pedido-fields-grid .field-group label { margin-top: 0; }
.pedido-fields-grid .field-group input { margin: 0; }

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

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

.wizard-step-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.wizard-step-actions button {
  flex: 1;
  margin-top: 0;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.step-indicator b { color: #a5b4fc; font-size: 13px; }

.step-progress {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.step-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary-grad);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.pedidos-resumo-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.pedido-summary-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pedido-summary-index {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.pedido-summary-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  min-width: 0;
  flex: 1;
}

.pedido-summary-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}

.pedido-summary-label {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.pedido-summary-value {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}

@media (max-width: 560px) {
  .pedido-summary-body { grid-template-columns: 1fr; }
}

.btn-edit-pedido {
  align-self: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-edit-pedido svg { width: 16px; height: 16px; }

.btn-edit-pedido:hover {
  background: var(--primary-soft);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

.btn-add-pedido {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add-pedido svg { width: 16px; height: 16px; }

/* ENTREGA */
.btn-confirm-entrega {
  padding: 7px 12px;
  background: var(--primary-soft);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-confirm-entrega:hover { background: rgba(99, 102, 241, 0.24); }

.entrega-countdown {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
  white-space: nowrap;
}

.entrega-countdown.expired { color: var(--danger); }

.col-entrega { min-width: 420px; }

.entrega-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Tags compactas usadas na tabela */
.entrega-date-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.entrega-date-tag strong { color: var(--text); font-weight: 700; }

.entrega-date-tag-deadline {
  color: #fbbf24;
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.3);
}

.entrega-date-tag-deadline strong { color: #fde68a; }

/* Chips maiores usados no modal de detalhes */
.entrega-dates-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.entrega-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.entrega-date-chip svg { width: 14px; height: 14px; flex-shrink: 0; }

.entrega-date-chip strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.entrega-date-chip-deadline {
  color: #fbbf24;
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.35);
}

.entrega-date-chip-deadline strong { color: #fde68a; }

.entrega-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
}

.entrega-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.entrega-banner-icon svg { width: 22px; height: 22px; }

.entrega-banner-content {
  flex: 1;
  min-width: 0;
}

.entrega-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.entrega-banner-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.entrega-banner-sub .entrega-countdown {
  font-size: 15px;
}


.btn-confirm-entrega-lg {
  width: auto;
  margin-top: 0;
  padding: 10px 20px;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .entrega-banner { flex-wrap: wrap; }
  .btn-confirm-entrega-lg { width: 100%; }
}

/* CRONOGRAMA DE LIBERAÇÃO (LOTES) */
.liquido-modal-subtitle {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.lote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm);
}

.lote-date {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.lote-count {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.lote-total {
  font-size: 17px;
  font-weight: 700;
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lote-item-pending {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  border-left-color: var(--text-faint);
}

.lote-item-pending .lote-total { color: var(--text-muted); }

.lotes-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 0;
  font-size: 13.5px;
}

.lote-item-due {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.35);
  border-left-color: var(--warning);
}

.lote-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lote-due-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.lote-item-due .lote-total { color: #fde68a; }

.lote-due-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 158, 11, 0.25);
}

.lote-due-question > span {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.lote-due-actions {
  display: flex;
  gap: 8px;
}

.btn-lote-confirm,
.btn-lote-dismiss {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-lote-confirm {
  background: var(--success);
  color: #05130d;
  border: none;
}

.btn-lote-confirm:hover { background: #16d696; }

.btn-lote-dismiss {
  background: none;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--text-muted);
}

.btn-lote-dismiss:hover { background: rgba(255, 255, 255, 0.05); }

.entrega-liberado-msg {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

.entrega-liberado-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: #6ee7b7;
  font-size: 11.5px;
  font-weight: 700;
}

/* TOAST */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.toast {
  pointer-events: auto;
  width: 340px;
  max-width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

.toast-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon svg { width: 13px; height: 13px; }

.toast.success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast.error .toast-icon { background: var(--danger-soft); color: var(--danger); }

.toast-message {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.45;
  padding-top: 2px;
}

.toast.toast-hide {
  animation: toastOut 0.25s ease-in forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(24px); }
}

/* ============ RESPONSIVE ============ */
@media (min-width: 900px) {
  .sidebar { transform: translateX(0) !important; }
  .main-area { margin-left: 264px; }
  .menu-btn { display: none; }
  .menu-overlay { display: none !important; }
}

/* ============ CONTAS ============ */

/* ---- Hero: saldo total + nova conta ---- */
.contas-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.contas-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(99, 102, 241, 0.12), transparent 70%),
    radial-gradient(420px 180px at 100% 100%, rgba(6, 182, 212, 0.08), transparent 70%);
  pointer-events: none;
}

.contas-hero-main { position: relative; }

.contas-hero-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contas-hero-valor {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.contas-hero-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-faint);
}

.btn-nova-conta {
  width: auto;
  margin-top: 0;
  padding: 13px 22px;
  position: relative;
}

.btn-nova-conta svg { width: 16px; height: 16px; }

/* ---- Painel com a lista de contas ---- */
.contas-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
}

.contas-empty { padding: 70px 20px; }
.contas-empty p strong { color: var(--text-muted); }

.contas-list { display: flex; flex-direction: column; }

/* ---- Linha de conta ---- */
.conta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}

.conta-row:hover { background: rgba(255, 255, 255, 0.04); }

.conta-row + .conta-row {
  border-top: 1px solid var(--border);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.conta-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.conta-color-0 { background: var(--primary-soft); color: #a5b4fc; }
.conta-color-1 { background: rgba(6, 182, 212, 0.14); color: #67e8f9; }
.conta-color-2 { background: var(--success-soft); color: #6ee7b7; }
.conta-color-3 { background: rgba(168, 85, 247, 0.14); color: #d8b4fe; }
.conta-color-4 { background: var(--warning-soft); color: #fcd34d; }
.conta-color-5 { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }

.conta-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conta-row-nome {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conta-row-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conta-share-bar {
  display: block;
  width: 110px;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.conta-share-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.conta-fill-0 { background: linear-gradient(90deg, #7c3aed, #6366f1); }
.conta-fill-1 { background: linear-gradient(90deg, #0891b2, #06b6d4); }
.conta-fill-2 { background: linear-gradient(90deg, #059669, #10b981); }
.conta-fill-3 { background: linear-gradient(90deg, #9333ea, #a855f7); }
.conta-fill-4 { background: linear-gradient(90deg, #d97706, #f59e0b); }
.conta-fill-5 { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.conta-share-pct {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  white-space: nowrap;
}

.conta-row-saldo {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.conta-row-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.conta-row:hover .conta-row-chevron {
  color: var(--text-muted);
  transform: translateX(2px);
}

/* ---- Modais de conta ---- */
.conta-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.conta-modal-header h3 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 700;
}

.conta-modal-header p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.conta-form-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.conta-form-icon svg { width: 22px; height: 22px; }

.conta-modal-saldo-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-top: 18px;
}

.conta-saldo-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.conta-saldo {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.conta-modal-mov-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

.conta-mov-tag { font-weight: 700; }
.conta-mov-tag.mov-add { color: var(--success); }
.conta-mov-tag.mov-sub { color: var(--danger); }

.conta-mov-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 20px 0 8px;
}

.conta-actions { display: flex; gap: 8px; }

.conta-actions input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}

.btn-conta-add,
.btn-conta-sub {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn-conta-add svg,
.btn-conta-sub svg { width: 13px; height: 13px; }

.btn-conta-add:active,
.btn-conta-sub:active { transform: scale(0.97); }

.btn-conta-add {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.25);
}

.btn-conta-add:hover { background: rgba(16, 185, 129, 0.24); }

.btn-conta-sub {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(244, 63, 94, 0.25);
}

.btn-conta-sub:hover { background: rgba(244, 63, 94, 0.24); }

.conta-modal-footer { margin-top: 24px; }

.btn-excluir-conta { color: var(--danger); }

/* ---- Ações do hero (Pagar + Nova Conta) ---- */
.contas-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
}

.btn-pagar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn-pagar svg { width: 16px; height: 16px; color: #67e8f9; }

.btn-pagar:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.conta-form-icon-pagar {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 60%, #38bdf8 100%);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.35);
}

/* ---- Edição do nome do banco ---- */
.conta-modal-title { flex: 1; min-width: 0; }

.conta-nome-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-edit-nome {
  background: none;
  border: 1px solid transparent;
  color: var(--text-faint);
  cursor: pointer;
  padding: 5px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.btn-edit-nome svg { width: 15px; height: 15px; }

.btn-edit-nome:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.conta-nome-edit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.conta-nome-edit input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
}

.btn-nome-acao {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-nome-acao svg { width: 14px; height: 14px; }

.btn-nome-save {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.25);
}

.btn-nome-save:hover { background: rgba(16, 185, 129, 0.24); }

.btn-nome-cancel {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.btn-nome-cancel:hover { background: rgba(255, 255, 255, 0.09); }

/* ---- Escolha do banco no pagamento ---- */
.pagar-bancos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 2px;
}

.pagar-banco-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.pagar-banco-option:hover { background: rgba(255, 255, 255, 0.05); }

.pagar-banco-option.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 1px var(--primary);
}

.pagar-banco-option .conta-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.pagar-banco-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pagar-banco-nome {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pagar-banco-saldo {
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.pagar-banco-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pagar-banco-check svg { width: 12px; height: 12px; }

.pagar-banco-option.selected .pagar-banco-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---- Wizard do Pagar ---- */
.btn-ver-contas svg { color: #a5b4fc; }

.pagar-indicator { margin-bottom: 14px; }

.pagar-step { min-height: 120px; }

.pagar-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-faint);
}

.pagar-resumo {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pagar-resumo strong { color: var(--text); }

/* ---- Extrato ---- */
.extrato-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.extrato-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.extrato-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.extrato-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-faint);
  pointer-events: none;
}

.extrato-search input {
  padding: 9px 12px 9px 36px;
  font-size: 13.5px;
}

.extrato-list { display: flex; flex-direction: column; }

.extrato-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
}

.extrato-row + .extrato-row { border-top: 1px solid var(--border); }

.extrato-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.extrato-icon svg { width: 16px; height: 16px; }

.extrato-icon-in {
  background: var(--success-soft);
  color: var(--success);
}

.extrato-icon-out {
  background: var(--danger-soft);
  color: var(--danger);
}

.extrato-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.extrato-desc {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extrato-meta {
  font-size: 11.5px;
  color: var(--text-faint);
}

.extrato-valor {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.extrato-valor.in { color: var(--success); }
.extrato-valor.out { color: var(--danger); }

@media (max-width: 640px) {
  .extrato-search { max-width: none; }
  .extrato-row { padding: 12px 12px; gap: 10px; }
}

@media (max-width: 640px) {
  .contas-hero { padding: 24px; }
  .contas-hero-valor { font-size: 32px; }
  .btn-nova-conta { width: 100%; }
  .conta-row { padding: 14px 12px; gap: 12px; }
  .conta-share-bar { width: 70px; }
  .conta-row-saldo { font-size: 15px; }
  .conta-actions { flex-wrap: wrap; }
  .conta-actions input { flex-basis: 100%; }
  .btn-conta-add, .btn-conta-sub { flex: 1; justify-content: center; padding: 10px 14px; }
}

/* ============ MODAL VERMELINHO ============ */

/* Abas */
.verm-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  background: var(--surface);
}

.verm-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-weight: 500;
  padding: 11px 18px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
  letter-spacing: 0.01em;
}

.verm-tab:hover {
  color: var(--text);
}

.verm-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Painéis */
.verm-panel {
  animation: fadeIn 0.12s ease;
}

/* Grid de campos */
.verm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

.verm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

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

.verm-field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Textarea de anotações */
#verm-anotacoes {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 12px 14px;
  resize: vertical;
  min-height: 180px;
  line-height: 1.65;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

#verm-anotacoes:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

@media (max-width: 540px) {
  .verm-form-grid {
    grid-template-columns: 1fr;
  }
  .verm-field.span-2 {
    grid-column: span 1;
  }
  .verm-tabs {
    padding: 0 12px;
  }
  .verm-tab {
    font-size: 0.78rem;
    padding: 10px 12px;
  }
}

/* LGC vencimento — tabela e modal */
.lgc-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}

.lgc-venc-badge {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
  width: fit-content;
}

.lgc-venc-ok   { background: var(--success-soft); color: var(--success); }
.lgc-venc-today { background: var(--warning-soft); color: var(--warning); }
.lgc-venc-exp  { background: var(--danger-soft);  color: var(--danger);  }

.lgc-countdown {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.lgc-venc-display {
  font-size: 0.94rem;
  margin: 0;
  font-weight: 700;
}
.lgc-venc-display.lgc-venc-ok    { color: var(--success); }
.lgc-venc-display.lgc-venc-today { color: var(--warning); }
.lgc-venc-display.lgc-venc-exp   { color: var(--danger);  }

/* ============ BOTÕES DE AÇÃO DA TABELA VERMELINHO ============ */
.verm-actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-alerta-verm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.btn-alerta-verm svg {
  width: 17px;
  height: 17px;
}

.btn-alerta-verm:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-soft);
}

.btn-alerta-verm.alerta-ativo {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-soft);
}

/* ============ TOGGLE SWITCH ============ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 100px;
  transition: background 0.2s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-track::before {
  transform: translateX(20px);
}

/* ============ ALERTA: ROW & FIELDS ============ */
.alerta-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.alerta-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.alerta-toggle-title {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
}

.alerta-toggle-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.verm-alerta-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============ MODAL ALERTA — PROFISSIONAL ============ */
.modal-box-alerta {
  max-width: 460px;
  padding: 0;
  overflow: hidden;
}

.alerta-topbar {
  height: 3px;
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.alerta-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 18px;
  border-bottom: 1px solid var(--border);
}

.alerta-head-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.28);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alerta-head-icon svg {
  width: 19px;
  height: 19px;
}

.alerta-head-info {
  flex: 1;
  min-width: 0;
}

.alerta-head-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.alerta-head-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.alerta-status-badge {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
  transition: all 0.2s;
  flex-shrink: 0;
}

.alerta-status-badge.badge-ativo {
  background: rgba(245,158,11,0.13);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.35);
}

.alerta-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.alerta-close-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.alerta-close-btn svg {
  width: 14px;
  height: 14px;
}

.alerta-body {
  padding: 20px 22px;
}

.alerta-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.alerta-section:last-child {
  margin-bottom: 0;
}

.alerta-section-label {
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.alerta-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.alerta-toggle-card:has(input:checked) {
  border-color: rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.05);
}

.alerta-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alerta-toggle-main {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.alerta-toggle-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.verm-alerta-fields {
  display: flex;
  flex-direction: column;
}

.alerta-datetime-field {
  position: relative;
  display: flex;
  align-items: center;
}

.alerta-field-icon-wrap {
  position: absolute;
  left: 13px;
  display: flex;
  align-items: center;
  color: var(--text-muted);
  pointer-events: none;
}

.alerta-field-icon-wrap svg {
  width: 15px;
  height: 15px;
}

.alerta-datetime-input {
  padding-left: 40px !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  font-size: 0.93rem !important;
}

.alerta-desc-input,
#verm-alerta-tab-desc {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 13px;
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.alerta-desc-input:focus,
#verm-alerta-tab-desc:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Rodapé do modal de alerta */
.alerta-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.alerta-btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.alerta-btn-cancel:hover {
  background: var(--surface);
  color: var(--text);
}

.alerta-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: none;
  border-radius: 7px;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.alerta-btn-save:hover { opacity: 0.9; }
.alerta-btn-save:active { transform: scale(0.98); }

/* Tab alerta */
.verm-tab-alerta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

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

/* ============ MODAL DE DISPARO DE ALERTA ============ */

@keyframes alertaBell {
  0%, 60%, 100% { transform: rotate(0); }
  10%  { transform: rotate(-18deg); }
  20%  { transform: rotate(18deg); }
  30%  { transform: rotate(-12deg); }
  40%  { transform: rotate(12deg); }
  50%  { transform: rotate(-6deg); }
}

@keyframes disparoIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box-disparo {
  max-width: 400px;
  padding: 0;
  overflow: hidden;
  text-align: center;
  animation: disparoIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.disparo-topbar {
  height: 4px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 100%);
}

.disparo-bell-area {
  padding: 32px 24px 8px;
  display: flex;
  justify-content: center;
}

.disparo-bell-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(239,68,68,0.12);
  border: 2px solid rgba(239,68,68,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  box-shadow: 0 0 0 8px rgba(239,68,68,0.06);
}

.disparo-bell-svg {
  width: 34px;
  height: 34px;
  animation: alertaBell 1.4s ease-in-out infinite;
  transform-origin: 50% 2px;
}

.disparo-body {
  padding: 16px 28px 24px;
}

.disparo-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ef4444;
  margin: 0 0 10px;
}

.disparo-nome {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.disparo-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
  min-height: 24px;
}

.disparo-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px 24px;
}

.disparo-btn-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #ef4444;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 20px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
  width: 100%;
}

.disparo-btn-dismiss:hover { opacity: 0.9; }
.disparo-btn-dismiss:active { transform: scale(0.98); }

.disparo-btn-snooze {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.disparo-btn-snooze:hover {
  background: var(--surface);
  color: var(--text);
}

/* ============ VERM HEADING ACTIONS ============ */
.verm-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.verm-heading-actions .btn-secondary {
  width: auto;
  margin-top: 0;
  padding: 11px 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.verm-heading-actions .btn-secondary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============ MODAL CONFIGURAÇÃO DE PAGAMENTO ============ */
.modal-box-config {
  max-width: 440px;
  padding: 0;
  overflow: hidden;
}

.verm-config-topbar {
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
}

.verm-config-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.verm-config-head-icon {
  width: 40px;
  height: 40px;
  background: rgba(var(--primary-rgb, 99, 102, 241), 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.verm-config-head-icon svg {
  width: 20px;
  height: 20px;
}

.verm-config-head-text {
  flex: 1;
  min-width: 0;
}

.verm-config-head-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.verm-config-head-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.verm-config-body {
  padding: 20px 24px;
}

.verm-config-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.verm-config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.verm-config-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.verm-config-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-inicial   { background: #3b82f6; }
.dot-final     { background: #22c55e; }
.dot-indicador { background: #f59e0b; }
.dot-cobrador  { background: #a855f7; }

.verm-config-input-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.verm-config-input-wrap:focus-within {
  border-color: var(--primary);
}

.verm-config-prefix {
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  line-height: 46px;
}

.verm-config-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  width: 100%;
}

.verm-config-input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.verm-config-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(var(--primary-rgb, 99, 102, 241), 0.1) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 1.5px solid rgba(var(--primary-rgb, 99, 102, 241), 0.25);
  border-radius: 12px;
  padding: 16px 18px;
}

.verm-config-total-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.verm-config-total-label svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.verm-config-total-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ============ MODAL COBRADOR ============ */
.cob-tabs {
  display: flex;
  gap: 2px;
  padding: 0 36px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  overflow-x: auto;
}

.cob-tab {
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  margin-bottom: -1px;
}

.cob-tab:hover { color: var(--text); }
.cob-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.cob-panel { display: none; }
.cob-panel.active { display: block; }

.btn-edit-cob, .btn-del-cob {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}

.btn-edit-cob { color: var(--primary); }
.btn-edit-cob:hover { background: var(--primary-soft); }
.btn-del-cob { color: var(--danger); }
.btn-del-cob:hover { background: rgba(239,68,68,0.1); }

.badge-afiliacao {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Rótulo de seção (Ativo em / Data de Credenciamento) */
.cob-section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* Chips "Ativo em" */
.cob-ativo-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cob-ativo-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cob-ativo-chip input[type="checkbox"] { display: none; }
.cob-ativo-chip:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* "Não informar" abaixo do campo de afiliação */
.cob-nao-informar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.cob-nao-informar input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}
#cob-afiliacao:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Data de credenciamento (Dia / Mês / Ano) */
.cob-date-row {
  display: flex;
  gap: 10px;
}
.cob-date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.cob-date-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cob-date-field select {
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  appearance: auto;
}
.cob-date-field select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Chips de status do cobrador */
.cob-status-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cob-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cob-status-chip input[type="radio"] { display: none; }

.cob-status-credenciamento:has(input:checked) { border-color: #a78bfa; background: rgba(167,139,250,0.12); color: #a78bfa; }
.cob-status-disponivel:has(input:checked)     { border-color: #34d399; background: rgba(52,211,153,0.12); color: #34d399; }
.cob-status-andamento:has(input:checked)      { border-color: #fbbf24; background: rgba(251,191,36,0.12); color: #fbbf24; }
.cob-status-finalizado:has(input:checked)     { border-color: #94a3b8; background: rgba(148,163,184,0.10); color: #94a3b8; }

/* Badges de status na tabela */
.badge-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-status-credenciamento { background: rgba(167,139,250,0.12); color: #a78bfa; }
.badge-status-disponivel     { background: rgba(52,211,153,0.12);  color: #34d399; }
.badge-status-andamento      { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.badge-status-finalizado     { background: rgba(148,163,184,0.10); color: #94a3b8; }

.cob-status-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

/* Aba Anotações */
.cob-anotacoes-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.cob-anotacoes-textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.6;
  padding: 12px 14px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.cob-anotacoes-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.cob-anotacoes-textarea::placeholder { color: var(--text-muted); }

/* ---- Aba Valores ---- */
.cob-valores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.btn-cob-add-valor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-cob-add-valor:hover { background: rgba(99,102,241,0.2); }

.cob-valores-list { display: flex; flex-direction: column; gap: 10px; }

.cob-valor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.cob-valor-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  min-width: 80px;
}
.cob-valor-input:focus { outline: none; }
.cob-valor-input::placeholder { color: var(--text-muted); font-weight: 400; }
.cob-valor-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}
.cob-valor-origens {
  display: flex;
  gap: 6px;
}
.cob-origem-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.cob-origem-chip input[type="radio"] { display: none; }
.cob-origem-lelo:has(input:checked)  { border-color: #a78bfa; background: rgba(167,139,250,0.14); color: #a78bfa; }
.cob-origem-tick:has(input:checked)  { border-color: #34d399; background: rgba(52,211,153,0.14); color: #34d399; }
.cob-origem-vr:has(input:checked)    { border-color: #fbbf24; background: rgba(251,191,36,0.14); color: #fbbf24; }

.btn-del-valor {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  color: var(--danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background 0.12s;
}
.btn-del-valor:hover { background: rgba(239,68,68,0.1); }
.cob-valores-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 24px 0;
}

/* ============ TOOLBAR BUSCA + FILTROS ============ */
.verm-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.verm-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

.verm-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}

.verm-search-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 36px 10px 38px;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.verm-search-input::placeholder { color: var(--muted); }
.verm-search-input:focus { border-color: var(--primary); }

.verm-search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}

.verm-search-clear:hover { color: var(--text); }
.verm-search-clear svg { width: 14px; height: 14px; }

.verm-filter-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.verm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.verm-filter-btn:hover { color: var(--text); border-color: var(--border-strong); }

.verm-filter-btn.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--text);
}

.verm-filter-vencido.active {
  background: rgba(239,68,68,0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.verm-filter-avencer.active {
  background: rgba(16,185,129,0.1);
  border-color: #10b981;
  color: #10b981;
}

/* ============ ABA ABATIMENTOS ============ */
.abat-intro {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.abat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.abat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  gap: 12px;
  transition: border-color 0.15s;
}

.abat-item:has(input:not(:checked)) {
  opacity: 0.5;
}

.abat-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.abat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.abat-nome {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.abat-valor {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.abat-liquido-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(16,185,129,0.1) 0%, rgba(16,185,129,0.05) 100%);
  border: 1.5px solid rgba(16,185,129,0.25);
  border-radius: 12px;
  padding: 14px 18px;
}

.abat-liquido-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.abat-liquido-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #10b981;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
