/* =========================================
   IMK-Q | BPS KOTA MADIUN
   FINAL LOGIN PAGE
========================================= */

:root {
    --blue: #07549a;
    --blue-dark: #073b6c;
    --blue-deep: #052d54;
    --orange: #f5a623;

    --text: #26384d;
    --muted: #8290a1;
    --border: #e1e7ee;
    --background: #f1f4f8;
    --white: #ffffff;
}

/* =========================================
   RESET & BODY
========================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 35px 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--background);
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
}

/* =========================================
   MAIN LOGIN CARD
========================================= */

.login-page {
    position: relative;

    display: grid;
    grid-template-columns: 42% 58%;

    width: 100%;
    max-width: 960px;
    min-height: 590px;

    overflow: hidden;

    background: var(--white);
    border: 1px solid #e5eaf0;
    border-radius: 14px;

    box-shadow: 0 18px 55px rgba(25, 54, 82, 0.11);
}

/* =========================================
   LEFT PANEL - BRAND
========================================= */

.brand-panel {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-width: 0;
    padding: 36px 34px 25px;

    overflow: hidden;

    color: var(--white);

    background: linear-gradient(
        145deg,
        #0b5a9f 0%,
        #08477f 52%,
        #062e56 100%
    );
}

.brand-panel::before {
    content: "";
    position: absolute;

    width: 430px;
    height: 430px;

    top: 25%;
    right: -245px;

    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;

    box-shadow:
        0 0 0 35px rgba(255,255,255,.025),
        0 0 0 70px rgba(255,255,255,.02);
}

.brand-panel::after {
    content: "";
    position: absolute;

    top: 42%;
    left: 0;

    width: 5px;
    height: 70px;

    background: var(--orange);
}

/* =========================================
   BRAND HEADER
========================================= */

.brand-header {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;

    background: var(--white);
    color: var(--blue);

    border-radius: 8px;

    font-size: 20px;
    font-weight: 900;
    letter-spacing: -1.5px;
}

.brand-logo span {
    color: var(--orange);
}

.brand-divider {
    width: 1px;
    height: 38px;

    background: rgba(255,255,255,.3);
}

.brand-institution {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.brand-institution strong {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
}

.brand-institution span {
    color: rgba(255,255,255,.7);
    font-size: 10px;
    letter-spacing: 1.2px;
}

/* =========================================
   BRAND MAIN CONTENT
========================================= */

.brand-main {
    position: relative;
    z-index: 2;

    max-width: 400px;
    margin-top: 25px;
}

.brand-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 19px;

    color: #d3e4f5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.brand-eyebrow span {
    width: 21px;
    height: 2px;
    background: var(--orange);
}

.brand-main h1 {
    margin: 0;

    color: var(--white);
    font-size: clamp(34px, 4vw, 46px);
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -1.8px;
}

.brand-main h1 span {
    display: block;
    color: #ffcb65;
}

.brand-main > p {
    max-width: 350px;
    margin: 19px 0 0;

    color: rgba(255,255,255,.76);
    font-size: 12px;
    line-height: 1.9;
}

.brand-line {
    width: 43px;
    height: 3px;
    margin-top: 23px;

    background: var(--orange);
}

.brand-caption {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 16px;
}

.caption-number {
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
}

.caption-text {
    max-width: 165px;
    padding-left: 13px;

    border-left: 1px solid rgba(255,255,255,.3);

    color: rgba(255,255,255,.65);
    font-size: 10px;
    line-height: 1.6;
}

/* =========================================
   STATISTICS DECORATION
========================================= */

.visual-area {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 360px;
    height: 145px;

    margin-top: 10px;
}

.visual-grid {
    position: absolute;
    inset: 0;

    opacity: .13;

    background-image:
        linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);

    background-size: 24px 24px;
}

.visual-card {
    position: absolute;
    top: 5px;
    right: 5%;

    width: 245px;
    height: 125px;
    padding: 13px 16px;

    border: 1px solid rgba(255,255,255,.2);
    border-radius: 9px;

    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
}

.visual-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: rgba(255,255,255,.85);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
}

.visual-card-top i {
    font-size: 15px;
}

.visual-chart {
    display: flex;
    align-items: flex-end;
    gap: 9px;

    height: 63px;
    padding: 8px 7px 0;

    border-bottom: 1px solid rgba(255,255,255,.3);
}

.chart-bar {
    flex: 1;
    min-width: 8px;

    border-radius: 3px 3px 0 0;
    background: rgba(255,255,255,.65);
}

.bar-1 { height: 35%; }
.bar-2 { height: 55%; }
.bar-3 { height: 43%; }
.bar-4 { height: 76%; }
.bar-5 { height: 58%; }
.bar-6 {
    height: 90%;
    background: #ffc65b;
}
.bar-7 { height: 70%; }

.visual-card-bottom {
    display: flex;
    justify-content: space-between;

    padding-top: 7px;

    color: rgba(255,255,255,.65);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .8px;
}

.visual-decoration {
    position: absolute;
    right: 0;
    bottom: 0;

    width: 60px;
    height: 60px;

    border-right: 3px solid var(--orange);
    border-bottom: 3px solid var(--orange);

    opacity: .7;
}

/* =========================================
   BRAND FOOTER
========================================= */

.brand-footer {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: space-between;
    gap: 10px;

    padding-top: 15px;

    border-top: 1px solid rgba(255,255,255,.16);

    color: rgba(255,255,255,.55);
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .7px;
}

/* =========================================
   RIGHT PANEL - LOGIN FORM
========================================= */

.form-panel {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 0;
    padding: 55px 48px 65px;

    background: var(--white);
}

.form-container {
    width: 100%;
    max-width: 370px;
}

/* =========================================
   FORM HEADING
========================================= */

.form-heading {
    margin-bottom: 29px;
}

.heading-label {
    display: inline-block;
    margin-bottom: 12px;

    color: var(--blue);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.form-heading h2 {
    margin: 0 0 9px;

    color: #183651;
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -1px;
}

.form-heading p {
    max-width: 330px;
    margin: 0;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

/* =========================================
   FORM INPUT
========================================= */

.form-group {
    margin-bottom: 19px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    color: #34485d;
    font-size: 11px;
    font-weight: 700;
}

.field-wrapper {
    position: relative;
}

.field-wrapper i {
    position: absolute;
    top: 50%;
    left: 15px;

    transform: translateY(-50%);

    color: #8797a9;
    font-size: 15px;

    pointer-events: none;
}

.field-wrapper input {
    width: 100%;
    height: 47px;

    padding: 0 15px 0 43px;

    border: 1px solid #dfe5ec;
    border-radius: 6px;
    outline: none;

    background: #fff;
    color: #273b50;

    font-family: inherit;
    font-size: 12px;

    transition: border-color .2s, box-shadow .2s;
}

.field-wrapper input::placeholder {
    color: #a9b3bf;
}

.field-wrapper input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(7,84,154,.08);
}

/* =========================================
   REMEMBER OPTION
========================================= */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: 2px 0 23px;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #64758a;
    font-size: 11px;

    cursor: pointer;
}

.remember-option input {
    width: 15px;
    height: 15px;
    margin: 0;

    accent-color: var(--blue);
    cursor: pointer;
}

/* =========================================
   LOGIN BUTTON
========================================= */

.btn-login {
    width: 100%;
    height: 47px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    border: none;
    border-radius: 6px;

    background: var(--blue);
    color: var(--white);

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: background .2s, transform .2s, box-shadow .2s;
}

.btn-login i {
    font-size: 16px;
    transition: transform .2s;
}

.btn-login:hover {
    background: var(--blue-dark);
    box-shadow: 0 5px 14px rgba(7,84,154,.18);
}

.btn-login:hover i {
    transform: translateX(4px);
}

/* =========================================
   DIVIDER
========================================= */

.alternative {
    display: flex;
    align-items: center;
    gap: 13px;

    margin: 21px 0;

    color: #a0aab6;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.alternative::before,
.alternative::after {
    content: "";
    flex: 1;
    height: 1px;

    background: #e8edf2;
}

/* =========================================
   VISITOR BUTTON
========================================= */

.btn-visitor {
    width: 100%;
    height: 47px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border: 1px solid #dce4ec;
    border-radius: 6px;

    background: var(--white);
    color: #36536e;

    text-decoration: none;
    font-size: 11px;
    font-weight: 700;

    transition: .2s;
}

.btn-visitor i {
    font-size: 16px;
}

.btn-visitor:hover {
    background: #f4f8fc;
    border-color: #9db9d3;
    color: var(--blue);
}

.visitor-description {
    margin-top: 11px;

    color: #98a3b0;
    font-size: 10px;
    text-align: center;
}

/* =========================================
   LOGIN ALERT
========================================= */

.login-alert {
    margin-bottom: 18px;
    padding: 11px 13px;

    border-radius: 6px;
    font-size: 11px;
}

/* =========================================
   SECURITY INFORMATION
========================================= */

.form-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin-top: 24px;
    padding-top: 15px;

    border-top: 1px solid #edf0f3;

    color: #9aa5b1;
    font-size: 9px;
    text-align: center;
}

.form-bottom i {
    color: #48886a;
    font-size: 13px;
}

/* =========================================
   PAGE FOOTER
========================================= */

.page-footer {
    position: absolute;
    right: 15px;
    bottom: 17px;
    left: 15px;

    color: #a1aab5;
    font-size: 9px;
    text-align: center;
}

.page-footer span {
    margin: 0 5px;
    color: var(--orange);
}

/* =========================================
   MOBILE BRAND
========================================= */

.mobile-brand {
    display: none;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 850px) {
    body {
        padding: 25px 18px;
    }

    .login-page {
        max-width: 760px;
        grid-template-columns: 40% 60%;
    }

    .brand-panel {
        padding: 30px 24px 22px;
    }

    .brand-main h1 {
        font-size: 35px;
    }

    .brand-main > p {
        font-size: 11px;
    }

    .visual-card {
        width: 210px;
        right: 0;
    }

    .form-panel {
        padding-right: 32px;
        padding-left: 32px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 650px) {
    body {
        align-items: flex-start;
        padding: 20px 14px;
    }

    .login-page {
        display: flex;
        flex-direction: column;

        width: 100%;
        max-width: 440px;
        min-height: auto;
    }

    .brand-panel {
        min-height: auto;
        padding: 23px 24px 25px;
    }

    .brand-panel::after {
        top: auto;
        bottom: 0;

        width: 50px;
        height: 4px;
    }

    .brand-header {
        gap: 10px;
    }

    .brand-logo {
        width: 43px;
        height: 43px;
        font-size: 18px;
    }

    .brand-institution strong {
        font-size: 10px;
    }

    .brand-institution span {
        font-size: 9px;
    }

    .brand-main {
        margin-top: 25px;
    }

    .brand-main h1 {
        font-size: 32px;
    }

    .brand-main > p {
        margin-top: 12px;
        font-size: 11px;
    }

    .brand-line,
    .brand-caption,
    .visual-area,
    .brand-footer {
        display: none;
    }

    .form-panel {
        min-height: auto;
        padding: 32px 25px 25px;
    }

    .form-container {
        max-width: 100%;
    }

    .form-heading {
        margin-bottom: 24px;
    }

    .form-heading h2 {
        font-size: 27px;
    }

    .page-footer {
        position: static;
        margin-top: 22px;
        font-size: 9px;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 380px) {
    body {
        padding: 14px 10px;
    }

    .brand-panel {
        padding: 20px 19px 22px;
    }

    .brand-main h1 {
        font-size: 29px;
    }

    .form-panel {
        padding: 28px 19px 22px;
    }

    .form-heading h2 {
        font-size: 25px;
    }
}

/* =========================================
   COMPACT LOGIN CARD
========================================= */

@media (min-width: 651px) {
    .login-page {
        max-width: 820px;
        min-height: 510px;
    }

    .brand-panel {
        padding: 28px 27px 20px;
    }

    .brand-logo {
        flex-shrink: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        width: 50px;
        height: 50px;

        padding: 4px;

        background: #ffffff;
        border-radius: 8px;
    }

    .brand-logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .brand-main {
        margin-top: 15px;
    }

    .brand-main h1 {
        font-size: 36px;
    }

    .brand-main > p {
        font-size: 11px;
        line-height: 1.7;
        margin-top: 14px;
    }

    .brand-eyebrow {
        margin-bottom: 14px;
    }

    .brand-line {
        margin-top: 17px;
    }

    .brand-caption {
        margin-top: 12px;
    }

    .visual-area {
        height: 120px;
        margin-top: 5px;
    }

    .visual-card {
        width: 220px;
        height: 110px;
        padding: 11px 14px;
    }

    .visual-chart {
        height: 53px;
    }

    .form-panel {
        padding: 40px 38px 55px;
    }

    .form-container {
        max-width: 335px;
    }

    .form-heading {
        margin-bottom: 23px;
    }

    .form-heading h2 {
        font-size: 26px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .field-wrapper input,
    .btn-login,
    .btn-visitor {
        height: 44px;
    }

    .form-options {
        margin-bottom: 19px;
    }

    .alternative {
        margin: 17px 0;
    }

    .form-bottom {
        margin-top: 19px;
        padding-top: 13px;
    }

    .page-footer {
        bottom: 13px;
    }
}


/* =========================================
   RESPONSIVE BRAND PANEL IMK-Q
========================================= */

/* Struktur utama panel biru */
.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
}

.brand-content {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.brand-header {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 0;
}

.brand-institution {
    min-width: 0;
}

.brand-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-top: clamp(15px, 3vh, 28px);
}

.brand-main h1 {
    max-width: 100%;
    font-size: clamp(27px, 3.2vw, 36px);
    line-height: 1.15;
    overflow-wrap: break-word;
}

.brand-main h1 span {
    display: block;
}

.brand-main > p {
    max-width: 100%;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.brand-line {
    flex-shrink: 0;
}

.brand-caption {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}

.caption-number {
    flex-shrink: 0;
}

.caption-text {
    min-width: 0;
    overflow-wrap: break-word;
}

/* Ilustrasi statistik */
.visual-area {
    position: relative;
    width: 100%;
    min-width: 0;
    flex-shrink: 0;
    height: clamp(115px, 18vh, 155px);
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-grid {
    position: absolute;
    inset: 0;
}

.visual-card {
    position: relative;
    z-index: 2;
    width: min(82%, 250px);
    max-width: 100%;
    box-sizing: border-box;
}

.visual-decoration {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

/* Footer */
.brand-footer {
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 15px;
}

.brand-footer span {
    min-width: 0;
    max-width: 48%;
    overflow-wrap: break-word;
}

/* =========================================
   TABLET DAN LAPTOP KECIL
========================================= */

@media (max-width: 900px) {
    .brand-panel {
        padding: 25px 22px;
    }

    .brand-main {
        margin-top: 18px;
    }

    .brand-main h1 {
        font-size: clamp(26px, 4vw, 32px);
    }

    .visual-area {
        height: 120px;
    }

    .visual-card {
        width: min(85%, 220px);
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 650px) {

    .brand-panel {
        width: 100%;
        min-width: 0;
        min-height: auto;
        height: auto;
        padding: 24px 22px 18px;
        gap: 0;
    }

    .brand-content {
        flex: none;
        gap: 0;
    }

    .brand-header {
        gap: 10px;
    }

    .brand-logo {
        width: 43px;
        height: 43px;
        flex-shrink: 0;
    }

    .brand-institution strong {
        font-size: 10px;
    }

    .brand-institution span {
        font-size: 9px;
    }

    .brand-main {
        margin-top: 24px;
    }

    .brand-eyebrow {
        font-size: 9px;
        margin-bottom: 14px;
    }

    .brand-main h1 {
        font-size: clamp(28px, 7vw, 36px);
        line-height: 1.12;
        margin-bottom: 12px;
    }

    .brand-main > p {
        font-size: 11px;
        line-height: 1.75;
        margin-top: 0;
        margin-bottom: 0;
    }

    .brand-line {
        width: 35px;
        margin-top: 17px;
        margin-bottom: 13px;
    }

    .brand-caption {
        align-items: center;
        flex-wrap: nowrap;
        gap: 13px;
    }

    .caption-number {
        font-size: 14px;
        white-space: nowrap;
    }

    .caption-text {
        font-size: 10px;
        line-height: 1.6;
    }

    .visual-area {
        height: 145px;
        margin-top: 15px;
        flex: none;
    }

    .visual-card {
        width: min(80%, 245px);
    }

    .brand-footer {
        margin-top: 15px;
        padding-top: 12px;
        gap: 10px;
    }

    .brand-footer span {
        font-size: 8px;
        line-height: 1.5;
    }
}

/* =========================================
   HP KECIL
========================================= */

@media (max-width: 380px) {

    .brand-panel {
        padding: 20px 17px 16px;
    }

    .brand-main {
        margin-top: 19px;
    }

    .brand-main h1 {
        font-size: 27px;
    }

    .brand-main > p {
        font-size: 10px;
    }

    .brand-caption {
        gap: 9px;
    }

    .caption-number {
        font-size: 12px;
    }

    .caption-text {
        font-size: 9px;
    }

    .visual-area {
        height: 125px;
    }

    .visual-card {
        width: 88%;
    }

    .brand-footer span {
        font-size: 7px;
    }
}

/* =========================================
   LAYAR PENDEK
========================================= */

@media (max-height: 700px) and (min-width: 651px) {

    .brand-main {
        margin-top: 12px;
    }

    .brand-main h1 {
        font-size: 30px;
    }

    .brand-main > p {
        margin-top: 10px;
        line-height: 1.55;
    }

    .visual-area {
        height: 105px;
    }

    .brand-footer {
        margin-top: 8px;
    }
}
