/* ============================================================
   Kawan Giat - Realistic Modern SaaS Split Login Experience
   Inspired by Clearfreight & Enterprise Cloud Portals
   Kementerian Agama Kab. Bolaang Mongondow Utara
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --kg-primary: #059669;
  --kg-primary-dark: #047857;
  --kg-primary-light: #ecfdf5;
  --kg-accent-blue: #0284c7;
  --kg-accent-gradient: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  --kg-btn-gradient: linear-gradient(135deg, #10b981 0%, #0284c7 100%);
  --kg-bg-page: #f1f4fa;
  --kg-text-dark: #0f172a;
  --kg-text-muted: #64748b;
  --kg-text-light: #94a3b8;
  --kg-border: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--kg-bg-page);
  color: var(--kg-text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ============================================================
   MAIN WRAPPER & DESKTOP WINDOW MOCKUP CANVAS
   ============================================================ */
.login-canvas {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  background: radial-gradient(circle at 15% 25%, #e0e7ff 0%, #eef2ff 35%, #f1f5f9 70%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

/* Ambient Lighting Overlays */
.login-canvas::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, rgba(2, 132, 199, 0.1) 40%, transparent 70%);
  top: -200px;
  left: -150px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.login-canvas::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.08) 0%, rgba(56, 189, 248, 0.08) 50%, transparent 70%);
  bottom: -150px;
  right: 10%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

/* Top Decorative Browser Frame Dots (Matching Reference Style) */
.browser-window-dots {
  position: absolute;
  top: 24px;
  left: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 25;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.browser-window-dots:hover .browser-dot:nth-child(1) { background: #f87171; }
.browser-window-dots:hover .browser-dot:nth-child(2) { background: #fbbf24; }
.browser-window-dots:hover .browser-dot:nth-child(3) { background: #34d399; }

/* Top Left Brand Header (Clearfreight › Style) */
.brand-nav-top {
  position: absolute;
  top: 56px;
  left: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
  text-decoration: none;
}

.brand-nav-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.8);
  padding: 5px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-nav-top:hover .brand-nav-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-nav-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 23px;
  font-weight: 800;
  color: #064e3b;
  letter-spacing: -0.035em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.brand-nav-arrow {
  color: var(--kg-accent-blue);
  font-size: 22px;
  font-weight: 700;
  transition: transform 0.25s ease;
}

.brand-nav-top:hover .brand-nav-arrow {
  transform: translateX(4px);
}

.brand-nav-tag {
  font-size: 11px;
  font-weight: 700;
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 4px;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

/* ============================================================
   GRID LAYOUT: LEFT HERO (58%) & RIGHT CARD (42%)
   ============================================================ */
.login-content-grid {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  align-items: center;
  padding: 40px 60px 40px 70px;
  position: relative;
  z-index: 10;
  max-width: 1520px;
  margin: 0 auto;
}

/* ============================================================
   LEFT AREA: 3D ISOMETRIC VISUAL CANVAS
   ============================================================ */
.login-hero-area {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  min-height: 640px;
  padding: 50px 20px 20px;
  user-select: none;
}

.hero-vector-stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 580px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Realistic Render Background */
.hero-3d-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(15, 23, 42, 0.09));
  z-index: 5;
  transition: transform 0.4s ease;
  pointer-events: none;
}

/* ============================================================
   HYPER-REALISTIC GLASSMORPHISM FLOATING CHIPS
   ============================================================ */
.glass-chip-realistic {
  position: absolute;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12),
              0 8px 16px -4px rgba(15, 23, 42, 0.06),
              inset 0 1px 1px rgba(255, 255, 255, 0.95);
  z-index: 15;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 250px;
}

.glass-chip-realistic:hover {
  transform: translateY(-6px) scale(1.03);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 26px 50px -10px rgba(15, 23, 42, 0.18),
              0 10px 20px -4px rgba(15, 23, 42, 0.08),
              inset 0 1px 1px rgba(255, 255, 255, 1);
}

/* Chip 1: LKB Real-time */
.chip-lkb {
  top: 10%;
  left: 2%;
  animation: floatChip1 5.5s ease-in-out infinite;
}

/* Chip 2: Presensi WFH */
.chip-wfh {
  bottom: 12%;
  left: 0%;
  animation: floatChip2 6.5s ease-in-out infinite 1s;
}

/* Chip 3: AI Copilot & WA Bot */
.chip-ai {
  bottom: 8%;
  right: 6%;
  animation: floatChip3 6s ease-in-out infinite 2s;
  max-width: 280px;
}

@keyframes floatChip1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes floatChip2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

@keyframes floatChip3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Chip Header Row */
.chip-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.chip-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chip-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.chip-icon-green { background: linear-gradient(135deg, #10b981, #059669); }
.chip-icon-blue { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.chip-icon-teal { background: linear-gradient(135deg, #0f766e, #0d9488); }

.chip-title-text {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.chip-subtitle-text {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  display: block;
}

/* Status Badges Inside Chips */
.chip-status-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.pill-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pill-blue {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.pill-teal {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Realistic Mini Progress Bar for LKB */
.chip-progress-box {
  margin-top: 8px;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.chip-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.chip-progress-bar-track {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.chip-progress-bar-fill {
  width: 95%;
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #0284c7 100%);
  border-radius: 10px;
}

/* Realistic WFH GPS & Hours Detail */
.chip-detail-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background: rgba(240, 249, 255, 0.7);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(186, 230, 253, 0.6);
}

/* Realistic AI Bot Chat Bubble Simulation */
.chip-chat-preview {
  margin-top: 8px;
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  color: #334155;
  line-height: 1.4;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.chip-chat-preview i {
  color: #25d366;
  margin-right: 4px;
}

/* ============================================================
   RIGHT AREA: PRISTINE FLOATING LOGIN CARD
   ============================================================ */
.login-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 10px;
}

.login-card-clean {
  background: #ffffff;
  border-radius: 26px;
  width: 100%;
  max-width: 440px;
  padding: 44px 40px;
  box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.12),
              0 10px 25px -4px rgba(15, 23, 42, 0.04),
              0 0 0 1px rgba(226, 232, 240, 0.85);
  position: relative;
  z-index: 30;
  animation: cardFadeUp 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Brand Header Inside Card */
.card-mobile-brand {
  display: none;
  text-align: center;
  margin-bottom: 24px;
}

.card-mobile-brand img {
  max-width: 180px;
  height: auto;
}

/* Typography Matching "Sign in to Clearfreight." */
.card-heading-group {
  margin-bottom: 28px;
}

.card-title-text {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.035em;
  line-height: 1.25;
  margin-bottom: 8px;
}

.card-subtitle-text {
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
}

.card-subtitle-text a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.card-subtitle-text a:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* Alert Error Banner */
.login-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shakeAlert 0.4s ease;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Form Fields */
.form-field-group {
  margin-bottom: 20px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.field-helper-link {
  font-size: 12.5px;
  font-weight: 600;
  color: #0284c7;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.field-helper-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

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

.input-box-wrapper i.field-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.clean-input-control {
  width: 100%;
  padding: 13px 16px 13px 42px;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  outline: none;
  transition: all 0.2s ease;
}

.clean-input-control::placeholder {
  color: #94a3b8;
  font-size: 13.5px;
}

.clean-input-control:focus {
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.input-box-wrapper:focus-within i.field-icon {
  color: #059669;
}

/* Toggle Password Visibility */
.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-pwd:hover {
  color: #475569;
}

/* Submit Action Button */
.btn-submit-action {
  width: 100%;
  padding: 14px 20px;
  margin-top: 8px;
  background: var(--kg-btn-gradient);
  color: #ffffff;
  border: none;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-submit-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.35);
  background: linear-gradient(135deg, #059669 0%, #0369a1 100%);
}

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

/* Divider OR */
.form-divider-row {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 14px;
}

.form-divider-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.form-divider-text {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Secondary Button (Virtual WhatsApp Bot) */
.btn-secondary-action {
  width: 100%;
  padding: 12px 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-secondary-action i {
  font-size: 18px;
}

/* Card Bottom Security Footer */
.card-bottom-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-bottom-footer i {
  color: #059669;
}

/* Helpdesk Modal */
.help-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.help-modal-overlay.active {
  display: flex;
}

.help-modal-box {
  background: #ffffff;
  border-radius: 22px;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================ */
@media (max-width: 1120px) {
  .login-content-grid {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }

  .login-hero-area {
    display: none; /* Hide heavy 3D illustration on tablet/mobile for max focus */
  }

  .brand-nav-top {
    position: static;
    margin-bottom: 24px;
    justify-content: center;
  }

  .browser-window-dots {
    display: none;
  }

  .login-canvas {
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
  }

  .card-mobile-brand {
    display: block;
  }

  .login-card-clean {
    padding: 36px 28px;
    max-width: 420px;
  }
}

@media (max-width: 480px) {
  .login-card-clean {
    padding: 30px 20px;
    border-radius: 22px;
  }

  .card-title-text {
    font-size: 22px;
  }
}
