/* Babel Live · identidade visual (mesmas cores do Shalom Escala) */
:root {
  --navy: #12214A;
  --navy-2: #1E2D5C;
  --yellow: #F5C518;
  --bg: #F1F3F8;
  --link: #1D4ED8;
  --muted: #5E6880;
  --green: #1E7B3E;
  --red: #D93025;
  --line: #E3E7F0;
  --white: #fff;
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--navy); background: var(--bg); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 38px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em; }
.small { font-size: 13px; }
.right { text-align: right; }

/* ---------- Layout master ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 245px; flex: 0 0 245px; background: var(--navy); color: #fff; padding: 28px 18px 18px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 30px 14px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); flex: none; }
.brand .name { font-weight: 800; font-size: 22px; line-height: 1.05; letter-spacing: -0.02em; }
.badge-master { background: var(--yellow); color: var(--navy); font-weight: 800; font-size: 11px; letter-spacing: .12em; padding: 4px 8px; border-radius: 6px; margin-left: auto; }
.nav a {
  display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 12px 16px; border-radius: 14px; margin-bottom: 6px;
}
.nav a svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.06); }
.nav a.active { background: var(--navy-2); color: var(--yellow); }
.nav .sep { height: 1px; background: rgba(255,255,255,.1); margin: 12px 8px; }
.side-user { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 14px 4px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-weight: 800; display: grid; place-items: center; flex: none; }
.side-user .who { font-weight: 800; font-size: 15px; line-height: 1.15; }
.side-user .who small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }
.side-user a { color: #fff; margin-left: auto; font-size: 14px; }
.main { flex: 1; padding: 38px 44px 30px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: 16px; }
.tag-exemplo { display: inline-block; vertical-align: middle; font-size: 13px; font-weight: 700; color: var(--muted); background: #E6E9F1; border-radius: 999px; padding: 4px 12px; margin-left: 10px; letter-spacing: 0; }

/* ---------- Componentes ---------- */
.card { background: #fff; border-radius: var(--radius); padding: 24px; }
.card.dark { background: var(--navy); color: #fff; }
.card h2 { margin-bottom: 18px; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
.g-2-1 { grid-template-columns: 1fr 1fr; }
.mb { margin-bottom: 18px; }
.mt { margin-top: 18px; }
.kpi .label { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.kpi .value { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 8px; }
.kpi .value.green { color: var(--green); }
.kpi .hint { color: var(--muted); font-size: 14px; }
.card.dark .kpi .label, .card.dark .label { color: #AAB3CC; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: #C9D0E0; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.btn.blue { background: var(--link); border-color: var(--link); color: #fff; }
.btn.soft-blue { background: #EAF0FF; border-color: #EAF0FF; color: var(--link); }
.btn.danger { color: var(--red); border-color: #F2B8B2; }
.btn.danger-fill { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { color: var(--muted); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { color: var(--link); font-weight: 700; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.pill.green { background: #E6F4EA; color: var(--green); }
.pill.yellow { background: #FDF3CC; color: #7A5B00; }
.pill.red { background: #FDE7E5; color: #B3261E; }
.pill.blue { background: #E8EEFF; color: var(--link); }
.pill.gray { background: #ECEEF3; color: var(--muted); }
.pill.navy { background: var(--navy); color: var(--yellow); }
.count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 999px; background: #FDE7E5; color: #B3261E; font-weight: 800; font-size: 13px; }

.chip { width: 36px; height: 36px; border-radius: 10px; background: #EEF1F7; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.chip.navy { background: var(--navy); color: var(--yellow); }
.chip.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 22px; }
.who-cell { display: flex; align-items: center; gap: 12px; font-weight: 800; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1.5px solid var(--line); }
table.t td { padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t.compact td { padding: 11px 10px; font-size: 14px; }
.bar { height: 8px; background: #E9ECF3; border-radius: 999px; overflow: hidden; width: 130px; display: inline-block; vertical-align: middle; margin-right: 12px; }
.bar > i { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.bar > i.warn { background: #B3261E; }
.bar.wide { width: 100%; height: 10px; margin: 0; }
.card.dark .bar { background: rgba(255,255,255,.15); }
.card.dark .bar > i { background: var(--yellow); }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tab { background: #fff; border-radius: 12px; padding: 11px 18px; font-weight: 800; text-decoration: none; color: var(--navy); }
.tab span { color: var(--muted); margin-left: 8px; }
.tab.active { background: var(--navy); color: #fff; }
.tab.active span { color: #C9D0E0; }
.search { flex: 1; max-width: 390px; min-width: 260px; position: relative; }
.search input[type=search] { padding-left: 46px; background: #fff; border-color: #fff; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }

label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], input[type=tel], select, textarea {
  width: 100%; min-height: 48px; border: 1.5px solid #D9DEE9; border-radius: 12px; padding: 10px 16px; font-size: 16px;
  font-family: inherit; color: var(--navy); background: #fff; outline: none;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--link); }
.field { margin-bottom: 18px; }
.row { display: flex; gap: 14px; align-items: flex-end; }
.row > * { flex: 1; }
.row > .none { flex: none; }
.check { display: inline-flex; align-items: center; gap: 10px; background: #EEF1F7; border-radius: 12px; padding: 10px 14px; font-weight: 700; margin: 0 8px 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }

.flash { border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; }
.flash.ok { background: #E6F4EA; color: var(--green); }
.flash.erro { background: #FDE7E5; color: #B3261E; }

.status-line { display: flex; align-items: center; gap: 12px; background: #F4F6FA; border-radius: 14px; padding: 14px 16px; }
.status-line .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex: none; }
.status-line .dot.off { background: #B9C0CF; }
.status-line .dot.err { background: var(--red); }
.status-line .txt { flex: 1; font-size: 15px; }

.toggle { position: relative; display: inline-block; width: 52px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #DDE2EC; border-radius: 999px; transition: .2s; cursor: pointer; }
.toggle span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--link); }
.toggle input:checked + span::before { transform: translateX(22px); }

.sponsor { border: 2px solid var(--link); }
.chart { display: flex; align-items: flex-end; gap: 30px; height: 220px; padding: 10px 10px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.chart .col b { font-size: 14px; margin-bottom: 8px; }
.chart .col i { width: 100%; max-width: 50px; background: var(--navy); border-radius: 8px; min-height: 4px; }
.chart .col:last-child i { background: #F0C541; }
.chart .col small { color: var(--muted); margin-top: 10px; font-size: 13px; }

.list-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .t1 { font-weight: 800; }
.list-row .t2 { color: var(--muted); font-size: 14px; }

.plan-card { position: relative; }
.plan-card.featured { outline: 2px solid var(--navy); }
.plan-card .price { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 8px; }
.plan-card .price small { font-size: 17px; font-weight: 600; color: var(--muted); }
.plan-card.off { opacity: .55; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0 10px; }
.footer img { display: block; height: 28px; margin: 6px auto 0; }
.footer.on-dark { color: #C9D0E0; }

.key-row { display: flex; gap: 12px; }
.key-row input { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: #F7F8FB; }
.seg { display: inline-flex; background: #EEF1F7; border-radius: 14px; padding: 4px; }
.seg label, .seg button { margin: 0; padding: 9px 18px; border-radius: 11px; font-weight: 700; color: var(--muted); cursor: pointer; border: 0; background: none; font: inherit; font-weight: 700; }
.seg input { display: none; }
.seg input:checked + span, .seg .on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(18,33,74,.12); }
.seg label span { display: inline-block; padding: 9px 18px; margin: -9px -18px; border-radius: 11px; }

.callout { background: #FDF3CC; border-radius: 14px; padding: 14px 18px; color: #5A4300; margin: 14px 0; }
.empty { color: var(--muted); text-align: center; padding: 26px 10px; }
details summary { cursor: pointer; font-weight: 700; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; background: var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.login-brand { text-align: center; color: #fff; margin-bottom: 34px; }
.login-brand .logo { font-weight: 800; font-size: 34px; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 12px; }
.login-brand .logo i { width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); }
.login-brand .bar-y { width: 62px; height: 5px; border-radius: 3px; background: var(--yellow); margin: 14px auto 18px; }
.login-brand .sub { letter-spacing: .32em; font-weight: 700; color: #AAB3CC; font-size: 15px; }
.login-card { background: #fff; border-radius: 24px; padding: 36px; width: 100%; max-width: 466px; }
.login-card h1 { font-size: 30px; margin-bottom: 22px; }
.login-card input { min-height: 50px; }

/* ---------- Páginas do app (pagamento, termos...) ---------- */
.app-page { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.app-page.wide { max-width: 760px; }
.app-head { background: var(--navy); color: #fff; padding: 30px 26px 56px; }
.app-head .logo { font-weight: 800; font-size: 21px; display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.app-head .logo i { width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); }
.app-head .plan { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.app-head .plan h1 { font-size: 30px; }
.app-head .price { color: var(--yellow); font-weight: 800; font-size: 30px; text-align: right; line-height: 1; }
.app-head .price small { display: block; color: #C9D0E0; font-size: 14px; font-weight: 600; margin-top: 6px; }
.app-body { background: var(--bg); border-radius: 26px 26px 0 0; margin-top: -28px; padding: 28px 26px 10px; flex: 1; }
.app-body h2 { margin-bottom: 18px; }
.stripe-field { min-height: 52px; border: 1.5px solid #D9DEE9; border-radius: 12px; padding: 15px 16px; background: #fff; }
.stripe-field.StripeElement--focus { border-color: var(--link); }
.stripe-field.StripeElement--invalid { border-color: var(--red); }
.terms-box { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 14px 16px; margin: 6px 0 18px; font-weight: 600; }
.terms-box input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--navy); flex: none; }
.secure { color: var(--muted); font-size: 14px; text-align: center; margin-top: 14px; display: flex; gap: 8px; justify-content: center; align-items: center; }
.btn.big { min-height: 60px; font-size: 18px; border-radius: 16px; }
.success-check { width: 76px; height: 76px; border-radius: 50%; background: #E6F4EA; display: grid; place-items: center; color: var(--green); margin-bottom: 22px; }
.code-card { background: var(--navy); color: #fff; border-radius: 22px; padding: 20px; display: flex; gap: 18px; align-items: center; margin: 26px 0; }
.code-card img { width: 92px; height: 92px; background: #fff; border-radius: 12px; padding: 6px; }
.code-card .lbl { font-size: 12px; letter-spacing: .14em; font-weight: 700; color: #C9D0E0; }
.code-card .code { color: var(--yellow); font-weight: 800; font-size: 32px; letter-spacing: .06em; }
.terms-doc h2 { font-size: 22px; margin: 26px 0 10px; }
.terms-doc h3 { font-size: 18px; margin: 20px 0 8px; }
.terms-doc p, .terms-doc li { color: #34405F; font-size: 16px; line-height: 1.6; }
.draft-banner { background: #FDE7E5; color: #8C1D18; font-weight: 700; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.err-box { background: #FDE7E5; color: #8C1D18; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: none; font-weight: 600; }

@media (max-width: 1100px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex: none; }
  .main { padding: 24px 18px; }
  .g2, .g-2-1 { grid-template-columns: 1fr; }
  h1 { font-size: 30px; }
}
