/* ============================================================
   DapuraPROXY - UI profissional (login + painel)
   ============================================================ */

:root {
  --bg: #04060c;
  --bg-2: #070b14;
  --card: rgba(12, 18, 31, .82);
  --card-2: #0b111d;
  --line: rgba(125, 165, 255, .14);
  --line-2: rgba(125, 165, 255, .30);
  --text: #eef4ff;
  --muted: #95a8cc;
  --dim: #60749a;
  --blue: #2f6bff;
  --cyan: #00d4ff;
  --green: #2ee6a8;
  --amber: #ffc857;
  --red: #ff5c78;
  --grad: linear-gradient(135deg, #2f6bff 0%, #00a8ff 55%, #00d4ff 100%);
  --grad-soft: linear-gradient(135deg, rgba(47, 107, 255, .22), rgba(0, 212, 255, .05));
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .35);
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --f-display: "Bungee", "Noto Sans Thai", "Cairo", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", "Noto Sans Thai", "Cairo", ui-monospace, monospace;
  --f-body: "Rubik", "Noto Sans Thai", "Cairo", system-ui, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html,
body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(47, 107, 255, .30), transparent 62%),
    radial-gradient(700px 480px at 105% 105%, rgba(0, 212, 255, .10), transparent 60%),
    linear-gradient(rgba(125, 165, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 165, 255, .03) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

a { color: #8fb6ff; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
  padding: 4px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(47, 107, 255, .18), rgba(0, 212, 255, .06));
  border: 1px solid rgba(125, 165, 255, .28);
  box-shadow: 0 8px 24px rgba(47, 107, 255, .22);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-family: var(--f-display);
  font-size: 16px;
  letter-spacing: .03em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-sub {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 3px;
}

.badge-pro {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  margin-left: 7px;
  border-radius: 6px;
  background: rgba(0, 212, 255, .12);
  border: 1px solid rgba(0, 212, 255, .35);
  color: #8ee9ff;
  font-family: var(--f-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .16em;
  vertical-align: middle;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 30, 50, .72), rgba(9, 14, 24, .86));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 30%);
}

/* ---------- Text ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7f9bd0;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: var(--r-md);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  padding: 14px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, filter .2s, background .2s;
  user-select: none;
}

.btn:active { transform: translateY(1px) scale(.995); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 34px rgba(47, 107, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .25);
}

.btn-primary:hover { filter: brightness(1.07); }

.btn-primary[disabled],
.btn-primary[aria-disabled="true"] {
  filter: grayscale(.5) brightness(.8);
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.btn-block { width: 100%; }

.btn-ghost {
  background: rgba(125, 165, 255, .08);
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover { background: rgba(125, 165, 255, .14); }

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: rgba(125, 165, 255, .07);
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.btn-icon:hover { background: rgba(125, 165, 255, .14); color: #fff; }

.spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
  display: none;
}

.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-text { opacity: .8; }

/* ---------- Login ---------- */
.auth {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 432px);
  margin: 0 auto;
  padding: 44px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth .brand { justify-content: center; margin-bottom: 2px; }

.auth-card { padding: 26px 22px 22px; }

.auth-title {
  font-family: var(--f-display);
  font-size: clamp(21px, 6vw, 27px);
  line-height: 1.14;
  letter-spacing: .01em;
  margin: 12px 0 8px;
}

.auth-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.field-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 8px;
}

.key-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: rgba(4, 8, 16, .72);
  transition: border-color .2s, box-shadow .2s;
}

.key-field:focus-within {
  border-color: rgba(0, 212, 255, .55);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, .10);
}

.key-field > svg { flex: none; color: #6f8ec4; }

#key-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 0;
}

#key-input::placeholder { color: #41547a; font-weight: 500; }

.btn-paste {
  flex: none;
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  background: rgba(125, 165, 255, .10);
  color: #a8c4f5;
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}

.btn-paste:hover { background: rgba(125, 165, 255, .18); }

.form-error {
  min-height: 18px;
  margin: 10px 0 0;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--red);
  opacity: 0;
  transition: opacity .2s;
}

.form-error.show { opacity: 1; }

.auth .btn-primary { margin-top: 4px; }

.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
}

.trust-item svg { color: #6f9bff; }

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--dim);
  text-align: center;
}

.auth-links a {
  color: #9fc2ff;
  text-decoration: none;
  border-bottom: 1px dotted rgba(159, 194, 255, .5);
  padding-bottom: 1px;
}

.auth-links .buy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #bcd4ff;
}

.free-gen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: rgba(46, 230, 168, .08);
  border: 1px solid rgba(46, 230, 168, .30);
  color: #8df7ca !important;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(46, 230, 168, .30) !important;
  transition: background .2s, border-color .2s;
}

.free-gen:hover {
  background: rgba(46, 230, 168, .14);
  border-color: rgba(46, 230, 168, .5) !important;
}

.only-nonproxy { /* controlado por JS */ }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 6px 4px 0;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--dim);
  text-align: center;
}

.site-footer a {
  color: #8fb6ff;
  text-decoration: none;
  border-bottom: 1px dotted rgba(143, 182, 255, .5);
}

/* ---------- Panel ---------- */
.panel {
  position: relative;
  z-index: 1;
  width: min(100% - 28px, 600px);
  margin: 0 auto;
  padding: 26px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 4px;
}

.top-actions { display: flex; align-items: center; gap: 10px; }

.online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8df7ca;
}

.online.off { color: var(--red); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(46, 230, 168, .8);
  animation: pulse 2.4s infinite;
}

.online.off .dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 92, 120, .7);
  animation: none;
}

/* Account */
.account {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.account-key {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  min-width: 0;
}

.account-key code {
  font-family: var(--f-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .05em;
  color: #fff;
  word-break: break-all;
}

.copy-btn {
  flex: none;
  border: 1px solid var(--line);
  background: rgba(125, 165, 255, .08);
  color: #a8c4f5;
  border-radius: 9px;
  padding: 7px 9px;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.copy-btn:hover { background: rgba(125, 165, 255, .16); color: #fff; }
.copy-btn.copied { color: #7df5c7; border-color: rgba(46, 230, 168, .4); }

.account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  color: var(--dim);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .05em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(125, 165, 255, .06);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.timer-box {
  text-align: right;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.timer-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
}

.timer {
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #cfe2ff;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.timer.expired { color: var(--red); }

/* Hero */
.hero {
  padding: 22px;
  background: linear-gradient(135deg, rgba(47, 107, 255, .22), rgba(0, 212, 255, .05));
  border-color: rgba(47, 107, 255, .38);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, .30), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.14;
  margin: 10px 0 8px;
}

.hero p {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 13px;
  max-width: 46ch;
}

.hero .btn { position: relative; z-index: 1; }

.sync-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .07em;
  color: var(--dim);
}

.sync-state .dot {
  width: 6px;
  height: 6px;
  background: #6f8ec4;
  box-shadow: none;
  animation: none;
}

.sync-state.ok { color: #8df7ca; }
.sync-state.ok .dot { background: var(--green); animation: pulse 2.4s infinite; }
.sync-state.err { color: var(--amber); }
.sync-state.err .dot { background: var(--amber); }

.renew-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #ffd08a;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 208, 138, .45);
  padding-bottom: 1px;
}

.renew-link[hidden] { display: none; }

/* Features */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 2px 0;
}

.section-head h2 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9db4dd;
  margin: 0;
  font-weight: 700;
}

.counter {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #7df5c7;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(46, 230, 168, .08);
  border: 1px solid rgba(46, 230, 168, .28);
}

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(20, 30, 50, .65), rgba(9, 14, 24, .82));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.feature + .feature { margin-top: 10px; }

.ficon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(47, 107, 255, .12);
  border: 1px solid rgba(47, 107, 255, .32);
  color: #8fb6ff;
}

.feature.active .ficon {
  background: rgba(46, 230, 168, .10);
  border-color: rgba(46, 230, 168, .34);
  color: #7df5c7;
}

.fbody { flex: 1; min-width: 0; }

.fbody h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .01em;
}

.fbody p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.pill-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(46, 230, 168, .10);
  border: 1px solid rgba(46, 230, 168, .34);
  color: #7df5c7;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--dim);
}

.note svg { flex: none; margin-top: 1px; color: #6f8ec4; }

/* Steps */
.steps { padding: 20px; }

.steps h2 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9db4dd;
  margin: 0 0 12px;
}

.step {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.step:first-of-type { border-top: 0; padding-top: 0; }
.step:last-of-type { padding-bottom: 0; }

.step-num {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(47, 107, 255, .14);
  border: 1px solid rgba(47, 107, 255, .32);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 800;
  color: #9fc2ff;
}

.step b { display: block; font-size: 13px; }
.step span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ---------- Animations ---------- */
.rise { animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .10s; }
.rise-3 { animation-delay: .15s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 230, 168, .45); }
  70% { box-shadow: 0 0 0 7px rgba(46, 230, 168, 0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .auth { padding-top: 30px; }
  .auth-card { padding: 22px 18px 18px; }
  .panel { padding-top: 18px; }
  .account {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .timer-box {
    text-align: left;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .brand-name { font-size: 14.5px; }
  .brand-mark { width: 40px; height: 40px; }
  .feature { padding: 14px; gap: 12px; }
  .fbody p { font-size: 11.5px; }
  .pill-active { padding: 5px 7px; font-size: 8.5px; }
}

@media (max-width: 360px) {
  .trust { grid-template-columns: 1fr; }
  .trust-item { flex-direction: row; justify-content: center; gap: 7px; }
}
