/* Tetology Google Auth UI v23 — intense purple/red palette; layout unchanged */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*{box-sizing:border-box}
[hidden]{display:none!important}
:root{
  --tet-purple:#7027ff;
  --tet-purple-2:#ff3d55;
  --tet-purple-dark:#4a119f;
  --tet-ink:#111827;
  --tet-copy:#374151;
  --tet-muted:#7b8494;
  --tet-line:#e3e8f0;
  --tet-surface:#ffffff;
  --tet-bg:#fbf5ff;
  --tet-success:#11845b;
  --tet-warning:#a56a0a;
  --tet-danger:#c94158;
  --tet-shadow:0 22px 58px rgba(86,42,123,.11);
  --tet-shadow-soft:0 12px 30px rgba(111,47,118,.085);
}

html,body{margin:0;min-height:100%;background:var(--tet-bg)}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.tet-auth-page{
  min-height:100dvh;
  color:var(--tet-ink);
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-tap-highlight-color:transparent;
  background:
    radial-gradient(ellipse at 84% 8%,rgba(112,39,255,.22) 0%,rgba(109,61,245,0) 30%),
    radial-gradient(ellipse at 12% 91%,rgba(255,61,85,.18) 0%,rgba(229,72,97,0) 34%),
    linear-gradient(160deg,#fff9fe 0%,#f4e9ff 48%,#fff0f3 100%);
  position:relative;
}
body.tet-auth-page::before{
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:url('../../images/auth-education-pattern.svg') center/430px 820px repeat-y;
  opacity:.72;
}
body.tet-auth-page::after{
  content:'';
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.26),rgba(255,240,245,.10));
}
button,input{font:inherit}
a{text-decoration:none;color:inherit}

/* ---------- fixed splash: never enters document flow ---------- */
.tet-auth-splash{
  position:fixed;
  inset:0;
  z-index:10000;
  display:grid;
  place-items:center;
  min-height:100dvh;
  padding:max(26px,env(safe-area-inset-top)) 24px max(32px,env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 42% 36%,rgba(112,39,255,.17),transparent 27%),
    radial-gradient(circle at 68% 64%,rgba(255,61,85,.12),transparent 30%),
    linear-gradient(160deg,#fff9fe 0%,#f3e8ff 50%,#fff0f3 100%);
  transition:opacity .28s ease,visibility .28s ease;
}
.tet-auth-splash::before{
  content:'';
  position:absolute;
  inset:0;
  background:url('../../images/auth-education-pattern.svg') center/430px 820px repeat-y;
  opacity:.64;
}
.tet-auth-splash.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
.tet-auth-splash__inner{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  transform:translateY(-4vh);
}
.tet-auth-splash__logo{
  width:84px;
  height:84px;
  display:block;
  object-fit:contain;
  border-radius:24px;
  filter:drop-shadow(0 12px 20px rgba(111,61,190,.16));
}
.tet-auth-splash__spinner{
  width:30px;
  height:30px;
  margin-top:34px;
  border:3px dotted #7027ff;
  border-radius:50%;
  animation:tetSpin 1s linear infinite;
}
.tet-auth-splash strong{
  margin-top:24px;
  font-size:14px;
  line-height:1.3;
  font-weight:750;
  letter-spacing:-.015em;
}
@keyframes tetSpin{to{transform:rotate(360deg)}}

/* ---------- login ---------- */
.tet-login{
  position:relative;
  z-index:1;
  min-height:100dvh;
  width:100%;
  display:grid;
  place-items:center;
  padding:max(32px,env(safe-area-inset-top)) 20px max(30px,env(safe-area-inset-bottom));
}
.tet-login__content{
  width:min(100%,360px);
  min-height:min(690px,calc(100dvh - 58px));
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.tet-login__brand{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.tet-login__logo{
  width:94px;
  height:94px;
  display:block;
  object-fit:contain;
  border-radius:28px;
  filter:drop-shadow(0 15px 24px rgba(111,61,190,.17));
}
.tet-login__logo-fallback{
  width:92px;height:92px;border-radius:26px;display:grid;place-items:center;
  color:#fff;background:linear-gradient(145deg,var(--tet-purple),var(--tet-purple-2));
  font-size:38px;font-weight:800;box-shadow:var(--tet-shadow-soft)
}
.tet-login__brand h1{
  margin:34px 0 0;
  color:#111827;
  font-size:25px;
  line-height:1.1;
  font-weight:800;
  letter-spacing:-.045em;
}
.tet-login__brand p{
  margin:8px 0 0;
  color:#7b8494;
  font-size:12.5px;
  line-height:1.45;
  font-weight:500;
}
.tet-login__signin{
  width:100%;
  margin-top:30px;
}
.tet-login__copy h2{
  margin:0;
  color:#111827;
  font-size:20px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:-.035em;
}
.tet-login__copy p{
  margin:9px auto 0;
  max-width:310px;
  color:#667085;
  font-size:10.8px;
  line-height:1.5;
  font-weight:500;
}
.tet-login__copy a{
  color:#6a22ef;
  font-weight:750;
}
.tet-google-block{
  width:100%;
  margin-top:20px;
}
.tet-google-button-shell{
  width:100%;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
}
.google-button-host{
  width:min(100%,320px);
  min-width:200px;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto;
  padding:0;
  overflow:visible!important;
  position:relative;
}
/* Google's generated button is intentionally left untouched. */
.google-auth-status{
  width:min(100%,320px);
  margin:10px auto 0;
  padding:10px 12px;
  border:1px solid #ead7dc;
  border-radius:12px;
  background:#fff8fa;
  color:#9d4052;
  font-size:11px;
  line-height:1.45;
}
.tet-login__powered{
  margin:auto 0 0;
  padding-top:30px;
  color:#191a22;
  font-size:10px;
  line-height:1.3;
  font-weight:750;
}

/* ---------- notices / loading ---------- */
.auth-alert{
  display:none;
  width:min(100%,320px);
  margin:14px auto 0;
  padding:11px 13px;
  border:1px solid transparent;
  border-radius:13px;
  font-size:11px;
  line-height:1.45;
  text-align:left;
}
.auth-alert.is-visible{display:block}
.auth-alert.is-info{color:#5f32c8;background:#f8f3ff;border-color:#e7dcff}
.auth-alert.is-warning{color:#8b5a08;background:#fff9e9;border-color:#f3dfad}
.auth-alert.is-error{color:#a83d50;background:#fff4f6;border-color:#f0d4db}
.auth-alert.is-success{color:#0e7651;background:#effbf6;border-color:#ccebdc}
.auth-loading{
  position:fixed;
  inset:0;
  z-index:11000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(248,238,255,.72);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.18s ease;
}
.auth-loading.is-visible{opacity:1;visibility:visible;pointer-events:auto}
.auth-loading-box{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 16px;
  border:1px solid rgba(231,218,237,.95);
  border-radius:16px;
  background:#fff;
  box-shadow:0 16px 44px rgba(90,41,98,.13);
  color:#313443;
  font-size:12px;
  font-weight:650;
}
.auth-spinner{
  width:18px;height:18px;border:2px solid #e5ddea;border-top-color:var(--tet-purple);
  border-radius:50%;animation:tetSpin .75s linear infinite
}
.google-webview-note{
  width:min(100%,330px);
  margin:0 auto;
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:13px;
  border:1px solid #eadff0;
  border-radius:15px;
  background:rgba(255,255,255,.96);
  text-align:left;
  box-shadow:var(--tet-shadow-soft);
}
.google-webview-note__icon{
  width:31px;height:31px;flex:0 0 auto;display:grid;place-items:center;border-radius:10px;
  background:#eef1fb;color:#6a22ef;font-size:15px;font-weight:800
}
.google-webview-note strong{display:block;font-size:12px;color:#20222e}
.google-webview-note span{display:block;margin-top:3px;color:#777b8a;font-size:10.5px;line-height:1.45}
.google-webview-open{display:inline-flex;margin:9px 0 0 42px;color:#6a22ef;font-size:11px;font-weight:750}

/* ---------- register shell ---------- */
.tet-auth-page--register{padding-top:78px}
.tet-register-top{
  position:fixed;
  z-index:50;
  top:0;left:0;right:0;
  min-height:76px;
  padding:max(12px,env(safe-area-inset-top)) 18px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:rgba(255,255,255,.82);
  border-bottom:1px solid rgba(236,223,239,.78);
  backdrop-filter:blur(18px) saturate(1.25);
  -webkit-backdrop-filter:blur(18px) saturate(1.25);
}
.tet-register-top__brand{display:flex;align-items:center;gap:11px;min-width:0}
.tet-register-top__brand img{width:42px;height:42px;object-fit:contain;border-radius:14px;filter:drop-shadow(0 7px 12px rgba(113,54,169,.14))}
.tet-register-top__brand span{display:grid;line-height:1}
.tet-register-top__brand strong{font-size:15px;font-weight:800;letter-spacing:-.025em}
.tet-register-top__brand small{margin-top:5px;color:#6a22ef;font-size:7px;font-weight:800;letter-spacing:.18em}
.tet-register-top__back{
  width:42px;height:42px;display:grid;place-items:center;border:1px solid #eee2f1;border-radius:14px;
  background:rgba(255,255,255,.92);box-shadow:0 7px 18px rgba(88,43,88,.055)
}
.tet-register-top__back svg{width:19px;height:19px;fill:none;stroke:#666b7b;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tet-register{
  position:relative;
  z-index:1;
  width:100%;
  min-height:calc(100dvh - 78px);
  padding:22px 16px 28px;
}
.tet-register__card{
  width:min(100%,430px);
  margin:0 auto;
  padding:18px;
  border:1px solid rgba(238,224,240,.96);
  border-radius:26px;
  background:rgba(255,255,255,.94);
  box-shadow:var(--tet-shadow);
}
.tet-register__intro{text-align:center;padding:8px 4px 4px}
.tet-register__intro-logo{width:76px;height:76px;object-fit:contain;border-radius:22px;filter:drop-shadow(0 12px 18px rgba(113,54,169,.14))}
.tet-register__intro h1{margin:18px 0 0;font-size:23px;line-height:1.15;font-weight:800;letter-spacing:-.04em}
.tet-register__intro p{margin:7px 0 0;color:var(--tet-muted);font-size:12px;line-height:1.45}
.tet-google-block--register{margin-top:20px}

/* ---------- verified account / form ---------- */
.google-registration-panel{display:block}
.google-account-chip{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:11px 11px;
  border:1px solid #d8eee4;
  border-radius:17px;
  background:linear-gradient(135deg,#f4fcf8,#fbfffd);
}
.google-account-avatar{position:relative;width:46px;height:46px;display:grid;place-items:center;flex:0 0 auto}
.google-account-avatar>img,.google-account-avatar>[data-google-avatar-fallback]{
  width:46px;height:46px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#eef1fb;color:#6a22ef;font-size:17px;font-weight:800
}
.google-account-verified-badge{
  position:absolute;right:-2px;bottom:-1px;width:17px;height:17px;display:grid;place-items:center;border:2px solid #fff;border-radius:50%;background:#1aa36d
}
.google-account-verified-badge svg{width:10px;height:10px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.google-account-chip__copy{min-width:0;text-align:left}
.google-account-chip__copy small{display:block;color:#13865d;font-size:7px;font-weight:850;letter-spacing:.09em}
.google-account-chip__copy strong{display:block;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#222531;font-size:11.5px;font-weight:700}
.google-account-chip>button{
  min-height:34px;padding:0 11px;border:1px solid #e0ddef;border-radius:11px;background:#fff;color:#6a22ef;font-size:9.5px;font-weight:750
}
.register-section-head{text-align:left;margin:22px 1px 19px}
.register-section-head h2{margin:0;font-size:25px;line-height:1.12;font-weight:800;letter-spacing:-.045em}
.register-section-head p{margin:7px 0 0;color:#747988;font-size:11.5px;line-height:1.45}
.auth-form{display:grid;gap:17px}
.auth-field{display:grid;gap:7px}
.auth-label{color:#373a47;font-size:10px;font-weight:750}
.auth-input-wrap{position:relative;display:flex;align-items:center}
.auth-input{
  width:100%;height:54px;padding:0 15px;border:1px solid #e4e2ea;border-radius:15px;background:#fff;color:#1d202b;outline:none;
  font-size:13px;font-weight:550;box-shadow:0 5px 14px rgba(91,43,81,.03);transition:border-color .18s ease,box-shadow .18s ease,background .18s ease
}
.auth-input::placeholder{color:#a0a4b0;font-weight:450}
.auth-input:focus{border-color:#7b4df2;box-shadow:0 0 0 3px rgba(109,61,245,.10),0 8px 20px rgba(92,50,117,.05)}
.auth-input.has-leading-icon{padding-left:53px}
.auth-input.has-phone-prefix{padding-left:61px}
.auth-input-icon{
  position:absolute;z-index:2;left:12px;top:50%;transform:translateY(-50%);width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:#f3edff;color:#6a22ef;pointer-events:none
}
.auth-input-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth-input-icon--phone{width:38px;color:#717687;font-size:10px;font-weight:750;background:#f5f5f8}
.auth-field-note{color:#9397a4;font-size:9.5px;line-height:1.35}
.auth-field-error{display:none;color:#b83e54;font-size:9.5px;line-height:1.35}
.auth-field.has-error .auth-field-error{display:block}
.auth-field.has-error .auth-input{border-color:#d95c72;box-shadow:0 0 0 3px rgba(217,92,114,.08)}
.auth-password-input{padding-right:72px}
.auth-password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);height:36px;padding:0 11px;border:0;border-radius:10px;background:#f1f3f8;color:#6a22ef;font-size:10px;font-weight:750}
.legacy-link-panel{padding:14px;border:1px solid #e1e6ef;border-radius:17px;background:#f8fafc}
.legacy-link-panel__head{display:flex;align-items:flex-start;gap:10px;margin-bottom:14px}
.legacy-link-panel__icon{width:34px;height:34px;flex:0 0 auto;display:grid;place-items:center;border-radius:11px;background:#f3edff;color:#6737e8}
.legacy-link-panel__icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.legacy-link-panel__head strong{display:block;color:#252735;font-size:11px;font-weight:800}
.legacy-link-panel__head p{margin:4px 0 0;color:#767b89;font-size:9.5px;line-height:1.45}
.auth-check{
  display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #e9e7ef;border-radius:14px;background:#fafafd;color:#666b79;font-size:9.5px;line-height:1.45
}
.auth-check input{width:16px;height:16px;margin:0;flex:0 0 auto;accent-color:var(--tet-purple)}
.auth-link{color:#6a22ef;font-weight:750}
.auth-primary{
  height:54px;border:0;border-radius:15px;display:flex;align-items:center;justify-content:center;gap:8px;color:#fff;background:linear-gradient(135deg,#6d3df5 0%,#8f3fe2 46%,#e54861 100%);
  box-shadow:0 13px 25px rgba(143,63,178,.23);font-size:12px;font-weight:800;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease
}
.auth-primary:active{transform:translateY(1px) scale(.997);box-shadow:0 8px 18px rgba(143,63,178,.19)}
.auth-primary svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tet-register-footer{
  position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 18px max(24px,env(safe-area-inset-bottom));color:#9498a4;font-size:9.5px
}
.tet-register-footer a{color:#777b89}

@media (max-width:380px){
  .tet-login{padding-left:16px;padding-right:16px}
  .tet-login__content{width:min(100%,342px)}
  .tet-login__logo{width:88px;height:88px}
  .tet-login__brand h1{margin-top:28px;font-size:24px}
  .tet-login__signin{margin-top:26px}
  .google-button-host{width:min(100%,310px)}
  .tet-register{padding-left:12px;padding-right:12px}
  .tet-register__card{padding:15px;border-radius:23px}
}
@media (max-height:700px) and (orientation:portrait){
  .tet-login{padding-top:20px;padding-bottom:18px}
  .tet-login__content{min-height:calc(100dvh - 38px)}
  .tet-login__logo{width:82px;height:82px}
  .tet-login__brand h1{margin-top:22px}
  .tet-login__signin{margin-top:22px}
  .tet-login__powered{padding-top:22px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
