.aa-auth-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:32px;
  align-items:start;
  max-width:1240px;
  margin:18px auto;
}

.aa-auth-box{
  position:relative;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  border:1px solid #dbe4f0;
  border-radius:28px;
  padding:30px;
  box-shadow:0 18px 60px rgba(15,23,42,.08);
  overflow:hidden;
}

.aa-auth-box:before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:6px;
  background:linear-gradient(90deg,#0f2f1d 0%,#1f6f3c 45%,#f59e0b 100%);
}

.aa-auth-box:after{
  content:"";
  position:absolute;
  top:-120px;
  right:-120px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(37,99,235,.08) 0%,rgba(37,99,235,0) 70%);
  pointer-events:none;
}

.aa-auth-box h3{
  margin:0;
  font-size:2.05rem;
  line-height:1.08;
  font-weight:800;
  color:#465579;
  letter-spacing:-.02em;
}

.aa-auth-subtitle{
  margin:10px 0 22px;
  color:#667085;
  font-size:14px;
  line-height:1.6;
}

.aa-auth-section-title{
  margin:8px 0 4px;
  font-size:1.55rem;
  line-height:1.2;
  font-weight:800;
  color:#465579;
}

.aa-auth-section-note{
  margin:0 0 12px;
  color:#6b7280;
  font-size:13px;
}

.aa-auth-form,
#aa-register-form{
  display:grid;
  gap:16px;
}

.aa-field{
  display:grid;
  gap:8px;
}

.aa-field > label,
.aa-inline-label,
.aa-auth-form label{
  color:#0f2551;
  font-size:14px;
  line-height:1.25;
  font-weight:700;
}

.aa-auth-form input,
#aa-register-form input{
  width:100%;
  height:58px;
  padding:15px 18px;
  border:1.5px solid #cbd5e1;
  border-radius:15px;
  background:#fff;
  color:#111827;
  font-size:17px;
  font-weight:600;
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.aa-auth-form input::placeholder,
#aa-register-form input::placeholder{
  color:#94a3b8;
  font-weight:500;
}

.aa-auth-form input:focus,
#aa-register-form input:focus{
  border-color:#3b82f6;
  box-shadow:0 0 0 4px rgba(59,130,246,.13);
  transform:translateY(-1px);
}

.aa-auth-form input[readonly],
#aa-register-form input[readonly]{
  background:#f8fafc;
}

.aa-auth-box .aa-btn,
.aa-auth-box #aa-register-form button,
.aa-auth-box #aa-login-password-form button,
.aa-auth-box #aa-login-firebase-email-form button,
.aa-auth-box #aa-login-phone-form button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:12px 18px;
  border:1px solid transparent;
  border-radius:14px;
  background:#eef2f7;
  color:#334155;
  font-size:15px;
  font-weight:800;
  text-align:center;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.aa-auth-box .aa-btn:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.08)}
.aa-auth-box .aa-btn:disabled{opacity:.65;cursor:not-allowed;transform:none;box-shadow:none}

.aa-auth-box .aa-btn-primary,
.aa-auth-box #aa-login-password-form .aa-btn-primary,
.aa-auth-box #aa-login-phone-form .aa-btn-primary,
.aa-auth-box #aa-register-submit{
  background:linear-gradient(135deg,#2f66ea 0%,#3367f0 55%,#2457d5 100%);
  color:#fff;
  border-color:#2f66ea;
  box-shadow:0 14px 30px rgba(47,102,234,.22);
}

.aa-auth-box .aa-btn-primary:hover,
.aa-auth-box #aa-register-submit:hover{
  box-shadow:0 16px 34px rgba(47,102,234,.28);
}

.aa-auth-tabs{
  display:inline-flex;
  gap:10px;
  margin:8px 0 20px;
  padding:6px;
  background:#f8fafc;
  border:1px solid #dce5f0;
  border-radius:999px;
  flex-wrap:wrap;
}

.aa-tab-btn{
  padding:12px 18px;
  border-radius:999px;
  border:1px solid transparent;
  background:transparent;
  color:#51617d;
  font-weight:700;
  cursor:pointer;
  transition:all .2s ease;
}

.aa-tab-btn.is-active{
  background:#0f172a;
  color:#fff;
  box-shadow:0 10px 22px rgba(15,23,42,.16);
}

.aa-tab-panel{display:none}
.aa-tab-panel.is-active{display:block}

.aa-panel-card,
.aa-verify-card{
  padding:18px;
  border:1px solid #e2e8f0;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.aa-divider{
  position:relative;
  text-align:center;
  margin:18px 0;
}
.aa-divider:before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  height:1px;
  background:#d9e2ec;
}
.aa-divider span{
  position:relative;
  z-index:1;
  background:#fff;
  padding:0 14px;
  color:#64748b;
  font-weight:700;
}

.aa-btn-row,
.aa-action-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.aa-status-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:4px;
}

.aa-status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:7px 14px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#475569;
  font-size:12px;
  font-weight:700;
}

.aa-resend-note{
  color:#64748b;
  font-size:13px;
  font-weight:700;
}

.aa-auth-message{
  margin-top:2px;
  padding:0;
  font-size:14px;
  line-height:1.55;
  font-weight:700;
}
.aa-auth-message.is-error{color:#dc2626}
.aa-auth-message.is-success{color:#15803d}

.aa-help{
  color:#667085;
  font-size:13px;
  margin:-6px 0 2px;
}

#aa-login-recaptcha,
#aa-register-recaptcha{
  min-height:78px;
}

@media (max-width:1024px){
  .aa-auth-grid{grid-template-columns:1fr;gap:24px;max-width:760px}
}

@media (max-width:767px){
  .aa-auth-grid{gap:18px;margin:10px auto}
  .aa-auth-box{padding:22px 18px;border-radius:22px}
  .aa-auth-box h3{font-size:1.85rem}
  .aa-auth-tabs{display:flex;width:100%}
  .aa-tab-btn{flex:1;text-align:center;padding:11px 14px}
  .aa-auth-form input,#aa-register-form input{height:54px;font-size:16px}
  .aa-btn-row,.aa-action-row{display:grid;grid-template-columns:1fr}
  .aa-auth-box .aa-btn,.aa-auth-box .aa-btn-primary,.aa-auth-box #aa-register-form button,.aa-auth-box #aa-login-password-form button,.aa-auth-box #aa-login-firebase-email-form button,.aa-auth-box #aa-login-phone-form button{width:100%}
}

.aa-required-mark{color:#dc2626;font-weight:800}
.aa-optional-mark{color:#64748b;font-size:12px;font-weight:600}
.aa-auth-message.is-error,.aa-auth-message.aa-msg-error{color:#dc2626!important}
.aa-auth-message.is-success,.aa-auth-message.aa-msg-success{color:#15803d!important}

.aa-login-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.aa-login-meta-row-single{
  justify-content:flex-start;
}
.aa-check-inline{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#334155;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.aa-check-inline input[type="checkbox"]{
  width:18px !important;
  height:18px !important;
  min-height:18px !important;
  padding:0 !important;
  margin:0;
  border-radius:4px !important;
  accent-color:#2f66ea;
  transform:none !important;
  box-shadow:none !important;
}

.aa-forgot-panel{
  display:none;
  margin-top:14px;
  padding:14px;
  border:1px solid #dce5f0;
  border-radius:14px;
  background:#f8fbff;
}
.aa-forgot-panel.is-open{display:block;}
.aa-forgot-panel p{margin:0 0 10px;color:#51617d;font-size:14px;}
.aa-forgot-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.aa-forgot-actions .aa-btn{min-height:46px;}
.aa-forgot-link{
  color:#2457d5;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
}
.aa-forgot-link:hover{
  text-decoration:underline;
}
