/* Intrarea în cont pe site, ca pe site-ul Revestech (cardul lat: banda Zent în stânga, formularul în dreapta), în
   culorile Zent, cu cerul din aplicație în fundal: noaptea stele și comete (sky.js), ziua nori pe gradientul albastru.
   Tema vine de la /theme.js (<html data-theme="light|dark">): a telefonului / calculatorului sau cea aleasă din buton. */
:root {
  --primary: #2DA1FF;
  --primary-2: #1E8FEA;
  /* Gradientul de pe Welcome din aplicație (theme.js → gradients.hero), noaptea */
  --sky: linear-gradient(180deg, #0E4A80 0%, #103A63 30%, #0E1D2E 65%, #0B121B 90%);
  --page: #0B121B;
  --glass: rgba(255, 255, 255, 0.06);
  --panel: #0E1825;
  --panel-line: rgba(255, 255, 255, 0.08);
  --ink: #F2F5F9;
  --soft: #B8C2CF;
  --muted: #7F8B9B;
  --field: rgba(255, 255, 255, 0.05);
  --field-line: rgba(255, 255, 255, 0.12);
  --tabs: rgba(255, 255, 255, 0.05);
  --google: rgba(255, 255, 255, 0.04);
  --google-line: rgba(255, 255, 255, 0.16);
  --apple: #FFFFFF;
  --apple-ink: #111111;
  --danger: #FF6B61;
  --success: #3BD083;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* Ziua: albastru sus, alb jos, ca în aplicație */
:root[data-theme="light"] {
  --sky: linear-gradient(180deg, #2DA1FF 0%, #6AC2FF 30%, #C2ECFF 65%, #FFFFFF 90%);
  --page: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.6);
  --panel: #FFFFFF;
  --panel-line: rgba(17, 17, 17, 0.06);
  --ink: #111111;
  --soft: #4A5361;
  --muted: #8A94A3;
  --field: #F3F8FD;
  --field-line: #DCE7F2;
  --tabs: #EEF5FC;
  --google: #FFFFFF;
  --google-line: #DCE7F2;
  --apple: #111111;
  --apple-ink: #FFFFFF;
  --danger: #E5392F;
  --success: #1E9E5A;
  --shadow: 0 40px 90px -45px rgba(16, 64, 120, 0.55);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100svh;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--primary); }
button, input { font: inherit; }

/* Cerul din fund: stă pe loc când derulezi; 100lvh = toată înălțimea ecranului, și cu bara browserului ascunsă */
.sky { position: fixed; inset: 0 0 auto; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; overflow: hidden; background: var(--sky); }
.stars { display: block; width: 100%; height: 100%; }
.clouds { display: none; position: absolute; inset: -30px; transition: transform 1.4s cubic-bezier(.2, .7, .3, 1); }
:root[data-theme="light"] .stars { display: none; }
:root[data-theme="light"] .clouds { display: block; }
/* Fiecare nor trece de la stânga la dreapta în --d, pornind din alt loc (--off); --s mărimea, --o cât de alb e */
.cloud {
  position: absolute; left: 0; top: var(--y);
  width: calc(var(--s) * clamp(110px, 15vw, 230px)); aspect-ratio: 2 / 1;
  fill: #fff; opacity: var(--o);
  animation: cloud var(--d) linear infinite; animation-delay: calc(var(--d) * var(--off) * -1);
}
@keyframes cloud { from { transform: translateX(-110%); } to { transform: translateX(calc(100vw + 60px)); } }

/* Bara de sus */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  width: min(1100px, 100% - 40px); height: 76px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 900 28px/1 var(--display); letter-spacing: -0.03em; }
.brand svg { width: 17px; height: 30px; fill: currentColor; }
.topbar nav { display: flex; gap: 8px; }
.topbar nav a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border-radius: 999px; color: var(--ink); background: var(--glass); border: 1px solid var(--panel-line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-weight: 600; font-size: 14px; text-decoration: none;
}
/* Butonul de temă: luna trece pe tema întunecată, soarele înapoi pe cea luminoasă */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; height: 40px; padding: 0 14px 0 11px; cursor: pointer;
  border-radius: 999px; color: var(--ink); background: var(--glass); border: 1.5px solid currentColor;
  font: 700 14px/1 var(--body);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .2s;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle:focus-visible, .topbar nav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun, :root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }

/* Cardul */
.wrap { position: relative; z-index: 1; display: grid; place-items: center; padding: 12px 20px 48px; min-height: calc(100svh - 76px); }
.card {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  width: min(1000px, 100%); min-height: 580px;
  border-radius: 28px; overflow: hidden;
  border: 1px solid var(--panel-line);
  box-shadow: var(--shadow);
  animation: rise 0.5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.side {
  position: relative; display: grid; align-content: center; gap: 18px; padding: 40px;
  color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.24), transparent 55%),
    linear-gradient(140deg, #2DA1FF 0%, #1E7FE0 55%, #145FB0 100%);
}
.side::after {
  /* Sigla mare, ca un watermark, în colțul de jos */
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 380px; opacity: 0.12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 80' fill='white'%3E%3Cpath d='M0 0 46 18.7V38.6H0Z'/%3E%3Cpath d='M0 41.9H46V80L0 61.1Z'/%3E%3C/svg%3E") center/contain no-repeat;
  transform: rotate(-8deg);
}
.side .brand { color: #fff; font-size: 30px; }
.side h1 { margin: 0; font: 900 clamp(28px, 3vw, 38px)/1.08 var(--display); letter-spacing: -0.025em; }
.side p { margin: 0; color: rgba(255, 255, 255, 0.9); line-height: 1.55; }
.side ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; font-weight: 600; }
.side li { display: flex; align-items: center; gap: 12px; }
.side li svg { width: 18px; height: 18px; padding: 8px; box-sizing: content-box; border-radius: 12px; background: rgba(255, 255, 255, 0.18); }
.side small { color: rgba(255, 255, 255, 0.82); font-size: 13px; line-height: 1.5; }
.side small a { color: #fff; font-weight: 700; }

.main { display: grid; align-content: center; gap: 16px; padding: 36px 40px; background: var(--panel); backdrop-filter: blur(18px); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--tabs); }
.tabs[hidden] { display: none; }
.tabs button { height: 44px; border: 0; border-radius: 999px; background: none; color: var(--soft); font-weight: 700; cursor: pointer; transition: background 0.2s, color 0.2s; }
.tabs button.is-on { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px rgba(45, 161, 255, 0.9); }

.social { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.social[hidden] { display: none; }
.provider {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: 14.5px; white-space: nowrap;
  transition: transform 0.12s, filter 0.15s;
}
.provider:active { transform: scale(0.98); }
.provider svg { width: 19px; height: 19px; flex: none; }
.provider span small { font-weight: 500; opacity: 0.75; }
.provider--google { background: var(--google); color: var(--ink); border: 1px solid var(--google-line); }
.provider--apple { background: var(--apple); color: var(--apple-ink); border: 1px solid var(--apple); }
.provider--apple svg { fill: currentColor; margin-top: -2px; }
.provider:hover { filter: brightness(1.06); }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--field-line); }
.or[hidden] { display: none; }

form { display: grid; gap: 12px; }
form[hidden] { display: none; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--soft); }
.field .box { position: relative; display: flex; align-items: center; min-width: 0; }
.field input {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--field-line); border-radius: 14px;
  background: var(--field); color: var(--ink); font-size: 15px; outline: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(45, 161, 255, 0.18); }
.field .box input[type="password"], .field .box input[data-secret] { padding-right: 46px; }
.eye { position: absolute; right: 6px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.eye svg { width: 20px; height: 20px; }
.lead { margin: 0; color: var(--soft); line-height: 1.5; }

.check { display: flex; align-items: flex-start; gap: 10px; color: var(--soft); font-size: 14px; line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); }
.check a { font-weight: 700; text-decoration: none; }

.message { margin: 0; padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1.45; }
.message[hidden] { display: none; }
.message--error { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.message--ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }

.btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 52px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 14px 30px -14px rgba(45, 161, 255, 0.95);
  transition: transform 0.12s, background 0.15s;
}
.btn:hover:not(:disabled) { background: var(--primary-2); }
.btn:active { transform: scale(0.985); }
.btn:disabled, .provider:disabled { opacity: 0.65; cursor: default; }
.is-busy { color: transparent !important; }
.is-busy svg { visibility: hidden; }
.is-busy::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(128, 128, 128, 0.35); border-top-color: var(--primary); animation: spin 0.8s linear infinite;
}
.btn.is-busy::after { border-color: rgba(255, 255, 255, 0.4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.link { justify-self: center; padding: 4px 8px; border: 0; background: none; color: var(--primary); font-weight: 700; font-size: 14px; cursor: pointer; }
.legal { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; text-align: center; }
.legal a { font-weight: 700; text-decoration: none; }

/* Tabletă și telefon: banda Zent sus, scurtă */
@media (max-width: 860px) {
  .card { grid-template-columns: 1fr; min-height: 0; }
  .side { padding: 26px 24px; gap: 10px; }
  .side ul, .side small, .side .brand { display: none; }
  .side::after { width: 120px; height: 200px; right: -20px; bottom: -50px; }
  .main { padding: 24px 22px 26px; }
}
@media (max-width: 560px) {
  .topbar { width: calc(100% - 32px); height: 64px; }
  .topbar nav a:last-of-type { display: none; }
  .wrap { padding: 4px 12px 28px; place-items: start center; min-height: 0; }
  .card { border-radius: 24px; }
  .side h1 { font-size: 26px; }
  .grid--wide { grid-template-columns: 1fr; }
  .provider { font-size: 14px; gap: 8px; }
  .provider span small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .cloud { animation-play-state: paused; }
  .theme-toggle { transition: none; }
}
