:root{
  --bg-1:#f5f2ec;
  --bg-2:#fff8df;
  --card:#fdfdfd;
  --ink:#8a3f12;
  --ink-soft:#a5521e;
  --text:#4c566a;
  --text-soft:#8a8f98;
  --gold:#efcc54;
  --gold-soft:#f6ecd0;
  --gold-soft-2:#f7f1df;
  --accent:#a65415;
  --accent-2:#dc7a03;
  --button-disabled:#d2a992;
  --line:#efd67a;
  --shadow:0 22px 65px rgba(94,61,18,.12);
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at left center, rgba(223,187,145,.35), transparent 28%),
    radial-gradient(circle at right center, rgba(242,209,95,.22), transparent 23%),
    linear-gradient(90deg,var(--bg-1) 0%, #f7f6f1 45%, var(--bg-2) 100%);
}
button,input{font:inherit}
a{color:inherit}

.page-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px 16px;
}

.access-card{
  width:min(100%,390px);
  background:var(--card);
  border:1.6px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.top-line{
  height:7px;
  background:linear-gradient(90deg,var(--ink) 0%, var(--accent-2) 100%);
}
.card-inner{
  padding:18px 24px 22px;
}
.secure-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  border:1.5px solid var(--line);
  background:var(--gold-soft-2);
  color:var(--accent);
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  margin-bottom:18px;
}
.badge-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#39c365;
  box-shadow:0 0 0 4px rgba(57,195,101,.16);
}

.hero h1{
  margin:0;
  color:var(--ink);
  font-size:24px;
  line-height:1.12;
  letter-spacing:-.04em;
  font-weight:800;
}
.hero p{
  margin:10px 0 0;
  color:var(--ink-soft);
  font-size:11px;
  line-height:1.55;
}
.hero-loading{margin-bottom:18px}
.hero-form{margin-bottom:22px}
.hidden{display:none}

.status-cards{
  display:grid;
  gap:14px;
}
.status-card{
  min-height:72px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 16px;
  border:2px solid var(--line);
  border-radius:12px;
  background:var(--gold-soft-2);
}
.status-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-size:10px;
  font-weight:700;
}
.icon-check{
  background:var(--accent);
  color:#fff;
}
.icon-refresh{
  background:#fff3cd;
  color:var(--accent);
  border:2px solid #f0d98a;
  animation:spinPulse 1.2s linear infinite;
}
@keyframes spinPulse{
  0%{transform:rotate(0deg)}
  100%{transform:rotate(360deg)}
}
.status-text{
  color:var(--ink);
  font-size:15px;
  line-height:1.25;
  font-weight:700;
}

.progress-wrap{
  margin-top:20px;
  border:2px solid var(--line);
  border-radius:12px;
  background:var(--gold-soft-2);
  padding:16px 18px 14px;
}
.progress-track{
  height:10px;
  background:#f4e7ad;
  border-radius:999px;
  overflow:hidden;
}
.progress-bar{
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#db7a02 0%, #8a3f12 100%);
  transition:width .18s linear;
}
.progress-value{
  margin-top:10px;
  text-align:right;
  color:var(--accent);
  font-size:10px;
  font-weight:800;
}

label{
  display:block;
  margin:0 0 8px;
  color:var(--ink);
  font-size:11px;
  font-weight:700;
}
input[type="text"]{
  width:100%;
  height:58px;
  border:1px solid #cb8a5d;
  border-radius:16px;
  background:#fff;
  padding:0 12px;
  color:#4b4b55;
  font-size:11px;
  outline:none;
  box-shadow:0 0 0 3px rgba(166,84,21,.18);
}
input[type="text"]::placeholder{color:#a5a7b1}
input[type="text"].invalid{
  border-color:#d92d20;
  box-shadow:0 0 0 3px rgba(217,45,32,.10);
}
.field-error,.security-error{
  display:none;
  margin:7px 3px 0;
  font-size:10px;
  color:#c52828;
  line-height:1.45;
}
.field-error.show,.security-error.show{display:block}

.turnstile-placeholder{
  margin:22px auto 0;
  max-width:346px;
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px 14px 12px;
  border:1px solid #d7d7d7;
  border-radius:3px;
  background:#f7f7f7;
  cursor:pointer;
  user-select:none;
}
.turnstile-left{
  display:flex;
  align-items:center;
  gap:12px;
}
.turnstile-check{
  width:26px;
  height:26px;
  border:2px solid #666;
  border-radius:3px;
  background:#fff;
  display:grid;
  place-items:center;
  outline:none;
  flex:0 0 auto;
}
.turnstile-check.checked{
  background:#fff;
  border-color:#3f8fdf;
}
.turnstile-check.checked span{
  width:12px;
  height:7px;
  border-left:2px solid #2f67b0;
  border-bottom:2px solid #2f67b0;
  transform:rotate(-45deg) translate(1px,-1px);
}
.turnstile-main-text{
  color:#222;
  font-size:10px;
  line-height:1.3;
}
.turnstile-brand{
  text-align:right;
  color:#555;
  line-height:1.15;
}
.cloud-logo{
  width:34px;
  height:16px;
  margin-left:auto;
  margin-bottom:2px;
  background:linear-gradient(180deg,#ff9b2b 0%, #eb7d08 100%);
  border-radius:12px 12px 7px 7px;
  position:relative;
}
.cloud-logo:before,
.cloud-logo:after{
  content:"";
  position:absolute;
  bottom:4px;
  background:inherit;
  border-radius:50%;
}
.cloud-logo:before{width:13px;height:13px;left:2px}
.cloud-logo:after{width:17px;height:17px;left:10px;bottom:2px}
.brand-name{
  font-size:9px;
  letter-spacing:.12em;
  font-weight:800;
  color:#1d1d1d;
}
.brand-links{
  font-size:8px;
}

.continue-btn{
  width:100%;
  height:52px;
  margin-top:18px;
  border:0;
  border-radius:14px;
  background:#a65318;
  box-shadow:0 7px 18px rgba(166,83,24,.22);
  color:#fff;
  font-size:10px;
  font-weight:500;
  cursor:pointer;
  transition:.2s;
}
.continue-btn:not(:disabled):hover{background:#8d4112;filter:brightness(1.02);transform:translateY(-1px)}
.security-note{
  margin-top:12px;
  text-align:center;
  color:var(--accent);
  font-size:9px;
}

.privacy-note{
  margin:20px 0 0;
  padding:12px 14px;
  border-radius:12px;
  background:#f8f1dd;
  color:var(--ink-soft);
  font-size:11px;
  line-height:1.55;
}
.privacy-note strong{color:var(--ink)}

.company-footer{
  margin-top:20px;
  text-align:center;
}
.company-divider{
  height:1.5px;
  margin-bottom:18px;
  background:var(--line);
}
.company-name{
  color:var(--ink);
  font-size:10px;
  font-weight:800;
}
.company-cnpj,
.company-footer address{
  margin-top:8px;
  color:var(--ink-soft);
  font-size:10px;
  line-height:1.5;
}
.company-footer address{font-style:normal}
.footer-links{
  margin-top:10px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.footer-links a{
  color:var(--ink-soft);
  text-decoration:none;
  font-size:10px;
}
.footer-links a:hover{text-decoration:underline}

.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translate(-50%,16px);
  background:#2a2a2a;
  color:#fff;
  padding:11px 16px;
  border-radius:10px;
  font-size:10px;
  opacity:0;
  pointer-events:none;
  transition:.2s;
  z-index:1100;
}
.toast.show{
  opacity:1;
  transform:translate(-50%,0);
}

.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(23,30,36,.52);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .22s ease, visibility .22s ease;
  z-index:1000;
}
.modal-overlay.open{opacity:1;visibility:visible;pointer-events:auto}
.legal-modal{
  width:min(920px,100%);
  max-height:min(84vh,760px);
  overflow:hidden;
  background:#fff;
  border:1.5px solid #e9c84e;
  border-radius:36px;
  box-shadow:0 30px 80px rgba(0,0,0,.24);
}
.legal-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:34px 40px;
  border-bottom:1px solid #ebcc5a;
}
.legal-modal-header h2{
  margin:0;
  font-size:31px;
  line-height:1.2;
  color:#823a14;
  letter-spacing:-.02em;
}
.modal-close{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:17px;
  background:#fff0bf;
  color:#8a3b13;
  font-size:42px;
  font-weight:300;
  line-height:1;
  cursor:pointer;
}
.legal-modal-body{
  padding:35px 40px 38px;
  overflow:auto;
  max-height:calc(84vh - 134px);
  color:#39465b;
}
.legal-modal-body h3{
  margin:0 0 14px;
  color:#823a15;
  font-size:27px;
  line-height:1.25;
}
.legal-modal-body h3:not(:first-child){margin-top:34px}
.legal-modal-body p{
  margin:0;
  font-size:22px;
  line-height:1.62;
}
.modal-open{overflow:hidden}

/* Compact desktop sizing to match the reference screenshot */
@media(min-width:641px){
  .page-shell{padding:26px 16px}
  .access-card{width:min(100%,390px)}
  .card-inner{padding:18px 24px 22px}
  .hero h1{font-size:24px}
  .hero p{font-size:13px}
  .status-card{min-height:72px;padding:12px 16px;border-radius:18px}
  .status-icon{width:42px;height:42px;border-radius:12px;font-size:20px}
  .status-text{font-size:15px}
  .progress-wrap{margin-top:20px;padding:16px 18px 14px;border-radius:18px}
  .progress-track{height:10px}
  .progress-value{font-size:14px;margin-top:8px}
}

@media(max-width:640px){
  .page-shell{padding:18px 10px}
  .access-card{width:100%;border-radius:24px}
  .card-inner{padding:16px 16px 20px}
  .secure-badge{min-height:38px;padding:0 14px;margin-bottom:18px;font-size:10px}
  .badge-dot{width:12px;height:12px}
  .hero h1{font-size:24px}
  .hero p{font-size:14px;margin-top:10px}
  .status-cards{gap:14px}
  .status-card{min-height:84px;padding:14px 16px;gap:16px;border-radius:22px}
  .status-icon{width:46px;height:46px;border-radius:14px;font-size:23px}
  .status-text{font-size:16px}
  .progress-wrap{margin-top:24px;padding:18px 18px 16px;border-radius:20px}
  .progress-track{height:12px}
  .progress-value{font-size:16px;margin-top:10px}
  input[type="text"]{height:54px;border-radius:14px;font-size:14px}
  .turnstile-placeholder{max-width:100%;padding:12px 10px;gap:10px}
  .turnstile-main-text{font-size:12px}
  .brand-name{font-size:8px}
  .brand-links{font-size:7px}
  .privacy-note{font-size:12px;padding:14px 15px;border-radius:16px}
  .company-name{font-size:13px}
  .company-cnpj,.company-footer address,.footer-links a{font-size:11px}
  .modal-overlay{padding:14px}
  .legal-modal{border-radius:24px;max-height:88vh}
  .legal-modal-header{padding:24px 22px}
  .legal-modal-header h2{font-size:25px}
  .modal-close{width:50px;height:50px;border-radius:14px;font-size:34px}
  .legal-modal-body{padding:24px 22px 30px;max-height:calc(88vh - 99px)}
  .legal-modal-body h3{font-size:21px}
  .legal-modal-body p{font-size:17px;line-height:1.58}
}

.turnstile-real-wrap{
  margin:22px auto 0;
  max-width:346px;
  display:flex;
  justify-content:center;
  min-height:65px;
}
.continue-btn:disabled{
  cursor:not-allowed;
  background:var(--button-disabled);
  box-shadow:none;
  opacity:.72;
}
.continue-btn.ready{
  background:#a65318;
  opacity:1;
  box-shadow:0 7px 18px rgba(166,83,24,.25);
}

/* Final compact proportions requested */
@media(min-width:641px){
  .access-card{width:390px;border-radius:24px}
  .card-inner{padding:18px 24px 22px}
  .secure-badge{min-height:30px;padding:0 11px;font-size:9px;margin-bottom:16px}
  .badge-dot{width:9px;height:9px;box-shadow:0 0 0 3px rgba(57,195,101,.16)}

  .hero-loading{margin-bottom:16px}
  .hero-loading h1{font-size:22px}
  .hero-loading p{font-size:12px;margin-top:8px}
  .status-cards{gap:10px}
  .status-card{min-height:58px;padding:9px 13px;gap:12px;border-radius:15px;border-width:1.5px}
  .status-icon{width:34px;height:34px;border-radius:10px;font-size:17px}
  .status-text{font-size:13px}
  .progress-wrap{margin-top:14px;padding:12px 14px 10px;border-radius:15px;border-width:1.5px}
  .progress-track{height:8px}
  .progress-value{margin-top:6px;font-size:12px}

  .hero-form{margin-bottom:18px}
  .hero-form h1{font-size:23px}
  .hero-form p{font-size:12px;margin-top:8px}
  label{font-size:11px;margin-bottom:6px}
  input[type="text"]{height:46px;border-radius:12px;padding:0 14px;font-size:13px}
  .turnstile-real-wrap{margin-top:16px;min-height:65px;max-width:320px}
  .continue-btn{height:44px;margin-top:14px;border-radius:11px;font-size:12px}
  .security-note{margin-top:9px;font-size:10px}

  .privacy-note{margin-top:18px;padding:11px 13px;border-radius:14px;font-size:10px;line-height:1.5}
  .company-footer{margin-top:18px}
  .company-divider{margin-bottom:16px}
  .company-name{font-size:11px}
  .company-cnpj,.company-footer address{font-size:9.5px;margin-top:5px}
  .footer-links{margin-top:10px;gap:14px}
  .footer-links a{font-size:9.5px}
}
