/* ==========================================================================
   Halaman login bergaya sign-in Cloudflare.
   Berdiri sendiri — tidak butuh AdminLTE, hanya cf-theme.css untuk tokennya.
   ========================================================================== */

/* Halaman ini berdiri sendiri tanpa Bootstrap, jadi reset box-sizing-nya harus
   disediakan sendiri. Tanpa ini, width:100% + padding + border pada input
   melebihi lebar induk dan meluber di layar sempit. */
.cfl-page, .cfl-page *, .cfl-page *::before, .cfl-page *::after {
  box-sizing: border-box;
}

.cfl-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cf-surface);
  font-family: var(--cf-font);
  color: var(--cf-ink);
}

/* ---------- Sisi kiri: formulir ---------- */
.cfl-left {
  display: flex;
  flex-direction: column;
  padding: 28px 32px 40px;
  overflow-y: auto;
}

.cfl-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.cfl-brand img { height: 34px; width: auto; }
.cfl-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--cf-orange);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.cfl-brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* margin auto pada sumbu blok memusatkan formulir di antara brand dan teks legal */
.cfl-form-wrap {
  width: 100%;
  max-width: 356px;
  margin: auto;
  padding: 28px 0 34px;
}

.cfl-title {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 26px;
}

.cfl-field { margin-bottom: 17px; }

.cfl-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cf-ink-2);
  margin-bottom: 6px;
}

.cfl-input {
  width: 100%;
  border: 1px solid var(--cf-border-strong);
  border-radius: var(--cf-radius);
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--cf-ink);
  background: var(--cf-surface);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.cfl-input::placeholder { color: #a3a3a3; }
.cfl-input:focus {
  outline: none;
  border-color: var(--cf-orange);
  box-shadow: 0 0 0 3px rgba(246,130,31,.20);
}

/* Tombol lihat/sembunyikan sandi */
.cfl-pw { position: relative; display: flex; align-items: center; }
.cfl-pw .cfl-input { padding-right: 42px; }
.cfl-pw-toggle {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  padding: 7px 9px;
  cursor: pointer;
  color: var(--cf-muted-2);
  border-radius: 4px;
  line-height: 1;
}
.cfl-pw-toggle:hover { color: var(--cf-ink); background: var(--cf-hover); }
.cfl-pw-toggle:focus-visible { outline: 2px solid var(--cf-orange); outline-offset: 1px; }

.cfl-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--cf-ink-2);
  margin: 4px 0 20px;
  cursor: pointer;
}
.cfl-check input {
  width: 15px; height: 15px;
  accent-color: var(--cf-blue);
  cursor: pointer;
}

/* Warnanya mengikuti .btn-primary di dalam aplikasi supaya tombol aksi utama
   terlihat sama sejak layar login. */
.cfl-submit {
  width: 100%;
  background: var(--cf-orange-btn);
  color: #fff;
  border: 1px solid var(--cf-orange-btn);
  border-radius: var(--cf-radius-btn);
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.cfl-submit:hover { background: var(--cf-orange-btn-hi); border-color: var(--cf-orange-btn-hi); }
.cfl-submit:focus-visible { outline: 2px solid var(--cf-orange-btn); outline-offset: 2px; }

.cfl-alert {
  background: #fdeceb;
  border: 1px solid #f5c4c0;
  color: #8c1a13;
  border-radius: var(--cf-radius);
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 18px;
}

.cfl-foot {
  text-align: center;
  font-size: 12.5px;
  color: var(--cf-muted-2);
  margin-top: 22px;
  line-height: 1.7;
}
.cfl-foot a { color: var(--cf-blue); text-decoration: none; }
.cfl-foot a:hover { text-decoration: underline; }

.cfl-legal {
  max-width: 356px;
  margin: 0 auto;
  text-align: center;
  font-size: 11.5px;
  color: #8a8a8a;
  line-height: 1.6;
}

/* ---------- Sisi kanan: panel oranye ---------- */
.cfl-right {
  position: relative;
  background: var(--cf-orange);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 56px;
  color: #fff;
}

/* Globe digeser jauh ke kanan dan sisi kirinya dipudarkan lewat mask,
   supaya titik-titiknya tidak menabrak headline dan teks tetap terbaca. */
/* Rampa mask sebelumnya sudah mencapai opasitas penuh di 48% lebar globe, dan
   di layar 1280px titik itu jatuh tepat di ekor headline — titik-titiknya
   menembus teks. Sekarang globe tetap sepenuhnya transparan melewati kolom
   teks dulu, baru memadat. */
.cfl-globe {
  position: absolute;
  right: -260px;
  top: 50%;
  transform: translateY(-50%);
  width: 760px;
  height: 760px;
  opacity: .85;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 44%, rgba(0,0,0,.3) 60%, #000 80%);
          mask-image: linear-gradient(to right, transparent 0%, transparent 44%, rgba(0,0,0,.3) 60%, #000 80%);
}
.cfl-globe img, .cfl-globe svg { width: 100%; height: 100%; display: block; }

.cfl-panel-content {
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.cfl-eyebrow {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
  opacity: .92;
  margin-bottom: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.cfl-headline {
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 16px;
}

.cfl-sub {
  font-size: 14.5px;
  line-height: 1.55;
  opacity: .93;
  margin-bottom: 26px;
}

.cfl-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.55);
  color: #fff;
  border-radius: var(--cf-radius);
  padding: 10px 17px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .14s ease;
}
.cfl-ghost-btn:hover { background: rgba(255,255,255,.22); color: #fff; text-decoration: none; }

/* ---------- Responsif ---------- */
/* ---------- Mobile ----------
   Sebelumnya panel oranye disembunyikan total di layar sempit, sehingga yang
   tersisa hanya formulir polos di atas putih — tidak ada identitas sama sekali.
   Di sini panel itu dinaikkan jadi pita di atas dan formulirnya menjadi lembar
   putih yang naik menutupinya, seperti pola kartu-di-atas-hero yang lazim pada
   aplikasi mobile. */
@media (max-width: 900px) {
  .cfl-page {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    background: var(--cf-orange);
    min-height: 100vh;
  }

  /* order:-1 memindah panel oranye ke atas tanpa mengubah urutan markup —
     formulir tetap yang pertama di DOM, jadi urutan fokus keyboard dan
     pembacaan layar tidak berubah. */
  .cfl-right {
    order: -1;
    display: block;
    padding: 30px 24px 52px;
    min-height: 0;
    text-align: center;
  }

  /* Globe dikecilkan dan digeser ke bawah supaya jadi tekstur latar, bukan
     gambar yang berebut perhatian dengan tagline. */
  /* Globe jadi tekstur latar samar. Pada 360px, opasitas .5 tanpa mask membuat
     titik-titiknya menembus tagline dan teksnya sulit dibaca. */
  .cfl-globe {
    right: -180px;
    top: auto;
    bottom: -260px;
    transform: none;
    width: 400px;
    height: 400px;
    opacity: .22;
    -webkit-mask-image: none;
            mask-image: none;
  }

  .cfl-panel-content { max-width: 100%; }
  .cfl-eyebrow { display: none; }
  .cfl-headline { font-size: 24px; margin-bottom: 8px; }
  .cfl-sub { font-size: 14px; margin-bottom: 0; }
  .cfl-ghost-btn { display: none; }

  /* Ubin logo di atas tagline, meniru ikon aplikasi pada referensinya. */
  .cfl-panel-content::before {
    content: "";
    display: block;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: #fff url("../img/header.png") center / 32px 32px no-repeat;
    box-shadow: 0 6px 18px rgba(0,0,0,.14);
  }

  /* Lembar putih naik menutupi tepi bawah pita oranye. */
  .cfl-left {
    background: var(--cf-surface);
    border-radius: 22px 22px 0 0;
    margin-top: -28px;
    padding: 26px 22px 34px;
    flex: 1 0 auto;
    position: relative;
    z-index: 1;
  }

  /* Brand di kepala formulir jadi mubazir — logonya sudah ada di pita atas. */
  .cfl-brand { display: none; }

  .cfl-form-wrap { padding: 4px 0 26px; max-width: 400px; }
  .cfl-title { font-size: 23px; margin-bottom: 22px; }
  .cfl-input { padding: 13px 14px; font-size: 15px; }
  .cfl-submit { padding: 14px 16px; font-size: 15px; }
  .cfl-legal { max-width: 400px; }
}

/* Layar sangat sempit: pita dipendekkan supaya formulir tetap terlihat tanpa
   menggulir di ponsel kecil. */
@media (max-width: 380px) {
  .cfl-right { padding: 24px 18px 46px; }
  .cfl-headline { font-size: 21px; }
  .cfl-panel-content::before { width: 50px; height: 50px; margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
