/**
 * Author: Dimas Aulia Trianggana (dat.vaditra)
 * Email: dimasauliat@gmail.com
 * Copyright (c) 2026 Dimas Aulia Trianggana. All rights reserved.
 */
/* SIOBE */

/* Soft page chrome — hindari flash putih saat dari splash */
html.from-splash,
html.from-splash body.auth-body {
  background: var(--siobe-primary-dark, #0b3a8c);
}

body.auth-body {
  margin: 0;
  background: var(--siobe-page-bg, #f4f7fe);
}

/* Cross-document view transition */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: auth-vt-out 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

::view-transition-new(root) {
  animation: auth-vt-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-vt-out {
  to {
    opacity: 0;
  }
}

@keyframes auth-vt-in {
  from {
    opacity: 0;
  }
}

/* LOGIN PAGE */

.login-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  overflow: hidden;
  background: var(--siobe-page-bg, #f4f7fe);
  animation: login-page-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.from-splash .login-page {
  animation-duration: 0.45s;
}

@keyframes login-page-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* LEFT PANEL */

.login-left {
  position: relative;
  width: 42%;
  min-height: 100vh;
  overflow: hidden;
  padding: 70px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--siobe-login-from, #1e3a8a) 0%, var(--siobe-login-to, #2563eb) 100%);
  color: #fff;
}

.login-left:not(.animate__animated) {
  animation: login-panel-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.from-splash .login-left:not(.animate__animated) {
  animation-name: login-panel-soft;
  animation-duration: 0.5s;
}

/* RIGHT PANEL */

.login-right {
  width: 58%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;

  /* Background — path dari .env CAMPUS_LOGIN_BG via --campus-login-bg */
  background-image: var(--campus-login-bg, url("../images/campus-bg.jpg"));
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.login-right:not(.animate__animated) {
  animation: login-panel-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

html.from-splash .login-right:not(.animate__animated) {
  animation-name: login-panel-soft;
  animation-duration: 0.55s;
  animation-delay: 0.04s;
}

@keyframes login-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes login-panel-soft {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


/* BACKGROUND SHAPE */

.background-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.shape-1 {
  width: 420px;
  height: 420px;
  background: #fff;
  top: -120px;
  left: -100px;
}

.shape-2 {
  width: 260px;
  height: 260px;
  background: #fff;
  right: -70px;
  bottom: 120px;
}

.shape-3 {
  width: 160px;
  height: 160px;
  background: #fff;
  top: 45%;
  left: 65%;
}

/* BRAND */

.brand-content {
  position: relative;
  z-index: 2;
}

.brand-logo {
  width: 115px;
  margin-bottom: 25px;
}

.brand-content h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.brand-content h2 {
  font-size: 28px;
  line-height: 40px;
  font-weight: 600;
  margin-bottom: 25px;
}

.brand-content p {
  width: 85%;
  line-height: 30px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.88);
}

/* FEATURE BOX */

.feature-box {
  position: relative;
  z-index: 2;
  width: 85%;
  padding: 28px;
  border-radius: 22px;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 500;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-item i {
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 14px;
}

/* LEFT FOOTER */

.left-footer {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 26px;
}

/* LOGIN CARD */

.login-card {
  width: 470px;
  background: #fff;
  border-radius: 28px;
  padding: 50px;
  box-shadow:
    0 15px 40px rgba(15, 23, 42, 0.08),
    0 5px 15px rgba(15, 23, 42, 0.04);
}

/* LOGIN HEADER */

.login-header {
  margin-bottom: 35px;
}

.login-header h3 {
  font-size: 34px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

.login-header p {
  color: #64748b;
  line-height: 28px;
  margin: 0;
}

/* FORM */

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.input-group {
  position: relative;
  margin-bottom: 8px;
}

.input-group-text {
  width: 52px;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-right: none;
  color: #64748b;
  border-radius: 14px 0 0 14px;
}

.input-group .form-control {
  height: 55px;
  border: 1px solid #e2e8f0;
  border-left: none;
  border-radius: 0 14px 14px 0;
  font-size: 15px;
  box-shadow: none;
}

.input-group .form-control:focus {
  border-color: #2563eb;
}

.input-group:focus-within .input-group-text {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

/* PASSWORD */

.password-group {
  position: relative;
}

.btn-password {
  position: absolute;
  right: 0;
  top: 0;
  width: 55px;
  height: 55px;
  border: none;
  background: transparent;
  color: #64748b;
  z-index: 20;
}

.btn-password:hover {
  color: #2563eb;
}

.btn-password:focus {
  box-shadow: none;
}

/* REMEMBER */

.login-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 18px;
}

.form-check-input {
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  font-size: 14px;
  color: #475569;
}

.turnstile-wrap {
  margin: 0 0 18px;
  min-height: 65px;
}

.turnstile-wrap .siobe-turnstile,
.turnstile-wrap iframe {
  max-width: 100%;
}

.turnstile-status {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

/* LOGIN BUTTON */

.btn-login {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.3);
}

.btn-login:active {
  transform: scale(0.98);
}

.btn-login i {
  font-size: 16px;
}

/* LOGIN BOTTOM */

.login-bottom {
  margin-top: 35px;
  text-align: center;
}

.login-bottom span {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.login-bottom small {
  color: #94a3b8;
}

/* ALERT */

.alert {
  border-radius: 14px;
  font-size: 14px;
  margin-bottom: 25px;
}

/* INPUT PLACEHOLDER */

.form-control::placeholder {
  color: #94a3b8;
}

.form-control {
  transition: 0.3s;
}

.form-control:hover {
  background: #fcfcfd;
}

/* CARD HOVER */

.login-card {
  transition: 0.35s;
}

.login-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 25px 55px rgba(15, 23, 42, 0.12),
    0 10px 25px rgba(15, 23, 42, 0.06);
}

/* BRAND EFFECT */

.brand-logo {
  transition: 0.35s;
}

.brand-logo:hover {
  transform: scale(1.05);
}

.feature-box {
  transition: 0.35s;
}

.feature-box:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* FLOATING ANIMATION */

@keyframes floatOne {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-18px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes floatTwo {
  0% {
    transform: translateX(0px);
  }

  50% {
    transform: translateX(20px);
  }

  100% {
    transform: translateX(0px);
  }
}

@keyframes floatThree {
  0% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-15px, -15px);
  }

  100% {
    transform: translate(0, 0);
  }
}

.shape-1 {
  animation: floatOne 8s ease-in-out infinite;
}

.shape-2 {
  animation: floatTwo 10s ease-in-out infinite;
}

.shape-3 {
  animation: floatThree 12s ease-in-out infinite;
}

/* GLOW EFFECT */

.login-left::before {
  content: "";

  position: absolute;

  width: 500px;

  height: 500px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.05);

  top: -180px;

  right: -180px;

  filter: blur(30px);
}

.login-left::after {
  content: "";

  position: absolute;

  width: 350px;

  height: 350px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.04);

  bottom: -120px;

  left: -120px;

  filter: blur(25px);
}

/* FEATURE HOVER */

.feature-item {
  transition: 0.35s;
}

.feature-item:hover {
  transform: translateX(10px);
}

.feature-item:hover i {
  transform: rotate(360deg);
}

.feature-item i {
  transition: 0.45s;
}

/* BRAND TITLE */

.brand-content h1 {
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.brand-content h2 {
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* LOGIN CARD ANIMATION */

.login-card {
  animation: fadeCard 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.from-splash .login-card {
  animation-duration: 0.5s;
  animation-delay: 0.08s;
}

@keyframes fadeCard {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* BUTTON EFFECT */

.btn-login {
  overflow: hidden;

  position: relative;
}

.btn-login::before {
  content: "";

  position: absolute;

  width: 30px;

  height: 180%;

  background: rgba(255, 255, 255, 0.25);

  top: -20px;

  left: -60px;

  transform: rotate(25deg);

  transition: 0.8s;
}

.btn-login:hover::before {
  left: 120%;
}

/* INPUT EFFECT */

.form-control {
  transition: 0.35s;
}

.form-control:focus {
  background: #fff;

  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

/* MOBILE */

@media (max-width: 1200px) {
  .login-left {
    width: 45%;

    padding: 50px;
  }

  .login-right {
    width: 55%;
  }
}

@media (max-width: 992px) {
  .login-left {
    display: none;
  }

  .login-right {
    width: 100%;

    padding: 30px;
  }

  .login-card {
    width: 100%;

    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .login-right {
    padding: 20px;
  }

  .login-card {
    padding: 35px;

    border-radius: 20px;
  }

  .login-header h3 {
    font-size: 28px;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 28px 24px;
  }

  .login-header {
    text-align: center;
  }

  .login-header h3 {
    font-size: 25px;
  }

  .login-bottom {
    font-size: 13px;
  }

  .btn-login {
    height: 52px;
  }
}

/* LARGE MONITOR */

@media (min-width: 1600px) {
  .login-left {
    padding: 90px;
  }

  .brand-content h1 {
    font-size: 64px;
  }

  .brand-content h2 {
    font-size: 34px;
  }

  .login-card {
    width: 520px;
  }
}

/* REDUCE MOTION */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;

    transition: none !important;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }

  .login-page,
  .login-left:not(.animate__animated),
  .login-right:not(.animate__animated),
  .login-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* BUTTON LOADING & ERROR PAGES */

.error-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 22px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.error-detail {
  color: #64748b;
  line-height: 1.75;
  margin-bottom: 28px;
  font-size: 15px;
}

.btn-error-secondary {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.btn-error-secondary:hover {
  border-color: #2563eb;
  color: #1e3a8a;
  background: #eff6ff;
}

.login-card.error-card:hover {
  transform: none;
}

.btn-login:disabled {
  opacity: 0.85;

  cursor: not-allowed;

  transform: none !important;
}

.login-brand-link {
  color: inherit;
  text-decoration: none;
}

.login-brand-link:hover,
.login-brand-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* SweetAlert2 — pastikan tombol kontras (hindari teks putih di background putih) */
.swal2-popup {
  color: #1e293b;
}

.swal2-styled.swal2-confirm {
  background-color: var(--siobe-primary-dark, #1e3a8a) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

.swal2-styled.swal2-cancel {
  background-color: #64748b !important;
  color: #fff !important;
  border: 0 !important;
}

.swal2-styled.swal2-deny {
  color: #fff !important;
}
