/**
 * SIMAPAN SDM - Modern Login UI Refreshment (Reddish / Crimson Identity)
 * BPSDMD Provinsi Jawa Tengah
 * Designed with modern GovTech & Glassmorphism design system
 */

/* Offline / Intranet Font Fallbacks */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/poppins/Poppins-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/poppins/Poppins-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/poppins/Poppins-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/poppins/Poppins-Bold.ttf') format('truetype');
}

:root {
  /* Red-ish Primary Palette */
  --primary: #b91c1c;
  --primary-hover: #991b1b;
  --primary-dark: #18080c;
  --primary-light: #dc2626;
  --primary-soft: #fef2f2;
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-rose: #be123c;
  --accent-amber: #d97706;
  --accent-emerald: #059669;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --border-light: #e2e8f0;
  --border-focus: #ef4444;
  --bg-dark: #0d0608;
  --radius-xxl: 28px;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-main: 0 25px 60px -15px rgba(15, 5, 8, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-input-focus: 0 0 0 4px rgba(220, 38, 38, 0.16);
  --shadow-btn: 0 10px 25px -5px rgba(185, 28, 28, 0.45);
  --font-family: 'Plus Jakarta Sans', 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  min-height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background canvas */
.simapan-bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(185, 28, 28, 0.38) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(220, 38, 38, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(24, 10, 14, 0.85) 0%, transparent 100%);
  background-attachment: fixed;
  overflow: hidden;
}

/* Subtle futuristic tech grid texture overlay */
.simapan-bg-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Animated glowing ambient orbs */
.simapan-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.65;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.simapan-ambient-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.42) 0%, rgba(220, 38, 38, 0) 70%);
  top: -60px;
  left: -80px;
}

.simapan-ambient-orb-2 {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(153, 27, 27, 0.38) 0%, rgba(153, 27, 27, 0) 70%);
  bottom: -100px;
  right: -80px;
  animation-delay: -9s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.1); }
  100% { transform: translate(-20px, -20px) scale(0.95); }
}

/* Page Wrapper */
.simapan-login-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
}

/* Master Login Container */
.simapan-login-card {
  width: 100%;
  max-width: 1100px;
  background: #ffffff;
  border-radius: var(--radius-xxl);
  box-shadow: var(--shadow-main);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  min-height: 640px;
  transition: transform 0.3s ease;
}

/* LEFT COLUMN: Hero Brand Showcase */
.simapan-brand-column {
  width: 48%;
  background: linear-gradient(155deg, #18080c 0%, #260d14 50%, #1a080d 100%);
  padding: 45px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centers content vertically (replaces space-between) */
  align-items: center;     /* Centers content horizontally */
  text-align: center;      /* Centers inline text elements inside children */
  position: relative;
  overflow: hidden;
  color: var(--text-light);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Decorative backdrop glow on hero side */
.simapan-brand-column::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 90% 10%, rgba(220, 38, 38, 0.25) 0%, transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(185, 28, 28, 0.22) 0%, transparent 50%);
  pointer-events: none;
}

/* National Red & White Accent ribbon at top */
.simapan-gov-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #f1f5f9;
  margin-bottom: 24px;
  width: fit-content;
  position: relative;
  z-index: 2;
}

.simapan-flag-badge {
  display: inline-block;
  width: 14px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #ef4444 50%, #ffffff 50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Dual Logo Header */
.simapan-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
}

.simapan-logo-emblem {
  box-sizing: border-box;
  height: 200px;
  border-radius: var(--radius-md);
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.simapan-logo-emblem img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.simapan-logo-divider {
  width: 1.5px;
  height: 38px;
  background: rgba(255, 255, 255, 0.2);
}

.simapan-agency-meta {
  line-height: 1.25;
}

.simapan-agency-title {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-transform: uppercase;
}

.simapan-agency-sub {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}

/* Title & Description */
.simapan-hero-main {
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
}

.simapan-hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.simapan-version-tag {
  font-size: 11px;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.simapan-hero-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 420px;
}

/* Feature Highlights Grid */
.simapan-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.simapan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.simapan-feature-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.simapan-feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.simapan-icon-red {
  background: rgba(220, 38, 38, 0.25);
  color: #f87171;
}

.simapan-icon-gold {
  background: rgba(217, 119, 6, 0.25);
  color: #fbbf24;
}

.simapan-icon-rose {
  background: rgba(190, 18, 60, 0.25);
  color: #fb7185;
}

.simapan-feature-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}

.simapan-feature-text p {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 0;
}

/* Brand Footer */
.simapan-brand-footer {
  position: relative;
  z-index: 2;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #94a3b8;
}

.simapan-security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}

.simapan-security-badge i {
  color: #f87171;
}

/* RIGHT COLUMN: Authentication Form */
.simapan-form-column {
  width: 52%;
  padding: 45px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
}

/* Form Top Header */
.simapan-form-header {
  margin-bottom: 24px;
}

.simapan-welcome-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #fecaca;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}

.simapan-form-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.simapan-form-header p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Custom Segmented Pill Tab Switcher */
.simapan-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  background: #fdf2f2;
  padding: 5px;
  border-radius: var(--radius-lg);
  gap: 4px;
  margin-bottom: 24px !important;
  border: 1px solid #fee2e2;
}

.simapan-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
}

.simapan-tab-btn:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.7);
}

.simapan-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.1), 0 1px 2px rgba(185, 28, 28, 0.05);
}

.simapan-tab-btn i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.simapan-tab-btn.active i {
  transform: scale(1.1);
  color: var(--primary);
}

.simapan-tab-subtag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.simapan-tab-btn.active .simapan-tab-subtag {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Guidance Info Banner inside active tab */
.simapan-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.simapan-banner-red {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.simapan-banner-red i {
  color: #dc2626;
  font-size: 15px;
  margin-top: 2px;
}

.simapan-banner-rose {
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.simapan-banner-rose i {
  color: #e11d48;
  font-size: 15px;
  margin-top: 2px;
}

/* Modern Form Groups */
.simapan-form-group {
  margin-bottom: 18px;
}

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

.simapan-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
}

.simapan-label-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* Input with icon wrapper */
.simapan-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

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

.simapan-form-control {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 42px;
  font-size: 13.5px;
  font-family: var(--font-family);
  font-weight: 500;
  color: var(--text-primary);
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.simapan-form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.simapan-form-control:focus {
  background: #ffffff;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-input-focus);
}

.simapan-form-control:focus + .simapan-input-icon,
.simapan-input-box:focus-within .simapan-input-icon {
  color: var(--primary);
}

/* Password Toggle Icon */
.simapan-pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.simapan-pwd-toggle:hover {
  color: var(--text-primary);
  background: #fee2e2;
}

.simapan-pwd-toggle:focus {
  outline: none;
}

/* Helper text below input */
.simapan-input-help {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  padding-left: 2px;
}

/* Primary Submit Button (Reddish gradient) */
.simapan-submit-btn {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.simapan-submit-btn:hover {
  background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
  box-shadow: 0 14px 28px -5px rgba(185, 28, 28, 0.55);
  transform: translateY(-2px);
}

.simapan-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px -3px rgba(185, 28, 28, 0.4);
}

.simapan-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none !important;
}

.simapan-submit-btn i {
  transition: transform 0.2s ease;
}

.simapan-submit-btn:hover i {
  transform: translateX(4px);
}

/* Alternative submit button for Tab 2 (Rich Crimson / Wine) */
.simapan-submit-btn-alt {
  background: linear-gradient(135deg, #881337 0%, #be123c 100%);
  box-shadow: 0 10px 25px -5px rgba(190, 18, 60, 0.4);
}

.simapan-submit-btn-alt:hover {
  background: linear-gradient(135deg, #700c2b 0%, #881337 100%);
  box-shadow: 0 14px 28px -5px rgba(190, 18, 60, 0.5);
}

/* Helpdesk & Support Section */
.simapan-form-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #fee2e2;
}

.simapan-support-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.simapan-help-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.2s ease;
}

.simapan-help-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Social Media Channels */
.simapan-social-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.simapan-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #64748b;
  background: #fdf2f2;
  border: 1px solid #fee2e2;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.simapan-social-btn:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.simapan-social-btn.facebook:hover { background: #1877f2; border-color: #1877f2; }
.simapan-social-btn.instagram:hover { background: #e1306c; border-color: #e1306c; }
.simapan-social-btn.twitter:hover { background: #0f1419; border-color: #0f1419; }
.simapan-social-btn.youtube:hover { background: #ff0000; border-color: #ff0000; }

/* Copyright footer */
.simapan-copyright {
  text-align: center;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.simapan-copyright strong {
  color: #64748b;
  font-weight: 600;
}

/* Custom Alert Message Container */
.simapan-alert-box {
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.simapan-alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.simapan-alert-danger i {
  color: #ef4444;
  font-size: 16px;
  margin-top: 1px;
}

.simapan-alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.simapan-alert-success i {
  color: #22c55e;
  font-size: 16px;
  margin-top: 1px;
}

/* Spinner for submit button */
.simapan-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

/* Help Modal Styling */
.simapan-modal-content {
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.simapan-modal-header {
  background: linear-gradient(135deg, #18080c 0%, #991b1b 100%);
  color: #ffffff;
  padding: 20px 24px;
  border: none;
}

.simapan-modal-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.simapan-modal-body {
  padding: 24px;
  background-color: #ffffff;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.simapan-modal-contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #fff8f8;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.simapan-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 991.98px) {
  .simapan-login-card {
    flex-direction: column;
    max-width: 580px;
    border-radius: var(--radius-xl);
  }

  .simapan-brand-column {
    width: 100%;
    padding: 32px 28px;
  }

  .simapan-form-column {
    width: 100%;
    padding: 34px 28px;
  }

  .simapan-features-list {
    display: none; /* keep mobile clean and high-converting */
  }

  .simapan-hero-title {
    font-size: 24px;
  }
}

@media (max-width: 575.98px) {
  .simapan-login-wrapper {
    padding: 16px 10px;
  }

  .simapan-brand-column {
    padding: 26px 20px;
  }

  .simapan-form-column {
    padding: 28px 20px;
  }

  .simapan-hero-title {
    font-size: 22px;
  }

  .simapan-tab-btn {
    padding: 8px 10px;
    font-size: 11.5px;
  }

  .simapan-support-row {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
}
