/* ==========================================================================
   STANDAR LOGIN EKSEKUTIF APIP NATUNA (EDISI KEDAULATAN 2026)
   Inspektorat Daerah Kabupaten Natuna - Kepulauan Riau
   
   Standar Desain: Executive Light Theme, Pure White Elevation, Anti-BKPSDM Mimicry,
   Anti-AI-Slop, High Contrast WCAG 2.1 AA Compliant, Terintegrasi Tur & Buku Panduan.
   ========================================================================== */

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

:root {
  --nt-primary: #047857;
  --nt-primary-dark: #064e3b;
  --nt-primary-light: #ecfdf5;
  --nt-navy: #0f172a;
  --nt-navy-dark: #020617;
  --nt-accent-gold: #d97706;
  --nt-accent-blue: #0284c7;
  --nt-text-dark: #0f172a;
  --nt-text-muted: #475569;
  --nt-border: #e2e8f0;
  --nt-bg-soft: #f8fafc;
  --nt-card-bg: #ffffff;
  --nt-radius-sm: 8px;
  --nt-radius-md: 14px;
  --nt-radius-lg: 20px;
  --nt-radius-xl: 24px;
  --nt-shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --nt-shadow-md: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --nt-shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* BASE BODY — PRISTINE EXECUTIVE LIGHT */
body.login-body.ref-login {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(4, 120, 87, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.05) 0%, transparent 45%),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--nt-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ELIMINATE DARK OVERLAYS */
body.login-body.ref-login::before {
  display: none !important;
}

/* SHELL CONTAINER — EXECUTIVE SUITE */
.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1220px;
  min-height: 720px;
  margin: 32px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(440px, 0.95fr);
  gap: 0;
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius-xl);
  box-shadow: var(--nt-shadow-lg), 0 0 0 1px var(--nt-border);
  overflow: hidden;
}

/* BRAND PANEL (LEFT) — EXECUTIVE LIGHT RESMI */
.brand-panel {
  position: relative;
  min-height: 100%;
  padding: 48px clamp(32px, 5vw, 64px) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--nt-text-dark);
  background: linear-gradient(160deg, #ffffff 0%, #f0fdf4 50%, #f0f9ff 100%);
  border-right: 1px solid var(--nt-border);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(4, 120, 87, 0.06) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border: 32px solid rgba(4, 120, 87, 0.05);
  border-radius: 50%;
  transform: rotate(-15deg);
  z-index: 0;
  pointer-events: none;
}

/* LOGOS HEADER */
.login-logos {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.login-logos > img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

.login-logos .agency-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 999px;
  box-shadow: var(--nt-shadow-subtle);
}

.login-logos .agency-logo img {
  height: 34px;
  width: auto;
}

.login-logos .agency-logo b {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--nt-navy);
  letter-spacing: 0.5px;
}

.login-logos .agency-logo small {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--nt-primary);
  letter-spacing: 1.2px;
}

/* BRAND COPY */
.brand-copy {
  position: relative;
  z-index: 2;
  margin: 32px 0 28px;
}

.brand-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--nt-primary);
  background: var(--nt-primary-light);
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.brand-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  font-weight: 800;
}

.brand-copy h1 em {
  font-style: normal;
  display: block;
  font-size: clamp(34px, 4vw, 46px);
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-copy h1 span {
  color: var(--nt-navy);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
}

.brand-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--nt-text-muted);
  max-width: 580px;
}

/* FEATURES PILLS */
.login-features {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.login-features div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-md);
  box-shadow: var(--nt-shadow-subtle);
  transition: all 0.2s ease;
}

.login-features div:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--nt-shadow-md);
}

.login-features b {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--nt-primary-light);
  color: var(--nt-primary);
  flex-shrink: 0;
}

.login-features span {
  font-size: 12px;
  font-weight: 600;
  color: var(--nt-text-dark);
  line-height: 1.35;
}

/* PUBLIC SERVICES */
.public-service-links {
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
}

.public-service-links > strong {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--nt-text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.public-service-links > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.public-service-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--nt-text-dark);
  box-shadow: var(--nt-shadow-subtle);
  transition: all 0.2s;
}

.public-service-links a:hover {
  border-color: var(--nt-primary);
  color: var(--nt-primary);
  transform: translateY(-1px);
}

.public-service-links img {
  height: 16px;
  width: auto;
}

/* BRAND BOTTOM */
.brand-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--nt-border);
  font-size: 11.5px;
}

.natuna-sign {
  font-weight: 800;
  color: var(--nt-navy);
}

.natuna-sign small {
  display: block;
  font-weight: 600;
  color: var(--nt-primary);
}

.location-badge {
  text-align: right;
  font-weight: 700;
  color: var(--nt-text-muted);
}

.location-badge span {
  font-weight: 600;
  color: #64748b;
}

/* ==========================================================================
   LOGIN CARD (RIGHT) — ELEVATED PURE WHITE
   ========================================================================== */
.login-card {
  position: relative;
  padding: 48px clamp(32px, 5vw, 56px);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* STRICT PURGE OF BKPSDM CORNER BRACKET ACCENT */
.login-card-accent {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.portal-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--nt-primary);
  background: var(--nt-primary-light);
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.login-card h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--nt-navy);
  margin: 0 0 4px;
  line-height: 1.2;
}

.login-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--nt-primary);
  margin: 0 0 10px;
}

.login-card .muted {
  font-size: 13.5px;
  color: var(--nt-text-muted);
  line-height: 1.5;
  margin: 0 0 24px;
}

/* ALERTS & FLASH MESSAGES */
.alert, .flash {
  padding: 12px 16px;
  border-radius: var(--nt-radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger, .flash.err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-success, .flash.ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.alert-warning, .flash.warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* FORM FIELDS */
.login-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--nt-navy);
  margin-bottom: 6px;
}

.icon-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  background: #ffffff;
  border: 1.5px solid var(--nt-border);
  border-radius: 10px;
  transition: all 0.2s;
}

.icon-field:focus-within {
  border-color: var(--nt-primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

.icon-field > span {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #94a3b8;
  flex-shrink: 0;
}

.icon-field input {
  width: 100%;
  padding: 12px 14px 12px 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--nt-navy);
  background: transparent;
  border: none;
  outline: none;
}

.icon-field input::placeholder {
  color: #94a3b8;
}

.password-toggle {
  background: transparent;
  border: none;
  padding: 0 14px;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--nt-primary);
}

/* SECURITY CODE CAPTCHA BOX */
.security-code-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--nt-border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.security-code-box div {
  display: flex;
  flex-direction: column;
}

.security-code-box span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #64748b;
  text-transform: uppercase;
}

.security-code-box strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--nt-primary-dark);
}

.btn-refresh-code {
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--nt-primary);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--nt-shadow-subtle);
}

.btn-refresh-code:hover {
  border-color: var(--nt-primary);
  background: var(--nt-primary-light);
}

.security-help {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin: -10px 0 18px;
}

/* SUBMIT BUTTON */
.login-submit {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.25);
  transition: all 0.2s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(4, 120, 87, 0.35);
}

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

/* DEDICATED GUIDE ACTION BUTTONS */
.apip-guide-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.btn-guide-interactive, .apip-btn-tour {
  flex: 1;
  padding: 10px 14px;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-guide-interactive:hover, .apip-btn-tour:hover {
  background: #d1fae5;
  border-color: #047857;
  transform: translateY(-1px);
}

.btn-guide-book, .apip-btn-book {
  flex: 1;
  padding: 10px 14px;
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  color: #0284c7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-guide-book:hover, .apip-btn-book:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  transform: translateY(-1px);
}

/* SELF REGISTRATION PROMPT */
.apip-register-prompt {
  margin: 20px 0 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px dashed var(--nt-border);
  border-radius: 10px;
  text-align: center;
  font-size: 12.5px;
}

.apip-register-prompt span {
  display: block;
  color: var(--nt-text-muted);
  margin-bottom: 4px;
}

.apip-register-prompt a {
  color: var(--nt-primary);
  font-weight: 800;
  text-decoration: none;
}

.apip-register-prompt a:hover {
  text-decoration: underline;
}

/* DIVIDERS */
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #94a3b8;
  text-transform: uppercase;
}

.or i {
  flex: 1;
  height: 1px;
  background: var(--nt-border);
}

/* WHATSAPP & PUBLIC SUPPORT */
.login-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  border-radius: 9px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  color: #059669;
  transition: all 0.2s;
}

.login-wa:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

/* SURVEY & WBS */
.login-survey {
  margin-top: 14px;
}

.survey-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--nt-border);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
}

.survey-link:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: var(--nt-shadow-subtle);
}

.survey-link img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.survey-link span {
  display: flex;
  flex-direction: column;
}

.survey-link b {
  font-size: 12.5px;
  color: var(--nt-navy);
}

.survey-link small {
  font-size: 11px;
  color: #64748b;
}

/* LEGAL LINKS & FOOTER */
.login-legal-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 20px 0 12px;
  font-size: 12px;
}

.login-legal-links a {
  color: #64748b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.login-legal-links a:hover {
  color: var(--nt-primary);
}

.copyright {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}

/* ==========================================================================
   MODAL SYSTEM FOR TOURS & GUIDEBOOKS (STANDAR DI SEMUA APLIKASI)
   ========================================================================== */
.apip-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.apip-modal-backdrop.open {
  display: flex;
}

.apip-modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: apip-modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes apip-modal-pop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.apip-modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--nt-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.apip-modal-title-group h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--nt-navy);
  margin: 0;
}

.apip-modal-title-group p {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 0;
}

.apip-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.apip-modal-close:hover {
  background: #e2e8f0;
  color: var(--nt-navy);
}

.apip-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 13.5px;
  line-height: 1.6;
}

.apip-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--nt-border);
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.apip-tour-step {
  display: none;
}

.apip-tour-step.active {
  display: block;
}

.apip-step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--nt-primary);
  background: var(--nt-primary-light);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.apip-step-visual {
  background: #f1f5f9;
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.apip-btn-primary {
  padding: 10px 18px;
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.apip-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    margin: 16px;
    border-radius: var(--nt-radius-lg);
  }
  .brand-panel {
    border-right: none;
    border-bottom: 1px solid var(--nt-border);
    padding: 32px 24px;
  }
  .login-card {
    padding: 32px 24px;
  }
  .login-features {
    grid-template-columns: 1fr;
  }
}
