/*
==============================================================
WEBSITE SMKN 5 BERAU
HALAMAN : LOGIN
FILE    : public_html/assets/css/login.css
VERSI   : 1.0.1
==============================================================
*/

:root {
    --primary: #159f86;
    --primary-dark: #0e806c;
    --dark: #263d51;
    --dark-2: #344f65;
    --text: #304456;
    --muted: #71818f;
    --soft: #f3f7f8;
    --border: #dfe7eb;
    --white: #ffffff;
    --danger: #c94b4b;
    --danger-bg: #fff3f3;
    --shadow: 0 20px 60px rgba(31, 54, 71, .13);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--soft);
}

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ==========================================================
   LAYOUT
========================================================== */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr);
}


/* ==========================================================
   LEFT BRAND PANEL
========================================================== */

.login-brand {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding: 45px 8%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        linear-gradient(145deg, #263d51 0%, #31566b 55%, #168a75 100%);
}

.login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(255,255,255,.10),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(255,255,255,.06),
            transparent 28%
        );
    pointer-events: none;
}

.brand-decoration {
    position: absolute;
    border-radius: 50%;
    border: 70px solid rgba(255,255,255,.035);
    pointer-events: none;
}

.decoration-one {
    width: 500px;
    height: 500px;
    right: -260px;
    top: -210px;
}

.decoration-two {
    width: 380px;
    height: 380px;
    left: -270px;
    bottom: -230px;
}

.brand-content,
.brand-footer {
    position: relative;
    z-index: 2;
}

.school-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.school-logo {
    width: 56px;
    height: 56px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.school-logo small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .7px;
}

.school-logo strong {
    font-size: 25px;
}

.school-name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.school-name strong {
    font-size: 15px;
    letter-spacing: .3px;
}

.school-name span {
    margin-top: 4px;
    color: rgba(255,255,255,.58);
    font-size: 10px;
}

.brand-message {
    max-width: 570px;
    margin-top: 18vh;
}

.brand-label {
    color: #73dfc6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.brand-message h1 {
    margin: 13px 0 20px;
    font-size: clamp(37px, 4vw, 55px);
    line-height: 1.1;
    letter-spacing: -1.2px;
    font-weight: 700;
}

.brand-message h1 strong {
    display: block;
    color: #70e1c8;
}

.brand-message p {
    max-width: 510px;
    margin: 0;
    color: rgba(255,255,255,.73);
    font-size: 14px;
    line-height: 1.8;
}

.brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 38px;
}

.brand-features div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-features span {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(112,225,200,.14);
    color: #70e1c8;
    font-size: 11px;
    font-weight: 800;
}

.brand-features p {
    margin: 0;
    color: rgba(255,255,255,.64);
    font-size: 11px;
}

.brand-footer {
    color: rgba(255,255,255,.42);
    font-size: 10px;
}


/* ==========================================================
   RIGHT LOGIN AREA
========================================================== */

.login-area {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: #f7fafb;
}

.login-card {
    width: min(100%, 440px);
    padding: 42px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    animation: loginAppear .55s ease both;
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-brand {
    display: none;
}

.login-heading {
    margin-bottom: 29px;
}

.login-heading > span {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.login-heading h2 {
    margin: 8px 0 7px;
    color: var(--dark);
    font-size: 31px;
    line-height: 1.2;
}

.login-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}


/* ==========================================================
   ERROR
========================================================== */

.error-msg {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
    padding: 12px 13px;
    border: 1px solid #f1cccc;
    border-radius: 9px;
    background: var(--danger-bg);
    color: var(--danger);
}

.error-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f6d9d9;
    font-size: 13px;
    font-weight: 800;
}

.error-msg strong {
    display: block;
    font-size: 12px;
}

.error-msg p {
    margin: 1px 0 0;
    font-size: 11px;
}

.error-close {
    margin-left: auto;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #a96b6b;
    font-size: 21px;
    line-height: 1;
}


/* ==========================================================
   FORM
========================================================== */

.form-group {
    margin-bottom: 19px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-size: 12px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    z-index: 2;
    width: 23px;
    color: #90a0aa;
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 45px 0 45px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: #fbfcfc;
    color: var(--dark);
    font-size: 13px;
    transition: .2s ease;
}

.input-wrap input::placeholder {
    color: #a6b2b9;
}

.input-wrap input:hover {
    border-color: #cbd7dc;
}

.input-wrap input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(21,159,134,.10);
}

.password-toggle {
    position: absolute;
    right: 9px;
    height: 34px;
    padding: 0 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
}

.password-toggle:hover {
    background: #edf8f5;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* ==========================================================
   LOGIN BUTTON
========================================================== */

.login-button {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 5px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
    overflow: hidden;
}

.login-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(21,159,134,.18);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: wait;
}

.button-arrow {
    font-size: 18px;
    line-height: 1;
}

.button-loader {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.login-button.loading {
    pointer-events: none;
    opacity: .88;
}

.login-button.loading .button-text,
.login-button.loading .button-arrow {
    display: none;
}

.login-button.loading .button-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ==========================================================
   BACK TO WEBSITE
========================================================== */

.login-back {
    margin-top: 24px;
    padding-top: 21px;
    border-top: 1px solid #edf0f2;
    text-align: center;
}

.login-back a {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    transition: .2s ease;
}

.login-back a span {
    margin-right: 5px;
    color: var(--primary);
    font-size: 15px;
}

.login-back a:hover {
    color: var(--primary);
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 900px) {

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-area {
        min-height: 100vh;
        padding: 25px;
    }

    .login-card {
        max-width: 440px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 34px;
    }

    .mobile-brand .school-logo {
        width: 44px;
        height: 44px;
    }

    .mobile-brand .school-logo strong {
        font-size: 22px;
    }

    .mobile-brand > div:last-child {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .mobile-brand strong {
        color: var(--dark);
        font-size: 12px;
    }

    .mobile-brand span {
        margin-top: 3px;
        color: var(--muted);
        font-size: 9px;
    }
}

@media (max-width: 500px) {

    .login-area {
        padding: 15px;
    }

    .login-card {
        padding: 29px 22px;
        border-radius: 14px;
    }

    .mobile-brand {
        margin-bottom: 27px;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .login-heading {
        margin-bottom: 25px;
    }
}

/* ==========================================================
   LOGO SEKOLAH - LOGO ASLI
   ========================================================== */

.school-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
}