/* ============================================================
   Premium Login Styles - Akuntansi-PRO
   Dipakai oleh: login.html (body.premium-login-body)
   Latar belakang memakai /accounting-bg.svg (pola akuntansi).
   Selector di-scope agar tidak bocor ke halaman seperti
   change-password.html yang juga memuat file ini.
   ============================================================ */

.premium-auth-page,
.premium-auth-page * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.premium-login-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  /* Sebelumnya `overflow: hidden` membuat konten yang lebih tinggi dari
     layar terpotong dan tak bisa di-scroll. Sekarang izinkan scroll
     vertikal agar tetap bisa diakses pada rasio 100% / layar pendek. */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.premium-auth-page {
  min-height: 100vh;
  display: flex;
  position: relative;
  background: linear-gradient(135deg, #0a0f1a 0%, #1a1f2e 50%, #0d1220 100%);
}

/* Animated Background */
.auth-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  /* `clip` (lebih kuat dari hidden) mencegah blob dekoratif yang
     membesar karena blur menambah tinggi scroll halaman. */
  overflow: clip;
}

/* Pola akuntansi (SVG) sebagai lapisan latar */
.auth-bg-image {
  position: absolute;
  inset: 0;
  background: url('/accounting-bg.svg') center / cover no-repeat;
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  bottom: -10%;
  left: -5%;
  animation-delay: -5s;
}

.shape-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #10b981 0%, transparent 70%);
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

.shape-4 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: 60%;
  right: 20%;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(20px, 30px) scale(1.02);
  }
}

/* Grid Pattern Overlay */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
}

/* Main Content */
.auth-container {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left Panel - Branding & Info */
.auth-left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* `safe center` mencegah konten terpotong di atas saat tingginya
     melebihi layar (rasio 100% / layar pendek); fallback ke center. */
  justify-content: center;
  justify-content: safe center;
  padding: 60px;
  color: white;
}

.brand-section {
  margin-bottom: 50px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.35), 0 0 0 1px rgba(251, 191, 36, 0.3);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 44px rgba(245, 158, 11, 0.45), 0 0 0 1px rgba(251, 191, 36, 0.4);
}

.logo-icon .logo-icon-text {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(120, 53, 15, 0.4);
  user-select: none;
}

.brand-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-name .highlight {
  color: #f59e0b;
}

.brand-name .brand-pro-text {
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.brand-tagline {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 500px;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 500px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.3);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 15px;
  color: #fff;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-icon.accounting {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.feature-icon.reports {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.feature-icon.tax {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.feature-icon.audit {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.feature-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* Right Panel - Login Form */
.auth-right-panel {
  width: 480px;
  display: flex;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h2 {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.login-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: #9aa0b0;
  z-index: 1;
  display: flex;
  align-items: center;
}

.input-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.form-group input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  background: #eef1fb;
  border: 1.5px solid #e2e7f5;
  border-radius: 12px;
  font-size: 15px;
  color: #1f2430;
  transition: all 0.3s ease;
}

.form-group input::placeholder {
  color: #9aa0b0;
}

.form-group input:focus {
  outline: none;
  border-color: #f59e0b;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: #9aa0b0;
  cursor: pointer;
  font-size: 18px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0;
}

.password-toggle:hover {
  color: #5a6072;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f59e0b;
  cursor: pointer;
}

.forgot-password {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #fbbf24;
}

.btn-login {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.social-login {
  margin-top: 30px;
}

.social-divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.social-divider::before,
.social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.social-divider span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.social-buttons {
  display: flex;
  gap: 12px;
}

.social-btn {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.login-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.6;
}

.login-footer a {
  color: #f59e0b;
  text-decoration: none;
  font-weight: 500;
}

/* Message Box (scoped ke halaman login premium) */
.premium-auth-page .message-box {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}

.premium-auth-page .message-box.error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: block;
}

.premium-auth-page .message-box.success {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: block;
}

.premium-auth-page .message-box.loading {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: block;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-left-panel {
  animation: fadeInUp 0.8s ease-out;
}

.auth-right-panel {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Responsive */
@media (max-width: 1024px) {
  .auth-left-panel {
    display: none;
  }

  .auth-right-panel {
    width: 100%;
    border-left: none;
  }
}

@media (max-width: 480px) {
  .auth-right-panel {
    padding: 20px;
  }

  .login-card {
    max-width: 100%;
  }
}

/* Layar pendek (laptop dengan rasio 100% / zoom normal):
   kecilkan jarak & ukuran agar seluruh form terlihat tanpa scroll. */
@media (max-height: 920px) {
  .auth-left-panel {
    padding: 40px;
  }

  .brand-section {
    margin-bottom: 28px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-description {
    margin-bottom: 26px;
  }

  .feature-card {
    padding: 16px;
  }

  .stats-row {
    margin-top: 26px;
    padding-top: 22px;
  }

  .auth-right-panel {
    padding: 28px;
  }

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

  .login-form {
    gap: 18px;
  }

  .social-login {
    margin-top: 20px;
  }

  .social-divider {
    margin-bottom: 14px;
  }

  .login-footer {
    margin-top: 20px;
    padding-top: 20px;
  }
}

@media (max-height: 760px) {
  .auth-left-panel {
    padding: 26px;
  }

  .brand-section {
    margin-bottom: 18px;
  }

  .hero-description,
  .stats-row {
    display: none;
  }

  .features-grid {
    gap: 12px;
  }

  .feature-card {
    padding: 12px;
  }

  .auth-right-panel {
    padding: 20px;
  }

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

  .login-header h2 {
    font-size: 26px;
  }

  .login-form {
    gap: 14px;
  }

  .form-group input {
    padding: 13px 14px 13px 46px;
  }

  .social-login {
    margin-top: 16px;
  }

  .social-divider {
    margin-bottom: 12px;
  }

  .login-footer {
    margin-top: 16px;
    padding-top: 16px;
  }
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Stats Counter */
.stats-row {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: left;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: #f59e0b;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
