/* ===================================================
   Auth Pages — Login & Register
   Shared split-screen layout (image panel + form panel)
   for the Pemkab Magelang portal.

   INTEGRATION: Merge into custom.css on the live server.
   Class names are prefixed with "auth-" to avoid clashes.
   =================================================== */

:root {
    --auth-green: #288052;
    --auth-ink: #111827;
    --auth-muted: #6b7280;
    --auth-border: #d8dce3;
}

* { box-sizing: border-box; }

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

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--auth-ink);
    background: #fff;
}


/* ======================================
   SHELL — two columns
====================================== */
.auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}


/* ======================================
   LEFT — visual panel
====================================== */
.auth__visual {
    position: relative;
    padding: 40px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    overflow: hidden;
}

/* legibility gradient for the bottom welcome text */
.auth__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%);
    z-index: 1;
}

.auth__brand,
.auth__welcome {
    position: relative;
    z-index: 2;
}

.auth__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth__crest {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #fffdf5;
    border-radius: 10px;
    padding: 6px;
}

.auth__brand-text {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth__welcome-title {
    font-size: 44px;
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.1;
}

.auth__welcome-desc {
    font-size: 15px;
    line-height: 1.6;
    max-width: 540px;
    margin: 0;
    color: rgba(255,255,255,0.9);
}


/* ======================================
   RIGHT — form panel
====================================== */
.auth__panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    overflow-y: auto;
}

.auth__close {
    position: absolute;
    top: 36px;
    right: 48px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--auth-ink);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.auth__close:hover {
    background: #f3f4f6;
    color: var(--auth-ink);
}

.auth__form-wrap {
    width: 100%;
    max-width: 620px;
}

.auth__title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 18px;
}

.auth__subtitle {
    font-size: 15px;
    line-height: 1.65;
    color: #4b5563;
    text-align: justify;
    margin: 0 0 36px;
}

.auth__subtitle a {
    color: var(--auth-green);
    font-weight: 600;
    text-decoration: none;
}


/* ======================================
   FORM FIELDS
====================================== */
.auth-field {
    margin-bottom: 22px;
}

.auth-field__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.auth-field__input {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: var(--auth-ink);
    padding: 14px 16px;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field__input::placeholder {
    color: #9ca3af;
}

.auth-field__input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(40, 128, 82, 0.12);
}

/* password input with eye toggle */
.auth-field__pw {
    position: relative;
}

.auth-field__pw .auth-field__input {
    padding-right: 48px;
}

.auth-pw-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

.auth-pw-toggle:hover { color: var(--auth-ink); }

/* two-up grid (register passwords) */
.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


/* ======================================
   ROW (remember me / forgot)
====================================== */
.auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 4px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
}

.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-green);
    cursor: pointer;
}

.auth__link-muted {
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-ink);
    text-decoration: none;
}

.auth__link-muted:hover { color: var(--auth-green); }


/* ======================================
   SUBMIT + ALT
====================================== */
.auth__submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--auth-green);
    border: 0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 28px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.auth__submit:hover { opacity: 0.92; }

.auth__submit i { font-size: 20px; }

.auth__alt {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-ink);
    margin: 28px 0 0;
}

.auth__alt a {
    color: var(--auth-green);
    text-decoration: none;
}

.auth__alt a:hover { text-decoration: underline; }


/* ======================================
   RESPONSIVE
====================================== */
@media (max-width: 992px) {
    .auth {
        grid-template-columns: 1fr;
    }

    /* hide the photo panel — form takes the full screen */
    .auth__visual {
        display: none;
    }

    .auth__panel {
        padding: 72px 24px 40px;
    }

    .auth__title {
        font-size: 30px;
    }

    .auth__close {
        top: 18px;
        right: 18px;
    }
}

@media (max-width: 520px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
