/* =============================================================================
   Portal karir publik — "Bangun karier di bawah satu atap".

   Seluruh identitas diturunkan dari logo WBL: navy atap #153C7F, emas huruf
   WBL #C89023, dan kanopi atap (partials/canopy.php) yang menjadi latar hero
   sekaligus animasi loading. Dimuat SETELAH app.css dan hanya di layout
   publik, jadi aplikasi internal HR tidak ikut berubah.
   ========================================================================== */

body.public, body.auth {
    --wb-navy:    #153C7F;
    --wb-night:   #0B1F45;
    --wb-deep:    #071633;
    --wb-gold:    #C89023;
    --wb-gold-hi: #E5B652;
    --wb-paper:   #F3F5F9;
    --wb-ink:     #0E1A33;
    --wb-mute:    #5D6B85;
    --wb-line:    #DCE2EC;

    /* Komponen bawaan app.css (tombol, input, badge) ikut berwarna atap. */
    --blue:       var(--wb-navy);
    --blue-deep:  var(--wb-night);
    --blue-hover: #E8EDF7;
    --ink:        var(--wb-ink);
    --ink-soft:   var(--wb-mute);
    --line:       var(--wb-line);
    --shadow:     0 22px 50px rgba(7, 22, 51, .16);
    --display:    "Archivo", "Plus Jakarta Sans", system-ui, sans-serif;

    background: var(--wb-paper);
    color: var(--wb-ink);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.public h1, body.public h2, body.public h3,
body.auth h1, body.auth h2 { font-family: var(--display); }
body.public .form-control:focus, body.auth .form-control:focus { border-color: var(--wb-navy); box-shadow: 0 0 0 3px rgba(21, 60, 127, .14); }
body.public :focus-visible, body.auth :focus-visible { outline: 2px solid var(--wb-gold); outline-offset: 2px; }

/* --- Header + kanopi ------------------------------------------------------ */

.pub-header {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(120% 90% at 50% -12%, #1D4A9C 0%, var(--wb-night) 48%, var(--wb-deep) 100%);
}
.pub-header .canopy-hero, .auth-side .canopy-hero {
    position: absolute; inset: 0; z-index: -1;
    width: 100%; height: 100%;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(#000 55%, transparent 100%);
            mask-image: linear-gradient(#000 55%, transparent 100%);
}
.canopy-hero line, .canopy-hero polyline { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.canopy-hero .cl-base line { stroke: rgba(255, 255, 255, .085); stroke-width: 1; }
.canopy-hero .cl-glow line { stroke: var(--wb-gold-hi); stroke-width: 1.4; }

.pub-header .bar { position: relative; view-transition-name: pub-bar; }
.pub-brand .brand-plate { box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.pub-brand b { font-family: var(--display); font-weight: 700; letter-spacing: -.1px; }
.pub-brand small { color: var(--wb-gold-hi); opacity: 1; letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; font-weight: 700; }
.pub-nav a { font-weight: 600; font-size: 13.5px; }
.pub-nav a.solid {
    background: transparent; color: #F6DFA8;
    box-shadow: inset 0 0 0 1px rgba(229, 182, 82, .55);
}
.pub-nav a.solid:hover { background: rgba(229, 182, 82, .14); }

/* Hero halaman lain (detail lowongan, formulir, lacak) — ringkas, rata kiri. */
.pub-hero { background: transparent; padding: 22px 22px 70px; }
.pub-hero h1 {
    font-weight: 800; font-stretch: 112%;
    font-size: clamp(26px, 3.6vw, 40px); line-height: 1.08; letter-spacing: -.02em;
}
.pub-hero p { color: rgba(255, 255, 255, .74); opacity: 1; }
.pub-hero a { color: #F6DFA8 !important; opacity: 1 !important; font-weight: 600; }

.pub-main { margin-top: -48px; position: relative; }
.pub-panel { border-radius: 20px; box-shadow: var(--shadow); }

/* --- Beranda karir -------------------------------------------------------- */

.hero-home { text-align: center; padding: 46px 22px 112px; }
.hero-eyebrow {
    display: inline-block;
    font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    color: var(--wb-gold-hi); margin-bottom: 18px;
}
.hero-home h1 {
    font-size: clamp(36px, 6.4vw, 74px);
    font-stretch: 118%;
    line-height: .98; letter-spacing: -.035em;
    margin: 0 auto 18px; max-width: 900px;
    text-wrap: balance;
}
.hero-home h1 em { font-style: normal; color: var(--wb-gold-hi); }
.hero-home p { font-size: 15.5px; line-height: 1.65; max-width: 560px; text-wrap: balance; }

/* Kotak cari menumpang di tepi bawah hero. */
.search-card {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 6px; padding: 8px;
    background: #fff; border-radius: 18px; box-shadow: var(--shadow);
}
.search-card label {
    display: flex; flex-direction: column; gap: 2px;
    padding: 9px 14px; border-radius: 12px; cursor: text;
    transition: background .15s ease;
}
.search-card label:hover, .search-card label:focus-within { background: var(--wb-paper); }
.search-card label span { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wb-mute); }
.search-card input, .search-card select {
    border: 0; background: transparent; padding: 0; outline: none;
    font: inherit; font-size: 14.5px; font-weight: 600; color: var(--wb-ink); width: 100%;
}
.search-card select { cursor: pointer; }
.search-card button {
    align-self: stretch; border: 0; border-radius: 12px; padding: 0 26px;
    background: var(--wb-gold); color: var(--wb-deep);
    font: inherit; font-weight: 800; font-size: 14.5px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background .15s ease, transform .1s ease;
}
.search-card button:hover { background: var(--wb-gold-hi); }
.search-card button:active { transform: scale(.98); }
.search-card button svg { width: 17px; height: 17px; }

.section-head {
    display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
    margin: 44px 4px 14px;
}
.section-head h2 { margin: 0; font-size: 24px; font-weight: 800; font-stretch: 110%; letter-spacing: -.02em; }
.section-head .count { font-size: 13.5px; color: var(--wb-mute); font-weight: 600; }
.section-head .reset { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--wb-navy); }

/* Daftar lowongan bergaya papan direktori mal: pelat kode unit di kiri. */
.job-list { background: #fff; border-radius: 20px; box-shadow: 0 1px 0 var(--wb-line), 0 10px 30px rgba(7, 22, 51, .06); overflow: hidden; }
.job-row {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 22px;
    align-items: center; gap: 18px;
    padding: 18px 22px; color: inherit;
    border-top: 1px solid var(--wb-line);
    transition: background .18s ease;
}
.job-row:first-child { border-top: 0; }
.job-row:hover { background: #F8FAFD; text-decoration: none; }
.plate {
    width: 56px; height: 56px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--wb-navy); color: var(--wb-gold-hi);
    font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 13px; letter-spacing: .06em;
    position: relative; overflow: hidden;
    transition: background .2s ease, color .2s ease;
}
/* Garis emas tipis di pelat — lis atap dari logo. */
.plate::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: 9px; height: 2px; background: currentColor; opacity: .55; }
.job-row:hover .plate { background: var(--wb-gold); color: var(--wb-deep); }
.jr-title { display: block; font-family: var(--display); font-weight: 700; font-size: 17.5px; letter-spacing: -.01em; color: var(--wb-ink); }
.jr-sub { display: block; font-size: 13px; color: var(--wb-mute); margin-top: 2px; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.jr-chips span {
    font-size: 11.5px; font-weight: 600; color: var(--wb-navy);
    background: #EDF1F8; border-radius: 999px; padding: 3px 10px;
}
.jr-chips span.pay { background: rgba(200, 144, 35, .14); color: #8A5F0E; }
.jr-end { text-align: right; white-space: nowrap; }
.jr-end small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wb-mute); }
.jr-end b { font-family: var(--display); font-size: 15px; font-weight: 700; }
.jr-arrow { color: var(--wb-gold); transition: transform .2s ease; font-size: 18px; font-weight: 700; }
.job-row:hover .jr-arrow { transform: translateX(4px); }

.job-empty { padding: 46px 24px; text-align: center; }
.job-empty .canopy-mini { width: 120px; height: auto; margin: 0 auto 14px; display: block; }
.job-empty .canopy-mini line, .job-empty .canopy-mini polyline { stroke: #C3CCDD; stroke-width: 5; fill: none; stroke-linecap: round; }
.job-empty b { display: block; font-family: var(--display); font-size: 18px; font-weight: 700; }
.job-empty p { margin: 6px auto 0; max-width: 420px; color: var(--wb-mute); font-size: 14px; line-height: 1.6; }
.job-empty a { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--wb-navy); }

/* Tahapan seleksi — urutan nyata dari master tahapan. */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; counter-reset: tahap; }
.stages li { position: relative; padding: 0 12px 0 0; counter-increment: tahap; }
.stages li::before {
    content: counter(tahap);
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 2px solid var(--wb-navy); color: var(--wb-navy);
    font-family: var(--display); font-weight: 800; font-size: 13px; position: relative; z-index: 1;
}
.stages li::after { content: ""; position: absolute; left: 30px; right: 0; top: 14px; height: 2px; background: var(--wb-line); }
.stages li:last-child::after { display: none; }
.stages li.end::before { content: "✓"; background: var(--wb-gold); border-color: var(--wb-gold); color: var(--wb-deep); }
.stages b { display: block; margin-top: 10px; font-size: 13.5px; font-weight: 700; }
.stages-note { margin: 14px 4px 0; font-size: 13px; color: var(--wb-mute); }

.cta-band {
    position: relative; overflow: hidden; isolation: isolate;
    background: var(--wb-night); border-radius: 22px; margin-top: 44px; padding: 30px 32px;
}
.cta-band h2 { font-size: 22px; font-weight: 800; font-stretch: 110%; letter-spacing: -.01em; }
.cta-band p { color: rgba(255, 255, 255, .72); opacity: 1; }
.cta-band .btn {
    background: transparent; color: #F6DFA8; font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(229, 182, 82, .6); border-radius: 12px; padding: 11px 18px;
}
.cta-band .btn:hover { background: rgba(229, 182, 82, .14); }

/* --- Footer --------------------------------------------------------------- */

.pub-foot {
    max-width: none; margin: 56px 0 0; padding: 34px 22px 38px;
    background: var(--wb-deep); color: rgba(255, 255, 255, .55); font-size: 12.5px; line-height: 1.8;
}
.pub-foot a { color: #F6DFA8; }
.pub-foot .nofee {
    display: flex; justify-content: center; align-items: flex-start; gap: 8px; margin-top: 10px;
    color: #fff; font-weight: 600; font-size: 13px;
}
.pub-foot .nofee svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 3px; color: var(--wb-gold-hi); }

/* --- Halaman masuk staf (login, lupa & reset sandi) ----------------------- */

body.auth {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
    grid-template-rows: minmax(100vh, auto);
    place-items: stretch; min-height: 100vh; padding: 0; background: #fff;
}
.auth-side {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 36px 52px 60px; color: #fff;
    background: radial-gradient(120% 90% at 50% -12%, #1D4A9C 0%, var(--wb-night) 48%, var(--wb-deep) 100%);
}
.auth-side .canopy-hero { -webkit-mask-image: none; mask-image: none; }
.auth-back { position: absolute; top: 30px; left: 52px; color: #F6DFA8; font-size: 13px; font-weight: 600; }
.auth-side-copy h2 {
    margin: 0 0 14px; font-weight: 800; font-stretch: 118%;
    font-size: clamp(34px, 4.2vw, 58px); line-height: 1; letter-spacing: -.035em;
}
.auth-side-copy p { margin: 0; max-width: 420px; color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.65; }

.auth-main {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 48px 28px 28px;
}
body.auth .auth-card { max-width: 380px; padding: 0; background: transparent; box-shadow: none; border-radius: 0; margin: auto 0; }
.auth-logo { display: block; height: 64px; width: auto; }
body.auth .auth-card h1 {
    margin: 26px 0 6px; color: var(--wb-ink);
    font-size: 30px; font-weight: 800; font-stretch: 110%; letter-spacing: -.02em;
}
body.auth .auth-card p.lead { color: var(--wb-mute); font-size: 14px; line-height: 1.55; margin: 0 0 24px; }
body.auth .form-control { padding: 12px 14px; border-radius: 12px; font-size: 14.5px; }
body.auth .auth-card .btn { margin-top: 6px; padding: 13px; border-radius: 12px; font-size: 14.5px; font-weight: 700; }
.auth-alt { text-align: center; font-size: 13px; margin: 18px 0 0; }
.auth-alt a { color: var(--wb-navy); font-weight: 600; }
.auth-foot { margin: 28px 0 0; font-size: 11.5px; color: var(--wb-mute); text-align: center; }

@media (max-width: 860px) {
    body.auth { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
    .auth-side { min-height: 230px; padding: 70px 22px 28px; }
    .auth-back { top: 22px; left: 22px; }
    .auth-side-copy h2 { font-size: 30px; font-stretch: 110%; }
    .auth-side-copy p { font-size: 13.5px; }
    .auth-main { padding: 30px 22px 22px; }
    body.auth .auth-card h1 { margin-top: 20px; font-size: 26px; }
    .auth-logo { height: 54px; }
}

/* --- Loading: kanopi digambar satu sapuan, logo asli menimpa, layar terangkat */

.pub-loader { display: none; }
.loader-on .pub-loader {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center;
    background: #fff;
    animation: loader-lift .62s cubic-bezier(.7, 0, .2, 1) 1.55s forwards;
}
.pub-loader-mark { position: relative; width: min(64vw, 360px); aspect-ratio: 768 / 480; }
.pub-loader-mark img, .pub-loader-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pub-loader-mark img { opacity: 0; animation: fade-in .3s ease .85s forwards; }
.pub-loader-mark svg line, .pub-loader-mark svg polyline {
    fill: none; stroke: #153C7F; stroke-width: 4; stroke-linecap: square;
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: draw .9s cubic-bezier(.55, 0, .25, 1) .1s forwards;
}
.pub-loader-mark svg { animation: fade-out .2s linear 1.1s forwards; }
.pub-loader-bar {
    position: absolute; left: 50%; bottom: 14vh; width: 120px; height: 2px; margin-left: -60px;
    background: #E6EAF2; overflow: hidden; border-radius: 2px;
}
.pub-loader-bar::after {
    content: ""; position: absolute; inset: 0; background: var(--wb-gold);
    transform-origin: left; transform: scaleX(0);
    animation: grow 1.45s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes loader-lift {
    to { transform: translateY(-100%); visibility: hidden; }
}

/* --- Masuknya halaman ----------------------------------------------------- */

body.public, body.auth { --rise-base: .05s; }
.loader-on body.public { --rise-base: 1.8s; }
.rise {
    opacity: 0; transform: translateY(16px);
    animation: rise .7s cubic-bezier(.2, .7, .2, 1) calc(var(--rise-base) + var(--d, 0s)) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* Pindah halaman: bilah navigasi diam, isi berganti dengan lembut. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s ease both; }
::view-transition-new(root) { animation: vt-in .34s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
    .loader-on .pub-loader { display: none; }
    .rise { opacity: 1; transform: none; animation: none; }
    .canopy-hero .cl-glow { display: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* --- Layar kecil ---------------------------------------------------------- */

@media (max-width: 860px) {
    /* Detail lowongan & hasil lacak memakai grid dua kolom di halamannya. */
    .pub-main .grid { grid-template-columns: 1fr !important; }
    .pub-main .pub-panel[style*="sticky"] { position: static !important; }
    .search-card { grid-template-columns: 1fr 1fr; }
    .search-card label:first-child { grid-column: 1 / -1; }
    .search-card button { grid-column: 1 / -1; justify-content: center; padding: 13px; }
}
@media (max-width: 600px) {
    .hero-home { padding: 30px 18px 96px; }
    .hero-home h1 { font-size: 34px; font-stretch: 108%; letter-spacing: -.03em; }
    .hero-home p { font-size: 14.5px; }
    .search-card { grid-template-columns: 1fr; }
    .section-head { margin-top: 34px; }
    .section-head h2 { font-size: 21px; }
    .job-row { grid-template-columns: 46px minmax(0, 1fr); gap: 14px; padding: 16px; align-items: start; }
    .plate { width: 46px; height: 46px; font-size: 11.5px; }
    .jr-end { grid-column: 2; text-align: left; display: flex; gap: 6px; align-items: baseline; }
    .jr-end b { font-size: 13.5px; }
    .jr-arrow { display: none; }
    .stages { grid-template-columns: 1fr; gap: 14px; }
    .stages li { display: flex; align-items: center; gap: 12px; }
    .stages li::after { left: 14px; right: auto; top: 30px; width: 2px; height: 14px; }
    .stages b { margin-top: 0; }
    .cta-band { padding: 24px 20px; }
}
