/* ==========================================================================
   Halaman Login — TATS (TRIC Assurance and Transparency System)
   Semua style di-scope di bawah .tl agar tidak bentrok dengan main_auth.css
   ========================================================================== */

.tl {
    --paper: #f5f3ee;
    --paper-2: #ece8df;
    --card: #fffefb;
    --ink: #16243a;
    --ink-soft: #4a5568;
    --ink-faint: #8a8f99;
    --navy: #1d4673;
    --navy-deep: #133357;
    --rule: #d9d3c7;
    --rule-soft: #e7e2d8;
    --verify: #2f7d5b;
    --error: #b4322a;

    --serif: 'Instrument Serif', 'Times New Roman', serif;
    --sans: 'IBM Plex Sans', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;

    position: relative;
    min-height: 100vh;
    overflow: hidden;
    font-family: var(--sans);
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 12% -10%, #fbfaf6 0%, transparent 60%),
        radial-gradient(900px 700px at 110% 110%, #e9e4d8 0%, transparent 55%),
        var(--paper);
    -webkit-font-smoothing: antialiased;
}

/* Grain halus */
.tl::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.37 0 0 0 0 0.3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Kisi garis seperti kertas formulir */
.tl::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(22, 36, 58, .045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(22, 36, 58, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(105deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 70%);
    -webkit-mask-image: linear-gradient(105deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 70%);
}

.tl-geo {
    position: absolute;
    width: min(78vw, 980px);
    left: -18vw;
    bottom: -32vh;
    color: var(--navy);
    opacity: .07;
    pointer-events: none;
    animation: tl-drift 60s linear infinite;
}

@keyframes tl-drift {
    to { transform: rotate(360deg); }
}

/* ---------- Layout ---------- */
.tl-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
    min-height: 100vh;
}

/* ---------- Panel kiri ---------- */
.tl-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    padding: 3rem clamp(2rem, 5vw, 5.5rem);
}

.tl-brand-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
}

.tl-eyebrow {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
}

.tl-eyebrow--muted { color: var(--ink-faint); }

.tl-kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1.25rem;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--navy);
}

.tl-kicker::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--navy);
}

.tl-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.6rem, 4.6vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -.015em;
    color: var(--ink);
}

.tl-title em {
    font-style: italic;
    color: var(--navy);
    position: relative;
    white-space: nowrap;
}

.tl-title em::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: .08em;
    height: .09em;
    background: var(--navy);
    opacity: .18;
    transform-origin: left;
    animation: tl-underline 1s .9s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes tl-underline {
    from { transform: scaleX(0); }
}

.tl-lede {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink-soft);
}

/* Register skema — gaya buku daftar */
.tl-register { max-width: 36rem; }

.tl-register-head {
    display: flex;
    justify-content: space-between;
    padding-bottom: .6rem;
    border-bottom: 1.5px solid var(--ink);
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink);
}

.tl-schemes {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tl-schemes li {
    display: grid;
    grid-template-columns: 2.5rem 6.5rem 1fr;
    align-items: baseline;
    padding: .7rem 0;
    border-bottom: 1px solid var(--rule);
    transition: background .25s ease, padding .25s ease;
}

.tl-schemes li:hover {
    background: linear-gradient(90deg, rgba(29, 70, 115, .06), transparent);
    padding-left: .5rem;
}

.tl-no {
    font-family: var(--mono);
    font-size: .72rem;
    color: var(--ink-faint);
}

.tl-code {
    font-weight: 600;
    font-size: .95rem;
    color: var(--navy-deep);
}

.tl-desc {
    font-size: .9rem;
    color: var(--ink-soft);
}

.tl-pillars {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2rem;
    font-size: .82rem;
    color: var(--ink-soft);
}

.tl-pillars i {
    margin-right: .4rem;
    color: var(--verify);
}

/* ---------- Panel kanan ---------- */
.tl-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .25));
    border-left: 1px solid var(--rule);
    backdrop-filter: blur(2px);
}

.tl-card {
    position: relative;
    width: 100%;
    max-width: 410px;
    padding: 2.5rem 2.25rem 2rem;
    background: var(--card);
    border: 1px solid var(--rule-soft);
    border-radius: 6px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .9) inset,
        0 1px 2px rgba(22, 36, 58, .04),
        0 12px 32px -12px rgba(22, 36, 58, .16),
        0 40px 80px -40px rgba(22, 36, 58, .22);
}

/* Lipatan sudut kertas di atas kartu */
.tl-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 2.25rem;
    right: 2.25rem;
    height: 3px;
    background: linear-gradient(90deg, var(--navy) 0 40%, var(--ink) 40% 70%, var(--verify) 70%);
    border-radius: 0 0 2px 2px;
}

/* Segel berputar */
.tl-seal {
    position: absolute;
    top: -38px;
    right: -38px;
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--rule);
    box-shadow: 0 8px 20px -10px rgba(22, 36, 58, .35);
}

.tl-seal svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: tl-drift 22s linear infinite;
}

.tl-seal text {
    font-family: var(--mono);
    font-size: 9.2px;
    letter-spacing: 2.1px;
    fill: var(--navy);
}

.tl-seal > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: .8rem;
}

.tl-logo {
    display: block;
    height: 84px;
    width: auto;
    margin: 0 auto 1.75rem;
    object-fit: contain;
}

.tl-card-head {
    margin-bottom: 1.75rem;
    text-align: center;
}

.tl-card-head h2 {
    margin: 0 0 .35rem;
    font-family: var(--serif);
    font-size: 1.85rem;
    font-weight: 400;
    color: var(--ink);
}

.tl-card-head p {
    margin: 0;
    font-size: .88rem;
    color: var(--ink-faint);
}

/* ---------- Form ---------- */
.tl-form { display: flex; flex-direction: column; gap: 1.1rem; }

.tl-field label {
    display: block;
    margin-bottom: .4rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--ink);
}

.tl-control {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 4px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tl-control > i {
    position: absolute;
    left: .95rem;
    font-size: .9rem;
    color: var(--ink-faint);
    transition: color .2s ease;
    pointer-events: none;
}

.tl-control input {
    flex: 1;
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.6rem;
    border: 0;
    background: transparent;
    font: 400 .95rem var(--sans);
    color: var(--ink);
    outline: none;
}

.tl-control input::placeholder { color: #b3b3ad; }

.tl-control:hover { border-color: #c4bdae; }

.tl-control:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(29, 70, 115, .12);
}

.tl-control:focus-within > i { color: var(--navy); }

.tl-reveal {
    height: 48px;
    padding: 0 .95rem;
    border: 0;
    background: none;
    color: var(--ink-faint);
    cursor: pointer;
    transition: color .2s ease;
}

.tl-reveal:hover, .tl-reveal:focus-visible { color: var(--navy); outline: none; }

.tl-field.is-error .tl-control { border-color: var(--error); }
.tl-field.is-error .tl-control > i { color: var(--error); }

.tl-error {
    display: block;
    margin-top: .35rem;
    font-size: .78rem;
    color: var(--error);
}

/* Checkbox kustom */
.tl-check {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}

.tl-check input { position: absolute; opacity: 0; pointer-events: none; }

.tl-box {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1.5px solid #bdb6a8;
    border-radius: 3px;
    background: #fff;
    transition: all .2s ease;
}

.tl-box i { font-size: .6rem; color: #fff; transform: scale(0); transition: transform .2s ease; }

.tl-check input:checked + .tl-box { background: var(--navy); border-color: var(--navy); }
.tl-check input:checked + .tl-box i { transform: scale(1); }
.tl-check input:focus-visible + .tl-box { box-shadow: 0 0 0 3px rgba(29, 70, 115, .2); }

/* Tombol */
.tl-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    margin-top: .35rem;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 4px;
    overflow: hidden;
    background: var(--navy);
    color: #fff;
    font: 600 .95rem var(--sans);
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(19, 51, 87, .7);
    transition: background .25s ease, transform .15s ease, box-shadow .25s ease;
}

.tl-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .7s ease;
}

.tl-submit:hover { background: var(--navy-deep); box-shadow: 0 14px 24px -12px rgba(19, 51, 87, .8); }
.tl-submit:hover::before { transform: translateX(100%); }
.tl-submit:hover .fa-arrow-right { transform: translateX(4px); }
.tl-submit:active { transform: translateY(1px); }
.tl-submit:focus-visible { outline: 3px solid rgba(29, 70, 115, .3); outline-offset: 2px; }
.tl-submit:disabled { opacity: .8; cursor: progress; }
.tl-submit i { transition: transform .25s ease; }

.tl-or {
    display: flex;
    align-items: center;
    gap: .9rem;
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.tl-or::before, .tl-or::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

.tl-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    height: 48px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}

.tl-google svg { width: 18px; height: 18px; }
.tl-google:hover { border-color: var(--ink); background: #fbfaf7; color: var(--ink); }
.tl-google:active { transform: translateY(1px); }

.tl-signup {
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--rule);
    text-align: center;
    font-size: .88rem;
    color: var(--ink-soft);
}

.tl-signup a {
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .25s ease;
}

.tl-signup a:hover { background-size: 100% 1px; }

.tl-copy {
    margin: 1.5rem 0 0;
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .06em;
    color: var(--ink-faint);
}

/* ==========================================================================
   Tambahan untuk halaman Register
   ========================================================================== */

.tl-card--wide { max-width: 480px; }

.tl-logo--sm { height: 64px; margin-bottom: 1.25rem; }

.tl-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
}

/* Langkah onboarding */
.tl-steps { list-style: none; margin: 0; padding: 0; }

.tl-steps li {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    align-items: baseline;
    gap: .25rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--rule);
}

.tl-steps .tl-code { display: block; margin-bottom: .15rem; }
.tl-steps .tl-desc { display: block; }
.tl-steps li:not(.is-current) .tl-code { color: var(--ink-soft); font-weight: 500; }
.tl-steps li.is-current .tl-no { color: var(--navy); font-weight: 500; }

.tl-step-tag {
    align-self: center;
    padding: .2rem .55rem;
    border: 1px solid rgba(47, 125, 91, .35);
    border-radius: 999px;
    background: rgba(47, 125, 91, .08);
    font-family: var(--mono);
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--verify);
}

.tl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.tl-chips-label {
    margin-right: .5rem;
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.tl-chip {
    padding: .3rem .7rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: rgba(255, 255, 255, .6);
    font-size: .8rem;
    font-weight: 500;
    color: var(--navy-deep);
}

/* Captcha */
.tl-captcha {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: .5rem;
    align-items: stretch;
}

.tl-captcha-img {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 .4rem;
    overflow: hidden;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #fff;
}

.tl-captcha-img img { display: block; height: 38px; width: auto; border-radius: 2px; }

.tl-captcha-reload {
    width: 44px;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #fff;
    color: var(--ink-soft);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease;
}

.tl-captcha-reload:hover, .tl-captcha-reload:focus-visible { color: var(--navy); border-color: var(--navy); outline: none; }
.tl-captcha-reload.is-spinning i { animation: tl-drift .8s linear infinite; }
.tl-captcha-input input { letter-spacing: .12em; }

@media (max-width: 480px) {
    .tl-row { grid-template-columns: 1fr; }
    .tl-captcha { grid-template-columns: 1fr auto; }
    .tl-captcha-input { grid-column: 1 / -1; }
}

/* ---------- Animasi masuk ---------- */
.tl-rise {
    animation: tl-rise .8s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(var(--d, 0) * 90ms + 80ms);
}

@keyframes tl-rise {
    from { opacity: 0; transform: translateY(14px); }
}

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
    .tl-shell { grid-template-columns: 1fr 420px; }
    .tl-schemes li { grid-template-columns: 2rem 5.5rem 1fr; }
}

@media (max-width: 900px) {
    .tl-shell { grid-template-columns: minmax(0, 1fr); }
    .tl-brand { display: none; }
    .tl-panel { border-left: 0; background: none; min-height: 100vh; padding: 3.5rem 1.25rem 2rem; }
    .tl-geo { left: -40vw; bottom: auto; top: -20vh; width: 140vw; }
    .tl::after { mask-image: none; -webkit-mask-image: none; opacity: .6; }
}

@media (max-width: 480px) {
    .tl-card { padding: 2.25rem 1.4rem 1.75rem; }
    .tl-seal { top: -30px; right: -10px; width: 76px; height: 76px; }
    .tl-seal > i { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .tl *, .tl *::before, .tl *::after, .tl-geo { animation: none !important; transition: none !important; }
}
