:root {
    --ri-red: #ED1C24;
    --ri-red-dark: #BE1118;
    --ri-red-deep: #8D0A10;
    --ri-white: #FFFFFF;
    --ri-black: #000000;
    --ink: #171717;
    --muted: #6D6D6D;
    --surface-soft: #F8F8F8;
    --line: rgba(0, 0, 0, .09);
    --shadow: 0 28px 80px rgba(98, 0, 5, .16);
}

* { box-sizing: border-box; }

html, body { min-width: 320px; min-height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--ri-white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
    position: fixed;
    z-index: 2000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: #fff;
    background: #000;
    border-radius: 10px;
    transform: translateY(-160%);
    transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.login-shell {
    position: relative;
    display: flex;
    min-height: 100svh;
    flex-direction: column;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 7% 84%, rgba(237, 28, 36, .08), transparent 27%),
        radial-gradient(circle at 76% 3%, rgba(237, 28, 36, .12), transparent 30%),
        linear-gradient(112deg, #fff 0 54%, #fff7f7 54% 100%);
}

.login-shell::before {
    position: absolute;
    z-index: -3;
    top: -260px;
    right: -175px;
    width: 680px;
    height: 680px;
    content: "";
    border: 70px solid rgba(237, 28, 36, .052);
    border-radius: 50%;
}

.login-shell::after {
    position: absolute;
    z-index: -2;
    right: -235px;
    bottom: -325px;
    width: 720px;
    height: 720px;
    content: "";
    border-radius: 43% 57% 55% 45% / 45% 44% 56% 55%;
    background: var(--ri-red);
    transform: rotate(-17deg);
    box-shadow: inset 60px 42px 0 rgba(255,255,255,.075);
}

.top-stripe {
    flex: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--ri-red) 0 78%, var(--ri-white) 78% 100%);
}

.login-header {
    position: relative;
    z-index: 20;
    flex: 0 0 auto;
    min-height: 82px;
    background: rgba(255,255,255,.9);
    border-bottom: 1px solid rgba(0,0,0,.055);
    backdrop-filter: blur(15px);
}

.header-inner {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.sitangkas-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.city-logo {
    display: block;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand-divider {
    display: block;
    width: 1px;
    height: 42px;
    background: rgba(0,0,0,.13);
}

.application-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand-symbol {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #fff;
    background: var(--ri-red);
    border-radius: 14px 14px 14px 4px;
    box-shadow: 0 10px 22px rgba(237, 28, 36, .22);
}

.brand-symbol::after {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 14px;
    height: 14px;
    content: "";
    background: #000;
    border: 3px solid #fff;
    border-radius: 50%;
}

.brand-symbol i { font-size: 21px; }
.brand-name { display: block; font-size: 1.18rem; font-weight: 900; line-height: 1; letter-spacing: .04em; }
.brand-caption { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }

.header-hut-logo {
    display: block;
    width: 154px;
    height: 58px;
    object-fit: contain;
}

.login-main {
    position: relative;
    z-index: 3;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    padding: 34px 0 44px;
}

.login-intro { position: relative; padding-right: clamp(12px, 4vw, 62px); }

.independence-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px;
    color: #9e0c13;
    background: #fff0f0;
    border: 1px solid rgba(237, 28, 36, .16);
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.flag-dot {
    position: relative;
    width: 20px;
    height: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 3px;
    box-shadow: 0 3px 7px rgba(0,0,0,.08);
}
.flag-dot::before { position: absolute; inset: 0 0 50%; content: ""; background: var(--ri-red); }

.intro-title {
    max-width: 720px;
    margin: 20px 0 5px;
    font-size: clamp(3rem, 6.2vw, 5.4rem);
    font-weight: 950;
    line-height: .95;
    letter-spacing: -.055em;
}
.intro-title span { color: var(--ri-red); }

.intro-subtitle {
    margin: 14px 0 0;
    color: #292929;
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    font-weight: 850;
}

.intro-description {
    max-width: 680px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.75;
}

.intro-features {
    display: grid;
    max-width: 690px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 25px;
}

.intro-feature {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(0,0,0,.065);
    border-radius: 16px;
    box-shadow: 0 9px 28px rgba(55,0,2,.055);
    backdrop-filter: blur(9px);
}
.feature-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--ri-red);
    background: #fff0f0;
    border-radius: 10px;
}
.intro-feature strong { display: block; margin-top: 1px; font-size: .78rem; }
.intro-feature small { display: block; margin-top: 3px; color: var(--muted); font-size: .67rem; line-height: 1.4; }

.intro-slogan {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 21px;
    color: #3c3c3c;
    font-size: .78rem;
}
.intro-slogan i { color: var(--ri-red); font-size: 1rem; }
.intro-slogan strong { color: var(--ri-red); }

.watermark-81 {
    position: absolute;
    z-index: -1;
    right: 6%;
    bottom: -34px;
    color: rgba(237, 28, 36, .045);
    font-size: 15rem;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.12em;
    user-select: none;
}

.login-card {
    position: relative;
    overflow: hidden;
    width: min(100%, 510px);
    margin-left: auto;
    padding: clamp(23px, 3vw, 34px);
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-card-accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--ri-red) 0 72%, #111 72% 78%, #f1f1f1 78% 100%);
}

.login-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 21px;
}
.login-eyebrow { color: var(--ri-red); font-size: .72rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.login-card-header h2 { margin: 4px 0 4px; font-size: clamp(1.65rem, 2vw, 2.05rem); font-weight: 900; letter-spacing: -.035em; }
.login-card-header p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.login-lock {
    display: grid;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #fff;
    background: var(--ri-red);
    border-radius: 15px;
    box-shadow: 0 12px 28px rgba(237,28,36,.21);
}
.login-lock i { font-size: 1.3rem; }

.login-alert { padding: 12px 14px; border: 0; border-left: 4px solid #b00009; border-radius: 13px; font-size: .77rem; }
.alert-heading-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.login-alert li + li { margin-top: 2px; }

.form-field { margin-bottom: 15px; }
.form-label { margin-bottom: 7px; color: #2c2c2c; font-size: .77rem; font-weight: 850; }
.form-text { margin-top: 5px; color: #858585; font-size: .66rem; }
.label-row { display: flex; align-items: center; justify-content: space-between; }

.input-shell { position: relative; }
.field-icon {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 14px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--ri-red);
    transform: translateY(-50%);
    pointer-events: none;
}

.input-shell .form-control,
.input-shell .form-select {
    min-height: 50px;
    padding: 11px 45px 11px 47px;
    color: #242424;
    background-color: #fafafa;
    border: 1px solid #dedede;
    border-radius: 14px;
    font-size: .84rem;
    font-weight: 600;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input-shell .form-select { padding-right: 42px; }
.input-shell .form-control::placeholder { color: #a0a0a0; font-weight: 500; }
.input-shell .form-control:focus,
.input-shell .form-select:focus {
    background: #fff;
    border-color: rgba(237,28,36,.62);
    box-shadow: 0 0 0 4px rgba(237,28,36,.09);
}
.input-shell .form-control.is-invalid,
.input-shell .form-select.is-invalid { border-color: #dc3545; }

.password-toggle {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: 7px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #737373;
    background: transparent;
    border: 0;
    border-radius: 10px;
    transform: translateY(-50%);
}
.password-toggle:hover,
.password-toggle:focus-visible { color: var(--ri-red); background: #fff0f0; outline: 0; }

.captcha-section {
    margin: 4px 0 17px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e7e7e7;
    border-radius: 15px;
}
.captcha-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; color: #555; font-size: .7rem; font-weight: 800; }
.captcha-label i { color: var(--ri-red); }
.captcha-wrapper { min-height: 78px; overflow: hidden; }

.btn-login {
    display: flex;
    width: 100%;
    min-height: 51px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 18px;
    color: #fff;
    background: var(--ri-red);
    border: 1px solid var(--ri-red);
    border-radius: 14px;
    font-size: .86rem;
    font-weight: 900;
    box-shadow: 0 13px 28px rgba(237,28,36,.22);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-login:hover,
.btn-login:focus-visible { background: var(--ri-red-dark); border-color: var(--ri-red-dark); box-shadow: 0 16px 34px rgba(190,17,24,.27); transform: translateY(-2px); }
.btn-login:disabled { cursor: wait; opacity: .76; transform: none; }
.button-label, .button-loading { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

.login-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    color: #7b7b7b;
    border-top: 1px solid #ededed;
    font-size: .65rem;
}
.login-card-footer span,
.login-card-footer a { display: inline-flex; align-items: center; gap: 5px; }
.login-card-footer a { color: var(--ri-red); font-weight: 800; }
.login-card-footer a:hover { color: var(--ri-red-dark); }

.login-footer {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    padding: 9px 0 13px;
    color: #666;
    font-size: .66rem;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner strong { color: #272727; }
.footer-inner span:last-child { color: #fff; font-weight: 800; text-shadow: 0 2px 9px rgba(0,0,0,.17); }

@media (max-width: 1199.98px) {
    .intro-features { grid-template-columns: 1fr; max-width: 470px; }
    .intro-feature { padding: 10px 12px; }
    .intro-feature small { display: inline; margin-left: 4px; }
    .watermark-81 { font-size: 12rem; }
}

@media (max-width: 991.98px) {
    .login-shell { overflow: visible; background: linear-gradient(180deg, #fff 0 68%, #fff6f6 100%); }
    .login-shell::after { right: -300px; bottom: -440px; }
    .login-main { padding: 43px 0 58px; }
    .login-intro { padding-right: calc(var(--bs-gutter-x) * .5); text-align: center; }
    .intro-description { margin-right: auto; margin-left: auto; }
    .intro-features { max-width: 720px; grid-template-columns: repeat(3, 1fr); margin-right: auto; margin-left: auto; text-align: left; }
    .intro-feature small { display: block; margin-left: 0; }
    .watermark-81 { right: 0; left: 0; bottom: -20px; text-align: center; }
    .login-card { margin: 22px auto 0; }
    .login-footer { color: #cfcfcf; background: #111; }
    .footer-inner strong { color: #fff; }
    .footer-inner span:last-child { color: #fff; }
}

@media (max-width: 767.98px) {
    .top-stripe { height: 5px; }
    .login-header, .header-inner { min-height: 72px; }
    .city-logo { width: 43px; height: 43px; }
    .brand-divider { height: 34px; }
    .application-brand { gap: 8px; }
    .brand-symbol { width: 38px; height: 38px; border-radius: 12px 12px 12px 4px; }
    .brand-symbol i { font-size: 18px; }
    .brand-name { font-size: 1rem; }
    .brand-caption { display: none; }
    .header-hut-logo { width: 116px; height: 47px; }
    .login-main { padding-top: 31px; }
    .intro-title { margin-top: 16px; font-size: clamp(2.7rem, 13vw, 4.3rem); }
    .intro-description { font-size: .88rem; }
    .intro-features { grid-template-columns: 1fr; max-width: 460px; }
    .intro-feature small { display: inline; margin-left: 4px; }
    .login-card { padding: 25px 20px; border-radius: 24px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 5px; }
}

@media (max-width: 479.98px) {
    .sitangkas-brand { gap: 7px; }
    .city-logo { width: 37px; height: 37px; }
    .brand-divider { height: 29px; }
    .brand-symbol { width: 34px; height: 34px; }
    .brand-symbol i { font-size: 16px; }
    .brand-name { font-size: .9rem; }
    .header-hut-logo { width: 92px; height: 39px; }
    .independence-pill { font-size: .62rem; }
    .intro-subtitle { font-size: .95rem; }
    .intro-slogan { align-items: flex-start; text-align: left; }
    .login-card-header p { font-size: .77rem; }
    .login-lock { width: 43px; height: 43px; flex-basis: 43px; }
    .captcha-section { padding: 9px; }
    .captcha-wrapper { width: 100%; overflow-x: auto; }
    .login-card-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-height: 800px) and (min-width: 992px) {
    .login-header, .header-inner { min-height: 70px; }
    .city-logo { width: 46px; height: 46px; }
    .brand-divider { height: 35px; }
    .brand-symbol { width: 38px; height: 38px; }
    .header-hut-logo { width: 132px; height: 50px; }
    .login-main { padding: 20px 0 24px; }
    .intro-title { margin-top: 14px; font-size: clamp(3rem, 5.3vw, 4.55rem); }
    .intro-subtitle { margin-top: 8px; }
    .intro-description { margin-top: 8px; line-height: 1.55; }
    .intro-features { margin-top: 16px; }
    .intro-slogan { margin-top: 13px; }
    .login-card { padding: 24px 27px; }
    .login-card-header { margin-bottom: 13px; }
    .form-field { margin-bottom: 11px; }
    .input-shell .form-control, .input-shell .form-select { min-height: 46px; }
    .captcha-section { margin-bottom: 12px; padding: 9px; }
    .captcha-label { margin-bottom: 5px; }
    .btn-login { min-height: 47px; }
    .login-card-footer { margin-top: 11px; padding-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
