/* ============================================================
   SIMANDAT — Login Page CSS
   Sistem Informasi Manajemen Data Ekbang Kecamatan Rumpin
   ============================================================ */

:root {
  --primary:       #059669;
  --primary-dark:  #047857;
  --primary-light: #10b981;
  --accent:        #34d399;
  --bg-deep:       #022c22;
  --bg-mid:        #064e3b;
  --white:         #ffffff;
  --gray-50:       #f9fafb;
  --gray-100:      #f3f4f6;
  --gray-200:      #e5e7eb;
  --gray-400:      #9ca3af;
  --gray-600:      #4b5563;
  --gray-800:      #1f2937;
  --text-primary:  #065f46;
  --text-body:     #374151;
  --text-muted:    #6b7280;
  --font:          'Plus Jakarta Sans', sans-serif;
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --shadow-card:   0 32px 80px rgba(2,44,34,0.45), 0 8px 24px rgba(2,44,34,0.2);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  overflow-x: hidden;
}

/* ── Background ──────────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg,  transparent, transparent 30px, rgba(52,211,153,0.03) 30px, rgba(52,211,153,0.03) 31px),
    repeating-linear-gradient(-45deg, transparent, transparent 30px, rgba(52,211,153,0.03) 30px, rgba(52,211,153,0.03) 31px);
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(52,211,153,0.1);
}

.bg-circle.c1 { width: 560px; height: 560px; top: -180px; right: -120px; }
.bg-circle.c2 { width: 360px; height: 360px; bottom: -120px; left: -100px; }
.bg-circle.c3 { width: 180px; height: 180px; top: 60px;   left: 40px; border-color: rgba(52,211,153,0.06); }

/* ── Page / Center ───────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ── Card ────────────────────────────────────────────── */
.card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: slideUp 0.45s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Top accent bar ──────────────────────────────────── */
.card-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--accent), var(--primary), var(--primary-dark));
}

/* ── Identity section ────────────────────────────────── */
.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 2rem 1.5rem;
  gap: 8px;
  border-bottom: 1px solid var(--gray-100);
}

.logo-ring {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(145deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #a7f3d0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.identity-text {
  text-align: center;
}

.app-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.app-full {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  margin-bottom: 2px;
}

.app-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ── Info pills ──────────────────────────────────────── */
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary-dark);
}

.pill-icon {
  width: 11px;
  height: 11px;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ── Divider with label ──────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2rem;
  margin: 1.25rem 0 0;
}

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

.divider span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Alert ───────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 1rem 2rem 0;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
}

.alert-icon {
  width: 15px;
  height: 15px;
  stroke: #d97706;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  flex-shrink: 0;
}

/* ── Form ────────────────────────────────────────────── */
.form {
  padding: 1.25rem 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: 0.01em;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--gray-400);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
  transition: stroke 0.15s;
}

.input-wrap:focus-within .input-icon {
  stroke: var(--primary);
}

.input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.input-wrap input:hover {
  border-color: #a7f3d0;
}

.input-wrap input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}

.input-wrap input::placeholder {
  color: #c4c9d4;
  font-size: 13px;
}

/* Toggle password button */
.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.1s;
}

.toggle-pw:hover {
  background: var(--gray-100);
}

.toggle-pw svg {
  width: 15px;
  height: 15px;
  stroke: var(--gray-400);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

/* Submit button */
.btn-login {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  margin-top: 4px;
}

.btn-login:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(5,150,105,0.3);
}

.btn-login:active {
  transform: scale(0.98);
  box-shadow: none;
}

.btn-login svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.btn-login:hover svg {
  transform: translateX(3px);
}

/* ── Card footer ─────────────────────────────────────── */


/* ── Below card text ─────────────────────────────────── */
.below-card {
  font-size: 11px;
  color: var(--white);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .page {
    padding: 1rem 0.75rem;
  }

  .identity {
    padding: 1.5rem 1.5rem 1.25rem;
  }

  .form {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .card-footer {
    padding: 12px 1.5rem;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .divider {
    padding: 0 1.5rem;
  }

  .alert {
    margin: 1rem 1.5rem 0;
  }

  .app-name {
    font-size: 22px;
  }

  .pill-row {
    gap: 6px;
  }
}