/* ChurchDAW account and checkout UI. */
:root {
  color-scheme: dark;
  --bg: #090b0f;
  --panel: #171b22;
  --panel-2: #20252e;
  --border: #343a45;
  --text: #f4f6f8;
  --muted: #a9afb8;
  --red: #e91845;
  --red-bright: #ff2a58;
  --green: #55c878;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(101, 0, 26, .38), transparent 36rem),
    linear-gradient(145deg, #0c0b10, var(--bg) 65%);
}
a { color: #ff738f; }
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  width: min(1180px, calc(100% - 3rem));
  margin: auto;
  padding: 3rem 0;
}
.hero h1, .dashboard h1 {
  margin: .35rem 0 1.25rem;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.compact-hero h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.hero-copy { max-width: 36rem; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.eyebrow { color: #ff5879; font-size: .72rem; letter-spacing: .17em; font-weight: 800; }
.brand-mark {
  display: grid; place-items: center;
  width: 7rem; height: 7rem; border-radius: 1.6rem;
  font-size: 3rem; font-weight: 900;
  background: linear-gradient(145deg, #9f0528, #47000f);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 1.2rem 4rem rgba(0,0,0,.45), inset 0 0 2rem rgba(255,60,90,.22);
}
.brand-mark span { font-size: .8rem; letter-spacing: -.18rem; margin-top: -1.6rem; }
.benefits { list-style: none; padding: 0; margin: 2rem 0 0; color: #d8dbe0; }
.benefits li { margin: .8rem 0; }
.benefits li::before { content: "●"; color: var(--green); margin-right: .75rem; }
.card {
  background: rgba(23,27,34,.96);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1.5rem;
  padding: clamp(1.6rem, 4vw, 2.7rem);
  box-shadow: 0 2rem 6rem rgba(0,0,0,.48);
}
.card h2 { margin: 0 0 1.5rem; font-size: 1.8rem; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1.8rem; }
.price-row h2 { margin: .15rem 0; }
.price-row strong { font-size: 1.7rem; white-space: nowrap; }
label { display: grid; gap: .5rem; margin: 1rem 0; color: #d7dbe1; font-size: .82rem; font-weight: 700; }
input, select, textarea {
  width: 100%; min-height: 3rem; padding: .8rem .9rem;
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: .65rem;
  font: inherit; outline: none;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(233,24,69,.16); }
.plan-picker { display: grid; gap: .75rem; margin: 0 0 1.25rem; padding: 0; border: 0; }
.plan-picker legend { margin-bottom: .7rem; color: #d7dbe1; font-size: .82rem; font-weight: 800; }
.plan-option {
  position: relative; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: .85rem; margin: 0; padding: 1rem; overflow: hidden;
  background: linear-gradient(145deg, rgba(32,37,46,.96), rgba(21,24,30,.96));
  border: 1px solid var(--border); border-radius: .9rem; cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.plan-option:hover { transform: translateY(-1px); border-color: #626a77; }
.plan-option:has(input:checked) { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(233,24,69,.12); }
.plan-option input { width: 1.15rem; min-height: 1.15rem; margin: 0; accent-color: var(--red-bright); }
.plan-option span { display: grid; gap: .2rem; min-width: 0; }
.plan-option b { color: #fff; font-size: .96rem; }
.plan-option small { color: var(--muted); }
.plan-option > strong { color: #fff; font-size: 1.05rem; white-space: nowrap; }
.plan-option.is-featured::after {
  content: "MAIS COMPLETO"; position: absolute; top: 0; right: 0;
  padding: .25rem .55rem; color: #fff; background: #b90d34;
  border-radius: 0 0 0 .55rem; font-size: .56rem; font-weight: 900; letter-spacing: .08em;
}
.pix-payment { display: grid; gap: 1rem; }
.pix-payment[hidden] { display: none; }
.pix-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pix-heading h2 { margin: .15rem 0 0; }
.pix-live { padding: .45rem .7rem; color: #ffe8ad; background: #34270d; border: 1px solid #766022; border-radius: 999px; font-size: .7rem; font-weight: 850; letter-spacing: .06em; }
.pix-live.is-paid { color: #d7ffe2; background: #14351f; border-color: #347b4d; }
#pix-qr { width: min(280px, 86%); aspect-ratio: 1; object-fit: contain; justify-self: center; padding: .65rem; background: #fff; border-radius: 1rem; box-shadow: 0 1.1rem 3rem rgba(0,0,0,.35); }
.pix-actions { display: grid; grid-template-columns: 1fr auto; gap: .75rem; }
.pix-actions .link-button { display: grid; place-items: center; text-decoration: none; white-space: nowrap; }
.check { grid-template-columns: auto 1fr; align-items: start; font-weight: 500; line-height: 1.45; }
.check input { width: 1.15rem; min-height: 1.15rem; accent-color: var(--red); }
button, .link-button {
  border: 0; border-radius: .7rem; min-height: 3rem;
  padding: .75rem 1.15rem; font: inherit; font-weight: 750; cursor: pointer;
}
button:disabled { opacity: .58; cursor: wait; }
.primary {
  display: inline-grid; place-items: center; width: 100%;
  color: white; text-decoration: none;
  background: linear-gradient(135deg, var(--red-bright), #c70e39);
  box-shadow: 0 .7rem 2rem rgba(233,24,69,.2);
}
.ghost { color: var(--muted); background: transparent; border: 1px solid var(--border); }
.danger { color: #ffd8df; background: #48111e; border: 1px solid #8e2a42; }
.hint, .signin-link, .secure-note, small { color: var(--muted); font-size: .82rem; line-height: 1.5; }
.signin-link { text-align: center; margin: 1.4rem 0 0; }
.secure-note { margin-top: 1.4rem; padding: 1rem; border-radius: .8rem; background: rgba(255,255,255,.035); }
.status { min-height: 1.3rem; color: #ff829a; font-size: .86rem; }
.dashboard { width: min(900px, calc(100% - 3rem)); margin: auto; padding: 4rem 0; }
.dashboard header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.dashboard h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin-bottom: 0; }
.identity { display: flex; justify-content: space-between; align-items: start; gap: 2rem; }
.identity div, .device-card div { display: grid; gap: .35rem; }
.identity span, .device-card span { color: var(--muted); font-size: .7rem; letter-spacing: .12em; font-weight: 800; }
.identity strong, .device-card strong { font-size: 1.25rem; }
.pill { padding: .45rem .7rem; color: var(--green)!important; border: 1px solid rgba(85,200,120,.35); border-radius: 999px; }
.device-card { display: flex; gap: 1rem; align-items: center; margin: 2rem 0 1rem; padding: 1.2rem; border-radius: 1rem; background: var(--panel-2); }
.device-icon { display: grid!important; place-items: center; width: 3rem; height: 3rem; border-radius: .75rem; background: #340a15; color: #ff5577; font-size: 1.5rem; }
.license-plan { margin-top: 1.25rem; padding: .8rem 1rem; border: 1px solid rgba(85,200,120,.28); border-radius: .8rem; color: #bfffd1; background: rgba(32,79,46,.16); font-size: .82rem; font-weight: 750; }
.account-device-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.2rem 0; }
.account-device { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-content: start; margin: 0; }
.account-device.is-empty { opacity: .68; border: 1px dashed var(--border); }
.account-device-action { grid-column: 1 / -1; width: 100%; margin-top: .8rem; min-height: 2.5rem; }
.message-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.message-page .card { width: min(560px, 100%); text-align: center; }
.message-page h1 { font-size: 2.25rem; margin-top: 0; }
.message-page p { color: var(--muted); line-height: 1.6; margin-bottom: 2rem; }
.success-page { padding: clamp(1rem, 4vw, 3rem); }
.message-page .success-card { width: min(960px, 100%); padding: clamp(1.4rem, 4vw, 3rem); text-align: left; }
.success-card p { margin: 0; }
.success-header { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.success-header h1 { margin: .25rem 0 .65rem; font-size: clamp(2.25rem, 6vw, 4rem); letter-spacing: -.045em; }
.success-lead { max-width: 42rem; font-size: 1.08rem; }
.success-check {
  display: grid; place-items: center; width: 4.25rem; height: 4.25rem;
  color: #e7ffed; background: linear-gradient(145deg, #2b9b52, #176c35);
  border: 1px solid rgba(143,255,177,.45); border-radius: 1.25rem;
  box-shadow: 0 1rem 2.8rem rgba(29,139,67,.24); font-size: 2rem; font-weight: 900;
}
.success-guide { margin: 2rem 0; padding: 1.4rem; border: 1px solid var(--border); border-radius: 1.15rem; background: rgba(255,255,255,.025); }
.success-guide h2, .success-downloads h2 { margin: 0; font-size: 1.35rem; }
.success-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin: 1.2rem 0; padding: 0; list-style: none; }
.success-steps li { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: center; }
.success-steps li > span { display: grid; place-items: center; width: 2rem; height: 2rem; color: #fff; background: #3a101b; border: 1px solid #78253a; border-radius: 999px; font-weight: 850; }
.success-steps li > p { color: #d7dbe1; font-size: .88rem; line-height: 1.45; }
.success-steps strong { color: #fff; }
.credentials-note { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: center; padding: 1rem; color: #dfffe8; background: rgba(43,155,82,.1); border: 1px solid rgba(85,200,120,.32); border-radius: .9rem; }
.credentials-note p { color: #bce9c9; font-size: .9rem; }
.credentials-note strong { color: #effff3; }
.credentials-icon { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; color: #dfffe8; background: #1b5d32; border-radius: .7rem; font-weight: 900; }
.download-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.download-heading .eyebrow { margin-bottom: .35rem; }
.download-heading > small { white-space: nowrap; }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.download-card {
  min-width: 0; min-height: 5.2rem; display: grid; grid-template-columns: auto 1fr auto;
  gap: .8rem; align-items: center; padding: 1rem; color: #fff; text-decoration: none;
  background: linear-gradient(145deg, #252b35, #191d24); border: 1px solid #3b4350;
  border-radius: 1rem; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.download-card:hover { transform: translateY(-2px); border-color: #ff456c; box-shadow: 0 .8rem 2.2rem rgba(0,0,0,.3); }
.download-card:focus-visible { outline: 3px solid rgba(255,42,88,.35); outline-offset: 3px; }
.download-platform { display: grid; place-items: center; width: 3rem; height: 3rem; color: #fff; background: linear-gradient(145deg, #9f0528, #570015); border-radius: .8rem; font-size: .66rem; font-weight: 900; letter-spacing: .07em; }
.download-copy { min-width: 0; display: grid; gap: .2rem; }
.download-copy strong { font-size: .98rem; }
.download-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-arrow { color: #ff6684; font-size: 1.35rem; font-weight: 900; }
.success-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }
.success-footer p { font-size: .86rem; }
.success-account-link { display: inline-grid; place-items: center; min-width: 12rem; text-decoration: none; white-space: nowrap; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; width: min(620px, calc(100% - 2rem)); padding: 2rem 0; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4.5rem); }
  .brand-mark { width: 5.2rem; height: 5.2rem; }
  .account-device-grid { grid-template-columns: 1fr; }
  .plan-option { grid-template-columns: auto minmax(0, 1fr); padding-top: 1.2rem; }
  .plan-option > strong { grid-column: 2; }
  .pix-actions { grid-template-columns: 1fr; }
  .success-steps, .download-grid { grid-template-columns: 1fr; }
  .success-steps { gap: .7rem; }
  .success-footer { align-items: stretch; flex-direction: column; }
  .success-account-link { width: 100%; }
}
@media (max-width: 520px) {
  .success-header { grid-template-columns: 1fr; }
  .success-check { width: 3.6rem; height: 3.6rem; border-radius: 1rem; }
  .success-guide { padding: 1rem; }
  .download-heading { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto!important; } }

.admin-body { min-height: 100vh; color: #f5f6f8; background: #0e0f13; }
.admin-login {
  min-height: 100vh; width: min(1120px, calc(100% - 2rem)); margin: auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center;
}
.admin-login-brand, .admin-login-card, .admin-panel, .admin-metric {
  border: 1px solid #2c323c; background: #181c22; box-shadow: 0 1.2rem 4rem rgba(0,0,0,.28);
}
.admin-login-brand {
  min-height: 560px; padding: clamp(2rem, 6vw, 5rem); display: grid;
  align-content: center; border-radius: 1.5rem;
  background: radial-gradient(circle at 15% 20%, rgba(234,23,71,.16), transparent 36%), #160d13;
}
.admin-login-brand h1 { max-width: 10ch; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .94; margin: 1rem 0; }
.admin-login-brand p, .admin-muted { color: #a9afb8; line-height: 1.6; }
.admin-login-card { padding: clamp(1.5rem, 4vw, 3rem); border-radius: 1.5rem; }
.admin-login-card h2, .admin-panel h2 { margin: .5rem 0; font-size: clamp(1.8rem, 4vw, 2.7rem); }
.admin-mark { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: 1rem; background: #ea1747; font-size: 2rem; }
.admin-kicker { color: #ff5b7d; font-size: .72rem; font-weight: 850; letter-spacing: .18em; }
.admin-security { color: #7e8590; text-align: center; font-size: .78rem; margin: 1rem 0 0; }
.admin-shell { width: min(1480px, calc(100% - 2rem)); margin: auto; padding: 2rem 0 4rem; }
.admin-topbar, .admin-section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-topbar { padding: 1rem 0 2rem; }
.admin-topbar h1 { margin: .25rem 0 0; font-size: clamp(2rem, 5vw, 4rem); }
.admin-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1rem; }
.admin-metric { padding: 1.25rem; border-radius: 1rem; display: grid; gap: .45rem; }
.admin-metric span { color: #a9afb8; font-size: .78rem; }
.admin-metric strong { font-size: 2rem; }
.admin-panel { border-radius: 1.25rem; padding: clamp(1rem, 3vw, 2rem); margin: 1rem 0; }
.admin-issue { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; align-items: end; }
.admin-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.admin-form-grid small, .admin-form-grid button { grid-column: 1 / -1; }
.admin-form-grid .admin-plan-choice { grid-column: 1 / -1; }
.admin-form-grid button { min-width: 12rem; justify-self: end; }
.admin-alert { display: grid; gap: .4rem; margin: 1rem 0; padding: 1rem 1.15rem; border-radius: 1rem; }
.admin-alert-success { color: #dbffe6; background: #10271a; border: 1px solid #2f7548; }
.admin-alert-error { color: #ffe4ea; background: #35121b; border: 1px solid #873047; }
.admin-code { display: block; width: fit-content; padding: .6rem .8rem; color: #fff; background: #090a0d; border: 1px solid #39414d; border-radius: .6rem; font-size: 1.05rem; user-select: all; }
.admin-table-wrap { overflow-x: auto; margin-top: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 1180px; }
.admin-table th { color: #7e8590; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; text-align: left; }
.admin-table th, .admin-table td { padding: 1rem; border-bottom: 1px solid #2c323c; vertical-align: top; }
.admin-table td > strong, .admin-table td > small { display: block; margin-bottom: .3rem; }
.admin-table small { color: #929aa6; line-height: 1.45; }
.admin-status { display: inline-flex; padding: .35rem .55rem; margin-bottom: .5rem; border-radius: 999px; font-size: .68rem; font-weight: 850; letter-spacing: .08em; }
.admin-status-active { color: #bfffd1; background: #163421; border: 1px solid #347b4d; }
.admin-status-revoked { color: #ffc6d2; background: #3b1420; border: 1px solid #813047; }
.admin-status-blocked { color: #ffe1a8; background: #36280f; border: 1px solid #806126; }
.admin-plan-badge { display: block; width: fit-content; margin: .1rem 0 .5rem; color: #b8c5d6; font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.admin-device-grid { display: grid; grid-template-columns: repeat(3, minmax(10.5rem, 1fr)); gap: .55rem; min-width: 35rem; }
.admin-device-slot { min-height: 8.6rem; display: grid; align-content: start; gap: .28rem; padding: .8rem; border-radius: .8rem; border: 1px solid #343c48; background: linear-gradient(145deg, #1e232b, #15191f); }
.admin-device-slot > span { color: #8d97a6; font-size: .65rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.admin-device-slot > strong { font-size: .85rem; line-height: 1.3; }
.admin-device-slot.is-active { border-color: rgba(72,188,112,.42); box-shadow: inset 0 1px rgba(255,255,255,.035); }
.admin-device-slot.is-active > span { color: #83e4a5; }
.admin-device-slot.is-empty { border-style: dashed; opacity: .72; }
.admin-device-slot form { margin-top: auto; }
.admin-slot-action { min-height: 2rem; width: 100%; padding: .35rem .55rem; border-radius: .55rem; color: #fff0c7; background: #33270e; border: 1px solid #745a1f; font-size: .68rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.admin-actions form { margin: 0; }
.admin-button { min-height: 2.65rem; padding: .55rem .75rem; border-radius: .65rem; font-size: .78rem; }
.admin-button-ghost { color: #e8ebef; background: #22272f; border: 1px solid #39414d; }
.admin-button-warn { color: #fff0c7; background: #33270e; border: 1px solid #745a1f; }
.admin-button-danger { color: #ffe3e9; background: #42131f; border: 1px solid #8e2a42; }
.admin-button-success { color: #d7ffe2; background: #14351f; border: 1px solid #347b4d; }
.admin-button-primary { color: #fff; background: #d91443; border: 1px solid #ff4c74; }
.admin-toolbar { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(10rem, .25fr) auto; align-items: end; gap: .75rem; margin: 1.25rem 0 .5rem; }
.admin-toolbar label { display: grid; gap: .35rem; color: #a9afb8; font-size: .76rem; }
.admin-toolbar input, .admin-toolbar select, .admin-mini-form input, .admin-mini-form select { width: 100%; min-height: 2.7rem; color: #f5f6f8; background: #12151a; border: 1px solid #39414d; border-radius: .65rem; padding: .55rem .7rem; }
.admin-toolbar strong { min-width: 6rem; min-height: 2.7rem; display: grid; place-items: center; color: #a9afb8; font-size: .75rem; }
.admin-password-action { width: 100%; }
.admin-password-action > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.admin-password-action > summary::-webkit-details-marker { display: none; }
.admin-mini-form { width: min(21rem, 78vw); display: grid; gap: .65rem; margin-top: .45rem; padding: .9rem; background: #171b21; border: 1px solid #414955; border-radius: .85rem; box-shadow: 0 1rem 3rem rgba(0,0,0,.35); }
.admin-mini-form label { display: grid; gap: .3rem; color: #a9afb8; font-size: .72rem; }
.admin-audit-table { min-width: 760px; }
.admin-id { color: #b9c0ca; font-size: .72rem; }
.admin-table tr[hidden] { display: none; }
.admin-footer, .admin-empty { color: #7e8590; text-align: center; padding: 2rem; font-size: .78rem; }
@media (max-width: 980px) {
  .admin-login, .admin-issue { grid-template-columns: 1fr; }
  .admin-login-brand { min-height: 260px; }
  .admin-login-brand h1 { font-size: clamp(2.6rem, 12vw, 5rem); }
  .admin-metrics { grid-template-columns: repeat(3, 1fr); }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-form-grid button { width: 100%; }
  .admin-toolbar { grid-template-columns: 1fr 1fr; }
  .admin-toolbar strong { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .admin-shell, .admin-login { width: min(100% - 1rem, 100%); }
  .admin-topbar { align-items: flex-end; }
  .admin-metrics { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .admin-toolbar { grid-template-columns: 1fr; }
  .admin-toolbar strong { grid-column: auto; }
}
