/* Tampilan baru registrasi reguler (register-reguler-v2.blade.php).
   Semua aturan dibatasi .reg-v2 supaya halaman lain tidak ikut berubah. */

:root {
    --reg-ink: #1e1b4b;
    --reg-muted: #64748b;
    --reg-radius: 18px;
}

/* Latar: gradasi lembut, bukan putih polos */
.reg-v2-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 500px at 0% 0%, rgba(99, 102, 241, 0.22), transparent 60%),
        radial-gradient(800px 500px at 100% 10%, rgba(236, 72, 153, 0.16), transparent 60%),
        radial-gradient(900px 600px at 50% 100%, rgba(20, 184, 166, 0.16), transparent 60%),
        #f4f6fd;
}

.reg-v2 {
    width: 100%;
    max-width: 1080px;
    /* wrapper ini item flex: tanpa min-width 0, deret langkah (nowrap di HP) melebarkan halaman */
    min-width: 0;
    color: var(--reg-ink);
}

/* body layout = flex center; tanpa ini .content-wrapper melebar ke isinya dan meluber di HP.
   File ini hanya dimuat halaman v2, jadi halaman lain tidak terpengaruh. */
.content-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.reg-v2 .reg-hero,
.reg-v2 .reg-shell {
    max-width: 100%;
    min-width: 0;
}

/* ---------- Hero ---------- */
.reg-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
    padding: 2.25rem 2rem 1.75rem;
    border-radius: 24px;
    color: #fff;
    text-align: center;
    background: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #db2777 100%);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.28);
}

.reg-hero::before,
.reg-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.reg-hero::before {
    width: 260px;
    height: 260px;
    top: -120px;
    right: -60px;
}

.reg-hero::after {
    width: 180px;
    height: 180px;
    bottom: -90px;
    left: -40px;
}

.reg-hero__logo {
    position: relative;
    height: 44px;
    padding: 8px 16px;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.reg-hero__title {
    position: relative;
    margin: 0 0 0.35rem;
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
}

.reg-hero__sub {
    position: relative;
    max-width: 560px;
    margin: 0 auto 1.25rem;
    font-size: 0.95rem;
    opacity: 0.92;
}

.reg-steps {
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reg-steps a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem 0.4rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
    transition: background 0.2s;
}

.reg-steps a:hover {
    background: rgba(255, 255, 255, 0.28);
}

.reg-steps a span {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4f46e5;
    background: #fff;
}

/* ---------- Kartu per bagian ---------- */
.reg-v2 .reg-shell {
    background: transparent;
    box-shadow: none;
    border: 0;
}

.reg-v2 .reg-shell > .card-body {
    padding: 0;
}

.reg-card {
    --accent: #4f46e5;
    --accent-soft: rgba(79, 70, 229, 0.1);
    position: relative;
    margin-bottom: 1.25rem;
    padding: 1.5rem 1.5rem 0.75rem;
    border-radius: var(--reg-radius);
    background: #fff;
    box-shadow: 0 8px 28px rgba(30, 27, 75, 0.07);
    border-top: 5px solid var(--accent);
    scroll-margin-top: 1rem;
}

.reg-card--1 { --accent: #4f46e5; --accent-soft: rgba(79, 70, 229, 0.1); }
.reg-card--2 { --accent: #0284c7; --accent-soft: rgba(2, 132, 199, 0.1); }
.reg-card--3 { --accent: #0d9488; --accent-soft: rgba(13, 148, 136, 0.1); }
.reg-card--4 { --accent: #7c3aed; --accent-soft: rgba(124, 58, 237, 0.1); }
.reg-card--5 { --accent: #ea580c; --accent-soft: rgba(234, 88, 12, 0.1); }
.reg-card--6 { --accent: #db2777; --accent-soft: rgba(219, 39, 119, 0.1); }
.reg-card--7 { --accent: #16a34a; --accent-soft: rgba(22, 163, 74, 0.1); }

.reg-card__head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}

.reg-card__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.45rem;
    color: var(--accent);
    background: var(--accent-soft);
}

.reg-card__step {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.reg-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--reg-ink);
}

.reg-card__sub {
    color: var(--reg-muted);
}

/* Sub-judul di dalam kartu Data Diri (Informasi Pelanggan, Alamat KTP, Kontak) */
.reg-subhead {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.75rem 0 1rem;
    padding-top: 1.1rem;
    border-top: 1px dashed #e2e8f0;
    scroll-margin-top: 1rem;
}

.reg-subhead--first {
    margin-top: -0.25rem;
    padding-top: 0;
    border-top: 0;
}

.reg-subhead > i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 1.05rem;
    color: var(--accent);
    background: var(--accent-soft);
}

.reg-subhead__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--reg-ink);
}

.reg-subhead__sub {
    color: var(--reg-muted);
    font-size: 0.78rem;
}

.reg-card__opt {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--reg-muted);
}

/* Input ikut warna aksen bagian */
.reg-card .form-control,
.reg-card .form-select {
    border-radius: 12px;
    border-color: #e2e8f0;
    background-color: #fbfcff;
}

.reg-card .form-control:focus,
.reg-card .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem var(--accent-soft);
    background-color: #fff;
}

.reg-card .select2-container--default .select2-selection--single {
    border-radius: 12px;
    border-color: #e2e8f0;
    background-color: #fbfcff;
}

.reg-card .select2-container--focus .select2-selection--single,
.reg-card .select2-container--open .select2-selection--single {
    border-color: var(--accent);
}

.reg-card .btn-primary:not(.reg-btn),
.reg-card .btn-icon.btn-primary {
    border-color: var(--accent);
    background: var(--accent);
}

.reg-card .alert-info {
    border: 0;
    border-radius: 12px;
    color: var(--reg-ink);
    background: var(--accent-soft);
}

/* Paket: kartu ISP sudah punya gaya sendiri (list-product.css) */
.reg-card--4 .paket-layanan {
    margin-top: -0.25rem;
}

/* Isi otomatis dari foto KTP (kartu Data Diri) */
.reg-ktp-ocr {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1rem;
    border: 1px dashed color-mix(in srgb, var(--accent) 45%, #fff);
    border-radius: 14px;
    background: var(--accent-soft);
}

.reg-ktp-ocr__main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.reg-ktp-ocr__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.4rem;
    color: #fff;
    background: var(--accent);
}

.reg-ktp-ocr__text {
    flex: 1 1 auto;
    min-width: 0;
}

.reg-ktp-ocr__text b {
    display: block;
    color: var(--reg-ink);
}

.reg-ktp-ocr__text small {
    color: var(--reg-muted);
}

.reg-btn-ktp {
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
}

.reg-btn-ktp:hover {
    color: #fff;
    filter: brightness(1.08);
}

.reg-ktp-ocr__status {
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    font-size: 0.85rem;
    background: #fff;
}

.reg-ktp-ocr__status.is-ok {
    border-left: 4px solid #16a34a;
}

.reg-ktp-ocr__status.is-warn {
    border-left: 4px solid #ea580c;
    color: #9a3412;
}

.reg-ktp-ocr__status.is-info {
    border-left: 4px solid var(--accent);
}

/* Kolom yang diisi dari KTP: kuning lembut sampai diubah pelanggan */
.reg-card .form-control.reg-autofilled {
    background-color: #fefce8;
    border-color: #facc15;
}

/* NIK hasil OCR yang belum meyakinkan */
.reg-card .form-control.reg-autofilled.reg-autofilled-cek {
    background-color: #fff7ed;
    border-color: #f97316;
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.15);
}

@media (max-width: 767.98px) {
    .reg-ktp-ocr__main {
        flex-wrap: wrap;
    }

    .reg-btn-ktp {
        width: 100%;
    }
}

/* Perangkat GPON & ONT (kartu Pilih Paket bundling) */
.reg-perangkat {
    margin: 0.5rem 0 1rem;
    padding: 0.25rem 1rem 1rem;
    border-radius: 14px;
    background: var(--accent-soft);
}

.reg-perangkat .reg-subhead {
    border-top: 0;
    padding-top: 0.75rem;
    margin-top: 0;
}

.reg-perangkat__body {
    max-width: 420px;
}

.reg-perangkat__row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dashed color-mix(in srgb, var(--accent) 25%, #fff);
    font-size: 0.92rem;
}

.reg-perangkat__total {
    border-bottom: 0;
    color: var(--accent);
}

.reg-perangkat__isp {
    font-size: 0.9rem;
    color: var(--reg-ink);
}

/* Upload */
.reg-card .drop-zone {
    border: 2px dashed color-mix(in srgb, var(--accent) 45%, #fff);
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    transition: background 0.2s, border-color 0.2s;
}

.reg-card .drop-zone:hover,
.reg-card .drop-zone--over {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, #fff);
}

.reg-card #signature-pad {
    border: 2px dashed color-mix(in srgb, var(--accent) 45%, #fff) !important;
    background: #fff;
}

/* S&K */
.reg-terms {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, #fff);
}

.reg-card--7 .form-check {
    padding: 0.85rem 1rem 0.85rem 2.6rem;
    margin-bottom: 0.75rem !important;
    border-radius: 12px;
    background: #f8fafc;
}

.reg-card--7 .form-check-input:checked {
    border-color: var(--accent);
    background-color: var(--accent);
}

/* ---------- Bar kirim ---------- */
.reg-submit {
    position: sticky;
    bottom: 1rem;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--reg-radius);
    color: #fff;
    background: linear-gradient(120deg, #4f46e5, #7c3aed 55%, #db2777);
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.3);
}

.reg-submit__text {
    font-size: 0.85rem;
    opacity: 0.95;
}

.reg-btn {
    flex: 0 0 auto;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    color: #4f46e5;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.reg-btn:hover:not(:disabled) {
    color: #4f46e5;
    background: #eef2ff;
    transform: translateY(-1px);
}

.reg-btn:disabled {
    color: #6366f1;
    background: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.reg-v2 .information {
    color: var(--reg-muted);
    text-align: center;
}

.reg-v2 hr {
    opacity: 0.08;
}

/* ---------- HP ---------- */
@media (max-width: 767.98px) {
    .reg-hero {
        padding: 1.75rem 1.1rem 1.4rem;
        border-radius: 18px;
    }

    .reg-hero__title {
        font-size: 1.45rem;
    }

    .reg-steps {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }

    .reg-steps a {
        flex: 0 0 auto;
    }

    .reg-card {
        padding: 1.15rem 1rem 0.5rem;
        border-radius: 14px;
    }

    .reg-submit {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        bottom: 0.5rem;
    }
}
