@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

/* ===== Modal Footer ===== */
.modal__footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 16px 24px 24px;
  border-top: 1px solid #f1f5f9;
}
/* ===== Modal Buttons ===== */
.modal__btn {
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  line-height: 1.4;
}
.modal__btn:active {
  transform: scale(0.98);
}
.modal__btn-primary {
  background: #111111;
  color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.modal__btn-primary:hover {
  background: #2d3748;
}
.modal__btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}
.modal__btn-secondary:hover {
  background: #f8fafc;
}
/* ===== Success & Error Variants ===== */
.modal__header--success .modal__title {
  color: #059669;
}
.modal__header--error .modal__title {
  color: #dc2626;
}
.modal__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.modal__icon--success {
  background: #d1fae5;
  color: #059669;
}
.modal__icon--error {
  background: #fee2e2;
  color: #dc2626;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial,
    sans-serif;
  background-image: url("sky.jpg");
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

/* Card Container */
.card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  padding: 32px 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.35);
  z-index: 0;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  border-radius: inherit;
  pointer-events: none;
  /* Fade putih → transparan + grid biru muda */
  background-image:
    /* fade atas ke bawah */ linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0.6) 18%,
      rgba(255, 255, 255, 0) 45%,
      rgba(255, 255, 255, 0) 100%
    ),
    /* garis vertikal biru muda */
      linear-gradient(
        to right,
        rgba(96, 165, 250, 0.4) 1px,
        /* #60a5fa */ transparent 1px
      ),
    /* garis horizontal biru muda */
      linear-gradient(to bottom, rgba(96, 165, 250, 0.35) 1px, transparent 1px);
  background-size: 100% 100%, /* fade overlay */ 24px 24px,
    /* grid vertikal */ 24px 24px; /* grid horizontal */
  background-position: 0 0, 6px 4px, 6px 4px;
  opacity: 0.9;
  mix-blend-mode: screen;
  z-index: -1;
}

/* Login Icon */
.login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px; /* jarak ke elemen bawah */
}

.login-icon img {
  /* width: 80px;      lebar gambar */
  /* height: 80px;     tinggi gambar */
  width: 100%;      /* lebar gambar */  
  object-fit: contain; /* jaga proporsi, tidak pecah */
}

/* Title */
h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a202c;
  text-align: center;
  margin-bottom: 12px;
}

/* Subtitle */
.subtitle {
  font-size: 15px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 35px;
}

/* Input Group */
.input-group {
  margin-bottom: 16px;
  position: relative;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: #94a3b8;
}

input {
  width: 100%;
  padding: 10px 16px 10px 48px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  font-size: 15px;
  color: #1a202c;
  outline: none;
  transition: all 0.3s ease;
}

input[type="password"],
input#password {
  padding-right: 48px !important;
}

input::placeholder {
  color: #4e5661;
}

input:focus {
  background: rgba(241, 245, 249, 1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: #64748b;
}

/* Forgot Password */
.forgot-password {
  text-align: right;
  margin-bottom: 28px;
}

.forgot-password a {
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #1a202c;
}

.btn-primary {
  position: relative;
  overflow: hidden;

  width: 100%;
  padding: 10px;
  background: #111111;
  color: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;

  font-size: 16px;
  font-weight: 100;
  cursor: pointer;

  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(45, 55, 72, 0.2);
}

/* Layer gradient putih di atas tombol */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.2) 10%,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0) 100%
  );

  opacity: 0.9;
  mix-blend-mode: screen;
}

.btn-primary:hover {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 28px 0;
  color: #94a3b8;
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.3);
}

.divider::before {
  margin-right: 12px;
}

.divider::after {
  margin-left: 12px;
}

/* Social Buttons */
.social-buttons {
  display: flex;
  gap: 1px;
}

.social-btn {
  width: 100%;
  height: 40px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.social-btn svg {
  width: 24px;
  height: 24px;
}

/* ===== Micromodal Base ===== */
.modal {
  display: none;
}
.modal.is-open {
  display: block;
}
.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 16px;
}
.modal__container {
  background: #ffffff;
  border-radius: 12px;
  max-width: 425px;
  width: 100%;
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* ===== Modal Header ===== */
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.modal__title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  line-height: 1.4;
}
.modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.modal__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.modal__close:active {
  transform: scale(0.95);
}
/* ===== Modal Content ===== */
.modal__content {
  padding: 24px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}
.modal__content p {
  margin: 0;
}


/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 24px 20px; /* diperkecil, bukan dibesarkan */
    border-radius: 24px;
  }
  h1 {
    font-size: 22px;
  }
  .subtitle {
    font-size: 14px;
  }
    .modal__container {
    max-width: 100%;
    margin: 0;
    border-radius: 12px;
  }
  .modal__header {
    padding: 20px 20px 12px;
  }
  .modal__content {
    padding: 20px;
  }
  .modal__footer {
    padding: 12px 20px 20px;
  }
}
