/* Shared login portal styles — PTK (teal) & Admin (navy) */
.login-shell {
  min-height: 100vh;
  display: flex;
  background: var(--lp-bg, #f8fafc);
}

.login-hero {
  flex: 1.15;
  display: none;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  color: var(--lp-hero-text, #0f172a);
  padding: 2.5rem 3.5rem;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 992px) {
  .login-hero { display: flex; }
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, .04), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(13, 148, 136, .03), transparent 50%);
  pointer-events: none;
}

.login-hero-top,
.login-hero-mid,
.login-hero-bottom {
  position: relative;
  z-index: 2;
}

.login-hero-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--lp-hero-text, #0f172a);
}

.login-hero-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 14px;
  padding: 5px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  border: 1px solid rgba(226, 232, 240, .9);
}

.login-hero-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
  flex: 1;
  justify-content: center;
  padding: 0.5rem 0;
}

.login-hero-logo-box {
  width: min(420px, 48vh);
  height: min(420px, 48vh);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

@media (min-width: 1200px) {
  .login-hero-logo-box {
    width: min(460px, 52vh);
    height: min(460px, 52vh);
  }
}

.login-hero-logo-box::before {
  content: '';
  position: absolute;
  width: 90%;
  height: 90%;
  background: radial-gradient(circle, rgba(37, 99, 235, .10) 0%, rgba(99, 102, 241, .03) 55%, transparent 75%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(14px);
  z-index: 0;
}

.login-hero-logo-box .login-hero-logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-hero-logo-box img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 42px rgba(37, 99, 235, .20));
  animation: lpFloat 5.5s ease-in-out infinite;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-hero-logo-box:hover img {
  transform: scale(1.05) translateY(-6px);
}

.login-hero-mid h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: var(--lp-hero-text, #0f172a);
  margin: 0 0 .4rem;
  max-width: 28rem;
  line-height: 1.28;
  letter-spacing: -.02em;
}

.login-hero-mid p {
  margin: 0;
  color: var(--lp-hero-muted, #475569);
  font-size: .95rem;
  max-width: 26rem;
  line-height: 1.55;
}

.login-hero-bottom {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.login-hero-chip {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  border-radius: 999px;
  padding: .35rem .85rem;
}

.login-aside {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
  background: var(--lp-panel, #fff);
  position: relative;
  z-index: 3;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .06);
}

@media (min-width: 992px) {
  .login-aside {
    width: 44%;
    max-width: none;
    padding: 2.5rem 3rem;
  }
}

.login-card {
  width: 100%;
  max-width: 400px;
  animation: lpIn .45s ease both;
}

.login-role-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--lp-accent-dark);
  background: var(--lp-accent-soft);
  border: 1px solid var(--lp-accent-border);
  border-radius: 999px;
  padding: .32rem .75rem;
  margin-bottom: 1rem;
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.35rem;
}

.login-logo-wrap img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 7px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06), 0 2px 6px rgba(0, 0, 0, .04);
  flex-shrink: 0;
}

.login-school-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}

.login-school-sub {
  font-size: .78rem;
  color: #64748b;
  margin: .2rem 0 0;
}

.login-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 .3rem;
}

.login-subtitle {
  color: #64748b;
  font-size: .9rem;
  margin: 0 0 1.35rem;
  line-height: 1.45;
}

.login-alert {
  border: none;
  border-radius: 12px;
  font-size: .85rem;
  margin-bottom: 1rem;
}

.login-field {
  margin-bottom: 1rem;
}

.login-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: .4rem;
}

.login-field .form-control,
.login-field .form-select,
.login-period .form-select {
  min-height: 46px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  font-size: .95rem;
  padding: .55rem .9rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.login-field .input-group {
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.login-field .input-group .form-control {
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-height: 44px;
}

.login-field .input-group .input-group-text {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.login-field .input-group:focus-within,
.login-field .form-control:focus,
.login-field .form-select:focus,
.login-period .form-select:focus {
  border-color: var(--lp-accent);
  box-shadow: 0 0 0 .2rem var(--lp-focus);
  outline: none;
}

.login-period {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: .85rem .9rem;
  margin-bottom: 1.15rem;
}

.login-period-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}

.login-period .row {
  --bs-gutter-x: .6rem;
}

.login-period label {
  font-size: .75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: .3rem;
}

.btn-login-accent {
  min-height: 48px;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: .95rem !important;
  background: var(--lp-accent) !important;
  border-color: var(--lp-accent) !important;
  box-shadow: 0 10px 22px var(--lp-shadow) !important;
  transition: transform .15s, background .15s, box-shadow .15s !important;
}

.btn-login-accent:hover:not(:disabled) {
  background: var(--lp-accent-dark) !important;
  border-color: var(--lp-accent-dark) !important;
  transform: translateY(-1px);
}

.btn-login-accent:disabled {
  opacity: .75;
  cursor: wait;
}

.login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem .85rem;
  margin-top: 1.15rem;
  font-size: .85rem;
  color: #64748b;
}

.login-links a {
  color: var(--lp-accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

.login-foot {
  margin-top: 1.4rem;
  text-align: center;
  font-size: .75rem;
  color: #94a3b8;
}

.login-foot.footer-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-foot .fc-school {
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
}

.login-foot .fc-product {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: .78rem;
  color: #64748b;
}

.login-foot .fc-ver {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.login-foot .fc-author {
  font-size: .72rem;
  color: #94a3b8;
}

.login-maintenance {
  text-align: center;
  padding: 1rem 0;
}

.login-maintenance .icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

@keyframes lpIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes lpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Theme: PTK */
body.login-ptk {
  --lp-accent: #0d9488;
  --lp-accent-dark: #0f766e;
  --lp-accent-soft: #f0fdfa;
  --lp-accent-border: #99f6e4;
  --lp-focus: rgba(13, 148, 136, .18);
  --lp-shadow: rgba(13, 148, 136, .16);
  --lp-hero: #ffffff;
  --lp-hero-text: #0f172a;
  --lp-hero-muted: #64748b;
  --lp-panel: #ffffff;
  --lp-bg: #f8fafc;
}

body.login-ptk .login-hero-logo-box::before {
  background: radial-gradient(circle, rgba(13, 148, 136, .12) 0%, rgba(20, 184, 166, .03) 55%, transparent 75%);
}

body.login-ptk .login-hero-logo-box img {
  filter: drop-shadow(0 20px 42px rgba(13, 148, 136, .22));
}

/* Theme: Admin */
body.login-admin {
  --lp-accent: #2563eb;
  --lp-accent-dark: #1d4ed8;
  --lp-accent-soft: #eff6ff;
  --lp-accent-border: #bfdbfe;
  --lp-focus: rgba(37, 99, 235, .18);
  --lp-shadow: rgba(37, 99, 235, .16);
  --lp-hero: #ffffff;
  --lp-hero-text: #0f172a;
  --lp-hero-muted: #475569;
  --lp-panel: #ffffff;
  --lp-bg: #f8fafc;
}

@media (max-width: 991.98px) {
  .login-aside {
    box-shadow: none;
    background: transparent;
    min-height: 100vh;
  }
  body.login-ptk,
  body.login-admin {
    background: var(--lp-bg);
  }
  .login-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.35rem 1.2rem 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
    border: 1px solid rgba(226, 232, 240, .9);
  }
}
