@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');
:root{
  --blue:#0f4c81; --cyan:#19b6cf; --bg:#eaf4ff; --card:#ffffff; --muted:#6b7280; --border:#e5e7eb; --shadow:0 8px 20px rgba(2,12,27,.12);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:"Montserrat","Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:#0f172a}
body.login-page{background:linear-gradient(90deg,#eef2ff 0%,#60a5fa 45%,#3b82f6 100%);}

.login-wrap{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:72px}
body.login-page .login-wrap{justify-content:center;padding-top:40px;padding-bottom:40px}
.register-page .auth-main{padding:12px 22px;}
.register-page .card{padding:14px 20px 14px;}
.register-page .form-group{margin-bottom:8px;}
.register-page .row.small{margin:4px 0 10px;}
.register-page .remember{white-space:nowrap;font-size:12px;}
.back-link{position:absolute;left:26px;top:18px;display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#374151;text-decoration:none;font-weight:600;z-index:5}
.back-link span.back-icon{display:inline-flex;width:28px;height:28px;border-radius:999px;border:2px solid #cbd5f5;align-items:center;justify-content:center;overflow:hidden;background:#e5f2ff}
.back-link span.back-icon img{width:18px;height:18px;display:block;object-fit:contain}
.back-link:hover{color:#0f4c81}
.back-link:hover span{border-color:#0f4c81}
.brand{margin-bottom:14px}
.brand img{height:64px;width:auto;display:block;filter:drop-shadow(0 4px 2px rgba(0,0,0,.25))}
.card{position:relative;width:440px;max-width:92vw;background:var(--card);border-radius:16px;box-shadow:var(--shadow);padding:20px 24px 20px}
.card-forgot,.card-reset{padding-top:32px;padding-bottom:24px}
.card-forgot .back-link,.card-reset .back-link{top:18px;left:18px}
.card-forgot .auth-title{margin-top:18px}
.card-forgot .auth-subtitle{margin-top:10px}
.auth-title{margin:0 0 6px;font-size:26px;font-weight:800;color:#111827}
.auth-subtitle{margin:0 0 20px;font-size:14px;color:var(--muted);line-height:1.5}
.flow-status{border-radius:16px;padding:14px 14px 16px;margin-bottom:18px;background:#f9fafb}
.flow-status-title{margin:0 0 4px;font-size:18px;font-weight:700;color:#111827}
.flow-status-text{margin:0;font-size:14px;color:#4b5563}
.auth-shell{display:flex;flex-direction:row-reverse;max-width:1100px;width:100%;border-radius:12px;overflow:hidden;box-shadow:0 18px 40px rgba(15,23,42,.22);background:#ffffff;}
.auth-main{position:relative;flex:0 0 48%;background:#fff;display:flex;align-items:center;justify-content:center;padding:18px 28px;}
.auth-main .card{box-shadow:none;border-radius:0;max-width:420px;width:100%;}
.auth-hero{flex:0 0 52%;background:#60a5fa;display:flex;align-items:center;justify-content:center;padding:32px;min-height:320px;}
.hero-inner{text-align:center;color:#fff;margin:0 auto;}
.hero-logo img{max-width:700px;width:100%;height:auto;display:block;margin:0 auto 18px;}
.hero-subtitle{font-size:16px;font-weight:600;letter-spacing:.02em;white-space:nowrap;}
.tabs{display:flex;justify-content:center;margin:0 0 18px}
.tab{color:#0f2744;text-decoration:none;font-weight:800;font-size:24px}
.tab.active{color:#0f2744}
.form-group{margin-bottom:10px}
.form-group label{display:block;margin:0 0 6px;font-weight:700;color:#1f2937}
.input-wrap{position:relative}
.input-wrap input{width:100%;height:42px;border:1px solid var(--border);border-radius:10px;padding:10px 40px 10px 12px;outline:0;background:#f9fafb}
.input-wrap.input-lg input{height:48px;border-radius:14px;font-size:15px}
.input-wrap .icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);opacity:.75;width:28px;height:28px;display:flex;align-items:center;justify-content:center}
.input-wrap .icon img{width:16px;height:16px;display:block;filter:brightness(0) saturate(100%);object-fit:contain}
.pass-wrap input{padding-right:56px}
.toggle-pass{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:transparent;border:0;color:#1f3550;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0}
.toggle-pass img{width:16px;height:16px;display:block}
.row.small{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#1f3550;margin:6px 0 16px}
.remember{display:flex;align-items:center;gap:8px}
.row .link{color:#1f3550;text-decoration:none;font-weight:700}
.actions{display:flex;justify-content:center}
.forgot-form .actions{margin-top:20px}
.reset-form .actions{margin-top:20px}
.otp-form .actions{margin-top:22px}
.otp-row{display:flex;justify-content:space-between;gap:10px;margin-top:12px}
.otp-input{flex:1;max-width:52px;height:48px;border-radius:14px;border:1px solid var(--border);background:#f9fafb;text-align:center;font-size:20px;font-weight:600;outline:0}
.otp-input:focus-visible{border-color:#60a5fa;box-shadow:0 0 0 2px rgba(96,165,250,.5)}
.otp-resend{margin-top:18px;font-size:13px;color:#6b7280;text-align:center}
.otp-resend .link{font-weight:700}
.register-cta{margin-top:14px;text-align:center;font-size:14px;color:#111827}
.register-cta a{color:var(--cyan);font-weight:800;text-decoration:none}
.register-cta a:hover{text-decoration:underline}
.login-footer-note{margin-top:20px;text-align:center;font-size:11px;color:#6b7280;letter-spacing:.03em}
.btn{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 26px;border-radius:999px;border:0;cursor:pointer;font-weight:800;text-decoration:none;box-shadow:0 3px 8px rgba(2,12,27,.12)}
.btn-wide{min-width:240px}
.btn-primary{background:var(--blue);color:#fff;min-width:220px}
.btn-primary:hover{background:#0c3f6d}
.btn-block{width:100%;min-width:0}
.btn-primary[disabled],.btn-primary:disabled,.btn-primary.disabled{background:#dbeafe;color:#9ca3af;box-shadow:none;cursor:not-allowed}
.btn-reset{
  width:100%;
  height:54px;
  border-radius:16px;
  background:#7ba5f4;
  color:#e5edff;
  font-family:"Montserrat","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:20px;
  font-weight:600;
  border:3px solid #dbeafe;
  box-shadow:none;
}
.btn-reset:hover,
.btn-reset:focus-visible{
  background:#3387ff;
  color:#ffffff;
}
.btn-reset:disabled,.btn-reset[disabled]{
  background:#7ba5f4;
  color:#dbeafe;
  border-color:#dbeafe;
  cursor:not-allowed;
}
.btn-alt{background:var(--cyan);color:#fff;min-width:220px;margin-top:30px}
.btn-alt:hover{background:#119eb4}
.btn-outline{background:#fff;border:1px solid var(--border);color:#1f3550;min-width:200px}
.btn-outline:hover{background:#f3f4f6}
.divider{display:flex;align-items:center;gap:10px;color:#6b7280;font-weight:700;margin:16px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--border)}
.socials{display:flex;gap:14px;justify-content:center;margin-bottom:6px}
.social-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;margin-right:8px}
.social-icon img{width:100%;height:100%;display:block;border-radius:50%;object-fit:cover}
.reset-success{text-align:center;padding-top:10px}
.reset-icon{display:flex;justify-content:center;margin-bottom:20px}
.reset-icon-circle{width:82px;height:82px;border-radius:50%;background:#eff6ff;border:2px solid #bfdbfe;display:flex;align-items:center;justify-content:center}
.reset-icon-check{font-size:34px;color:#3b82f6;line-height:1}
.reset-success .auth-title{margin-bottom:6px}
.reset-success .auth-subtitle{margin-bottom:24px}
@media (max-width:420px){.card{padding:20px}}

/* Specific login button style to match provided design */
.btn-login{
  width:100%;
  background:#3b82f6; /* bright blue */
  color:#fff;
  border-radius:12px;
  box-shadow:0 0 0 4px rgba(59,130,246,.25), 0 3px 8px rgba(2,12,27,.12);
  font-size:16px; /* match admin button text size */
}
.btn-login:hover{background:#2563eb}
.btn-login:active{background:#1d4ed8}

/* Admin CTA button: same style, default cyan color */
.btn-admin{
  width:100%;
  background:var(--cyan);
  color:#fff;
  border-radius:12px;
  margin-top:30px;
  box-shadow:0 0 0 4px rgba(25, 182, 207, .25), 0 3px 8px rgba(2,12,27,.12);
}
.btn-admin:hover{background:#119eb4}
.btn-admin:active{background:#0c8da0}

/* Register button: cyan with soft ring (matches provided design) */
.btn-register{
  width:100%;
  background:var(--cyan);
  color:#fff;
  border-radius:12px;
  font-size:16px;
  box-shadow:0 0 0 4px rgba(25,182,207,.25), 0 3px 8px rgba(2,12,27,.12);
}
.btn-register:hover{background:#119eb4}
.btn-register:active{background:#0c8da0}

/* Toast (login success) */
.toast-stack{position:fixed;right:20px;top:20px;z-index:10000;display:flex;flex-direction:column;gap:10px}
.toast-card{position:relative;display:grid;grid-template-columns:34px 1fr 28px;align-items:center;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);padding:10px 10px 10px 10px;min-width:260px;max-width:min(90vw,420px);opacity:0;transform:translateY(-6px);animation:toastIn .18s ease-out forwards}
.toast-card .tc-left{display:none}
.toast-card.success .tc-left{display:none}
.toast-card.error .tc-left{display:none}
.toast-card .tc-ico{grid-column:1/2;display:flex;align-items:center;justify-content:center}
.toast-card .tc-ico .tick{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#22c55e;color:#fff;font-weight:800;align-items:center;justify-content:center;line-height:1}
.toast-card .tc-ico .bang{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#ef4444;color:#fff;font-weight:800;align-items:center;justify-content:center;line-height:1}
.toast-card .tc-body{grid-column:2/4;padding:0 8px}
.toast-card .tc-title{font-weight:800;color:#0f172a}
.toast-card .tc-sub{font-size:12px;color:#6b7280}
.toast-card .tc-close{grid-column:4/5;background:transparent;border:0;color:#9ca3af;font-size:18px;cursor:pointer;line-height:1}
.toast-card .tc-close:hover{color:#111827}
@keyframes toastIn{to{opacity:1;transform:translateY(0)}}

/* Login failed modal */
.lm-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:10000}
.lm-modal.open{display:flex}
.lm-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(2px)}
.lm-card{position:relative;background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:0 18px 45px rgba(2,12,27,.18), 0 2px 6px rgba(2,12,27,.08);width:min(360px, calc(100% - 40px));padding:22px 20px;text-align:center}
.lm-icon{display:flex;align-items:center;justify-content:center;margin-bottom:8px}
.lm-title{margin:4px 0 4px;font-size:20px;font-weight:800;color:#6366f1}
.lm-sub{margin:0 0 12px;font-size:14px;color:#6b7280}
.lm-actions{display:flex;justify-content:center}
.lm-ok{min-width:96px;height:38px;border-radius:999px;background:#9bd6ff;color:#fff;border:1px solid #7cc7ff}
.lm-ok:hover{background:#86cdfc}

@media (max-width: 768px){
  body.login-page{background:linear-gradient(90deg, #A9D2FF 0%, #6CB2FF 50%, #3B82F6 100%);}
  body.login-page .login-wrap{justify-content:flex-start;padding-top:24px;padding-bottom:24px}
  .auth-shell{flex-direction:column-reverse;max-width:100%;border-radius:0;background:transparent;box-shadow:none}
  .auth-main{flex:0 0 auto;padding:0 16px 32px;background:transparent}
  .auth-main .card{border-radius:12px;max-width:100%;box-shadow:0 18px 40px rgba(15,23,42,.22)}
  .auth-hero{flex:0 0 auto;min-height:260px;background:transparent;padding:32px 16px 24px}
  .hero-logo img{max-width:320px;margin:0 auto 4px}
  .register-page .auth-main{padding:0 16px 32px}
  .register-page .card{padding:20px 18px 20px}
  .register-page .form-group{margin-bottom:10px}
  .hero-subtitle{font-size:13px}
}
