/* ============================================================
   SIMPATEL STUDIOS - auth.css
   Styles untuk halaman login & register
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ─── AUTH PANEL KIRI ────────────────────────────────────── */
.auth-branding {
  background: linear-gradient(145deg, var(--primary) 0%, #8B5CF6 50%, var(--accent) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 52px;
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}

.auth-branding::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255,255,255,.95);
  line-height: 1.2;
}

.brand-tagline {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  font-weight: 400;
}

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

.auth-brand-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: white;
  line-height: 1.25;
  margin-bottom: 16px;
}

.auth-brand-content h1 span {
  color: rgba(255,255,255,.7);
}

.auth-brand-content p {
  font-size: .95rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  max-width: 380px;
}

.auth-features {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.1);
}

.auth-feature-text {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  font-weight: 500;
}

/* ─── AUTH PANEL KANAN ───────────────────────────────────── */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 32px;
  background: var(--white);
  overflow-y: auto;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  animation: fadeIn .4s ease;
}

.auth-box-header {
  margin-bottom: 32px;
}

.auth-box-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-box-header p {
  font-size: .88rem;
  color: var(--gray-400);
}

/* Tabs untuk pilih role */
.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.role-tab {
  padding: 14px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: var(--tr);
  background: var(--white);
}

.role-tab:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.role-tab.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.role-tab-icon { font-size: 1.6rem; margin-bottom: 6px; }
.role-tab-label { font-size: .85rem; font-weight: 600; color: var(--gray-700); }
.role-tab-desc  { font-size: .72rem; color: var(--gray-400); margin-top: 2px; }

.role-tab.selected .role-tab-label { color: var(--primary); }
.role-tab.selected .role-tab-desc  { color: var(--primary); opacity: .7; }

/* Auth switch */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: .85rem;
  color: var(--gray-500);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.auth-switch a:hover { text-decoration: underline; }

/* Divider OR */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-divider span { font-size: .78rem; color: var(--gray-400); font-weight: 500; }

/* Password visibility toggle */
.input-group {
  position: relative;
}

.input-group .form-control { padding-right: 44px; }

.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--tr);
  padding: 4px;
  border-radius: 4px;
}

.input-toggle:hover { color: var(--gray-700); background: var(--gray-100); }

/* Publisher-only fields */
.publisher-fields {
  display: none;
}

.publisher-fields.visible { display: block; }

/* Auth footer */
.auth-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
  font-size: .72rem;
  color: var(--gray-300);
}

/* ─── ADMIN LOGIN ─────────────────────────────────────────── */
.admin-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-900);
  padding: 20px;
}

.admin-auth-box {
  background: var(--gray-800);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.admin-auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,71,87,.15);
  border: 1px solid rgba(255,71,87,.3);
  color: #ff8c95;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.admin-auth-header h2 { color: var(--white); font-size: 1.5rem; }
.admin-auth-header p  { color: var(--gray-400); font-size: .85rem; margin-top: 6px; }

.admin-auth-box .form-label { color: var(--gray-300); }

.admin-auth-box .form-control {
  background: var(--gray-900);
  border-color: var(--gray-700);
  color: var(--white);
}

.admin-auth-box .form-control:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,71,87,.15);
}

.admin-auth-box .form-control::placeholder { color: var(--gray-600); }

.btn-admin-login {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn-admin-login:hover:not(:disabled) {
  background: #e0001b;
  border-color: #e0001b;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-branding {
    padding: 40px 32px;
    min-height: 220px;
  }

  .auth-branding .auth-brand-content h1 {
    font-size: 1.6rem;
  }

  .auth-features { display: none; }

  .auth-form-panel { padding: 32px 20px; }

  .auth-box { max-width: 100%; }
}

@media (max-width: 480px) {
  .auth-branding { padding: 28px 20px; min-height: 180px; }
  .auth-branding .auth-brand-content h1 { font-size: 1.4rem; }
  .auth-form-panel { padding: 24px 16px; }
  .admin-auth-box { padding: 28px 20px; }
}
