/*
 * Modern Login — override tampilan css/style.css (hanya CSS)
 * Untuk kembali ke tampilan lama: hapus <link> login-modern.css di index.php
 * Catatan: beberapa !important dipakai untuk menimpa inline style di index.php
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4361ee;
  --primary-hover: #3451d1;
  --accent: #7048e8;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --heading: #0f172a;
  --ring: 0 0 0 4px rgba(67, 97, 238, .15);
}

/* ---------- Halaman ---------- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* Dekorasi latar */
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
body::before {
  width: 520px; height: 520px;
  top: -160px; left: -140px;
  background: rgba(67, 97, 238, .22);
}
body::after {
  width: 460px; height: 460px;
  bottom: -160px; right: -120px;
  background: rgba(112, 72, 232, .18);
}

.ftco-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 0;
  overflow: visible;
}
.ftco-section > .container { padding-top: 0 !important; }

.heading-section {
  font-family: inherit;
  font-size: 26px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -.4px;
  margin: 0;
}
.ftco-section .mb-5 { margin-bottom: 28px !important; }

/* ---------- Kartu login ---------- */
.wrap {
  max-width: 920px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, .8);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .04);
}

/* Panel form */
.login-wrap { background: var(--surface); }
.login-wrap.p-lg-5 { padding: 48px !important; }

/* Judul sapaan (dibuat lewat CSS pada div kosong di atas form) */
.login-wrap > .d-flex { display: block !important; margin-bottom: 28px; }
.login-wrap > .d-flex::before {
  content: 'Selamat Datang';
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.3px;
}
.login-wrap > .d-flex::after {
  content: 'Silakan masuk menggunakan akun Anda.';
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Label & input */
.form-group .label {
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #334155;
  margin-bottom: 8px;
}
.form-group.mb-3 { margin-bottom: 18px !important; }

.login-wrap .form-control {
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.login-wrap .form-control::placeholder { color: #94a3b8; }
.login-wrap .form-control:hover { border-color: #cbd5e1; }
.login-wrap .form-control:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: var(--ring);
  outline: 0;
}

.login-wrap hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Tombol login */
.login-wrap .btn.btn-primary.submit {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 10px 20px -8px rgba(67, 97, 238, .6);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.login-wrap .btn.btn-primary.submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 24px -10px rgba(67, 97, 238, .7);
}
.login-wrap .btn.btn-primary.submit:active { transform: translateY(0); }
.login-wrap .btn.btn-primary.submit:focus { box-shadow: var(--ring), 0 10px 20px -8px rgba(67, 97, 238, .6); outline: 0; }

/* ---------- Panel logo / brand ---------- */
.text-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--primary) 0%, var(--accent) 100%) !important;
}
.text-wrap::before,
.text-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  pointer-events: none;
}
.text-wrap::before { width: 340px; height: 340px; top: -120px; right: -120px; }
.text-wrap::after  { width: 260px; height: 260px; bottom: -110px; left: -90px; background: rgba(255, 255, 255, .08); }

.text-wrap .text { position: relative; z-index: 1; }
.text-wrap .text img {
  max-width: 100%;
  height: auto;
  max-height: 180px;
  padding: 22px;
  background: rgba(255, 255, 255, .12);            /* efek kaca: logo putih tetap terlihat */
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 24px;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .35);
}

/* ---------- Alert ---------- */
.alert {
  max-width: 920px;
  margin: 0 auto 18px;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
}
.alert-danger  { background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; color: #991b1b; }
.alert-success { background: #ecfdf5; border-color: #a7f3d0; border-left-color: #059669; color: #065f46; }

/* ---------- Responsif ---------- */
@media (max-width: 767.98px) {
  .ftco-section { align-items: flex-start; padding: 24px 0; }
  .heading-section { font-size: 22px; }
  .ftco-section .mb-5 { margin-bottom: 20px !important; }
  .wrap { display: flex; flex-direction: column; border-radius: 20px; }
  .text-wrap { order: -1; padding: 28px !important; }   /* logo di atas form pada layar kecil */
  .text-wrap .text img { max-height: 110px; padding: 14px; border-radius: 18px; }
  .login-wrap { padding: 28px 22px !important; }
  .login-wrap > .d-flex { margin-bottom: 22px; }
  .login-wrap > .d-flex::before { font-size: 20px; }
}
