:root {
  color: #10224a;
  background: #f5f8ff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(280px, 410px) 1fr;
}

.brand-panel {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  color: white;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.2), transparent 31%),
    linear-gradient(145deg, #0634ee 0%, #0964ff 52%, #0041bf 100%);
}

.login-shell .brand-panel {
  justify-content: flex-start;
  padding-bottom: 0;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -140px -80px;
  height: 310px;
  background: repeating-linear-gradient(135deg, #ffd335 0 10px, #fb7b16 10px 20px);
  transform: rotate(-3deg);
  opacity: 0.9;
  z-index: 1;
}

.login-photo {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: min(108%, 560px);
  max-width: none;
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 24px 38px rgba(0, 16, 76, 0.34));
}

.login-shell .brand-panel .brand-mark,
.login-shell .brand-panel .eyebrow,
.login-shell .brand-panel h1,
.login-shell .brand-panel .tagline {
  position: relative;
  z-index: 2;
  text-shadow: 0 4px 18px rgba(0, 18, 78, 0.36);
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0640db;
  background: #ff8c00;
  border: 5px solid #ffcf2f;
  font-size: 28px;
  font-weight: 950;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.brand-mark.small {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: white;
  background: #0fbe61;
  border-color: #9cf7c1;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-panel h1 {
  margin: 0;
  color: #fff3c4;
  font-size: clamp(86px, 15vw, 148px);
  line-height: 0.9;
  font-weight: 1000;
  text-shadow: 0 8px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.tagline {
  max-width: 310px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.45;
  position: relative;
  z-index: 1;
}

.content-panel {
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-header,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header h2,
.topbar h2,
.card h2,
.success h2 {
  margin: 0;
  color: #061c50;
  font-size: 28px;
  line-height: 1.08;
}

.compact h2 {
  font-size: 21px;
}

.stack {
  width: min(100%, 460px);
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: #32446e;
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cad8ff;
  border-radius: 8px;
  padding: 0 14px;
  color: #071f55;
  background: white;
  outline: none;
}

input:focus {
  border-color: #0a5bff;
  box-shadow: 0 0 0 4px rgba(10, 91, 255, 0.12);
}

.primary,
.ghost,
.icon-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
}

.primary {
  color: white;
  background: #0758ff;
}

.ghost,
.icon-button {
  color: #0640db;
  background: #e8efff;
}

.hint {
  margin: 0;
  color: #667596;
  font-size: 13px;
  line-height: 1.45;
}

.grid {
  display: grid;
  gap: 16px;
}

.two {
  grid-template-columns: 1.25fr 0.75fr;
}

.three {
  grid-template-columns: repeat(3, 1fr);
}

.admin-grid {
  align-items: start;
}

.card {
  border: 1px solid #dce6ff;
  border-radius: 8px;
  padding: 20px;
  background: white;
  box-shadow: 0 12px 28px rgba(0, 47, 142, 0.08);
}

.highlight {
  background: linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
}

.stat-card {
  display: grid;
  align-content: center;
  gap: 8px;
}

.stat-card strong {
  color: #0640db;
  font-size: 46px;
  line-height: 1;
}

.stat-card span {
  color: #687692;
}

.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 18px 0 10px;
}

.pill {
  display: inline-grid;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #713900;
  background: #fff1bb;
  font-size: 13px;
  font-weight: 900;
}

.member-list {
  display: grid;
  gap: 10px;
}

.member-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #f5f8ff;
}

.member-row strong,
.member-row span {
  display: block;
}

.member-row span {
  color: #687692;
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.table-card {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  min-width: 560px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid #e6edff;
  text-align: left;
}

th {
  color: #657391;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.active-row td {
  color: #0640db;
  background: #edf4ff;
  font-weight: 900;
}

.success {
  width: min(100%, 480px);
  margin: auto;
  text-align: center;
  display: grid;
  gap: 12px;
}

.success p {
  margin: 0 0 10px;
  color: #536482;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  color: white;
  background: #061c50;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

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

  .brand-panel {
    position: relative;
    min-height: 270px;
    padding: 28px;
  }

  .login-shell .brand-panel {
    min-height: 430px;
  }

  .login-shell .brand-panel::after {
    inset: auto -40px -60px -40px;
    height: 190px;
  }

  .login-photo {
    right: -18px;
    bottom: 0;
    width: 275px;
  }

  .content-panel {
    padding: 22px;
  }

  .two,
  .three {
    grid-template-columns: 1fr;
  }

  .copy-row,
  .panel-header,
  .topbar,
  .member-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}

/* 1101 premium campaign system */
:root {
  --blue-950: #03133f;
  --blue-900: #062575;
  --blue-700: #063fe6;
  --blue-500: #096bff;
  --yellow: #ffd22e;
  --orange: #ff7818;
  --surface: #f4f7fd;
}

body {
  background:
    radial-gradient(circle at 84% 4%, rgba(42, 112, 255, 0.1), transparent 28%),
    var(--surface);
}

.page { grid-template-columns: 300px 1fr; }

.brand-panel {
  padding: 38px 32px;
  justify-content: flex-start;
  background:
    linear-gradient(160deg, rgba(255,255,255,.12), transparent 25%),
    radial-gradient(circle at 20% 42%, #0b73ff 0, transparent 34%),
    linear-gradient(155deg, #052cbd 0%, #072185 52%, #020d31 100%);
  isolation: isolate;
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .32;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.brand-panel::after {
  height: 170px;
  inset: auto -60px -100px -60px;
  background: linear-gradient(120deg, var(--yellow), var(--orange));
  opacity: 1;
  z-index: -1;
}

.campaign-copy { position: relative; z-index: 3; }
.candidate-name {
  margin: 18px 0 10px;
  font-size: 30px;
  line-height: .87;
  font-weight: 1000;
  letter-spacing: -.055em;
  text-transform: uppercase;
}
.brand-panel h1 { font-size: clamp(72px, 8vw, 112px); }
.brand-panel .tagline { font-size: 15px; max-width: 230px; }
.brand-mark { box-shadow: 0 12px 30px rgba(0,0,0,.22); }

.content-panel { padding: 34px clamp(24px, 4vw, 64px) 60px; gap: 22px; max-width: 1500px; width: 100%; }
.topbar { padding-bottom: 20px; border-bottom: 1px solid #dce5f5; }
.topbar h2 { font-size: 24px; }

.card {
  border-color: rgba(19, 64, 155, .1);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 42px rgba(17, 54, 123, .08);
}
.primary, .ghost, .icon-button { border-radius: 11px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary { background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); box-shadow: 0 10px 20px rgba(6, 72, 233, .22); }
.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(6, 72, 233, .3); }
.ghost:hover, .icon-button:hover { background: #dce8ff; }
.metrics-grid .card { position: relative; overflow: hidden; min-height: 130px; }
.metrics-grid .card::after { content:""; position:absolute; width:90px; height:90px; border-radius:50%; right:-25px; bottom:-35px; background:rgba(8,90,255,.07); }

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border-radius: 20px;
  color: white;
  background:
    radial-gradient(circle at 85% 0%, rgba(255,210,46,.24), transparent 25%),
    linear-gradient(125deg, #031c66, #0758f0);
  box-shadow: 0 22px 46px rgba(5, 42, 132, .22);
}
.admin-hero h3 { margin: 4px 0 6px; font-size: 30px; }
.admin-hero p { margin: 0; color: rgba(255,255,255,.75); }
.admin-hero .eyebrow { color: var(--yellow); }
.week-chip { display:grid; gap:4px; min-width:140px; padding:13px 16px; border:1px solid rgba(255,255,255,.18); border-radius:14px; background:rgba(255,255,255,.1); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.week-chip strong { color:var(--yellow); font-size:18px; }

.neighborhood-card { padding: 28px; }
.territory-total { display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:14px; background:#edf3ff; color:#5f6f91; }
.territory-total strong { color:var(--blue-700); font-size:28px; }
.territory-total span { max-width:90px; font-size:12px; font-weight:800; line-height:1.1; }
.neighborhood-chart { display:grid; gap:15px; margin-top:26px; }
.neighborhood-row { display:grid; grid-template-columns:minmax(145px, .7fr) minmax(140px, 2fr) 34px; align-items:center; gap:16px; }
.neighborhood-label { display:flex; align-items:center; gap:10px; min-width:0; }
.neighborhood-label span { color:#9ba9c2; font-size:12px; font-weight:900; }
.neighborhood-label strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
.bar-track { height:11px; overflow:hidden; border-radius:20px; background:#edf1f8; }
.bar-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--blue-700), #1ca6ff); box-shadow:0 4px 12px rgba(7,78,228,.24); }
.neighborhood-row > b { color:var(--blue-900); font-size:15px; }
.empty-state { color:#6f7d97; }

.login-shell { grid-template-columns: minmax(520px, 1.18fr) minmax(440px, .82fr); background:#fff; }
.login-shell .brand-panel { min-height:100svh; padding:clamp(36px, 5vw, 72px); justify-content:flex-start; }
.login-shell .brand-panel::before { opacity:.36; background-size:64px 64px; }
.login-shell .brand-panel::after { inset:auto -120px -140px -120px; height:280px; transform:rotate(-5deg); }
.login-shell .campaign-copy { max-width:390px; }
.login-shell .brand-mark { width:58px; height:58px; margin-bottom:28px; }
.login-shell .candidate-name { margin:20px 0 12px; font-size:clamp(36px, 4.4vw, 66px); }
.login-shell .brand-panel h1 { font-size:clamp(104px, 12vw, 178px); letter-spacing:-.09em; }
.login-shell .brand-panel .tagline { max-width:330px; margin-top:16px; font-size:17px; }
.login-photo { right:-1%; bottom:0; width:min(70%, 650px); z-index:2; filter:drop-shadow(0 28px 45px rgba(0,8,42,.46)); }
.hero-seal { position:absolute; right:9%; top:12%; z-index:4; display:flex; align-items:center; gap:10px; transform:rotate(-4deg); color:#0733b0; }
.hero-seal span { width:58px; height:58px; display:grid; place-items:center; border-radius:50%; color:#fff; background:var(--orange); border:5px solid var(--yellow); font-size:26px; font-weight:1000; box-shadow:0 12px 25px rgba(0,0,0,.2); }
.hero-seal strong { padding:8px 12px; border-radius:7px; background:var(--yellow); text-transform:uppercase; font-size:12px; line-height:1.05; box-shadow:0 10px 20px rgba(0,0,0,.15); }

.login-shell .content-panel { position:relative; justify-content:center; padding:clamp(34px, 7vw, 100px); max-width:none; background:radial-gradient(circle at 80% 10%, #eef4ff 0, transparent 32%), #fff; }
.login-shell .content-panel::before { content:"1101"; position:absolute; right:5%; bottom:1%; color:#f4f7fd; font-size:clamp(120px, 15vw, 220px); line-height:1; font-weight:1000; letter-spacing:-.1em; pointer-events:none; }
.login-wrap { position:relative; z-index:1; width:min(100%, 480px); margin:auto; }
.login-heading { margin-bottom:32px; }
.login-heading h2 { margin:10px 0 10px; color:var(--blue-950); font-size:clamp(34px, 4vw, 52px); letter-spacing:-.045em; line-height:1; }
.login-heading > p:last-child { margin:0; max-width:420px; color:#6b7893; font-size:16px; line-height:1.55; }
.status-badge { display:inline-flex; align-items:center; gap:8px; margin-bottom:30px; padding:8px 12px; border:1px solid #dce7fb; border-radius:30px; color:var(--blue-900); background:#f6f9ff; font-size:12px; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
.status-badge i { width:8px; height:8px; border-radius:50%; background:#20c66b; box-shadow:0 0 0 5px rgba(32,198,107,.12); }
.login-form { width:100%; gap:18px; }
.field { display:flex; align-items:center; min-height:56px; border:1px solid #d7e1f3; border-radius:13px; background:#fff; transition:border-color .2s, box-shadow .2s; }
.field:focus-within { border-color:var(--blue-500); box-shadow:0 0 0 4px rgba(9,107,255,.1); }
.field b { padding-left:17px; color:#7d8cab; font-size:18px; }
.field input { min-height:54px; border:0; box-shadow:none; background:transparent; }
.field input:focus { box-shadow:none; }
.login-button { min-height:58px; display:flex; align-items:center; justify-content:space-between; padding:0 20px; margin-top:4px; font-size:15px; }
.login-button span { font-size:24px; font-weight:400; }
.demo-access { padding:12px 14px; border-radius:10px; background:#f6f8fc; }
.secure-note { margin:26px 0 0; color:#8a96ad; font-size:12px; text-align:center; }
.secure-note::first-letter { color:#28bf6b; }

table tbody tr { transition:background .2s; }
table tbody tr:hover { background:#f7f9fe; }

@media (max-width: 1100px) {
  .login-shell { grid-template-columns: minmax(430px, .95fr) minmax(390px, 1.05fr); }
  .login-photo { width:min(76%, 540px); right:-7%; }
  .hero-seal { right:5%; }
}

@media (max-width: 900px) {
  .page, .login-shell { grid-template-columns:1fr; }
  .brand-panel { position:relative; min-height:auto; padding:28px; }
  .page:not(.login-shell) .brand-panel { min-height:220px; }
  .page:not(.login-shell) .campaign-copy { display:grid; grid-template-columns:auto 1fr; column-gap:18px; align-items:center; }
  .page:not(.login-shell) .brand-mark { grid-row:1/4; margin:0; }
  .page:not(.login-shell) .candidate-name { margin:4px 0; font-size:26px; }
  .page:not(.login-shell) .brand-panel h1, .page:not(.login-shell) .tagline { display:none; }
  .login-shell .brand-panel { min-height:540px; padding:30px; }
  .login-shell .campaign-copy { max-width:280px; }
  .login-shell .candidate-name { font-size:38px; }
  .login-shell .brand-panel h1 { font-size:104px; }
  .login-shell .brand-panel .tagline { max-width:250px; font-size:14px; }
  .login-photo { right:-20px; width:330px; }
  .hero-seal { top:auto; right:24px; bottom:175px; transform:scale(.82) rotate(-4deg); transform-origin:right; }
  .login-shell .content-panel { padding:44px 24px 56px; }
  .login-heading h2 { font-size:38px; }
  .admin-hero { align-items:flex-start; flex-direction:column; }
  .neighborhood-row { grid-template-columns:120px 1fr 28px; gap:10px; }
  .territory-total { display:none; }
}

@media (max-width: 520px) {
  .login-shell .brand-panel { min-height:500px; }
  .login-photo { width:290px; right:-32px; }
  .hero-seal { bottom:150px; right:14px; }
  .login-shell .brand-panel h1 { font-size:90px; }
  .content-panel { padding:22px 16px 40px; }
  .neighborhood-row { grid-template-columns:1fr 34px; }
  .neighborhood-label { grid-column:1/3; }
}

/* Login em composição única */
.login-shell {
  position: relative;
  display: block;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 18%, rgba(12, 109, 255, .95), transparent 34%),
    linear-gradient(120deg, #06164d 0%, #0635c5 48%, #075eff 100%);
}

.login-shell .brand-panel {
  position: absolute;
  inset: 0;
  min-height: 100%;
  width: 100%;
  padding: clamp(42px, 6vw, 86px);
  background:
    linear-gradient(90deg, rgba(1, 14, 58, .86) 0%, rgba(3, 32, 126, .52) 44%, rgba(3, 56, 205, .06) 72%),
    radial-gradient(circle at 75% 25%, #0c6cff 0%, #0649e7 36%, #03144f 100%);
}

.login-shell .brand-panel::before {
  opacity: .2;
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, black 0%, transparent 78%);
}

.login-shell .brand-panel::after {
  inset: auto -10% -19% -10%;
  height: 34%;
  transform: rotate(-4deg);
  background: linear-gradient(105deg, #ffc32d, #ff8a18);
}

.login-shell .campaign-copy { max-width: 390px; }
.login-shell .candidate-name { margin-top: 0; }
.login-shell .login-photo {
  right: 37%;
  bottom: -2%;
  width: min(40vw, 600px);
  max-height: 91svh;
  object-fit: contain;
  object-position: bottom;
}

.login-shell .content-panel {
  position: relative;
  z-index: 6;
  min-height: 100svh;
  width: 100%;
  display: flex;
  align-items: center;
  padding: clamp(28px, 5vw, 74px);
  background: transparent;
}

.login-shell .content-panel::before { display: none; }
.login-wrap {
  width: min(100%, 450px);
  margin: auto 0 auto auto;
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 30px 90px rgba(0, 9, 49, .42);
  backdrop-filter: blur(24px);
}
.login-heading { margin-bottom: 26px; }
.login-heading h2 { font-size: clamp(34px, 3.3vw, 48px); }
.status-badge { margin-bottom: 24px; }

.admin-tabs {
  display: flex;
  gap: 8px;
  width: fit-content;
  padding: 6px;
  border: 1px solid #dce5f5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17,54,123,.06);
}
.admin-tabs button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  color: #64728e;
  background: transparent;
  font-weight: 900;
}
.admin-tabs button span { margin-right: 6px; }
.admin-tabs button.active { color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); box-shadow: 0 8px 18px rgba(6,72,233,.22); }

.bot-layout { display: grid; gap: 20px; }
.bot-status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px;
  border-radius: 22px;
  color: white;
  background: radial-gradient(circle at 85% 20%, rgba(255,210,46,.17), transparent 28%), linear-gradient(125deg, #031647, #073ec6);
  box-shadow: 0 24px 54px rgba(5,42,132,.24);
}
.bot-orbit { width: 78px; height: 78px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.24); border-radius:50%; box-shadow:0 0 0 9px rgba(255,255,255,.06); }
.bot-icon { width:56px; height:56px; display:grid; place-items:center; border-radius:18px; color:#12338c; background:var(--yellow); font-size:26px; }
.connection-status { display:flex; align-items:center; gap:8px; color:#aebfe8; font-size:12px; font-weight:900; letter-spacing:.07em; text-transform:uppercase; }
.connection-status i { width:8px; height:8px; border-radius:50%; background:#ffbd2e; box-shadow:0 0 0 5px rgba(255,189,46,.13); }
.bot-status-card.connected .connection-status i { background:#25d979; box-shadow:0 0 0 5px rgba(37,217,121,.13); }
.bot-status-copy h3 { margin:8px 0 6px; font-size:26px; }
.bot-qr { display:flex; align-items:center; gap:16px; margin-top:18px; padding:14px; border-radius:18px; color:#10224a; background:#fff; }
.bot-qr img { width:170px; height:170px; border-radius:10px; }
.bot-qr strong { max-width:170px; }
.bot-error { color:#ffd1d1 !important; font-weight:700; }
.queue-card { margin-top:18px; }
.queue-list { display:grid; gap:10px; }
.queue-item { display:grid; grid-template-columns:1fr auto auto; align-items:start; gap:12px; padding:15px; border:1px solid #dfe7f5; border-radius:15px; background:#f8faff; }
.queue-item div { display:grid; gap:4px; }
.queue-item small { color:#75819a; }
.queue-main p { margin:8px 0; padding:11px; border-radius:10px; color:#263753; background:#fff; white-space:pre-wrap; }
.queue-media { display:block; width:min(100%,340px); max-height:260px; object-fit:contain; border-radius:12px; background:#e9eef8; }
.queue-status { padding:7px 10px; border-radius:999px; font-size:12px; font-weight:850; background:#e8eef9; }
.queue-status.scheduled { color:#0754d8; background:#e4efff; }
.queue-status.sending { color:#8a5b00; background:#fff0be; }
.queue-status.sent { color:#087b43; background:#dff8ea; }
.queue-status.failed { color:#b52929; background:#ffe2e2; }
.queue-status.cancelled { color:#667085; background:#eceff4; }
.queue-status.missed { color:#765a00; background:#fff2c7; }
.queue-error { grid-column:1/-1; color:#b52929 !important; }
.bot-status-copy p { margin:0; max-width:640px; color:rgba(255,255,255,.68); line-height:1.5; }
.connect-button, .disconnect-button { min-height:50px; padding:0 18px; border:0; border-radius:12px; font-weight:950; }
.connect-button { color:#052073; background:var(--yellow); box-shadow:0 12px 24px rgba(0,0,0,.2); }
.disconnect-button { color:#fff; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.22); }
.connect-button span { margin-left:16px; font-size:19px; }
.bot-grid { grid-template-columns: .85fr 1.15fr; align-items:start; }
.step-number { color:#d8e2f3; font-size:28px; font-weight:1000; }
.bot-form { width:100%; margin-top:24px; }
.group-add { display:grid; grid-template-columns:1fr auto; gap:10px; margin:24px 0 16px; }
.group-list { display:grid; gap:8px; }
.group-item { display:flex; align-items:center; justify-content:space-between; min-height:48px; padding:0 12px; border-radius:11px; background:#f4f7fc; }
.group-item span { display:flex; align-items:center; gap:10px; }
.group-item i { color:#25c875; font-size:9px; }
.group-item button { width:30px; height:30px; border:0; border-radius:8px; color:#8d99af; background:#e7edf7; font-size:18px; }
.schedule-form { display:grid; grid-template-columns:1.6fr .7fr; gap:24px; margin-top:24px; }
textarea { width:100%; padding:14px; border:1px solid #cad8ff; border-radius:11px; color:#071f55; background:#fff; resize:vertical; font:inherit; outline:none; }
textarea:focus { border-color:#0a5bff; box-shadow:0 0 0 4px rgba(10,91,255,.12); }
.schedule-side { display:grid; gap:15px; align-content:start; }
.days { display:grid; gap:8px; color:#32446e; font-size:14px; font-weight:800; }
.days > div { display:flex; gap:5px; }
.days button { width:32px; height:32px; padding:0; border:0; border-radius:8px; color:#77849b; background:#edf1f7; font-size:12px; font-weight:900; }
.days button.active { color:#fff; background:var(--blue-700); }

.locked-card { position:relative; border-style:dashed; background:linear-gradient(145deg, #fff, #f8faff); }
.locked-state { min-height:210px; display:grid; place-items:center; align-content:center; gap:8px; padding:30px; text-align:center; color:#77849c; }
.locked-state > div { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; color:#7990bc; background:#eaf0fb; font-size:27px; }
.locked-state strong { color:#263b68; font-size:16px; }
.locked-state p { max-width:340px; margin:0; font-size:13px; line-height:1.5; }
.group-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:22px 0 13px; color:#6d7c97; font-size:13px; font-weight:800; }
.group-toolbar button { min-height:34px; border:0; border-radius:8px; padding:0 10px; color:var(--blue-700); background:#edf3ff; font-weight:900; }
.selectable-groups { max-height:265px; overflow:auto; padding-right:4px; }
.group-option { display:flex; align-items:center; gap:12px; min-height:58px; padding:10px 12px; border:1px solid #e3eaf5; border-radius:12px; background:#f8faff; cursor:pointer; }
.group-option:has(input:checked) { border-color:#9bb9ff; background:#eef4ff; box-shadow:inset 3px 0 0 var(--blue-500); }
.group-option input { width:18px; min-height:18px; accent-color:var(--blue-700); }
.group-option > span { display:grid; grid-template-columns:auto 1fr; align-items:center; column-gap:9px; }
.group-option i { grid-row:1/3; color:#25c875; font-size:9px; }
.group-option small { color:#8491a8; font-size:11px; font-weight:600; }
.post-content { display:grid; gap:14px; }
.media-upload { display:flex; align-items:center; gap:13px; min-height:76px; padding:13px; border:1px dashed #aebfdf; border-radius:13px; color:#33466e; background:#f8faff; cursor:pointer; }
.media-upload input { position:absolute; width:1px; height:1px; min-height:0; opacity:0; pointer-events:none; }
.media-upload.disabled { opacity:.48; cursor:not-allowed; }
.upload-icon { width:44px; height:44px; display:grid; place-items:center; flex:0 0 auto; border-radius:12px; color:#fff; background:linear-gradient(135deg, var(--blue-700), var(--blue-500)); font-size:25px; font-weight:400; }
.media-upload > span:last-child { display:grid; gap:3px; }
.media-upload small { color:#8190aa; font-size:11px; font-weight:600; }
.media-preview { min-height:52px; display:flex; align-items:center; gap:12px; padding:10px; border-radius:12px; color:#263b68; background:#edf3ff; font-size:12px; }
.media-preview.empty { justify-content:center; color:#94a0b5; background:#f6f8fc; }
.media-preview img, .media-preview video { width:86px; height:58px; object-fit:cover; border-radius:8px; background:#071842; }
.media-preview > span { color:#7a89a4; }
.media-preview > strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.selected-summary { display:flex; align-items:center; gap:9px; min-height:48px; padding:8px 12px; border-radius:11px; background:#f0f5ff; }
.selected-summary strong { color:var(--blue-700); font-size:22px; }
.selected-summary span { color:#64738f; font-size:12px; font-weight:800; }
button:disabled, input:disabled, textarea:disabled { cursor:not-allowed; opacity:.48; }

@media (max-width: 1050px) {
  .login-shell .login-photo { right: 58%; width: 34vw; opacity: 1; }
  .login-wrap { width:min(100%, 390px); padding:26px; }
  .login-shell .campaign-copy { max-width:300px; }
  .login-shell .candidate-name { font-size:44px; }
  .login-shell .brand-panel h1 { font-size:120px; }
  .login-shell .brand-panel .tagline { display:none; }
  .login-heading { margin-bottom:20px; }
  .status-badge { margin-bottom:18px; }
  .login-form { gap:13px; }
  .field, .field input { min-height:50px; }
  .login-button { min-height:52px; }
}

@media (min-width: 1051px) and (max-width: 1250px) {
  .login-shell .login-photo { right:44%; width:38vw; }
}

@media (max-width: 760px) {
  .login-shell { min-height:auto; overflow:visible; }
  .login-shell .brand-panel { position:relative; min-height:480px; padding:28px; }
  .login-shell .campaign-copy { max-width:230px; }
  .login-shell .candidate-name { font-size:36px; }
  .login-shell .brand-panel h1 { font-size:90px; }
  .login-shell .brand-panel .tagline { display:none; }
  .login-shell .login-photo { right:-32px; width:330px; max-height:460px; }
  .login-shell .content-panel { min-height:auto; margin-top:-48px; padding:0 16px 36px; }
  .login-wrap { width:100%; margin:auto; border-radius:24px; }
  .admin-tabs { width:100%; }
  .admin-tabs button { flex:1; padding:0 10px; }
  .bot-status-card { grid-template-columns:1fr; text-align:center; justify-items:center; }
  .connection-status { justify-content:center; }
  .bot-grid, .schedule-form { grid-template-columns:1fr; }
}

/* Mobile-first experience */
@media (max-width: 760px) {
  body { overflow-x:hidden; }
  .page { display:block; min-height:100svh; }

  .page:not(.login-shell) .brand-panel {
    position:relative;
    min-height:112px;
    padding:20px;
    justify-content:center;
  }
  .page:not(.login-shell) .brand-panel::after { height:45px; bottom:-32px; }
  .page:not(.login-shell) .campaign-copy { display:block; }
  .page:not(.login-shell) .brand-panel .eyebrow { font-size:10px; }
  .page:not(.login-shell) .candidate-name { margin:5px 0 0; font-size:25px; line-height:.82; }
  .page:not(.login-shell) .brand-panel h1,
  .page:not(.login-shell) .brand-panel .tagline { display:none; }

  .content-panel { width:100%; padding:18px 14px 42px; gap:14px; }
  .topbar { flex-direction:row; align-items:center; padding:5px 2px 16px; }
  .topbar h2 { font-size:20px; }
  .topbar .ghost { width:auto; min-height:40px; }
  .panel-header { flex-direction:row; align-items:center; }
  .panel-header h2, .card h2 { font-size:20px; }
  .card { padding:17px; border-radius:15px; }
  .grid, .two, .three, .bot-grid { grid-template-columns:1fr; gap:12px; }
  .metrics-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .metrics-grid .card { min-height:108px; padding:15px; }
  .metrics-grid .card:last-child { grid-column:1 / -1; }
  .stat-card strong { font-size:38px; }
  .copy-row { grid-template-columns:1fr; }
  .copy-row .primary { width:100%; }
  .member-row { flex-direction:column; align-items:stretch; }
  .member-row .actions { justify-content:stretch; }
  .member-row .actions button { flex:1; }

  .admin-hero { padding:21px; border-radius:17px; }
  .admin-hero h3 { font-size:24px; }
  .admin-tabs { position:sticky; top:8px; z-index:8; width:100%; overflow-x:auto; flex-wrap:nowrap; }
  .admin-tabs button { flex:1 0 auto; white-space:nowrap; font-size:13px; }
  .neighborhood-card { padding:18px; }
  .neighborhood-row { grid-template-columns:1fr 30px; gap:8px; }
  .neighborhood-label { grid-column:1 / 3; }
  .bar-track { height:9px; }

  .table-card { overflow:visible; }
  .table-card table { display:block; min-width:0; margin-top:12px; }
  .table-card thead { display:none; }
  .table-card tbody { display:grid; gap:9px; }
  .table-card tr { display:grid; padding:12px; border:1px solid #e2e9f5; border-radius:12px; background:#f9fbff; }
  .table-card td { display:flex; justify-content:space-between; gap:16px; padding:6px 2px; border:0; font-size:13px; text-align:right; }
  .table-card td::before { color:#7b89a3; font-size:11px; font-weight:900; letter-spacing:.04em; text-transform:uppercase; text-align:left; }
  .ranking-card td:nth-child(1)::before { content:"Posição"; }
  .ranking-card td:nth-child(2)::before { content:"Membro"; }
  .ranking-card td:nth-child(3)::before { content:"Semana"; }
  .ranking-card td:nth-child(4)::before { content:"Total"; }
  .signup-card td:nth-child(1)::before { content:"Nome"; }
  .signup-card td:nth-child(2)::before { content:"Telefone"; }
  .signup-card td:nth-child(3)::before { content:"Bairro"; }
  .signup-card td:nth-child(4)::before { content:"Indicado por"; }
  .signup-card td:nth-child(5)::before { content:"Data"; }

  .bot-status-card { padding:24px 18px; border-radius:18px; gap:17px; }
  .bot-orbit { width:66px; height:66px; }
  .bot-status-copy h3 { font-size:22px; }
  .bot-qr { flex-direction:column; }
  .queue-item { grid-template-columns:1fr auto; }
  .queue-item .cancel-job { grid-column:1/-1; width:100%; }
  .connect-button, .disconnect-button { width:100%; }
  .group-toolbar { align-items:flex-start; }
  .schedule-form { grid-template-columns:1fr; gap:17px; }
  .days > div { justify-content:space-between; }
  .days button { width:36px; height:36px; }
  .group-add { grid-template-columns:1fr; }

  .login-shell { display:block; min-height:100svh; overflow:hidden; padding-bottom:18px; }
  .login-shell .brand-panel {
    position:relative;
    inset:auto;
    width:100%;
    min-height:405px;
    padding:24px 22px;
    overflow:hidden;
  }
  .login-shell .brand-panel::after { height:105px; bottom:-72px; }
  .login-shell .campaign-copy { position:relative; z-index:3; max-width:210px; }
  .login-shell .brand-panel .eyebrow { font-size:10px; }
  .login-shell .candidate-name { margin:7px 0 4px; font-size:33px; }
  .login-shell .brand-panel h1 { font-size:82px; line-height:.86; }
  .login-shell .brand-panel .tagline { display:none; }
  .login-shell .login-photo {
    right:-28px;
    bottom:-32px;
    width:292px;
    height:auto;
    max-height:390px;
    object-position:bottom right;
    filter:drop-shadow(0 20px 28px rgba(0,8,42,.34));
  }
  .login-shell .content-panel { min-height:auto; margin:-46px 0 0; padding:0 13px 24px; }
  .login-wrap { width:100%; padding:23px 18px; border-radius:22px; box-shadow:0 24px 55px rgba(0,9,49,.32); }
  .login-heading { margin-bottom:18px; }
  .login-heading h2 { margin-top:8px; font-size:32px; }
  .login-heading > p:last-child { font-size:14px; line-height:1.45; }
  .status-badge { margin-bottom:16px; padding:7px 10px; }
  .login-form { gap:12px; }
  .field, .field input { min-height:50px; }
  .login-button { min-height:52px; }
  .secure-note { margin-top:18px; font-size:11px; }
}

@media (max-width: 380px) {
  .login-shell .brand-panel { min-height:385px; }
  .login-shell .login-photo { right:-38px; width:270px; height:auto; max-height:365px; }
  .login-shell .campaign-copy { max-width:180px; }
  .login-shell .candidate-name { font-size:29px; }
  .login-shell .brand-panel h1 { font-size:70px; }
  .metrics-grid { grid-template-columns:1fr; }
  .metrics-grid .card:last-child { grid-column:auto; }
  .admin-tabs button { padding:0 10px; }
}

@media (min-width: 761px) {
  .page:not(.login-shell) { grid-template-columns:280px 1fr; }
  .page:not(.login-shell) .brand-panel { min-height:100svh; }
  .page:not(.login-shell) .content-panel { padding:30px clamp(24px, 3vw, 52px) 56px; }
}

.create-account-button { min-height:54px; border-color:#b8c8e7; color:var(--blue-900); background:#fff; font-weight:900; }
.create-account-button:hover { border-color:var(--blue-700); background:#f5f8ff; }
.group-confirmation { position:relative; z-index:1; width:min(100%, 520px); margin:auto; }
.group-confirmation > h2 { margin:8px 0 10px; color:var(--blue-950); font-size:clamp(32px, 4vw, 48px); line-height:1.02; letter-spacing:-.045em; }
.confirmation-intro { margin:0 0 22px; color:#66738d; line-height:1.55; }
.join-group-card { position:relative; display:block; min-height:330px; overflow:hidden; border-radius:26px; color:#fff; text-decoration:none; background:radial-gradient(circle at 82% 20%, #356df8 0, transparent 30%), linear-gradient(145deg, #031b68 0%, #063cc2 62%, #0b63f3 100%); box-shadow:0 24px 55px rgba(2,34,119,.3); isolation:isolate; transition:transform .22s ease, box-shadow .22s ease; }
.join-group-card::before { content:""; position:absolute; inset:0; z-index:-1; opacity:.2; background-image:linear-gradient(30deg, transparent 42%, rgba(255,255,255,.3) 43%, transparent 44%); background-size:32px 32px; }
.join-group-card::after { content:""; position:absolute; left:-8%; right:-8%; bottom:-68px; height:150px; z-index:-1; background:var(--yellow); transform:rotate(-5deg); }
.join-group-card:hover { transform:translateY(-4px); box-shadow:0 30px 65px rgba(2,34,119,.38); }
.join-group-card img { position:absolute; right:-4px; bottom:-22px; width:62%; max-height:330px; object-fit:contain; object-position:bottom right; filter:drop-shadow(0 18px 24px rgba(0,0,0,.32)); }
.join-card-copy { position:relative; z-index:2; display:flex; flex-direction:column; align-items:flex-start; min-height:330px; padding:26px; }
.join-card-kicker { max-width:210px; font-size:11px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.join-card-copy > strong { margin-top:18px; font-size:clamp(38px, 6vw, 58px); line-height:.86; letter-spacing:-.055em; text-transform:uppercase; }
.join-card-number { margin-top:9px; color:var(--yellow); font-size:64px; line-height:1; font-weight:1000; letter-spacing:-.08em; }
.join-card-action { margin-top:auto; padding:11px 15px; border-radius:999px; color:var(--blue-950); background:var(--yellow); font-size:12px; font-weight:950; box-shadow:0 9px 20px rgba(0,0,0,.18); }
.join-card-action b { margin-left:8px; font-size:18px; }
.registration-warning { display:flex; gap:12px; align-items:center; margin:18px 0 14px; padding:14px 16px; border:1px solid #ffd7a1; border-radius:14px; color:#70420a; background:#fff8e8; }
.registration-warning > span { display:grid; place-items:center; flex:0 0 30px; height:30px; border-radius:50%; color:#fff; background:#ee8b00; font-weight:1000; }
.registration-warning p { margin:0; font-size:13px; line-height:1.4; }
.referral-confirmation { margin:0 0 14px; color:#78849a; font-size:12px; text-align:center; }
.group-confirmation > .ghost { width:100%; }

@media (max-width: 520px) {
  .join-group-card { min-height:300px; }
  .join-group-card img { right:-34px; width:72%; max-height:300px; }
  .join-card-copy { min-height:300px; padding:22px; }
  .join-card-copy > strong { font-size:38px; }
  .join-card-number { font-size:54px; }
  .join-card-action { max-width:175px; border-radius:15px; line-height:1.2; }
}
