/* =====================================================================
 * Halaman autentikasi @HOM Kudus - login, daftar, OTP, lupa/atur ulang
 * sandi. Dipakai bersama lewat application/views/template_login.php.
 *
 * Dipisah dari template itu 22 Agustus 2026: 370 baris ini sebelumnya
 * tercetak ulang pada SETIAP kunjungan ke halaman login, dan membuat
 * view-source-nya nyaris tidak terbaca.
 *
 * Location: ./assets/css/auth.css
 * ===================================================================== */

/* =====================================================================
   Palet @HOM Hotel by Horison, diambil dari logo klien (img/logoHOM.png):
   merah #e30613 pada mark "@", maroon untuk gradasi, emas sebagai aksen.
   Semua warna lewat CSS variable supaya mode gelap cukup menimpa token,
   bukan menulis ulang aturannya.
   ===================================================================== */
:root {
    --auth-brand-1:   #7d0a10;   /* maroon - ujung gelap gradasi foto  */
    --auth-brand-2:   #e30613;   /* merah  - warna utama, dari logo    */
    --auth-brand-3:   #b10d16;   /* merah tua - hover tombol           */
    --auth-gold:      #e0a13a;   /* emas   - garis pemisah & ikon      */
    --auth-ink:       #23272b;
    --auth-muted:     #7b8288;
    --auth-card:      #ffffff;
    --auth-page:      #f6f6f7;
    --auth-border:    #e9eaec;
    --auth-input:     #ffffff;
    --auth-input-bd:  #dcdee1;
    --auth-shadow:    0 18px 50px rgba(35, 39, 43, .10);
}
[data-bs-theme="dark"] {
    --auth-ink:       #eceef0;
    --auth-muted:     #9aa1a8;
    --auth-card:      #17191c;
    --auth-page:      #0e1013;
    --auth-border:    #292d32;
    --auth-input:     #1e2126;
    --auth-input-bd:  #343940;
    --auth-shadow:    0 18px 50px rgba(0, 0, 0, .5);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--auth-page);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--auth-ink);
}

.auth-wrap { display: flex; min-height: 100vh; }

/* ------------------------------------------------ panel kiri (branding)
   Foto gedung @HOM Kudus dengan selubung merah di atasnya. Fotonya
   dipasang sebagai background-image pada ::before, BUKAN <img>, supaya
   tidak perlu markup tambahan dan gradasinya bisa ditumpuk sebagai
   lapisan kedua tanpa memengaruhi logo di dalamnya. */
.auth-brand {
    position: relative;
    flex: 0 0 52%;
    max-width: 52%;
    padding: 56px 48px;
    color: #fff;
    background: var(--auth-brand-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}
/* Lapisan foto. Sengaja diturunkan dari tepi atas panel: fotonya jauh
   lebih lebar daripada panel, jadi `cover` selalu pas persis setinggi
   panel dan tidak menyisakan ruang untuk digeser lewat object-position.
   Menurunkan kotaknya adalah satu-satunya cara memberi lebih banyak
   bidang merah di atas logo. Sisa di atasnya terisi warna maroon panel,
   lalu disatukan oleh gradasi ::after yang menutupi keduanya. */
.auth-brand::before {
    inset: 7% 0 0 0;
    background: url("../../img/auth/hom-hotel.jpg") no-repeat center / cover;
}
/* Selubung merah. Pekat di sepertiga atas supaya logo putih tetap terbaca
   apa pun isi fotonya, lalu turun tajam agar gedung, atap, dan pepohonan
   di bawahnya tetap terbaca sebagai foto - bukan bidang merah rata. */
.auth-brand::after {
    background:
        linear-gradient(180deg,
            rgba(120, 9, 15, 1)    0%,
            rgba(132, 10, 17, .98) 14%,
            rgba(155, 12, 19, .88) 24%,
            rgba(178, 14, 22, .58) 38%,
            rgba(192, 16, 24, .30) 55%,
            rgba(180, 14, 22, .15) 78%,
            rgba(125, 10, 16, .20) 100%);
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-logo-wrap { padding-top: 26px; text-align: center; }
.auth-logo {
    max-width: 330px;
    max-height: 150px;
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Bayangan tipis menjaga logo tetap terbaca kalau ada bagian foto
       yang kebetulan terang di belakangnya. */
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .28));
}

/* Sisa isi panel kiri. Halaman auth lain masih memakai kelas-kelas ini;
   di desain sekarang panelnya sengaja hanya berisi logo, jadi bila
   elemennya tidak dipakai tidak ada yang perlu disembunyikan. */
.auth-brand-title {
    /* Metronic memberi setiap h1-h6 warna sendiri lewat
       --bs-heading-color, dan aturan itu MENANG atas `color: #fff`
       yang diwarisi dari .auth-brand. Tanpa baris ini judulnya
       tampil biru tua di atas gradasi merah - nyaris tak terbaca. */
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
    margin: 0 0 14px;
}
.auth-brand-sub {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .88);
    margin: 0 0 34px;
    max-width: 430px;
}
.auth-feature { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.auth-feature-ic {
    flex: 0 0 42px;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .16);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
}
.auth-feature-tx b { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 2px; }
.auth-feature-tx span { font-size: .85rem; color: rgba(255, 255, 255, .8); line-height: 1.5; }
.auth-brand-foot { margin-top: auto; font-size: .8rem; color: rgba(255, 255, 255, .78); }

/* ------------------------------------------------ panel kanan (form) */
.auth-main {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--auth-page);
    overflow: hidden;
}
/* Motif abstrak samar di sudut kanan atas - guratan kontur konsentris,
   memberi kedalaman pada bidang abu-abu yang lebar tanpa mengganggu
   keterbacaan kartu di depannya.

   Sengaja SATU berkas untuk mode terang dan gelap: warnanya abu netral
   beropasitas rendah, jadi pada latar terang ia terbaca sebagai guratan
   gelap samar dan pada latar gelap sebagai guratan terang yang sama
   samarnya - tanpa perlu aset kedua.

   Ditarik melampaui tepi panel supaya polanya terpotong bidang, bukan
   berhenti sebagai bentuk utuh yang mengambang. */
.auth-main::before {
    content: "";
    position: absolute;
    top: -170px;
    right: -240px;
    width: 1020px;
    height: 990px;
    background: url("../../img/auth/hom-abstrak.svg") no-repeat center / contain;
    /* Dipudarkan ke kiri-bawah: bagian itu yang paling dekat dengan
       kartu form, dan motif yang masih kuat di sana membuat tepi kartu
       terlihat kotor. */
    -webkit-mask-image: linear-gradient(215deg, #000 0%, rgba(0,0,0,.55) 50%, transparent 85%);
            mask-image: linear-gradient(215deg, #000 0%, rgba(0,0,0,.55) 50%, transparent 85%);
    pointer-events: none;
}
.auth-main > * { position: relative; z-index: 1; }

.auth-card {
    width: 100%;
    max-width: 470px;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    box-shadow: var(--auth-shadow);
    padding: 44px 44px 40px;
}
.auth-mobile-logo { display: none; text-align: center; margin-bottom: 26px; }
.auth-mobile-logo img { max-height: 68px; max-width: 210px; object-fit: contain; }

.auth-title  {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-align: center;
    margin: 0 0 8px;
    color: var(--auth-brand-2);
}
.auth-sub    {
    font-size: .95rem;
    line-height: 1.55;
    text-align: center;
    color: var(--auth-muted);
    margin: 0 0 22px;
}

/* Garis emas pendek pemisah kepala kartu dan isian form. */
.auth-divider {
    width: 68px;
    height: 3px;
    border-radius: 3px;
    background: var(--auth-gold);
    margin: 0 auto 28px;
}

/* ------------------------------------------------ kontrol form */
.auth-label {
    display: block;
    font-size: .87rem;
    font-weight: 700;
    color: var(--auth-ink);
    margin-bottom: 8px;
}
.auth-field { position: relative; margin-bottom: 18px; }
/* Awalan "+62" pada kolom nomor WhatsApp.
   Bagian dari .input-group, jadi cukup diberi pembatas kanan agar
   terbaca terpisah dari nomor yang diketik. */
.auth-phone-pre {
    font-size: .93rem;
    font-weight: 600;
    color: var(--auth-ink);
    padding: 0 12px 0 4px !important;
    border-right: 1px solid var(--auth-input-bd) !important;
    margin-right: 4px;
}
.auth-field .input-group .form-control[readonly] {
    color: var(--auth-muted);
    cursor: not-allowed;
}
.auth-field .input-group:has(.form-control[readonly]) { background: var(--auth-page); }
/* ---------------------------------------------- input-group Metronic
   Kolom dibungkus .input-group agar ikon berada di depan input.
   Border dipindah ke pembungkus, anak-anaknya dibuat transparan,
   sehingga ikon + input + tombol tampak menyatu sebagai satu kolom. */
.auth-field .input-group {
    background: var(--auth-input);
    border: 1px solid var(--auth-input-bd);
    border-radius: 10px;
    overflow: hidden;
    flex-wrap: nowrap;
    transition: border-color .15s, box-shadow .15s;
}
.auth-field .input-group .input-group-text {
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    padding: 0 4px 0 15px;
}
.auth-field .input-group .form-control {
    height: 50px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: .95rem;
    color: var(--auth-ink);
    padding: 0 12px;
}
.auth-field .input-group .form-control:focus { background: transparent; box-shadow: none; }
.auth-field .input-group .form-control::placeholder { color: var(--auth-muted); opacity: .8; }

/* Cincin fokus mengikuti warna merek. Sebelumnya nilainya rgba biru -
   sisa tema lama yang tidak ikut terganti saat rebranding. */
.auth-field:focus-within .input-group {
    border-color: var(--auth-brand-2);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .13);
}
.auth-field.is-invalid .input-group { border-color: #f04438; }
.auth-field.is-invalid:focus-within .input-group { box-shadow: 0 0 0 4px rgba(240, 68, 56, .15); }

/* Tombol lihat/sembunyikan password.
   Dibuat sebagai anak flex dari .input-group (bukan absolute), sehingga
   selalu center terhadap TINGGI INPUT saja - posisinya tidak bergeser
   ketika pesan galat muncul di bawah kolom. */
.auth-toggle {
    align-self: stretch;
    width: 46px;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    transition: color .15s;
}
.auth-toggle:hover { color: var(--auth-brand-2); }

/* pesan galat per kolom */
.auth-err {
    display: none;
    font-size: .8rem;
    color: #d92d20;
    margin-top: 6px;
}
.auth-field.is-invalid .auth-phone-pre { border-color: #f04438; }
.auth-field.is-invalid .auth-err { display: block; }

/* ------------------------------------------------ tombol */
.auth-btn {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 700;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: background .15s, box-shadow .15s, opacity .15s;
}
.auth-btn-primary {
    background: var(--auth-brand-2);
    color: #fff;
    box-shadow: 0 8px 20px rgba(227, 6, 19, .22);
}
.auth-btn-primary:hover:not(:disabled) { background: var(--auth-brand-3); }
.auth-btn:disabled { opacity: .62; cursor: not-allowed; box-shadow: none; }

.auth-btn-google {
    background: var(--auth-input);
    color: var(--auth-ink);
    border: 1px solid var(--auth-input-bd);
    text-decoration: none;
    font-weight: 600;
    box-shadow: none;
}
.auth-btn-google:hover { background: rgba(35, 39, 43, .05); color: var(--auth-ink); }

/* ------------------------------------------------ lain-lain */
.auth-sep {
    display: flex; align-items: center; gap: 14px;
    margin: 20px 0;
    color: var(--auth-muted);
    font-size: .82rem;
}
.auth-sep::before, .auth-sep::after {
    content: ""; flex: 1; height: 1px; background: var(--auth-border);
}

.auth-row  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.auth-link { color: var(--auth-brand-2); font-weight: 600; text-decoration: none; font-size: .87rem; }
.auth-link:hover { text-decoration: underline; color: var(--auth-brand-3); }
[data-bs-theme="dark"] .auth-link { color: #ff5a63; }

/* Baris "Belum punya akun? Hubungi Administrator" di bawah tombol. */
.auth-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--auth-border);
    font-size: .88rem;
    color: var(--auth-muted);
}
.auth-foot-ic {
    flex: 0 0 auto;
    color: var(--auth-gold);
    line-height: 1;
    display: flex;
    align-items: center;
}
/* Ukuran DAN warna dipasang pada <i>-nya, bukan pembungkusnya: kelas
   .ki-solid Metronic menyetel font-size dan color pada elemen ikon itu
   sendiri, sehingga nilai apa pun yang diwarisi dari pembungkus tidak
   pernah terpakai - ikonnya tampil abu kebiruan, bukan emas. */
.auth-foot-ic i {
    font-size: 1.75rem;
    color: var(--auth-gold);
}
.auth-foot-tx span { display: block; line-height: 1.45; }
.auth-foot-tx .auth-link { font-size: .9rem; font-weight: 700; }

/* Hak cipta di bawah kartu, bukan di dalamnya. */
.auth-page-foot {
    margin-top: 28px;
    text-align: center;
    font-size: .82rem;
    line-height: 1.7;
    color: var(--auth-muted);
}

.auth-check { display: flex; align-items: center; gap: 9px; margin-bottom: 0; font-size: .87rem; color: var(--auth-muted); }
.auth-check input { width: 17px; height: 17px; accent-color: var(--auth-brand-2); flex: 0 0 auto; }

.auth-alert {
    display: none;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: .87rem;
    margin-bottom: 18px;
    line-height: 1.5;
}
.auth-alert.show    { display: block; }
.auth-alert-error   { background: rgba(240, 68, 56, .10); color: #d92d20; border: 1px solid rgba(240, 68, 56, .22); }
.auth-alert-success { background: rgba(18, 160, 120, .10); color: #08795c; border: 1px solid rgba(18, 160, 120, .22); }
.auth-alert-info    { background: rgba(22, 104, 214, .10); color: #1257b8; border: 1px solid rgba(22, 104, 214, .22); }
[data-bs-theme="dark"] .auth-alert-success { color: #34d3a6; }
[data-bs-theme="dark"] .auth-alert-info    { color: #6fb6f5; }

/* indikator kekuatan password */
.auth-meter { display: flex; gap: 5px; margin-top: 9px; }
.auth-meter i {
    flex: 1; height: 4px; border-radius: 3px;
    background: var(--auth-border);
    transition: background .2s;
}
.auth-meter.s1 i:nth-child(1) { background: #f04438; }
.auth-meter.s2 i:nth-child(-n+2) { background: #f79009; }
.auth-meter.s3 i:nth-child(-n+3) { background: var(--auth-gold); }
.auth-meter.s4 i { background: #12a078; }
.auth-meter-tx { font-size: .78rem; color: var(--auth-muted); margin-top: 6px; }

/* captcha */
.auth-captcha { display: flex; gap: 11px; align-items: stretch; }
.auth-captcha img {
    height: 50px; width: 132px;
    border: 1px solid var(--auth-input-bd);
    border-radius: 10px;
    background: #fff;
    object-fit: cover;
}
.auth-captcha .input-group { flex: 1; }
.auth-captcha .auth-captcha-in { text-align: center; letter-spacing: .22em; font-weight: 600; text-transform: uppercase; }
.auth-captcha-re {
    border: 1px solid var(--auth-input-bd);
    background: var(--auth-input);
    color: var(--auth-muted);
    border-radius: 10px;
    width: 50px;
    cursor: pointer;
}
.auth-captcha-re:hover { color: var(--auth-brand-2); }

/* kotak input OTP */
.otp-boxes { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 6px; }
.otp-boxes input {
    width: 100%; height: 58px;
    text-align: center;
    font-size: 1.4rem; font-weight: 700;
    color: var(--auth-ink);
    background: var(--auth-input);
    border: 1px solid var(--auth-input-bd);
    border-radius: 12px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.otp-boxes input:focus {
    border-color: var(--auth-brand-2);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .13);
}
.otp-boxes input.filled { border-color: var(--auth-brand-2); }

/* ------------------------------------------------ responsif */
@media (max-width: 1199.98px) {
    .auth-brand { flex-basis: 46%; max-width: 46%; padding: 44px 32px; }
    .auth-card  { padding: 38px 34px 34px; }
}
@media (max-width: 991.98px) {
    /* Foto gedung tidak ikut ke layar sempit: pada panel setinggi
       layar ponsel yang tersisa hanya potongan atap, dan itu tidak
       mengatakan apa pun. Logonya pindah ke atas kartu. */
    .auth-brand { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-main { padding: 32px 20px; }
}
@media (max-width: 575.98px) {
    .auth-main  { padding: 24px 16px; justify-content: flex-start; }
    .auth-card  { padding: 30px 22px 26px; border-radius: 16px; }
    .auth-title { font-size: 1.5rem; }
    .auth-sub   { font-size: .9rem; }
    .auth-row   { flex-direction: row; flex-wrap: wrap; }
    .otp-boxes  { gap: 7px; }
    .otp-boxes input { height: 52px; font-size: 1.2rem; }
}
