:root {
  --primary-blue: #364b98;
  --accent-blue: #4e6ddb;
  --light-blue: #8fa3ef;
  --bg-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background: #ffffff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
  overflow-x: hidden;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Container Utama */
.auth-container {
  width: 100%;
  max-width: 1050px;
  min-height: 650px;
  background: #fff;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  box-shadow:
    0 25px 60px -12px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 1;
}

/* Sisi Kiri: Brand & Identity */
.brand-section {
  background: var(--primary-blue);
  width: 50%;
  padding: 60px 40px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.brand-section::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  z-index: -1;
}

.brand-section h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 5px;
  margin: 0;
  text-transform: uppercase;
}

.brand-section p {
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 10px;
  line-height: 1.6;
}

.brand-section hr {
  width: 80px;
  border-top: 4px solid #fff;
  opacity: 1;
  margin: 30px auto;
}

.university-name {
  font-weight: 600;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Sisi Kanan: Form & Interactive Logic */
.form-section {
  width: 50%;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  position: relative;
}

/* Animasi Transisi Halaman */
.content-wrapper {
  display: none;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  width: 100%;
}

.content-wrapper.active {
  display: block;
  opacity: 1;
  animation: slideIn 0.4s ease forwards;
  z-index: 10;
  position: relative;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

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

.btn-light {
  position: relative;
  z-index: 20;
  cursor: pointer !important;
}

/* Desain Tombol Menu (Futuristik) */
.btn-role {
  position: relative;
  width: 100%;
  padding: 20px 25px;
  margin-bottom: 15px;
  border-radius: 20px;
  border: 1px solid #edf2f7;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  text-decoration: none;
  color: var(--primary-blue);
}

.btn-role:hover {
  background: var(--primary-blue);
  color: white !important;
  transform: scale(1.02) translateX(10px);
  box-shadow: 0 15px 30px rgba(54, 75, 152, 0.2);
  border-color: var(--primary-blue);
}

.role-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.role-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0;
}

.role-desc {
  font-size: 0.8rem;
  opacity: 0.7;
}

.btn-role .icon-box {
  width: 45px;
  height: 45px;
  background: rgba(54, 75, 152, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-role:hover .icon-box {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(360deg);
}

/* Styling Input Form - DIPERBARUI */
.input-group-custom {
  margin-bottom: 10px;
}

/* Style Input Field dalam Group */
.form-control-custom {
  border-radius: 15px;
  padding: 14px 15px 14px 50px;
  background: #f1f5f9;
  border: 1px solid transparent;
  font-weight: 500;
  transition: var(--transition);
}

/* Reset padding untuk input yang ada di dalam input-group agar seragam */
.input-group-custom .form-control {
  border-radius: 15px !important;
  /* Force radius agar seragam */
  padding-left: 50px;
  background: #f1f5f9;
  border: 1px solid transparent;
  font-weight: 500;
}

.input-group-custom .form-control:focus {
  background: #fff;
  border-color: var(--accent-blue);
  box-shadow: none;
}

/* Container Icon Kiri (User, Key, Door) */
.input-icon-left {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 5;
  font-size: 1.2rem;
}

/* Style Container Khusus Input Password Group */
.password-group {
  position: relative;
  display: flex;
  align-items: center;
}

/* Container Icon Kanan (Mata) */
.showPassword {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  /* Berada di depan input field */
  padding: 5px;
  /* Tambah padding agar mudah di-tap di mobile */
  transition: color 0.3s;
}

.showPassword:hover {
  color: var(--accent-blue) !important;
}

/* Captcha Design */
.captcha-container {
  background: #fff5f5;
  border: 2px dashed #feb2b2;
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  margin-bottom: 20px;
}

.captcha-code {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 8px;
  color: #e53e3e;
  font-family: "Courier New", Courier, monospace;
}

.btn-login {
  background: var(--primary-blue);
  border: none;
  border-radius: 15px;
  padding: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(54, 75, 152, 0.3);
}

/* Responsive Mobile & Tablet */
@media (max-width: 992px) {
  .auth-container {
    flex-direction: column;
    max-width: min(92vw, 700px);
  }

  .brand-section {
    width: 100%;
    padding: 40px 20px;
  }

  .form-section {
    width: 100%;
    padding: 40px 30px;
  }

  .brand-section h1 {
    font-size: 3rem;
  }
}

@media (min-width: 768px) and (max-width: 992px) {
  .role-selection-header {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .auth-container {
    max-width: min(94vw, 520px);
  }
}

html.theme-dark body,
body.theme-dark {
  background: radial-gradient(
    circle at top,
    #19203c 0%,
    #0f1428 45%,
    #080b17 100%
  );
  color: #e5ecff;
}

html.theme-dark .auth-container,
body.theme-dark .auth-container {
  background: #131a33;
  border: 1px solid rgba(114, 140, 255, 0.25);
  box-shadow:
    0 25px 70px -20px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(122, 149, 255, 0.14);
}

html.theme-dark .brand-section,
body.theme-dark .brand-section {
  background: linear-gradient(165deg, #233677 0%, #3d4ea4 65%, #5a67c7 100%);
}

html.theme-dark .form-section,
body.theme-dark .form-section {
  background: #0f162e;
}

html.theme-dark .text-dark,
body.theme-dark .text-dark {
  color: #f1f4ff !important;
}

html.theme-dark .text-muted,
body.theme-dark .text-muted {
  color: #9db0e5 !important;
}

html.theme-dark .btn-role,
body.theme-dark .btn-role {
  background: #182242;
  border-color: rgba(129, 156, 255, 0.18);
  color: #dbe6ff;
}

html.theme-dark .btn-role:hover,
body.theme-dark .btn-role:hover {
  background: #3f5bc3;
  border-color: #5f7bf4;
  box-shadow: 0 15px 30px rgba(46, 78, 202, 0.38);
}

html.theme-dark .btn-role .icon-box,
body.theme-dark .btn-role .icon-box {
  background: rgba(125, 153, 255, 0.18);
}

html.theme-dark .input-group-custom .form-control,
html.theme-dark .form-control-custom,
body.theme-dark .input-group-custom .form-control,
body.theme-dark .form-control-custom {
  background: #151f3f !important;
  border-color: rgba(129, 156, 255, 0.15) !important;
  color: #eaf0ff !important;
}

html.theme-dark .input-group-custom .form-control:focus,
html.theme-dark .form-control-custom:focus,
body.theme-dark .input-group-custom .form-control:focus,
body.theme-dark .form-control-custom:focus {
  background: #1c2950 !important;
  border-color: #5f7bf4 !important;
  color: #f5f8ff !important;
}

html.theme-dark .input-group-custom .form-control::placeholder,
html.theme-dark .form-control-custom::placeholder,
body.theme-dark .input-group-custom .form-control::placeholder,
body.theme-dark .form-control-custom::placeholder {
  color: #9fb2e8;
}

html.theme-dark input.username,
html.theme-dark input.password,
body.theme-dark input.username,
body.theme-dark input.password {
  background-color: #151f3f !important;
  border-color: rgba(129, 156, 255, 0.15) !important;
  color: #eaf0ff !important;
}

html.theme-dark input.username:focus,
html.theme-dark input.password:focus,
body.theme-dark input.username:focus,
body.theme-dark input.password:focus {
  background-color: #1c2950 !important;
  border-color: #5f7bf4 !important;
  color: #f5f8ff !important;
}

html.theme-dark input.username:-webkit-autofill,
html.theme-dark input.password:-webkit-autofill,
html.theme-dark input.username:-webkit-autofill:hover,
html.theme-dark input.password:-webkit-autofill:hover,
html.theme-dark input.username:-webkit-autofill:focus,
html.theme-dark input.password:-webkit-autofill:focus,
body.theme-dark input.username:-webkit-autofill,
body.theme-dark input.password:-webkit-autofill,
body.theme-dark input.username:-webkit-autofill:hover,
body.theme-dark input.password:-webkit-autofill:hover,
body.theme-dark input.username:-webkit-autofill:focus,
body.theme-dark input.password:-webkit-autofill:focus {
  -webkit-text-fill-color: #eaf0ff !important;
  box-shadow: 0 0 0 1000px #151f3f inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

html.theme-dark .input-icon-left,
body.theme-dark .input-icon-left {
  color: #8fa4e8;
}

html.theme-dark .captcha-container,
body.theme-dark .captcha-container {
  background: #2a1a2f;
  border-color: #744567;
}

html.theme-dark .captcha-code,
body.theme-dark .captcha-code {
  color: #ff8ab3;
}

html.theme-dark .btn-light,
body.theme-dark .btn-light {
  background: #1d284f !important;
  color: #dce6ff !important;
}
