/* =========================================
   CORNGRID INSTITUTIONAL LOGIN PAGE STYLES
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #080A0F;
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer Wrapper Grid */
.login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* =========================================
   LEFT PANEL (Showcase & Metrics)
========================================= */
.login-brand-panel {
    flex: 1.2;
    background: linear-gradient(135deg, #141822 0%, #080A0F 100%);
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px;
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(8, 10, 15, 0.95) 0%, rgba(13, 17, 23, 0.85) 100%);
    backdrop-filter: blur(8px);
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 42px;
    width: auto;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #FFD400;
}

.brand-hero-text h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.brand-hero-text p {
    color: #8A92A6;
    font-size: 15px;
    line-height: 1.6;
}

.brand-metrics-card {
    background: rgba(20, 24, 33, 0.7);
    border: 1px solid rgba(255, 212, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-label {
    font-size: 11px;
    color: #8A92A6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
}

.status-active {
    color: #00FF87;
}

.brand-footer-text {
    font-size: 12px;
    color: #586072;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   RIGHT PANEL (Login Controls)
========================================= */
.login-form-panel {
    flex: 1;
    background: #0D1117;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.form-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 6px;
}

.form-header p {
    font-size: 13px;
    color: #8A92A6;
}

/* Input Fields */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

[hidden] {
    display: none !important;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #C5CBD8;
}

.password-label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 12px;
    color: #FFD400;
    text-decoration: none;
    /* Expand the tap target to ~43px without shifting the label row. */
    padding: 12px 6px;
    margin: -12px -6px;
}

.forgot-link:hover {
    text-decoration: underline;
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #586072;
    font-size: 14px;
}

.input-field input {
    width: 100%;
    padding: 12px 54px 12px 40px;
    background: #141822;
    border: 1px solid #222735;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.input-field input:focus {
    border-color: #FFD400;
    box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.15);
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 3px;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    color: #586072;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transform: translateY(-50%);
}

.toggle-password:hover, .toggle-password:focus-visible {
    color: #FFD400;
}
.toggle-password:focus-visible { outline: 2px solid #FFD400; outline-offset: 2px; }
.input-field .toggle-password {
    display: grid;
    place-items: center;
}

/* Checkbox & Options */
.form-options {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8A92A6;
    cursor: pointer;
    /* Expand the tappable row to ~43px without adding layout height. */
    padding: 12px 0;
    margin: -12px 0;
}

.checkbox-container input {
    accent-color: #FFD400;
}

/* Submit Button */
.btn-login-submit {
    width: 100%;
    padding: 14px;
    background: #FFD400;
    color: #080A0F;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-login-submit:hover {
    background: #FFE033;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 212, 0, 0.2);
}

/* Form Footer */
.form-footer {
    text-align: center;
    font-size: 13px;
    color: #8A92A6;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-footer a {
    color: #FFD400;
    text-decoration: none;
    font-weight: 600;
}

.auth-mode-toggle {
    /* Expand the tap target to ~44px without shifting the footer line. */
    padding: 12px 8px;
    margin: -12px -8px;
    background: none;
    border: 0;
    color: #FFD400;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.auth-mode-toggle:hover {
    text-decoration: underline;
}

.disclaimer-note {
    font-size: 11px;
    color: #586072;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
    line-height: 1.4;
}

.disclaimer-note i {
    color: #FFD400;
    margin-top: 2px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .login-brand-panel {
        display: none; /* Hide showcase panel on smaller mobile devices */
    }
    
    .login-form-panel {
        flex: 1;
        width: 100%;
        padding: 20px;
    }
}


/* Add this inside your new CSS for API notification messages */
.alert-box {
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: none; /* Disembunyikan secara lalai, ditunjukkan oleh login.js */
}

/* Warna Alert khusus untuk tema gelap */
.alert-error {
    background: rgba(255, 77, 77, 0.15);
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.alert-success {
    background: rgba(0, 255, 135, 0.15);
    color: #00FF87;
    border: 1px solid rgba(0, 255, 135, 0.3);
}

.alert-info {
    background: rgba(255, 212, 0, 0.15);
    color: #FFD400;
    border: 1px solid rgba(255, 212, 0, 0.3);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 16% 12%, rgba(255, 212, 0, 0.07), transparent 38%),
        #080A0F;
}

.login-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    overflow: clip;
}

.login-brand-panel {
    isolation: isolate;
    min-width: 0;
    padding: clamp(28px, 5vw, 72px);
    animation: auth-panel-in .65s ease-out both;
}

.login-form-panel {
    position: relative;
    z-index: 2;
    min-width: 0;
    padding: clamp(24px, 4vw, 56px);
    background: linear-gradient(155deg, #10151d 0%, #0D1117 58%);
    box-shadow: -24px 0 70px rgba(0, 0, 0, .18);
    animation: auth-panel-in .65s .08s ease-out both;
}

.form-container {
    max-width: 420px;
    gap: clamp(19px, 3vh, 27px);
}

.form-header h3 { font-size: clamp(24px, 3vw, 29px); letter-spacing: -.5px; }
.form-header p { line-height: 1.65; }
.brand-metrics-card { backdrop-filter: blur(12px); }
.metric-value { font-variant-numeric: tabular-nums; }
.form-group { margin-bottom: 16px; }
.input-field input { min-height: 48px; }
.input-field input:hover { border-color: #41495A; }
.btn-login-submit { min-height: 48px; }
.alert-box { animation: auth-alert-in .2s ease-out both; }
.disclaimer-note { line-height: 1.55; }

@keyframes auth-panel-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-alert-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    body { align-items: stretch; }
    .login-wrapper { min-height: 100vh; min-height: 100svh; }
    .login-form-panel {
        flex: 1 1 100%;
        min-height: 100vh;
        min-height: 100svh;
        padding: clamp(24px, 7vw, 56px) clamp(20px, 8vw, 70px);
        border: 0;
        box-shadow: none;
    }
    .form-container { margin: auto; }
}

@media (max-width: 480px) {
    .login-form-panel { align-items: flex-start; padding: 30px 20px 24px; }
    .form-container { max-width: 440px; gap: 20px; }
    .form-header h3 { font-size: 25px; }
    .form-footer { gap: 12px; font-size: 12px; line-height: 1.5; }
    .disclaimer-note { padding: 10px; }
}

@media (max-height: 650px) and (min-width: 901px) {
    .login-brand-panel, .login-form-panel { padding-top: 24px; padding-bottom: 24px; }
    .brand-content { gap: 20px; }
    .form-container { gap: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

* { font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { font-size: 15px; line-height: 1.55; }
.login-brand-panel { background: radial-gradient(ellipse at 20% 15%, rgba(255, 212, 0, .09), transparent 46%), linear-gradient(145deg, #11151d 0%, #080a0f 100%); }
.brand-overlay { background: linear-gradient(135deg, rgba(8, 10, 15, .86), rgba(13, 17, 23, .72)); }
.brand-name { font-size: 24px; }
.brand-hero-text h2 { font-size: clamp(32px, 3.5vw, 42px); letter-spacing: -.7px; }
.brand-hero-text p { font-size: 16px; }
.brand-metrics-card { border-color: rgba(255, 212, 0, .24); border-radius: 14px; background: rgba(17, 21, 29, .78); }
.metric-label { font-size: 12px; }
.metric-value { font-size: 15px; }
.status-active { color: #23cf8b; }
.brand-footer-text { font-size: 13px; }
.login-form-panel { background: linear-gradient(155deg, #11151d 0%, #0d1117 62%); }
.form-container { max-width: 440px; }
.form-header h3 { font-size: clamp(25px, 3vw, 30px); }
.form-header p { font-size: 14px; }
.form-group label { font-size: 13px; }
.input-field input { min-height: 50px; border-color: #252b36; border-radius: 9px; background: #11151d; font-size: 15px; }
.input-field input { font-size: 16px; }
.input-field input:focus { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255, 212, 0, .12); }
.input-icon, .toggle-password { font-size: 15px; }
.forgot-link, .auth-mode-toggle { font-size: 13px; }
.btn-login-submit { min-height: 50px; border-radius: 9px; font-size: 15px; }
.btn-login-submit:disabled { cursor: wait; opacity: .72; }
.form-footer { font-size: 14px; }
.disclaimer-note { border-color: #252b36; border-radius: 9px; background: #11151d; color: #a0a6b4; font-size: 12px; }
.alert-box { display: block; padding: 12px 14px; margin-bottom: 18px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; line-height: 1.55; }
.alert-error { border-color: rgba(255, 115, 125, .35); background: rgba(255, 115, 125, .1); color: #ff929a; }
.alert-success { border-color: rgba(35, 207, 139, .35); background: rgba(35, 207, 139, .1); color: #23cf8b; }
.alert-info { border-color: rgba(255, 212, 0, .3); background: rgba(255, 212, 0, .1); color: #ffd400; }
[hidden] { display: none !important; }

.auth-topbar { position: absolute; z-index: 5; top: 0; left: 0; display: flex; width: 100%; min-height: 70px; align-items: center; justify-content: space-between; gap: 18px; padding: 12px max(20px, calc((100vw - 1200px) / 2)); border-bottom: 1px solid rgba(255, 212, 0, .18); background: rgba(8, 10, 15, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: #ffd400; text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: 1.4px; }
.auth-brand .brand-mark { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.auth-topbar nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.auth-topbar nav a { color: #e0e0e0; font-size: 13px; font-weight: 500; text-decoration: none; transition: color .2s ease; }
.auth-topbar nav a:hover, .auth-topbar nav a:focus-visible { color: #ffd400; }
.auth-topbar nav a:focus-visible, .auth-brand:focus-visible { outline: 2px solid #ffd400; outline-offset: 4px; }
body.reset-page { align-items: stretch; }
body.reset-page .login-wrapper { min-height: 100vh; min-height: 100svh; padding-top: 70px; }
body.reset-page .login-form-panel { min-height: calc(100vh - 70px); min-height: calc(100svh - 70px); }

@media (max-width: 900px) {
    .login-form-panel { background: radial-gradient(ellipse at 50% 0%, rgba(255, 212, 0, .07), transparent 48%), #0d1117; }
}

@media (max-width: 600px) {
    .auth-topbar { min-height: 62px; padding: 10px 16px; }
    .auth-brand { gap: 8px; font-size: 15px; }
    .auth-brand .brand-mark { width: 34px; height: 34px; }
    .auth-topbar nav { gap: 12px; }
    .auth-topbar nav a { font-size: 12px; }
    body.reset-page .login-wrapper { padding-top: 62px; }
    body.reset-page .login-form-panel { min-height: calc(100vh - 62px); min-height: calc(100svh - 62px); }
}

@supports (height: 100dvh) {
    body { min-height: 100dvh; }
    .login-wrapper, .login-form-panel { min-height: 100dvh; }
    body.reset-page .login-wrapper { min-height: 100dvh; }
}