:root {
  --navy: #0b1422;
  --navy-soft: #121f31;
  --canvas: #f3f6f8;
  --surface: #ffffff;
  --text: #111d2c;
  --muted: #718096;
  --line: #e2e8ee;
  --green: #13c77b;
  --green-dark: #09965c;
  --green-pale: #e9fbf3;
  --blue: #3468f5;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 38, 58, .07);
}

/* legibilidade do texto secundario do botao de compra de chip - v54 */
.chip-buy-sidebar .chip-buy-copy small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .92);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--text); background: var(--canvas); font-family: "DM Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.eyebrow { color: var(--green-dark); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.eyebrow.light { color: #70e7b3; }

.boot-screen { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 65% 25%, rgba(19,199,123,.2), transparent 30%), #0b1422; }
.boot-brand { display: grid; justify-items: center; gap: 14px; font-family: "Manrope", sans-serif; }
.boot-brand strong { font-size: 20px; }
.boot-brand small { color: #8da2b6; font: 500 12px "DM Sans", sans-serif; }
.loading-spinner { width: 26px; height: 26px; margin-top: 6px; border: 3px solid rgba(255,255,255,.16); border-top-color: var(--green); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-shell { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 100vh; }
.auth-brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 42px 7vw; overflow: hidden; color: #fff; background: radial-gradient(circle at 72% 28%, rgba(19,199,123,.23), transparent 27%), linear-gradient(145deg, #081321, #112941); }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; }
.auth-brand::before { width: 420px; height: 420px; right: -160px; top: 15%; }
.auth-brand::after { width: 260px; height: 260px; right: -60px; top: 25%; }
.brand-lockup { display: flex; align-items: center; gap: 12px; font-family: "Manrope", sans-serif; font-size: 18px; font-weight: 800; }
.brand-lockup.compact { font-size: 15px; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; color: #04160e; background: linear-gradient(145deg, #2de99a, #0fbe72); border-radius: 11px; font: 800 14px "Manrope", sans-serif; box-shadow: 0 8px 22px rgba(15,190,114,.25); }
.auth-copy { position: relative; z-index: 1; max-width: 620px; margin: 9vh 0; }
.auth-copy h1 { max-width: 580px; margin: 16px 0 20px; font: 800 clamp(38px, 4vw, 64px)/1.07 "Manrope", sans-serif; letter-spacing: -.04em; }
.auth-copy > p { max-width: 560px; color: #b8c9d8; font-size: 18px; line-height: 1.7; }
.auth-points { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 32px; }
.auth-points span { padding: 10px 14px; color: #d7eee5; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); border-radius: 999px; font-size: 13px; }
.auth-disclaimer { position: relative; z-index: 1; color: #7690a7; font-size: 12px; }
.auth-panel { display: grid; place-items: center; padding: 40px; overflow-y: auto; background: #fff; }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { margin: 10px 0 6px; font: 800 34px "Manrope", sans-serif; letter-spacing: -.03em; }
.auth-card > p { margin: 0 0 30px; color: var(--muted); }
.auth-card label, .field { display: grid; gap: 8px; margin: 16px 0; color: #344153; font-size: 13px; font-weight: 700; }
.auth-card input, input, select, textarea { width: 100%; padding: 12px 14px; color: var(--text); background: #f9fbfc; border: 1px solid var(--line); border-radius: 11px; outline: none; transition: .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(19,199,123,.12); }
textarea { min-height: 94px; resize: vertical; }
.mobile-brand { display: none; }
.form-note { margin-top: 20px !important; text-align: center; font-size: 12px; }
.auth-register-button { color: #087848 !important; background: var(--green-pale) !important; border: 1px solid #bcebd6 !important; box-shadow: none !important; }
.auth-register-button:hover { color: #fff !important; background: var(--green-dark) !important; border-color: var(--green-dark) !important; }
.auth-card.register { padding: 28px 0; }
.auth-card.register h2 { font-size: 30px; }
.auth-card.register > p { margin-bottom: 24px; }
.auth-card.register label { margin: 16px 0; }
.auth-alert { margin: 18px 0; padding: 12px 14px; border-radius: 11px; font-size: 12px; line-height: 1.45; }
.auth-alert.success { color: #087848; background: #e5f9f0; border: 1px solid #bcebd6; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border: 0; border-radius: 11px; font-weight: 800; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fff; background: linear-gradient(135deg, #13c77b, #08a967); box-shadow: 0 8px 18px rgba(19,199,123,.2); }
.btn.secondary { color: #334155; background: #edf2f5; }
.btn.danger { color: #b91c1c; background: #feecec; }
.btn.small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.btn.full { width: 100%; margin-top: 10px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; color: inherit; background: transparent; border: 1px solid rgba(148,163,184,.25); border-radius: 9px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 246px; color: #d7e2ee; background: var(--navy); border-right: 1px solid rgba(255,255,255,.05); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; min-height: 88px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-brand strong { display: block; color: #fff; font: 800 15px "Manrope", sans-serif; }
.sidebar-brand small { display: block; margin-top: 3px; color: #71869b; font-size: 10px; }
.nav { flex: 1; padding: 20px 12px; overflow-y: auto; }
.nav-section { display: block; margin: 12px 10px 8px; color: #557087; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0; padding: 11px 12px; color: #9fb1c4; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: 13px; }
.nav button span { width: 20px; text-align: center; filter: grayscale(.15); }
.nav button:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav button.active { color: #38e69b; background: rgba(19,199,123,.14); }
.sidebar-user { display: grid; grid-template-columns: 38px 1fr 36px; align-items: center; gap: 9px; padding: 15px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-user > div { min-width: 0; overflow: hidden; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: #fff; font-size: 12px; }
.sidebar-user small { margin-top: 3px; color: #647c92; font-size: 10px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; color: #fff; background: #3268f3; border-radius: 50%; font-weight: 800; }
.workspace { min-height: 100vh; margin-left: 246px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 120px; padding: 26px 34px 22px; background: rgba(243,246,248,.92); border-bottom: 1px solid #e8edf1; backdrop-filter: blur(12px); }
.topbar h1 { margin: 5px 0 4px; font: 800 28px "Manrope", sans-serif; letter-spacing: -.03em; }
.topbar p { margin: 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.emergency-restart { background:#fff1f2; color:#be123c; border:1px solid #fecdd3; box-shadow:none; }
.emergency-restart:hover { background:#ffe4e6; }
.restart-warning { margin-bottom:18px; padding:14px 16px; border:1px solid #fed7aa; border-radius:14px; background:#fff7ed; color:#9a3412; }
.restart-warning p { margin:6px 0 0; color:#9a3412; line-height:1.55; }
.system-live { display: flex; align-items: center; gap: 7px; padding: 8px 11px; color: #207352; background: #e8f9f1; border-radius: 999px; font-size: 11px; font-weight: 800; }
.system-live i, .live-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(19,199,123,.13); }
.content { padding: 28px 34px 50px; }
.mobile-header { display: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { position: relative; padding: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent, var(--green)); }
.stat-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 18px; background: color-mix(in srgb, var(--accent, var(--green)) 11%, white); border-radius: 10px; }
.stat-card strong { display: block; font: 800 29px "Manrope", sans-serif; }
.stat-card label { display: block; margin-top: 3px; color: #415064; font-size: 12px; font-weight: 700; }
.stat-card small { display: block; margin-top: 7px; color: #9aa7b5; font-size: 11px; }
#user-plan-summary { display: block; min-width: 0; }
.user-plan-card { height: 100%; }
.user-plan-card .user-plan-name {
  min-height: 43px;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
}
.user-plan-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.user-plan-days > span {
  min-width: 0;
  padding: 10px;
  background: #fff8e8;
  border: 1px solid #f8e6bd;
  border-radius: 10px;
}
.user-plan-days b {
  display: block;
  color: #9a6106;
  font: 800 20px "Manrope", sans-serif;
}
.user-plan-card .user-plan-days small {
  margin-top: 1px;
  color: #9a7b48;
  font-size: 9px;
  font-weight: 700;
}
.user-plan-card .user-plan-validity {
  padding-top: 9px;
  border-top: 1px solid #f2ead9;
  line-height: 1.35;
}
.grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-top: 18px; }
.admin-live-layout {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
  align-items: stretch;
  gap: 18px;
  margin-top: 18px;
}
.admin-live-panel {
  display: flex;
  min-width: 0;
  height: clamp(420px, 48vh, 560px);
  flex-direction: column;
  overflow: hidden;
}
.admin-live-panel > .panel-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.admin-live-layout > .compact-maturation-panel {
  min-width: 0;
  grid-column: 1 / -1;
  margin-top: 0;
}
.admin-live-layout > .admin-log-panel { margin-top: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #edf1f4; }
.panel-head h2 { margin: 0; font: 800 15px "Manrope", sans-serif; }
.panel-body { padding: 18px 20px; }
.live-pill, .status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.live-pill, .status-pill.online { color: #087848; background: #dff8ed; }
.status-pill.qr, .status-pill.initializing { color: #6b51c7; background: #eee9ff; }
.status-pill.offline, .status-pill.created { color: #64748b; background: #eef2f5; }
.status-pill.queued { color: #075985; background: #e0f2fe; }
.connection-card-head .status-pill { max-width: 65%; justify-content: center; text-align: center; }
.status-pill.attention { color: #b45309; background: #fff2d7; }
.status-pill.protected { color: #0369a1; background: #e0f2fe; }

.connection-row { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f3f5; font-size: 12px; }
.connection-row:last-child { border: 0; }
.connection-row .dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(19,199,123,.12); }
.connection-row small { color: var(--muted); }
.day-badge { padding: 5px 8px; color: #3656b8; background: #edf1ff; border-radius: 8px; font-size: 10px; font-weight: 800; }
.log-list { max-height: 355px; overflow: auto; }
.admin-live-panel .log-list { max-height: none; }
.user-activity-panel { margin-top: 22px; }
.maturation-panel { margin-top: 22px; }
.compact-maturation-list {
  max-height: min(58vh, 680px);
  overflow: auto;
  padding: 8px 20px 14px;
  scrollbar-gutter: stable;
}
.compact-maturation-row {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f4;
}
.compact-maturation-row:last-child { border-bottom: 0; }
.compact-maturation-number { min-width: 0; }
.compact-maturation-number strong,
.compact-maturation-number small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-maturation-number strong { font-size: 12px; }
.compact-maturation-number small,
.compact-maturation-messages { margin-top: 3px; color: var(--muted); font-size: 10px; }
.report-stats + .maturation-panel { margin-top: 20px; }
.admin-log-panel { margin-top: 22px; }
.maturation-table td:first-child small {
  display: block;
  margin-top: 4px;
}
.log-direction {
  display: inline-flex;
  margin: 0 8px 4px 0;
  vertical-align: middle;
}
.log-row { display: grid; grid-template-columns: 62px 1fr 20px; gap: 8px; align-items: start; margin-bottom: 5px; padding: 8px 9px; color: #375067; background: #eefaf5; border-radius: 8px; font: 10px/1.35 monospace; }
.log-row.failed { color: #9f3939; background: #fff0f0; }
.log-row time { color: #90a1b1; }
.empty { display: grid; place-items: center; min-height: 190px; padding: 30px; color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 5px; color: #344153; }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.connection-card { padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.connection-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phone-avatar { display: grid; place-items: center; width: 44px; height: 44px; color: #087848; background: #ddf8eb; border-radius: 13px; font-weight: 800; }
.connection-card h3 { margin: 15px 0 4px; font: 800 15px "Manrope", sans-serif; }
.connection-card p { margin: 0; color: var(--muted); font-size: 12px; }
.progress-meta { display: flex; justify-content: space-between; margin: 19px 0 7px; font-size: 10px; font-weight: 700; }
.progress { height: 7px; overflow: hidden; background: #edf1f4; border-radius: 999px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #55dfad); border-radius: inherit; }
.card-actions { display: flex; gap: 8px; margin-top: 17px; }
.notice { margin-bottom: 18px; padding: 16px 18px; color: #674c0c; background: #fff7d8; border: 1px solid #f5e5a5; border-radius: 13px; }
.notice strong { display: block; margin-bottom: 4px; }
.user-maturation-alert {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(480px, 1.2fr);
  gap: 22px;
  margin-top: 22px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #94a3b8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.user-maturation-alert.protected { border-left-color: #0ea5e9; }
.user-maturation-alert.active { border-left-color: var(--green); }
.user-maturation-alert.queued { border-left-color: #38bdf8; }
.user-maturation-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.maturation-alert-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 14px;
  font-size: 23px;
  font-weight: 800;
}
.protected .maturation-alert-icon { color: #0369a1; background: #e0f2fe; }
.active .maturation-alert-icon { color: #087848; background: #dff8ed; }
.queued .maturation-alert-icon { color: #075985; background: #e0f2fe; }
.user-maturation-heading .eyebrow {
  color: #718096;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}
.user-maturation-heading h2 {
  margin: 5px 0 6px;
  font: 800 19px/1.25 "Manrope", sans-serif;
}
.user-maturation-heading p,
.user-maturation-heading small {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.user-maturation-heading small { margin-top: 7px; color: #8a98a8; }
.user-maturation-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.user-maturation-group {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #e7edf2;
  border-radius: 14px;
}
.user-maturation-group.protected { background: #f0f9ff; border-color: #cfeeff; }
.user-maturation-group.active { background: #effbf6; border-color: #cdeede; }
.maturation-group-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  color: #475569;
  background: #fff;
  border-radius: 9px;
  font-weight: 900;
}
.user-maturation-group.protected .maturation-group-icon { color: #0369a1; }
.user-maturation-group.active .maturation-group-icon { color: #087848; }
.maturation-group-copy { min-width: 0; flex: 1; }
.maturation-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.maturation-group-title strong { font: 800 13px "Manrope", sans-serif; }
.maturation-group-title b {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  color: #fff;
  background: #64748b;
  border-radius: 999px;
  font-size: 12px;
}
.user-maturation-group.protected .maturation-group-title b { background: #0284c7; }
.user-maturation-group.active .maturation-group-title b { background: #0b9f66; }
.maturation-group-copy > p {
  margin: 4px 0 10px;
  color: #718096;
  font-size: 11px;
  line-height: 1.4;
}
.maturation-number-list { display: flex; flex-wrap: wrap; gap: 6px; }
.maturation-number-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 8px;
}
.maturation-number-chip strong,
.maturation-number-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.maturation-number-chip strong { max-width: 95px; font-size: 11px; }
.maturation-number-chip small { color: #64748b; font-size: 10px; }
.maturation-number-chip em {
  flex: 0 0 auto;
  padding: 2px 6px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.current-interaction-note {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  color: #075985;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 10px;
}
.current-interaction-note > span {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  background: #fff;
  border-radius: 8px;
  font-weight: 900;
}
.current-interaction-note div { min-width: 0; }
.current-interaction-note strong,
.current-interaction-note small { display: block; }
.current-interaction-note strong { font-size: 12px; }
.current-interaction-note small {
  margin-top: 2px;
  overflow: hidden;
  color: #47748b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.maturation-group-empty { color: #8a98a8; font-size: 11px; }
.connection-interaction-state {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e7edf2;
  border-radius: 11px;
}
.connection-interaction-state.protected { color: #075985; background: #f0f9ff; border-color: #cfeeff; }
.connection-interaction-state.active { color: #087848; background: #effbf6; border-color: #cdeede; }
.connection-interaction-state.queued { color: #075985; background: #f0f9ff; border-color: #bae6fd; }
.queue-state-copy { min-width: 0; flex: 1; }
.queue-state-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.queue-state-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 7px;
  color: #075985;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}
.queue-summary-note { color: #0369a1 !important; font-weight: 700; }
.interaction-state-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  background: rgba(255,255,255,.8);
  border-radius: 8px;
  font-weight: 900;
}
.connection-interaction-state strong,
.connection-interaction-state small { display: block; }
.connection-interaction-state strong { font: 800 12px/1.35 "Manrope", sans-serif; }
.connection-interaction-state small { margin-top: 3px; color: currentColor; font-size: 11px; line-height: 1.45; opacity: .78; }

.integration-isolation {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px 18px;
  color: #0a7049;
  background: #e9faf3;
  border: 1px solid #bdebd7;
  border-radius: 14px;
}
.integration-isolation strong,
.integration-isolation p { display: block; margin: 0; }
.integration-isolation p { margin-top: 3px; color: #388167; font-size: 12px; }
.integration-shield {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  color: #fff;
  background: linear-gradient(135deg, #13c77b, #07935a);
  border-radius: 14px;
  font: 800 13px "Manrope", sans-serif;
  box-shadow: 0 10px 24px rgba(19,199,123,.2);
}
.panel-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.integration-panel { margin-bottom: 18px; }
.integration-url-field { margin-bottom: 18px; }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.copy-field .btn { min-width: 108px; }
.integration-settings-grid { margin-bottom: 24px; }
.integration-section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 26px -20px 16px;
  padding: 20px 20px 0;
  border-top: 1px solid var(--line);
}
.integration-section-title h3,
.integration-section-title p { margin: 0; }
.integration-section-title h3 { font: 800 16px "Manrope", sans-serif; }
.integration-section-title p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.mapping-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mapping-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  background: #f8fbfa;
  border: 1px solid #dfeae6;
  border-radius: 13px;
}
.mapping-card b,
.mapping-card small { display: block; }
.mapping-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.integration-message { margin-top: 22px; }
.integration-message textarea {
  min-height: 360px;
  color: #1e293b;
  font: 500 13px/1.55 monospace;
}
.integration-test {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 16px;
  background: #f5f8fa;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.integration-test strong,
.integration-test small { display: block; }
.integration-test small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.test-send-fields { display: grid; grid-template-columns: minmax(180px, 260px) auto; gap: 9px; }
.integration-events .integration-diagnostic {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.monitor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.monitor-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.monitor-screen { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; color: #8192a3; background: #e9edef; }
.monitor-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.monitor-screen .screen-overlay { position: absolute; inset: auto 10px 10px; display: flex; justify-content: flex-end; opacity: 0; transition: .2s; }
.monitor-screen:hover .screen-overlay { opacity: 1; }
.monitor-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 14px; }
.monitor-info strong, .monitor-info small { display: block; }
.monitor-info strong { font-size: 12px; }
.monitor-info small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid #edf1f4; text-align: left; white-space: nowrap; font-size: 12px; }
th { color: #8492a3; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td strong { display: block; }
td small { color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search { max-width: 320px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .field { margin: 0; }
.field.full { grid-column: 1/-1; }
.field-hint { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.35; }
.script-settings-grid {
  align-items: start;
  column-gap: 18px;
  row-gap: 14px;
}

@media (max-width: 700px) {
  .integration-isolation,
  .integration-test { align-items: stretch; flex-direction: column; }
  .mapping-grid { grid-template-columns: 1fr; }
  .copy-field,
  .test-send-fields { grid-template-columns: 1fr; }
  .copy-field .btn,
  .test-send-fields .btn { width: 100%; }
  .integration-message textarea { min-height: 430px; }
}
.script-settings-grid .field {
  align-content: start;
  gap: 8px;
}
.script-settings-grid .field > span:first-child {
  min-height: 18px;
  color: #263448;
  font-weight: 800;
}
.script-settings-grid input,
.automatic-delay-preview {
  min-height: 48px;
}
.script-settings-grid .field-hint {
  min-height: 34px;
  margin: 0;
}
.automatic-delay-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 14px;
  color: #14523e;
  background: linear-gradient(135deg, #ecfbf5, #f7fcfa);
  border: 1px solid #cdeee0;
  border-radius: 11px;
}
.automatic-delay-preview i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(19,199,123,.11);
}
.automatic-delay-preview strong {
  color: #0d6848;
  font-size: 14px;
  white-space: nowrap;
}
.automatic-delay-preview span {
  min-width: 0;
  margin-left: auto;
  color: #527568;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.checkbox input { width: auto; }
.protected-reply-settings {
  margin: 22px 0 12px;
  padding: 20px;
  background: linear-gradient(135deg, #f1fbff, #f7fcfa);
  border: 1px solid #cfe9ee;
  border-radius: 14px;
}
.protected-reply-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.protected-reply-heading h2 { margin: 5px 0 5px; font: 800 16px "Manrope", sans-serif; }
.protected-reply-heading p {
  max-width: 760px;
  margin: 0;
  color: #607486;
  font-size: 12px;
  line-height: 1.5;
}
.protected-reply-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.protected-reply-message { margin-bottom: 10px; }
.protected-reply-message textarea { min-height: 76px; background: #fff; }
.protected-reply-footnote {
  margin: 10px 0 0;
  color: #607486;
  font-size: 11px;
  line-height: 1.5;
}
.script-line { display: grid; grid-template-columns: 90px 120px 1fr 34px; gap: 8px; align-items: start; margin-bottom: 9px; padding: 10px; background: #f6f8fa; border-radius: 11px; }
.script-line textarea { min-height: 42px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(4,12,21,.68); backdrop-filter: blur(5px); }
.modal { width: min(620px, 100%); max-height: 90vh; overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.wide { width: min(1040px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font: 800 18px "Manrope", sans-serif; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 20px; border-top: 1px solid var(--line); }
.modal.compact-confirm {
  width: min(470px, 100%);
  overflow: hidden;
  border: 1px solid rgba(15, 118, 78, .08);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(5, 30, 22, .24);
}
.modal.compact-confirm .modal-head {
  padding: 25px 26px 17px;
  border-bottom: 0;
}
.modal.compact-confirm .modal-head h2 {
  color: #12231d;
  font-size: 20px;
  letter-spacing: -.025em;
}
.modal.compact-confirm .modal-body:empty { display: none; }
.modal.compact-confirm .modal-body { padding: 0 26px 17px; }
.modal.compact-confirm .modal-foot {
  gap: 11px;
  padding: 8px 26px 26px;
  border-top: 0;
}
.modal.compact-confirm .modal-foot .btn {
  min-height: 46px;
  padding: 0 19px;
  border-radius: 13px;
  font-size: 14px;
  white-space: nowrap;
}
.modal.compact-confirm .modal-foot .btn.primary {
  box-shadow: 0 12px 24px rgba(8, 169, 103, .24);
}
.qr-box { display: grid; place-items: center; min-height: 360px; padding: 10px; text-align: center; }
.qr-box img { width: min(300px, 88vw); margin: 8px 0; }
.qr-box p { max-width: 390px; color: var(--muted); font-size: 13px; }
.qr-status-banner { display: flex; align-items: center; gap: 11px; width: min(440px, 100%); padding: 12px 14px; color: #123d31; background: #eafaf3; border: 1px solid #c9f0df; border-radius: 13px; text-align: left; }
.qr-status-banner .stage-number { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-weight: 800; }
.qr-status-banner strong, .qr-status-banner small { display: block; }
.qr-status-banner strong { font-size: 13px; }
.qr-status-banner small { margin-top: 2px; color: #4f766b; font-size: 10px; line-height: 1.35; }
.qr-countdown-card { display: grid; justify-items: center; width: min(360px, 100%); padding: 10px 16px 12px; background: #f6f9f8; border: 1px solid #dfe9e5; border-radius: 13px; }
.qr-countdown-card small { color: var(--muted); font-size: 10px; font-weight: 700; }
.qr-countdown { margin-top: 2px; color: #087848; font: 800 24px "Manrope", sans-serif; }
.qr-countdown.expired { color: #b45309; }
.qr-progress, .connection-progress { display: block; width: 100%; height: 5px; margin-top: 7px; overflow: hidden; background: #dce8e3; border-radius: 99px; }
.qr-progress i { display: block; width: 100%; height: 100%; background: var(--green); border-radius: inherit; transition: width .8s linear; }
.qr-instruction { margin: 8px 0 0; line-height: 1.45; }
.connection-loading { display: grid; justify-items: center; gap: 12px; padding: 30px; }
.connection-loading .loading-spinner { width: 42px; height: 42px; border-width: 4px; border-color: #dce6e1; border-top-color: var(--green); }
.connection-loading strong { font: 800 18px "Manrope", sans-serif; }
.connection-loading p, .qr-error p { margin: 0; color: var(--muted); line-height: 1.5; }
.connection-step { color: #07945d; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.connection-progress { width: min(280px, 100%); }
.connection-progress i { display: block; width: 42%; height: 100%; background: var(--green); border-radius: inherit; animation: connectionProgress 1.2s ease-in-out infinite alternate; }
.connection-success { display: grid; justify-items: center; gap: 8px; padding: 30px; }
.connection-success .phone-avatar { display: grid; width: 70px; height: 70px; place-items: center; color: #078b57; background: #dcf8ec; border-radius: 50%; font-size: 28px; font-weight: 800; }
.connection-success span { color: #07945d; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.connection-success h3 { margin: 2px 0 0; font: 800 21px "Manrope", sans-serif; }
.connection-success p { margin: 0; }
@keyframes connectionProgress { from { transform: translateX(-10%); } to { transform: translateX(135%); } }
.qr-error { padding: 28px; color: var(--red); }
.full-screen-image { width: 100%; border-radius: 12px; }
.toast-root { position: fixed; z-index: 200; top: 18px; right: 18px; display: grid; gap: 8px; }
.toast { min-width: 280px; padding: 12px 14px; color: #fff; background: #182536; border-radius: 11px; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 12px; animation: enter .2s ease-out; }
.toast.error { background: #a83232; }
.background-operations { display: grid; gap: 9px; margin-bottom: 18px; }
.background-operation {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  color: #245444;
  background: #effbf6;
  border: 1px solid #c9efdf;
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(16, 122, 79, .07);
}
.background-operation.warning { color: #84540c; background: #fff9e9; border-color: #f2dfac; }
.background-operation.failed { color: #9b3333; background: #fff1f1; border-color: #f2c9c9; }
.background-operation.completed { color: #176044; background: #eafaf3; }
.background-operation-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 10px;
  font-weight: 800;
}
.background-operation.processing .background-operation-icon { animation: operationSpin 1.1s linear infinite; }
.background-operation.warning .background-operation-icon { background: #e8a11a; }
.background-operation.failed .background-operation-icon { background: #e14d4d; animation: none; }
.background-operation-copy { min-width: 0; flex: 1; }
.background-operation-copy strong, .background-operation-copy small { display: block; }
.background-operation-copy strong { font: 800 13px "Manrope", sans-serif; }
.background-operation-copy small { margin-top: 2px; color: inherit; opacity: .78; font-size: 11px; }
.background-operation > b { font-size: 11px; }
.background-operation-progress { display: block; height: 5px; margin-top: 8px; overflow: hidden; background: rgba(89, 128, 112, .18); border-radius: 999px; }
.background-operation-progress i { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .35s ease; }
.background-operation.warning .background-operation-progress i { background: #e8a11a; }
.background-operation.failed .background-operation-progress i { background: #e14d4d; }
@keyframes operationSpin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(-6px); } }
.skeleton { min-height: 120px; border-radius: 14px; background: linear-gradient(90deg, #edf1f4 25%, #f8fafb 37%, #edf1f4 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .monitor-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 25px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 50px; }
  .auth-card.register .mobile-brand { margin-bottom: 28px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .workspace { margin-left: 0; padding-top: 62px; }
  .mobile-header { position: fixed; inset: 0 0 auto; z-index: 25; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 14px; color: #fff; background: var(--navy); }
  .topbar { min-height: 110px; padding: 20px; }
  .system-live { display: none; }
  .content { padding: 18px; }
  .stats-grid, .cards-grid, .monitor-grid, .form-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn { padding: 10px; font-size: 0; }
  .topbar-actions .btn::after { content: "+"; font-size: 20px; }
  .topbar-actions .emergency-restart { font-size:0; padding:10px 12px; }
  .topbar-actions .emergency-restart::after { content:"↻"; font-size:20px; }
  .script-line { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}

/* Layout fluido e tipografia legível — v6 */
body {
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.5;
}
.eyebrow { font-size: 12px; }
.app-shell { width: 100%; min-width: 0; }
.sidebar { width: 260px; }
.sidebar-brand strong { font-size: 16px; }
.sidebar-brand small { color: #8297aa; font-size: 11px; }
.nav-section { color: #64839b; font-size: 10px; }
.nav button { margin: 5px 0; padding: 12px 13px; color: #afc2d3; font-size: 14px; font-weight: 700; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user small { color: #758da2; font-size: 11px; }
.workspace {
  width: calc(100% - 260px);
  min-width: 0;
  margin-left: 260px;
}
.topbar {
  width: 100%;
  min-height: 132px;
  padding: 30px clamp(26px, 3vw, 52px) 26px;
}
.topbar h1 { font-size: clamp(28px, 2.1vw, 34px); }
.topbar p { font-size: 15px; }
.system-live { padding: 9px 13px; font-size: 12px; }
.content {
  width: 100%;
  min-width: 0;
  padding: 30px clamp(26px, 3vw, 52px) 56px;
}
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 20px;
}
.admin-stats-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.admin-stats-grid > .stat-card { grid-column: span 3; }
.admin-stats-grid > .stat-card:nth-last-child(-n + 3) { grid-column: span 4; }
.user-stats-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.user-stats-grid > .stat-card { grid-column: span 3; }
.user-stats-grid > .stat-card:nth-last-child(-n + 3) { grid-column: span 4; }
.user-stats-grid > #user-plan-summary { grid-column: span 4; }
.stat-card { min-width: 0; padding: 24px; }
.stat-card label { font-size: 14px; }
.stat-card small { color: #8998a8; font-size: 13px; }
.grid-2 {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  gap: 20px;
  margin-top: 20px;
}
.panel-head h2 { font-size: 17px; }
.panel-body { padding: 20px 22px; }
.connection-row {
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  padding: 14px 0;
  font-size: 14px;
}
.log-row {
  grid-template-columns: 72px minmax(0, 1fr) 22px;
  gap: 9px;
  margin-bottom: 7px;
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.45;
}
.log-message { min-width: 0; overflow-wrap: anywhere; }
.log-error {
  display: block;
  margin-top: 5px;
  color: #a52323;
  font: 700 12px/1.4 "DM Sans", sans-serif;
}
.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 20px;
}
.connection-card { min-width: 0; padding: 22px; }
.connection-card h3 { font-size: 17px; }
.connection-card p { font-size: 14px; }
.card-actions { flex-wrap: wrap; }
.connection-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 14px;
  padding: 12px;
  background: #f7fafc;
  border: 1px solid #e3ebf2;
  border-radius: 13px;
}
.connection-history > div { min-width: 0; }
.connection-history span,
.connection-history strong { display: block; }
.connection-history span { color: #7c8ca0; font-size: 11px; }
.connection-history strong { margin-top: 3px; color: var(--navy); font: 800 17px "Manrope", sans-serif; }
.connection-history small {
  grid-column: 1 / -1;
  padding-top: 8px;
  color: #8b99a8;
  border-top: 1px solid #e5ecf2;
  font-size: 11px;
}
.user-lifetime-report {
  margin-top: 20px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #f1fbf7, #f7fbff);
  border: 1px solid #cfeadf;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.user-lifetime-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.user-lifetime-heading h2 { margin: 4px 0; font: 800 20px "Manrope", sans-serif; }
.user-lifetime-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.user-lifetime-heading > strong {
  display: grid;
  place-items: center;
  min-width: 86px;
  min-height: 64px;
  padding: 10px 16px;
  color: #087a51;
  background: #dff7ec;
  border-radius: 14px;
  font: 800 28px "Manrope", sans-serif;
}
.user-lifetime-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.user-lifetime-metrics > div {
  min-width: 0;
  padding: 13px 15px;
  background: rgba(255,255,255,.82);
  border: 1px solid #dfeae5;
  border-radius: 12px;
}
.user-lifetime-metrics span,
.user-lifetime-metrics strong,
.user-lifetime-metrics small { display: block; }
.user-lifetime-metrics span { color: #66788b; font-size: 12px; }
.user-lifetime-metrics strong { margin-top: 4px; font: 800 20px "Manrope", sans-serif; }
.user-lifetime-metrics small { margin-top: 2px; color: #8a99a8; font-size: 11px; }
.monitor-remove-all { margin-left: 4px; white-space: nowrap; }
.monitor-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.support-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 18px 20px;
  color: #17473a;
  background: #eafaf3;
  border: 1px solid #c8efde;
  border-radius: 15px;
}
.support-notice > div { display: flex; align-items: center; gap: 14px; min-width: 0; }
.support-notice > .support-notice-copy { flex: 1 1 420px; }
.support-notice strong, .support-notice p { display: block; margin: 0; }
.support-notice strong { font: 800 16px "Manrope", sans-serif; }
.support-notice p { margin-top: 3px; color: #51776b; font-size: 13px; }
.support-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: #fff;
  background: var(--green);
  border-radius: 12px;
  font-size: 22px;
  font-weight: 800;
}
.support-counter {
  flex: 0 0 auto;
  padding: 7px 11px;
  color: #087848;
  background: #d8f6e9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.support-limit-control {
  display: grid !important;
  grid-template-columns: minmax(150px, 190px) auto;
  align-items: end !important;
  flex: 0 1 auto;
  gap: 8px !important;
}
.support-limit-control label { display: grid; gap: 5px; }
.support-limit-control label > span { font-size: 11px; font-weight: 800; }
.support-limit-control input {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bce4d2;
  border-radius: 9px;
  font: 800 14px "DM Sans", sans-serif;
}
.support-limit-control .support-counter {
  grid-column: 1 / -1;
  justify-self: end;
}
.monitor-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.status-pill.support { color: #5b3fc0; background: #eee9ff; }
.btn.support-action { color: #5b3fc0; background: #eee9ff; border-color: #ddd3ff; }
.btn.support-action:hover { color: #472ba8; background: #e3dcff; border-color: #cfc2ff; }
.monitor-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.health-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid;
  border-radius: 15px;
}
.health-alert > div { min-width: 0; flex: 1; }
.health-alert strong, .health-alert p, .health-alert small { display: block; margin: 0; }
.health-alert p { margin-top: 3px; font-size: 13px; line-height: 1.45; }
.health-alert small { margin-top: 5px; font-size: 11px; }
.health-alert.healthy { color: #166044; background: #eafaf3; border-color: #c8efde; }
.health-alert.healthy p, .health-alert.healthy small { color: #51776b; }
.health-alert.problem { color: #8e2c2c; background: #fff1f1; border-color: #f5cccc; }
.health-alert.problem p, .health-alert.problem small { color: #965555; }
.health-alert.warning { color: #805718; background: #fff8e8; border-color: #f1d89b; }
.health-alert.warning p, .health-alert.warning small { color: #8c7246; }
.health-alert.warning .health-alert-icon { background: #e6a72e; font-size: 11px; }
.health-alert-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #e14d4d;
  font: 900 19px "Manrope", sans-serif;
}
.health-alert.healthy .health-alert-icon { background: var(--green); }
.user-disconnected-alert {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  padding: 17px 19px;
  color: #8e2c2c;
  background: linear-gradient(135deg, #fff0f0, #fff8f8);
  border: 1px solid #f1c2c2;
  border-left: 5px solid #ef4444;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(180, 45, 45, .08);
}
.user-disconnected-alert > div { min-width: 0; flex: 1; }
.user-disconnected-alert strong,
.user-disconnected-alert p,
.user-disconnected-alert small { display: block; margin: 0; }
.user-disconnected-alert strong { font: 800 16px "Manrope", sans-serif; }
.user-disconnected-alert p { margin-top: 3px; color: #8f5050; font-size: 13px; }
.user-disconnected-alert small {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #aa6464;
  font-size: 11px;
  font-weight: 700;
}
.user-disconnected-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  color: #fff;
  background: #ef4444;
  border-radius: 11px;
  font: 800 18px "Manrope", sans-serif;
}
.user-connections-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.user-connections-toolbar strong,
.user-connections-toolbar small { display: block; }
.user-connections-toolbar strong { font: 800 16px "Manrope", sans-serif; }
.user-connections-toolbar small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.user-connection-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 14px;
}
.monitor-toolbar strong, .monitor-toolbar small { display: block; }
.monitor-toolbar strong { font: 800 17px "Manrope", sans-serif; }
.monitor-toolbar small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.monitor-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.monitor-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  color: #526174;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font: 700 12px "DM Sans", sans-serif;
}
.monitor-filter:hover { color: #087848; border-color: #a9dfc9; }
.monitor-filter.active { color: #087848; background: #eafaf3; border-color: #99dfc0; }
.monitor-filter span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  background: #edf1f4;
  border-radius: 999px;
  font-size: 10px;
}
.monitor-filter.active span { background: #ccefe0; }
.monitor-list { display: grid; gap: 13px; }
.monitor-row {
  overflow: hidden;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.monitor-row.health-ok { border-left-color: #19bd78; }
.monitor-row.health-watch { border-left-color: #8b6ee8; }
.monitor-row.health-warning { border-left-color: #f59e0b; }
.monitor-row.health-problem { border-left-color: #ef5350; }
.monitor-row-main { display: flex; align-items: center; gap: 13px; }
.monitor-row-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: #087848;
  background: #dff8ed;
  border-radius: 13px;
  font: 800 16px "Manrope", sans-serif;
}
.monitor-row-identity { min-width: 0; flex: 1; }
.monitor-row-title { display: flex; align-items: center; gap: 9px; }
.monitor-row-title h3 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; font: 800 15px "Manrope", sans-serif; }
.monitor-row-identity p { overflow-wrap: anywhere; margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.monitor-health {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 0;
  padding: 12px 13px;
  background: #f7f9fb;
  border: 1px solid #e8edf1;
  border-radius: 11px;
}
.monitor-health.health-warning { background: #fff9e9; border-color: #f5dfaa; }
.monitor-health.health-problem { background: #fff1f1; border-color: #f5cccc; }
.monitor-health > div { min-width: 0; flex: 1; }
.monitor-health strong, .monitor-health p, .monitor-health small { display: block; margin: 0; }
.monitor-health strong { font-size: 13px; }
.monitor-health p { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.monitor-health small { margin-top: 4px; color: #9c3c3c; font-size: 11px; overflow-wrap: anywhere; }
.monitor-health-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  color: #087848;
  background: #dff8ed;
  border-radius: 9px;
  font-weight: 900;
}
.health-warning .monitor-health-icon { color: #a25b00; background: #ffedbc; }
.health-problem .monitor-health-icon { color: #a62424; background: #ffd9d9; }
.flow-warning {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #a62424;
  background: #ffdada;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.monitor-row-footer { display: flex; align-items: flex-end; gap: 16px; }
.monitor-stage { min-width: 180px; flex: 1; }
.monitor-stage > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #59677a; font-size: 11px; font-weight: 700; }
.monitor-age { display: block; margin: -1px 0 7px; color: #718096; font-size: 11px; font-weight: 600; }
.monitor-row-footer .monitor-actions { flex: 0 0 auto; padding: 0; }
.support-modal-note {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 13px 15px;
  color: #17473a;
  background: #eafaf3;
  border: 1px solid #c8efde;
  border-radius: 12px;
}
.support-modal-note span { color: #51776b; font-size: 13px; line-height: 1.45; }
.table-wrap { width: 100%; }
th, td {
  padding: 15px 16px;
  vertical-align: middle;
  font-size: 14px;
}
th { color: #718096; font-size: 11px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.log-detail {
  max-width: 520px;
  white-space: normal;
  line-height: 1.45;
}
.log-detail small {
  display: block;
  margin-top: 5px;
  color: #aa2424;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.field-hint { font-size: 12px; line-height: 1.4; }
.checkbox { font-size: 14px; }
.script-line {
  grid-template-columns: 130px 150px minmax(240px, 1fr) 38px;
  gap: 10px;
  margin-bottom: 11px;
  padding: 12px;
}

@media (max-width: 1260px) {
  .grid-2 { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .admin-stats-grid > .stat-card { grid-column: span 3; }
  .admin-stats-grid > .stat-card:nth-last-child(-n + 3) { grid-column: span 2; }
  .user-stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .user-stats-grid > .stat-card { grid-column: span 3; }
  .user-stats-grid > .stat-card:nth-last-child(-n + 3) { grid-column: span 2; }
  .user-stats-grid > #user-plan-summary { grid-column: span 2; }
  .user-maturation-alert { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .admin-live-layout { grid-template-columns: 1fr; }
  .admin-live-layout > .compact-maturation-panel { grid-column: auto; }
  .admin-live-panel { height: clamp(390px, 52vh, 520px); }
}

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100dvh; padding: 30px 22px; }
  .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 50px; }
  .auth-card.register .mobile-brand { margin-bottom: 28px; }
  .sidebar {
    width: min(86vw, 310px);
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(2,10,18,.24);
    transition: transform .25s;
  }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; margin-left: 0; padding-top: 68px; }
  .mobile-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 18px;
    color: #fff;
    background: var(--navy);
  }
  .topbar { min-height: auto; padding: 24px 22px; }
  .system-live { display: flex; }
  .topbar-actions .btn { padding: 10px 14px; font-size: 14px; }
  .topbar-actions .btn::after { content: none; }
  .content { padding: 24px 22px 44px; }
  .script-line {
    grid-template-columns: 120px 140px minmax(220px, 1fr) 38px;
    overflow-x: auto;
  }
  .user-lifetime-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .auth-panel { padding: 24px 18px; }
  .auth-card h2 { font-size: 30px; }
  .mobile-brand { margin-bottom: 34px; }
  .mobile-header .brand-lockup { font-size: 14px; }
  .mobile-header .brand-mark { width: 34px; height: 34px; }
  .topbar { align-items: flex-start; gap: 18px; padding: 22px 18px; }
  .topbar h1 { font-size: 27px; }
  .topbar p { font-size: 14px; }
  .topbar-actions { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .system-live { display: flex; padding: 7px 9px; font-size: 11px; }
  .topbar-actions .btn {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }
  .topbar-actions .btn::after { content: none; }
  .content { padding: 20px 16px 38px; }
  .stats-grid, .cards-grid, .monitor-grid, .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .stat-card { padding: 21px; }
  .grid-2 { gap: 15px; margin-top: 15px; }
  .admin-live-layout { gap: 15px; }
  .admin-live-layout { margin-top: 15px; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .admin-stats-grid > .stat-card,
  .admin-stats-grid > .stat-card:nth-last-child(-n + 3) { grid-column: auto; }
  .user-stats-grid { grid-template-columns: 1fr; }
  .user-stats-grid > .stat-card,
  .user-stats-grid > .stat-card:nth-last-child(-n + 3) { grid-column: auto; }
  .user-stats-grid > #user-plan-summary { grid-column: auto; }
  .admin-live-panel { height: min(480px, 58vh); min-height: 360px; }
  .panel-head { align-items: flex-start; padding: 16px; }
  .panel-body { padding: 16px; }
  .support-notice { align-items: flex-start; flex-direction: column; padding: 16px; }
  .support-notice > div { align-items: flex-start; }
  .support-limit-control { width: 100%; grid-template-columns: 1fr; }
  .support-limit-control .support-counter { grid-column: auto; justify-self: stretch; text-align: center; }
  .health-alert { align-items: flex-start; flex-wrap: wrap; padding: 15px; }
  .health-alert .btn { width: 100%; }
  .user-disconnected-alert { align-items: flex-start; flex-wrap: wrap; padding: 15px; }
  .user-disconnected-alert .btn { width: 100%; }
  .user-connections-toolbar { align-items: stretch; flex-direction: column; }
  .user-connection-filters { display: grid; grid-template-columns: 1fr; }
  .user-connection-filters .monitor-filter { justify-content: space-between; }
  .monitor-toolbar { align-items: stretch; flex-direction: column; }
  .monitor-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-filter { justify-content: space-between; }
  .monitor-remove-all { width: 100%; margin-left: 0; }
  .user-lifetime-report { padding: 18px; }
  .user-lifetime-heading { align-items: flex-start; }
  .user-lifetime-heading > strong { min-width: 72px; min-height: 56px; font-size: 23px; }
  .user-lifetime-metrics { grid-template-columns: 1fr; }
  .monitor-row { padding: 15px; }
  .monitor-row-main { align-items: flex-start; flex-wrap: wrap; }
  .monitor-row-main > .monitor-badges { width: 100%; justify-content: flex-start; padding-left: 57px; }
  .monitor-health { align-items: flex-start; flex-wrap: wrap; }
  .flow-warning { margin-left: 40px; }
  .monitor-row-footer { align-items: stretch; flex-direction: column; }
  .monitor-row-footer .monitor-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .monitor-row-footer .monitor-actions .btn { width: 100%; }
  .user-maturation-alert { gap: 16px; padding: 17px; }
  .user-maturation-groups { grid-template-columns: 1fr; }
  .user-maturation-heading h2 { font-size: 17px; }
  .maturation-number-chip { width: 100%; justify-content: space-between; }
  .maturation-number-chip strong { max-width: 50%; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar .btn { width: 100%; }
  .connection-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .connection-row > small:last-child { display: none; }
  .compact-maturation-row {
    grid-template-columns: minmax(130px, 1fr) auto auto;
  }
  .compact-maturation-row .status-pill:nth-of-type(2),
  .compact-maturation-messages { display: none; }
  .card-actions .btn { flex: 1 1 auto; }
  .form-grid .field { min-width: 0; }
  .script-settings-grid .field-hint { min-height: 0; }
  .automatic-delay-preview {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .automatic-delay-preview span {
    flex-basis: 100%;
    margin-left: 18px;
    text-align: left;
  }
  .protected-reply-settings { padding: 16px; }
  .protected-reply-heading { flex-direction: column; }
  .protected-reply-grid { grid-template-columns: 1fr; }
  .script-line { grid-template-columns: 1fr; overflow: visible; }
  .script-line .icon-btn { justify-self: end; }
  .field.full { grid-column: auto; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal {
    width: 100%;
    max-height: 94dvh;
    border-radius: 20px 20px 0 0;
  }
  .modal-head, .modal-body, .modal-foot { padding-left: 17px; padding-right: 17px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 130px; }
  .modal.compact-confirm {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    border-radius: 20px;
  }
  .modal.compact-confirm .modal-head { padding: 22px 20px 15px; }
  .modal.compact-confirm .modal-body { padding: 0 20px 15px; }
  .modal.compact-confirm .modal-foot { padding: 7px 20px 20px; }
  .modal.compact-confirm .modal-foot .btn {
    flex: 1 1 0;
    padding: 0 10px;
    font-size: 12px;
  }
  .qr-box { min-height: 330px; padding: 4px; }
  .qr-box img { width: min(290px, 80vw); }
  .toast-root { inset: 12px 12px auto; }
  .toast { width: 100%; min-width: 0; }

  .responsive-table thead { display: none; }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td { display: block; width: 100%; }
  .responsive-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .responsive-table tr:last-child { border-bottom: 0; }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 9px 16px;
    border: 0;
    white-space: normal;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: #718096;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .responsive-table .table-actions { min-width: 0; }
  .responsive-table .table-actions .btn { flex: 1 1 105px; }
  .log-detail { max-width: none; }
}

/* Identidade visual Aquecedor Pro — v39 */
.boot-logo {
  display: block;
  width: min(330px, 76vw);
  height: auto;
  object-fit: contain;
}

.auth-shell {
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(19, 199, 123, .11), transparent 28%),
    radial-gradient(circle at 86% 84%, rgba(52, 104, 245, .08), transparent 26%),
    #f3f6f8;
}

.auth-panel {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 48px);
  overflow-y: auto;
  background: transparent;
}

.auth-card,
.auth-card.register {
  width: min(470px, 100%);
  padding: clamp(28px, 4vw, 40px);
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(210, 222, 230, .9);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(20, 38, 58, .13);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  margin: 0 0 26px;
}

.auth-logo img {
  display: block;
  width: min(330px, 92%);
  max-height: 106px;
  object-fit: contain;
}

.sidebar-brand {
  min-height: 104px;
  padding: 12px 18px 10px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.sidebar-logo {
  display: block;
  width: min(198px, 100%);
  max-height: 62px;
  object-fit: contain;
}

.sidebar-brand small {
  margin-top: 5px;
  color: #a9bbca;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .01em;
}

.mobile-logo {
  display: block;
  width: 148px;
  max-height: 44px;
  object-fit: contain;
}

@media (max-width: 700px) {
  .auth-panel { padding: 18px; }
  .auth-card,
  .auth-card.register {
    padding: 27px 22px 30px;
    border-radius: 20px;
  }
  .auth-logo {
    min-height: 68px;
    margin-bottom: 23px;
  }
  .auth-logo img { width: min(290px, 94%); }
  .mobile-logo { width: 138px; max-height: 40px; }
}

/* Renovação de plano por Pix — v40 */
.renewal-card {
  width: min(520px, 100%);
  padding: clamp(26px, 4vw, 40px);
}

.renewal-card .auth-logo {
  margin-bottom: 18px;
}

.renewal-stage {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 20px 0;
  padding: 16px;
  color: #264158;
  background: #f3f8fb;
  border: 1px solid #dce8ef;
  border-radius: 16px;
}

.renewal-stage-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #087d54;
  font-size: 20px;
  font-weight: 900;
  background: #dff8ee;
  border-radius: 14px;
}

.renewal-stage strong,
.renewal-stage span {
  display: block;
}

.renewal-stage strong {
  margin-bottom: 4px;
  color: #102438;
  font-size: 15px;
}

.renewal-stage span {
  color: #71849a;
  font-size: 13px;
  line-height: 1.45;
}

.renewal-stage[data-stage="approved"],
.renewal-stage[data-stage="renewing"],
.renewal-stage[data-stage="done"] {
  background: #edfbf5;
  border-color: #bdebd8;
}

.renewal-stage[data-stage="error"] {
  background: #fff2f2;
  border-color: #f5caca;
}

.renewal-stage[data-stage="error"] .renewal-stage-icon {
  color: #bf2f39;
  background: #ffe1e3;
}

.renewal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 15px 16px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.renewal-summary span,
.renewal-summary strong {
  display: block;
}

.renewal-summary span {
  margin-bottom: 3px;
  color: #75879a;
  font-size: 12px;
}

.renewal-summary strong {
  color: #12263a;
  font-size: 16px;
}

.renewal-summary-price {
  flex: 0 0 auto;
  color: #06855b;
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
}

.renewal-pix {
  padding: 18px;
  background: #f8fbfa;
  border: 1px solid #d9ebe4;
  border-radius: 18px;
}

.renewal-qr-wrap {
  display: grid;
  place-items: center;
  min-height: 230px;
  margin-bottom: 15px;
}

.renewal-qr-wrap img {
  display: block;
  width: min(250px, 72vw);
  height: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #dce7e2;
  border-radius: 14px;
}

.renewal-code-field label {
  display: block;
  margin-bottom: 7px;
  color: #42556a;
  font-size: 12px;
  font-weight: 800;
}

.renewal-code-field textarea {
  width: 100%;
  min-height: 76px;
  resize: none;
  padding: 12px;
  color: #34495e;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid #d8e3df;
  border-radius: 12px;
}

.renewal-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .renewal-card { padding: 26px 20px 28px; }
  .renewal-summary { align-items: flex-start; }
  .renewal-summary-price { font-size: 18px; }
  .renewal-pix { padding: 13px; }
}


/* renovacao-v42-isolada */
.renewal-stage {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 15px;
  padding: 15px 16px;
  background: linear-gradient(135deg, #f7fafc 0%, #f1f7fa 100%);
  border-color: #d9e5ec;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgb(28 65 91 / 6%);
}

.renewal-stage .renewal-stage-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  overflow: hidden;
  color: #087d54;
  font-size: 0;
  line-height: 0;
  background: linear-gradient(145deg, #e7faf2 0%, #d6f4e8 100%);
  border: 1px solid rgb(8 125 84 / 10%);
  border-radius: 16px;
  box-shadow: 0 7px 16px rgb(8 125 84 / 12%), inset 0 1px 0 rgb(255 255 255 / 75%);
}

.renewal-stage .renewal-stage-icon svg {
  display: block;
  width: 27px;
  height: 27px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.renewal-stage-icon .renewal-stage-icon-dot { fill: currentColor; stroke: none; }
.renewal-stage-content { min-width: 0; }
.renewal-stage-content > strong, .renewal-stage-content > small { display: block; }
.renewal-stage-content > small { color: #71849a; font-size: 13px; line-height: 1.45; }

.renewal-stage[data-stage="expired"] .renewal-stage-icon {
  color: #b86408;
  background: linear-gradient(145deg, #fff8e8 0%, #ffedc8 100%);
  border-color: rgb(184 100 8 / 12%);
}

.renewal-stage[data-stage="pending"] { background: #f1f8fd; border-color: #cee4f2; }
.renewal-stage[data-stage="pending"] .renewal-stage-icon { color: #0876a7; background: #dff3fc; }
.renewal-stage[data-stage="approved"], .renewal-stage[data-stage="renewing"], .renewal-stage[data-stage="renewed"] {
  background: linear-gradient(135deg, #f1fcf7 0%, #e8f9f1 100%);
  border-color: #b8e8d4;
}
.renewal-stage[data-stage="renewed"] .renewal-stage-icon {
  color: #fff;
  background: linear-gradient(145deg, #12c987 0%, #069b68 100%);
  border-color: transparent;
}
.renewal-stage[data-stage="failed"] { background: #fff2f2; border-color: #f5caca; }
.renewal-stage[data-stage="failed"] .renewal-stage-icon { color: #bf2f39; background: #ffe1e3; }
.renewal-stage-spinner { animation: renewal-stage-spin 0.85s linear infinite; }
@keyframes renewal-stage-spin { to { transform: rotate(360deg); } }

.renewal-stage .renewal-opening-progress {
  display: none;
  height: 4px;
  margin-top: 11px;
  overflow: hidden;
  background: rgb(8 133 91 / 12%);
  border-radius: 999px;
}
.renewal-opening-progress i {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #12c987, #07895e);
  border-radius: inherit;
  animation: renewal-opening 1.1s ease-in-out infinite;
}
.renewal-stage[data-stage="renewed"] .renewal-opening-progress { display: block; }
@keyframes renewal-opening { from { transform: translateX(-110%); } to { transform: translateX(245%); } }
@media (prefers-reduced-motion: reduce) {
  .renewal-stage-spinner, .renewal-opening-progress i { animation: none; }
}

/* relatorio-renovacoes-v43-isolado */
.admin-renewal-report {
  margin-top: 18px;
  overflow: hidden;
}
.renewal-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f7fbf9, #f4f8fb);
  border-bottom: 1px solid #edf1f4;
}
.renewal-report-summary article {
  min-width: 0;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid #e2ece7;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgb(21 78 58 / 6%);
}
.renewal-report-summary span,
.renewal-report-summary strong,
.renewal-report-summary small { display: block; }
.renewal-report-summary span { color: #718096; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.renewal-report-summary strong { margin-top: 7px; color: #102438; font: 800 22px "Manrope", sans-serif; }
.renewal-report-summary small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.renewal-report-table-wrap { max-height: 470px; overflow: auto; scrollbar-gutter: stable; }
.renewal-report-table thead { position: sticky; z-index: 2; top: 0; background: #fff; }
.renewal-report-table td { vertical-align: top; }
.renewal-report-table td strong { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.renewal-report-table td small { display: block; margin-top: 4px; }
.renewal-report-value { color: #078b5b; }
@media (max-width: 1000px) {
  .renewal-report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .renewal-report-summary { grid-template-columns: 1fr; padding: 14px; }
  .admin-renewal-report .panel-head { align-items: flex-start; }
}


/* status-planos-vencidos-v44-isolado */
.status-pill.expired { color: #b4232f; background: #ffe5e8; }
.status-pill.blocked { color: #5f6875; background: #e9edf1; }
.admin-user-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.admin-user-summary article {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.admin-user-summary article > span { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; font-weight: 900; }
.admin-user-summary article strong, .admin-user-summary article small { display: block; }
.admin-user-summary article strong { font: 800 22px "Manrope", sans-serif; }
.admin-user-summary article small { color: var(--muted); font-size: 12px; }
.admin-user-summary .active > span { color: #087848; background: #dff8ed; }
.admin-user-summary .expired { border-color: #f3c6cb; }
.admin-user-summary .expired > span { color: #b4232f; background: #ffe5e8; }
.admin-user-summary .blocked > span { color: #5f6875; background: #e9edf1; }
.admin-users-panel { overflow: hidden; }
.admin-user-row.access-expired { background: #fffafb; }
.admin-user-row.access-expired td:first-child { box-shadow: inset 4px 0 #e34b57; }
.plan-validity-expired { color: #bd2935; }
.access-flow-note { display: block; margin-top: 5px; color: #b4232f; font-weight: 700; }
.monitor-row.access-plan-expired { border-left-color: #e34b57; background: linear-gradient(90deg, #fffafb 0, #fff 18%); }
.monitor-access-warning {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 14px 0;
  padding: 13px 14px;
  color: #8f2630;
  background: #fff0f2;
  border: 1px solid #f4c5ca;
  border-radius: 12px;
}
.monitor-access-warning > span { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; color: #fff; background: #df3f4c; border-radius: 9px; font-weight: 900; }
.monitor-access-warning strong, .monitor-access-warning p, .monitor-access-warning small { display: block; margin: 0; }
.monitor-access-warning p { margin-top: 3px; color: #99545a; font-size: 12px; line-height: 1.4; }
.monitor-access-warning small { margin-top: 4px; color: #a33e47; font-size: 11px; }
@media (max-width: 700px) {
  .admin-user-summary { grid-template-columns: 1fr; }
  .monitor-access-warning { align-items: flex-start; }
}

/* comprar-chip-virtual-v52-isolado */
.sidebar-chip-buy {
  padding: 13px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.chip-buy-link {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0fc77a 0%, #08a96d 48%, #0788c8 100%);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(8,169,109,.24);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.chip-buy-link::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 8% 10%, rgba(255,255,255,.26), transparent 38%);
  content: "";
  pointer-events: none;
}
.chip-buy-link:hover {
  color: #fff;
  box-shadow: 0 16px 34px rgba(8,169,109,.32);
  filter: saturate(1.08);
  transform: translateY(-2px);
}
.chip-buy-link:focus-visible {
  outline: 3px solid rgba(34,211,238,.38);
  outline-offset: 3px;
}
.chip-buy-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.chip-buy-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.chip-buy-copy {
  min-width: 0;
  line-height: 1.2;
}
.chip-buy-copy strong,
.chip-buy-copy small { display: block; }
.chip-buy-copy strong {
  color: inherit;
  font: 800 11px "Manrope", sans-serif;
  letter-spacing: .035em;
  white-space: nowrap;
}
.chip-buy-copy small {
  margin-top: 4px;
  color: rgba(255,255,255,.76);
  font-size: 9px;
  white-space: nowrap;
}
.chip-buy-arrow {
  margin-left: auto;
  font-size: 17px;
  line-height: 1;
  transition: transform .2s ease;
}
.chip-buy-link:hover .chip-buy-arrow { transform: translate(2px, -2px); }
.chip-buy-sidebar { width: 100%; padding: 11px; }
.chip-buy-header {
  min-height: 44px;
  padding: 7px 13px 7px 8px;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(8,169,109,.2);
}
.chip-buy-header .chip-buy-icon {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border-radius: 9px;
}
.chip-buy-header .chip-buy-icon svg { width: 17px; height: 17px; }
.chip-buy-header .chip-buy-copy strong { font-size: 10px; }
.topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 980px) {
  .sidebar-chip-buy { padding: 13px 16px 14px; }
  .chip-buy-header { min-height: 40px; padding: 6px 10px 6px 7px; }
  .chip-buy-header .chip-buy-copy strong { font-size: 9px; }
}
@media (max-width: 700px) {
  .chip-buy-header {
    max-width: 168px;
    min-height: 38px;
    gap: 7px;
    padding: 5px 8px 5px 6px;
  }
  .chip-buy-header .chip-buy-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .chip-buy-header .chip-buy-copy strong { white-space: normal; line-height: 1.15; }
  .chip-buy-header .chip-buy-arrow { font-size: 14px; }
}
