/* ============================================================
   JabatVison Premium Login — Green Theme
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --green-900: #052e16;
    --green-800: #064e3b;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --green-400: #34d399;
    --green-300: #6ee7b7;
    --green-100: #d1fae5;
    --ink:       #0a0f0d;
    --ink-soft:  #1a2420;
    --line:      rgba(52, 211, 153, 0.18);
    --text:      #ecfdf5;
    --text-mute: #94b8a8;
    --danger:    #f87171;
    --success:   #34d399;
    --radius:    14px;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--ink);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== LAYOUT ===== */
.login-wrapper {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh;
}

/* ============================================================
   KIRI — BRAND PANEL
   ============================================================ */
.brand-panel {
    position: relative;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(16, 185, 129, 0.25), transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(4, 120, 87, 0.35), transparent 60%),
        linear-gradient(135deg, #04160e 0%, #052e16 55%, #064e3b 100%);
    padding: 64px 72px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line);
}

.brand-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(52, 211, 153, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 211, 153, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
}

.brand-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}
.brand-glow-1 {
    width: 400px; height: 400px;
    background: rgba(16, 185, 129, 0.35);
    top: -120px; left: -100px;
}
.brand-glow-2 {
    width: 360px; height: 360px;
    background: rgba(5, 150, 105, 0.3);
    bottom: -140px; right: -80px;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 56px;
}
.logo-mark {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-400), var(--green-600));
    display: grid;
    place-items: center;
    color: #04160e;
    font-size: 22px;
    box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.6);
}
.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}
.logo-text span { color: var(--green-400); }

/* Headline */
.brand-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: var(--text);
}
.gradient-text {
    background: linear-gradient(135deg, var(--green-300), var(--green-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-sub {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-mute);
    margin-bottom: 48px;
    max-width: 460px;
}

/* Stats */
.brand-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.stat {
    padding: 18px 20px;
    border-radius: var(--radius);
    background: rgba(6, 78, 59, 0.35);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.stat:hover {
    transform: translateY(-3px);
    border-color: rgba(52, 211, 153, 0.4);
}
.stat-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--green-300);
    letter-spacing: -0.5px;
}
.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Footer badges */
.brand-footer { margin-top: 8px; }
.trust-badges {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-mute);
}
.trust-badges i { color: var(--green-400); }

/* Chart ornamen */
.brand-chart {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    width: 100%; height: 200px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   KANAN — FORM PANEL
   ============================================================ */
.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--ink);
    position: relative;
}
.form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08), transparent 60%);
    pointer-events: none;
}

.form-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 2;
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
}

/* Header */
.form-header { margin-bottom: 32px; }
.form-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
    color: var(--text);
}
.form-header p {
    font-size: 14px;
    color: var(--text-mute);
    line-height: 1.6;
}
.form-header strong { color: var(--green-300); font-weight: 600; }

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fecaca;
}
.alert-error i { color: var(--danger); }
.alert-success {
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--green-100);
}
.alert-success i { color: var(--success); }

/* Fields */
.login-form .field { margin-bottom: 20px; }

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.input-wrap {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-mute);
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    background: var(--ink-soft);
    border: 1.5px solid rgba(52, 211, 153, 0.12);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input-wrap input::placeholder { color: #5a6e66; }
.input-wrap input:hover { border-color: rgba(52, 211, 153, 0.25); }
.input-wrap input:focus {
    outline: none;
    border-color: var(--green-500);
    background: #0d1a15;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}
.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: var(--green-400); }

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-mute);
    cursor: pointer;
    padding: 8px;
    font-size: 15px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}
.toggle-password:hover {
    color: var(--green-400);
    background: rgba(52, 211, 153, 0.08);
}

/* Remember + forgot */
.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 13.5px;
}
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-mute);
    user-select: none;
}
.checkbox input { display: none; }
.checkmark {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1.5px solid rgba(52, 211, 153, 0.35);
    background: var(--ink-soft);
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
}
.checkmark::after {
    content: '';
    width: 5px; height: 9px;
    border: solid var(--ink);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
    margin-top: -2px;
}
.checkbox input:checked + .checkmark {
    background: var(--green-500);
    border-color: var(--green-500);
}
.checkbox input:checked + .checkmark::after {
    transform: rotate(45deg) scale(1);
}
.checkbox:hover .checkmark { border-color: var(--green-400); }

.link-forgot {
    color: var(--green-400);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.link-forgot:hover { color: var(--green-300); text-decoration: underline; }

/* Submit */
.btn-submit {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: #04160e;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 30px -8px rgba(16, 185, 129, 0.55);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--green-400), var(--green-500));
    opacity: 0;
    transition: opacity 0.25s ease;
}
.btn-submit span, .btn-submit i { position: relative; z-index: 1; }
.btn-submit i { transition: transform 0.25s ease; }
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -8px rgba(16, 185, 129, 0.7);
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:hover i { transform: translateX(4px); }
.btn-submit:active { transform: translateY(0); }

/* Divider */
.form-divider {
    position: relative;
    text-align: center;
    margin: 32px 0 20px;
    color: var(--text-mute);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.form-divider::before,
.form-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 70px);
    height: 1px;
    background: var(--line);
}
.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

/* Help */
.help-links {
    text-align: center;
    margin-bottom: 28px;
}
.help-links a {
    color: var(--text-mute);
    text-decoration: none;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}
.help-links a:hover { color: var(--green-400); }

/* Footer */
.form-footer {
    text-align: center;
    font-size: 12px;
    color: #5a6e66;
    line-height: 1.7;
    padding-top: 24px;
    border-top: 1px solid rgba(52, 211, 153, 0.08);
}
.form-footer small { color: #465a52; font-size: 11px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .login-wrapper { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .mobile-logo { display: flex; }
    .form-panel {
        padding: 40px 24px;
        min-height: 100vh;
        background:
            radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.18), transparent 55%),
            linear-gradient(160deg, #04160e 0%, #052e16 100%);
    }
}

@media (max-width: 480px) {
    .form-header h2 { font-size: 25px; }
    .input-wrap input { height: 50px; }
    .btn-submit { height: 50px; }
}
