:root {
  --lite-green: #0f766e;
  --lite-blue: #1d4ed8;
  --lite-ink: #172033;
  --lite-muted: #64748b;
  --lite-border: #dbe3ef;
}

* {
  letter-spacing: 0;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--lite-ink);
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, .16), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  padding-bottom: 6rem;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(29, 78, 216, .14));
}

.login-card,
.lite-card {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.login-card {
  width: 100%;
  max-width: 390px;
  padding: 1.35rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--lite-green), var(--lite-blue));
}

.app-navbar {
  background: rgba(15, 23, 42, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand-title {
  line-height: 1.1;
  font-weight: 800;
}

.brand-subtitle {
  color: rgba(255, 255, 255, .62);
  font-size: .72rem;
}

.main-wrap {
  padding-top: 5.25rem;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-radius: 22px;
  padding: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--lite-green), var(--lite-blue));
  box-shadow: 0 22px 50px rgba(15, 118, 110, .2);
}

.hero-panel h1 {
  font-size: 1.55rem;
  margin: 0;
  font-weight: 800;
}

.hero-panel p {
  margin: .25rem 0 0;
  color: rgba(255, 255, 255, .78);
}

.eyebrow {
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .72);
  font-weight: 800;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  border-radius: 18px;
  padding: 1rem;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -38px;
  bottom: -46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}

.metric-blue { background: linear-gradient(135deg, #2563eb, #0f766e); }
.metric-green { background: linear-gradient(135deg, #16a34a, #15803d); }
.metric-amber { background: linear-gradient(135deg, #d97706, #be123c); }
.metric-slate { background: linear-gradient(135deg, #334155, #111827); }

.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .18);
  margin-bottom: .75rem;
}

.metric-label {
  font-size: .78rem;
  color: rgba(255, 255, 255, .82);
}

.metric-value {
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 800;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-title > i {
  color: var(--lite-green);
  font-size: 1.25rem;
}

.modern-progress {
  height: .65rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.list-row {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: .8rem .9rem;
  margin-bottom: .55rem;
  overflow-wrap: anywhere;
}

.cadastro-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.cadastro-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, .28);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .74rem;
  font-weight: 700;
  color: #0f766e;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  line-height: 1.15;
  white-space: normal;
}

.tag-chip.muted {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.list-scroll {
  max-height: 360px;
  overflow: auto;
}

.small-label {
  font-size: .72rem;
  color: var(--lite-muted);
}

.list-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: space-between;
  align-items: center;
  color: var(--lite-muted);
  font-size: .8rem;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 1020;
  display: flex;
  gap: .4rem;
  width: min(390px, calc(100% - 2rem));
  padding: .45rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 999px;
  background: rgba(15, 23, 42, .94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .24);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  padding: .72rem .8rem;
  font-weight: 800;
}

.bottom-nav button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--lite-green), var(--lite-blue));
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: .85rem 0 1.15rem;
}

.lite-toast-stack {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 2000;
  display: grid;
  gap: .6rem;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.lite-toast {
  display: flex;
  align-items: center;
  gap: .65rem;
  border: 1px solid #dbe3ef;
  border-left-width: 5px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  padding: .8rem .85rem;
  pointer-events: auto;
  animation: toastIn .18s ease-out;
}

.lite-toast--success {
  border-left-color: #16a34a;
}

.lite-toast--success > i {
  color: #16a34a;
}

.lite-toast--danger {
  border-left-color: #dc2626;
}

.lite-toast--danger > i {
  color: #dc2626;
}

.lite-toast span {
  flex: 1;
  font-size: .88rem;
  font-weight: 700;
}

.lite-toast button {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: .15rem;
}

.lite-toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}

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

.form-section-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--lite-green);
  font-weight: 800;
  padding: .75rem .85rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  margin: .4rem 0 .85rem;
}

.lite-form-section {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: .8rem;
  margin-bottom: .7rem;
}

.lite-form-section--highlight {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.section-kicker {
  margin-bottom: .65rem;
  color: #1e293b;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.segmentacao-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: .65rem;
  align-items: stretch;
}

.segmentacao-layout .lite-form-section {
  min-width: 0;
}

.image-side {
  display: flex;
  align-items: stretch;
  margin-bottom: .7rem;
}

.vote-confirm-card {
  height: 100%;
  min-height: 70px;
  border: 1px dashed #93c5fd;
  border-radius: 12px;
  background: #eff6ff;
  padding: .72rem;
}

.form-control,
.form-select,
.btn {
  border-radius: 12px;
  font-size: 16px;
}

.btn {
  min-height: 38px;
}

.form-control,
.form-select,
textarea {
  border-color: var(--lite-border);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
  border-color: var(--lite-green);
  box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12);
}

.modal-dialog {
  margin: 0;
}

.modal-content {
  border: 0;
  border-radius: 0;
  overflow: hidden;
  min-height: 100vh;
  max-height: 100vh;
}

.modal-content > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100vh - 73px);
}

.modal-header {
  color: #fff;
  background: linear-gradient(135deg, var(--lite-green), var(--lite-blue));
}

.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
}

.modal-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: .85rem clamp(1rem, 3vw, 2.5rem);
}

.tag-selector {
  display: grid;
  gap: .65rem;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--lite-border);
  border-radius: 14px;
  background: #f8fafc;
  padding: .7rem;
}

.tag-group-box {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: .65rem;
}

.tag-group-title {
  font-size: .78rem;
  font-weight: 800;
  color: #0f766e;
  margin-bottom: .5rem;
}

.tag-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag-check {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: .32rem .58rem;
  font-size: .78rem;
  cursor: pointer;
  background: #fff;
}

.tag-check:has(input:checked) {
  border-color: #0f766e;
  color: #0f766e;
  background: #ccfbf1;
}

.tag-check input {
  width: .9rem;
  height: .9rem;
}

.person-image {
  position: relative;
  width: 100%;
  min-height: 120px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  padding: 0;
}

.person-image img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
  display: block;
}

.person-image span {
  position: absolute;
  left: .65rem;
  right: .65rem;
  bottom: .65rem;
  border-radius: 999px;
  padding: .4rem .65rem;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  background: rgba(15, 23, 42, .72);
}

.section-vote-row .progress {
  height: .5rem;
}

@media (max-width: 576px) {
  .app-navbar .container-fluid {
    gap: .6rem;
  }

  .main-wrap {
    padding-top: 5.25rem;
  }

  .hero-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel h1 {
    font-size: 1.25rem;
  }

  .lite-card {
    border-radius: 14px;
  }

  .list-row {
    padding: .72rem;
  }

  .tag-chip,
  .tag-check {
    font-size: .72rem;
  }

  .segmentacao-layout {
    grid-template-columns: 1fr;
  }

  .image-side {
    min-height: 180px;
  }

  .lite-toast-stack {
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
