/* =============================================
   LOGIN.CSS — Halaman Login Publik
   /portalperaturan/assets/css/login.css
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green-950: #052e16;
    --green-900: #14532d;
    --green-800: #166534;
    --green-700: #15803d;
    --green-600: #16a34a;
    --green-400: #4ade80;
    --green-300: #86efac;
    --green-100: #dcfce7;
    --green-50:  #f0fdf4;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--green-950);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ══════════════════════════════════════════════
   ANIMATED BACKGROUND
   ══════════════════════════════════════════════ */
.bg-layer {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(135deg, #052e16 0%, #0a3d1f 40%, #0d4a24 70%, #0a3d1f 100%);
    overflow: hidden;
}
.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(74,222,128,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74,222,128,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: floatOrb 12s ease-in-out infinite;
}
.bg-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #16a34a, transparent);
    top: -120px; left: -100px;
    animation-delay: 0s;
}
.bg-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #4ade80, transparent);
    bottom: -80px; right: -80px;
    animation-delay: -6s;
}
.bg-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #166534, transparent);
    top: 50%; left: 60%;
    animation-delay: -3s;
}
@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -30px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.97); }
}

/* ══════════════════════════════════════════════
   LAYOUT WRAPPER
   ══════════════════════════════════════════════ */
.login-wrapper {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.login-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1fr 420px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(74,222,128,0.12),
        0 40px 80px rgba(0,0,0,0.5),
        0 0 120px rgba(22,163,74,0.08);
    animation: slideUp 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   LEFT PANEL
   ══════════════════════════════════════════════ */
.panel-left {
    background: linear-gradient(160deg, #0d4a24 0%, #052e16 60%, #0a3d1f 100%);
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.panel-left::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(74,222,128,0.1) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 80%, rgba(22,163,74,0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative rings */
.deco-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(74,222,128,0.12);
    pointer-events: none;
}
.deco-ring-1 { width: 280px; height: 280px; top: -80px; right: -80px; }
.deco-ring-2 { width: 180px; height: 180px; top: -20px; right: -20px; border-color: rgba(74,222,128,0.08); }
.deco-ring-3 { width: 200px; height: 200px; bottom: -60px; left: -60px; }

.panel-left-content { position: relative; z-index: 1; }

/* Logo — full width: logo melebar + garis + nama besar */
.left-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 44px;
    width: 100%;
}
.left-logo img {
    width: 100%;
    max-height: 110px;
    object-fit: contain;
    object-position: left center;
    filter: brightness(0) invert(1);
    opacity: 0.93;
    margin-bottom: 18px;
}
.left-logo-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.18);
    margin-bottom: 16px;
}
.left-logo-text .org {
    font-size: 20px; font-weight: 700;
    color: var(--green-300);
    letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 6px;
}
.left-logo-text .name {
    font-size: 22px; font-weight: 800;
    color: #fff; line-height: 1.25;
    letter-spacing: -0.3px;
}

/* Headline */
.left-headline {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(28px, 3vw, 38px);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}
.left-headline em {
    font-style: italic;
    color: var(--green-300);
}
.left-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    max-width: 320px;
    margin-bottom: 44px;
}

/* Feature list */
.left-features { display: flex; flex-direction: column; gap: 14px; }
.left-feature  { display: flex; align-items: flex-start; gap: 14px; }
.left-feature-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: rgba(74,222,128,0.1);
    border: 1px solid rgba(74,222,128,0.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--green-400); font-size: 14px;
}
.left-feature-text .feat-title {
    font-size: 13px; font-weight: 700;
    color: rgba(255,255,255,0.9); margin-bottom: 2px;
}
.left-feature-text .feat-desc {
    font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.5;
}

/* Bottom tag */
.left-bottom {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 8px;
    padding-top: 36px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 11px; color: rgba(255,255,255,0.3);
}
.left-bottom i { color: var(--green-400); }

/* ══════════════════════════════════════════════
   RIGHT PANEL
   ══════════════════════════════════════════════ */
.panel-right {
    background: #fff;
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 5px 14px; border-radius: 20px;
    margin-bottom: 18px;
    width: fit-content;
}

.form-title {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    color: var(--green-900);
    line-height: 1.2;
    margin-bottom: 6px;
}
.form-subtitle {
    font-size: 13.5px;
    color: #6b7280;
    margin-bottom: 36px;
    line-height: 1.5;
}

/* ── Alert ───────────────────────────────────── */
.form-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 22px;
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%,60%  { transform: translateX(-5px); }
    40%,80%  { transform: translateX(5px); }
}
.form-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.form-alert.success {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    color: var(--green-700);
}
.form-alert i { flex-shrink: 0; margin-top: 1px; }

/* ── Input ───────────────────────────────────── */
.input-group-custom { margin-bottom: 20px; }

.input-label {
    display: block;
    font-size: 12.5px; font-weight: 700;
    color: #374151;
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}

.input-wrap { position: relative; }

.input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: 13px; pointer-events: none;
    transition: color 0.2s;
}
.input-wrap:focus-within .input-icon { color: var(--green-600); }

.input-field {
    width: 100%; height: 48px;
    padding: 0 44px 0 42px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px; font-family: inherit;
    color: #111827;
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input-field:focus {
    border-color: var(--green-600);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

.input-toggle {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; cursor: pointer; font-size: 13px;
    background: none; border: none; padding: 4px;
    transition: color 0.2s;
}
.input-toggle:hover { color: var(--green-600); }

/* ── Submit button ───────────────────────────── */
.btn-submit {
    width: 100%; height: 50px;
    background: linear-gradient(135deg, var(--green-600) 0%, var(--green-900) 100%);
    color: #fff; border: none; border-radius: 12px;
    font-size: 14.5px; font-weight: 700; font-family: inherit;
    cursor: pointer; letter-spacing: 0.3px;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(22,163,74,0.3);
    margin-top: 8px;
    position: relative; overflow: hidden;
}
.btn-submit::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0; transition: opacity 0.2s;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22,163,74,0.4);
}
.btn-submit:hover::before { opacity: 1; }
.btn-submit:active { transform: translateY(0); }

/* Loading state */
.btn-submit.loading { pointer-events: none; opacity: 0.8; }
.spinner {
    display: none;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-submit.loading .spinner    { display: block; }
.btn-submit.loading .btn-label  { display: none; }

/* ── Divider & back ──────────────────────────── */
.form-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 24px 0 20px;
}
.form-divider::before,
.form-divider::after {
    content: ''; flex: 1;
    height: 1px; background: #f3f4f6;
}
.form-divider span { font-size: 11px; color: #d1d5db; white-space: nowrap; }

.btn-back {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 46px;
    background: var(--green-50);
    color: var(--green-700);
    border: 1.5px solid var(--green-100);
    border-radius: 12px;
    font-size: 13.5px; font-weight: 600; font-family: inherit;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-back:hover {
    background: var(--green-100);
    border-color: var(--green-300);
    color: var(--green-900);
    text-decoration: none;
}

/* ── Footer note ─────────────────────────────── */
.form-note {
    text-align: center;
    font-size: 11.5px; color: #9ca3af;
    margin-top: 28px;
    line-height: 1.6;
}
.form-note i { color: var(--green-400); margin-right: 4px; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 780px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 460px;
    }
    .panel-left { padding: 40px 32px 36px; }
    .left-features { display: none; }
    .left-headline { font-size: 26px; margin-bottom: 10px; }
    .left-sub { margin-bottom: 0; }
    .left-bottom { display: none; }
    .panel-right { padding: 40px 32px; }
}
@media (max-width: 480px) {
    .panel-left  { padding: 32px 24px 28px; }
    .panel-right { padding: 32px 24px; }
    .login-wrapper { padding: 20px 12px; }
}