:root {
  --bg: #080b10;
  --bg-card: #111723;
  --bg-card-soft: #151b28;
  --accent: #ffcc00;
  --accent-soft: rgba(255, 204, 0, 0.12);
  --accent-strong: #ffd950;
  --text: #f7f7ff;
  --text-soft: #a9b2c8;
  --danger: #ff6b81;
  --success: #6bdc7b;
  --border: #252b3a;
  --radius-xl: 18px;
  --radius-lg: 12px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #1b1f30 0, #07090f 45%, #020308 100%);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.app {
  width: 100%;
  max-width: 1280px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(20px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 28px 28px 32px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 span.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(255, 204, 0, 0.45);
}

.subtitle {
  font-size: 15px;
  color: var(--text-soft);
}

.pill {
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill strong {
  color: var(--accent-strong);
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  main {
    grid-template-columns: minmax(0, 1fr);
  }
}

.column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.05) 0, rgba(0, 0, 0, 0) 55%),
    var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 204, 0, 0.09), transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}

.card-inner {
  position: relative;
  z-index: 1;
}

h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

label {
  font-size: 14px;
  color: var(--text-soft);
  display: block;
  margin-bottom: 4px;
}

input,
button {
  font-family: inherit;
  font-size: 16px;
}

input {
  width: 100%;
  margin: 3px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card-soft);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.4);
  background: #191f30;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #000;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.7);
  filter: brightness(1.05);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.inline {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.inline > div {
  flex: 1;
}

.usuarios-list {
  margin-top: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 25, 35, 0.98), rgba(7, 10, 18, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 10px;
  max-height: 220px;
  overflow: auto;
}

.usuario-item {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
  margin-bottom: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.usuario-item:last-child {
  margin-bottom: 0;
}

.usuario-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 204, 0, 0.35);
  background: rgba(255, 204, 0, 0.06);
}

.fatura-selecionada {
  border-color: rgba(255, 204, 0, 0.65) !important;
  background: rgba(255, 204, 0, 0.10) !important;
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.15), 0 12px 28px rgba(0, 0, 0, 0.35);
}

.usuario-nome {
  color: var(--text-soft);
}

.usuario-saldo {
  text-align: right;
  font-weight: 600;
  color: var(--accent-strong);
}

.checkbox-list {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(5, 9, 25, 0.9);
  max-height: 210px;
  overflow: auto;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--text-soft);
  padding: 0;
  border-radius: 10px;
  border: none;
  background: transparent;
  transition: none;
  cursor: pointer;
}

.checkbox-list label:hover {
  transform: none;
}

.participante-text {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease;
  color: var(--text-soft);
}

.checkbox-list label:hover .participante-text {
  transform: translateY(-1px);
  border-color: rgba(255, 204, 0, 0.25);
  background: rgba(255, 204, 0, 0.05);
}

.checkbox-list input[type='checkbox']:checked + .participante-text {
  border-color: rgba(255, 204, 0, 0.55);
  background: rgba(255, 204, 0, 0.10);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.12), 0 12px 28px rgba(0, 0, 0, 0.35);
  color: var(--accent-strong);
}

.checkbox-list input[type='checkbox'] {
  accent-color: var(--accent-strong);
  width: 15px;
  height: 15px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

/* Scrollbar (fica melhor no visual escuro) */
.usuarios-list::-webkit-scrollbar,
.checkbox-list::-webkit-scrollbar,
.detalhes-fatura::-webkit-scrollbar {
  width: 10px;
}

.usuarios-list::-webkit-scrollbar-thumb,
.checkbox-list::-webkit-scrollbar-thumb,
.detalhes-fatura::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.22);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.35);
}

.usuarios-list::-webkit-scrollbar-track,
.checkbox-list::-webkit-scrollbar-track,
.detalhes-fatura::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
}

/* Remove a "baixinha" (scrollbar) do lado das listas */
.usuarios-list,
.checkbox-list,
.detalhes-fatura {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/old Edge */
}

.usuarios-list::-webkit-scrollbar,
.checkbox-list::-webkit-scrollbar,
.detalhes-fatura::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.section-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.msg {
  margin-top: 6px;
  font-size: 13px;
}

.erro {
  color: var(--danger);
}

.sucesso {
  color: var(--success);
}

.banco-label {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.banco-valor {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-strong);
}

.banco-pill {
  font-size: 11px;
  margin-top: 2px;
  color: var(--text-soft);
}

.detalhes-fatura {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(5, 9, 25, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.detalhes-fatura h3 {
  margin: 0 0 6px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
}

.detalhes-fatura ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detalhes-fatura li {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  color: var(--text-soft);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: rgba(14, 18, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent-strong);
  text-transform: uppercase;
}

.modal-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-soft);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 14px 16px 8px;
}

.modal-body input {
  margin: 6px 0 0;
}

.modal-actions {
  padding: 12px 16px 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  box-shadow: none;
  text-transform: uppercase;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #000;
  border: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
  text-transform: uppercase;
  font-weight: 800;
}

.btn-secondary,
.btn-primary {
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

/* Estilo para itens de fatura com botão */
.fatura-item {
  display: grid !important;
  grid-template-columns: 1.4fr 0.9fr auto !important;
  align-items: center;
  gap: 8px;
}

.btn-enviar-fatura {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--success), #5bc370) !important;
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.btn-enviar-fatura:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  filter: brightness(1.08);
}

.btn-enviar-fatura:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.btn-enviar-fatura:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
