/* ==========================================================================
   SIMANTUEL — Sistem Informasi Manajemen Tamu Elektronik
   PTUN Palangkaraya | Login Page Stylesheet
   ========================================================================== */

:root {
    --primary-green: #16A34A;
    --primary-green-light: #22C55E;
    --dark-green: #064E3B;
    --deep-green: #022C22;
    --dark-navy: #0B1F2A;
    --bg-light: #F5F7F8;
    --white: #FFFFFF;
    --text-dark: #172033;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 28px;

    --shadow-card: 0 20px 50px -12px rgba(11, 31, 42, 0.18);
    --shadow-btn: 0 10px 24px -6px rgba(6, 78, 59, 0.45);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Poppins", "Inter", system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    overflow: hidden;
    background: var(--bg-light);
}

a {
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* ==========================================================================
   LAYOUT — Split Screen
   ========================================================================== */

.auth-shell {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
    overflow: hidden;
}

@media (min-width: 1400px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.96fr);
    }
}

@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: minmax(0, 52%) minmax(0, 48%);
    }
}

@media (max-width: 860px) {
    .auth-shell {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 220px;
        height: auto;
        padding: 24px 20px 18px;
    }

    .feature-grid,
    .brand-footer {
        display: none;
    }

    .form-panel {
        min-height: auto;
        height: auto;
        padding: 20px 16px 40px;
    }

    .login-card {
        max-width: 100%;
        width: min(100%, 420px);
        padding: 20px 16px 18px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .field-input-wrap input {
        height: 44px;
    }

    .row-between {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ==========================================================================
   LEFT PANEL — Branding
   ========================================================================== */

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    height: 100vh;
    padding: 18px 20px 16px;
    isolation: isolate;
    overflow: hidden;
    color: var(--white);
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url("../../assets/img/gedung.jpg");
    background-size: cover;
    background-position: center;
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 550px at 15% -10%, rgba(11, 31, 42, 0.55), transparent 60%),
        linear-gradient(165deg, rgba(11, 31, 42, 0.94) 0%, rgba(6, 78, 59, 0.90) 52%, rgba(2, 44, 34, 0.96) 100%);
}

/* subtle dotted grid decoration */
.brand-panel .grid-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(circle at 20% 20%, black, transparent 70%);
    pointer-events: none;
}

/* abstract curved wave at the bottom */
.brand-panel .wave-decor {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: -6%;
    height: 220px;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    animation: fadeInUp 0.6s var(--ease) both;
}

.brand-logo-row .logo-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
}

.brand-logo-row .logo-text {
    line-height: 1.3;
}

.brand-logo-row .logo-text strong {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.brand-logo-row .logo-text span {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
}

.welcome-line {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 6px;
    animation: fadeInUp 0.6s var(--ease) 0.05s both;
}

.brand-title {
    font-size: clamp(26px, 2.9vw, 38px);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.6s var(--ease) 0.1s both;
}

.brand-title .part-a {
    color: var(--white);
}

.brand-title .part-b {
    background: linear-gradient(120deg, #6ee7a8, var(--primary-green-light) 60%, #34d17f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-desc {
    max-width: 420px;
    animation: fadeInUp 0.6s var(--ease) 0.15s both;
}

.brand-desc .desc-main {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 4px;
    color: rgba(255, 255, 255, 0.94);
}

.brand-desc .desc-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.62);
    margin: 0 0 18px;
}

.brand-tagline {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    border-left: 2px solid var(--primary-green-light);
    padding-left: 14px;
    max-width: 360px;
    animation: fadeInUp 0.6s var(--ease) 0.2s both;
}

/* Feature cards */
.feature-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 12px 0 10px;
    animation: fadeInUp 0.6s var(--ease) 0.25s both;
}

@media (max-width: 520px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        grid-auto-flow: column;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}

.feature-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(168, 124, 18, 0.14));
    border: 1px solid rgba(244, 204, 92, 0.52);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    backdrop-filter: blur(8px);
    transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.feature-card:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(244, 204, 92, 0.34), rgba(212, 175, 55, 0.22));
    border-color: rgba(255, 225, 132, 0.82);
}

.feature-card .f-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255, 225, 132, 0.2);
    color: #FFE184;
    display: grid;
    place-items: center;
    margin-bottom: 10px;
}

.feature-card .f-title {
    font-size: 10.6px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.3;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 12px;
}

.brand-footer .footer-tags {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.2px;
}

@media (max-width: 860px) {
    .auth-shell {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 220px;
        height: auto;
        padding: 22px 18px 16px;
    }

    .feature-grid,
    .brand-footer {
        display: none;
    }

    .brand-title {
        font-size: 30px;
    }

    .form-panel {
        min-height: auto;
        height: auto;
        padding: 20px 16px 40px;
    }

    .login-card {
        max-width: 100%;
        width: min(100%, 420px);
        padding: 20px 16px 18px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .field-input-wrap input {
        height: 44px;
    }

    .row-between {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ==========================================================================
   RIGHT PANEL — Login Form
   ========================================================================== */

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 20px 18px 18px;
    background: var(--bg-light);
    min-height: 100vh;
    height: 100vh;
}

@media (max-width: 860px) {
    .form-panel {
        min-height: auto;
        padding: 32px 20px 48px;
    }
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 40px -18px rgba(11, 31, 42, 0.22);
    padding: 14px 18px 14px;
    animation: fadeIn 0.5s var(--ease) both;
}

.login-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1.5px solid rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.08);
    color: var(--primary-green);
    display: grid;
    place-items: center;
    margin-bottom: 10px;
}

.login-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 5px;
}

.login-subtitle {
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-secondary);
    margin: 0 0 9px;
}

/* Form fields */
.field-group {
    margin-bottom: 7px;
}

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.field-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.field-input-wrap .f-ic {
    position: absolute;
    left: 14px;
    color: var(--text-secondary);
    display: flex;
    pointer-events: none;
}

.field-input-wrap input {
    width: 100%;
    height: 42px;
    border: 0;
    background: transparent;
    outline: none;
    padding: 0 12px 0 36px;
    font-size: 12.4px;
    color: var(--text-dark);
    font-family: inherit;
}

.field-input-wrap input::placeholder {
    color: #9AA5B4;
}

.field-input-wrap:focus-within {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.field-input-wrap.has-error {
    border-color: #DC2626;
}

.field-input-wrap.has-error:focus-within {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.toggle-pw {
    position: absolute;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    display: flex;
    border-radius: 6px;
    transition: color 0.15s;
}

.toggle-pw:hover {
    color: var(--text-dark);
}

.field-error-msg {
    font-size: 11.5px;
    color: #DC2626;
    margin-top: 3px;
    min-height: 8px;
}

/* Remember / forgot row */
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 3px 0 10px;
    font-size: 12px;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-green);
    cursor: pointer;
}

.link-forgot {
    color: var(--primary-green);
    font-weight: 500;
}

.link-forgot:hover {
    text-decoration: underline;
}

/* Login button */
.btn-login {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: var(--white);
    font-size: 12.8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 12px 25px -12px rgba(6, 78, 59, 0.55);
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), filter 0.18s var(--ease);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -6px rgba(6, 78, 59, 0.55);
    filter: brightness(1.04);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.btn-login .spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    animation: spin 0.7s linear infinite;
    display: none;
}

.btn-login.is-loading .spinner {
    display: inline-block;
}

.btn-login.is-loading .btn-icon-default {
    display: none;
}

/* Divider */
.divider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    color: var(--text-secondary);
    font-size: 11.5px;
}

.divider-row::before,
.divider-row::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* SSO button */
.btn-sso {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background: var(--white);
    border: 1.5px solid var(--primary-green);
    color: var(--dark-green);
    font-size: 12.2px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn-sso:hover {
    background: rgba(22, 163, 74, 0.06);
    transform: translateY(-1px);
}

/* Security notice */
.security-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #EFF7F1;
    border-radius: 12px;
    padding: 8px 10px;
    margin-top: 10px;
}

.security-box .s-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(22, 163, 74, 0.14);
    color: var(--primary-green);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.security-box .s-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 3px;
}

.security-box .s-desc {
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 400px) {
    .brand-panel {
        padding: 18px 14px 14px;
    }

    .brand-title {
        font-size: 26px;
    }

    .login-card {
        padding: 18px 14px 16px;
    }

    .login-title {
        font-size: 19px;
    }

    .field-input-wrap input {
        height: 42px;
        font-size: 12.8px;
    }

    .btn-login,
    .btn-sso {
        height: 42px;
    }

    .row-between {
        flex-wrap: wrap;
        gap: 10px;
    }
}