/* auth/assets/tgx-auth.css */
/* Имена классов уникальные: tgx-auth-* */

:root{
  --tgx-tg:#229ED9;
  --tgx-tg-dark:#1E8CC3;
  --tgx-ink:#0B3A53;
  --tgx-bg:#F4FBFF;
  --tgx-card:#ffffff;
  --tgx-border:rgba(15,23,42,.12);
  --tgx-shadow: 0 25px 60px rgba(2, 38, 55, .14);
  --tgx-radius: 22px;
  /* Похоже на Telegram: системный шрифт */
  --tgx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.tgx-auth-body{
  min-height:100vh;
  margin:0;
  font-family:var(--tgx-font);
  color:#0f172a;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background: radial-gradient(900px 600px at 30% 0%, rgba(34,158,217,.14), transparent 55%),
              radial-gradient(800px 600px at 90% 20%, rgba(34,158,217,.10), transparent 60%),
              linear-gradient(180deg, var(--tgx-bg), #fff);
  position:relative;
  overflow:hidden;
}

.tgx-auth-body::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:url("./bg-tile.jpg");
  background-repeat:repeat;
  background-size:340px auto;
  opacity:.08;
  pointer-events:none;
}

@media (max-width: 640px){
  .tgx-auth-body::before{
    background-image:url("./bg-mobile.jpg");
    background-repeat:no-repeat;
    background-size:cover;
    background-position:center;
    opacity:.22;
  }
}

.tgx-auth-wrap{ width:100%; max-width:520px; position:relative; z-index:1; }

.tgx-auth-card{
  background:var(--tgx-card);
  border:1px solid var(--tgx-border);
  border-radius:var(--tgx-radius);
  box-shadow:var(--tgx-shadow);
  overflow:hidden;
}

.tgx-auth-top{
  padding:24px 24px 12px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.tgx-auth-brand{ display:flex; align-items:center; gap:12px; min-width:0; }

.tgx-auth-logo{
  width:50px; height:50px; border-radius:18px;
  background:linear-gradient(180deg, var(--tgx-tg), var(--tgx-tg-dark));
  box-shadow:0 14px 34px rgba(34,158,217,.28);
  display:flex; align-items:center; justify-content:center;
  color:#fff; flex:0 0 auto;
}

.tgx-auth-logo i{ font-size:30px; }

.tgx-auth-title{
  font-size:22px;
  font-weight:900;
  letter-spacing:-0.2px;
  margin:0;
  line-height:1.25;
  color:#0b3a53;
}
.tgx-auth-sub{ margin:4px 0 0 0; font-size:12px; color:rgba(15,23,42,.60); }

.tgx-auth-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(34,158,217,.10);
  color:var(--tgx-ink);
  font-weight:800;
  font-size:12px;
  border:1px solid rgba(34,158,217,.20);
  flex:0 0 auto;
}

.tgx-auth-mid{ padding: 6px 24px 22px 24px; }
.tgx-auth-widget{ display:flex; align-items:center; justify-content:center; padding:14px 0 6px 0; }
.tgx-auth-divider{ height:1px; background:rgba(15,23,42,.08); margin:14px 0; }

.tgx-auth-skip{ display:flex; justify-content:center; }
.tgx-auth-skip a{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  width:100%; max-width:320px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  color:rgba(15,23,42,.78);
  text-decoration:none;
  font-weight:900;
  transition:transform .08s ease, box-shadow .15s ease, border-color .15s ease;
}
.tgx-auth-skip a:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
  border-color: rgba(34,158,217,.35);
}

.tgx-auth-footer{
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(34,158,217,.06), rgba(34,158,217,.03));
  border-top:1px solid rgba(15,23,42,.08);
  display:flex; align-items:center; justify-content:center; gap:10px;
  color: rgba(15,23,42,.56);
  font-size:12px;
}

.tgx-auth-status{
  margin-top: 12px;
  text-align:center;
  font-size:13px;
  color: rgba(15,23,42,.68);
  min-height: 18px;
}
.tgx-auth-status.tgx-auth-status--error{ color: #b42318; }

.tgx-auth-loader{
  width:16px;height:16px;border-radius:50%;
  border:2px solid rgba(34,158,217,.28);
  border-top-color: var(--tgx-tg);
  display:inline-block;
  animation: tgxspin .8s linear infinite;
  vertical-align:-3px;
  margin-right:8px;
}
@keyframes tgxspin{ to{ transform: rotate(360deg);} }

.tgx-auth-error{
  padding: 16px 18px;
  margin: 18px 24px 22px 24px;
  border-radius: 18px;
  border:1px solid rgba(220,38,38,.22);
  background: rgba(254,242,242,.85);
  color:#991b1b;
  font-size:13px;
}
