/* =============================================================
   login.css — Halaman Login SIM UNUSIDA
   Dipisah dari login.blade.php agar lebih mudah di-maintain
   ============================================================= */

/* ── Reset & Variables ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary:    #1a6b3a;
    --primary-lt: #25924f;
    --accent:     #f0b429;
    --dark:       #0d1b2a;
    --card-bg:    rgba(255, 255, 255, 0.97);
    --input-bg:   #f4f7fb;
    --input-bdr:  #d1dae8;
    --text:       #1e293b;
    --muted:      #64748b;
    --danger:     #ef4444;
    --radius:     16px;
}

/* ── Body ── */
body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 30px 0;
}

/* ── Animated gradient background ── */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, #043915 0%, #064635 40%, #519259 70%, #043915 100%);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Floating orbs ── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: floatOrb linear infinite;
    z-index: 0;
    pointer-events: none;
}

.orb-1 {
    width: 520px;
    height: 520px;
    background: #25924f;
    top: -120px;
    left: -100px;
    animation-duration: 22s;
}

.orb-2 {
    width: 380px;
    height: 380px;
    background: #f0b429;
    bottom: -80px;
    right: -60px;
    animation-duration: 18s;
    animation-delay: -6s;
}

.orb-3 {
    width: 280px;
    height: 280px;
    background: #1a6b3a;
    top: 50%;
    left: 60%;
    animation-duration: 26s;
    animation-delay: -12s;
}

@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -40px) scale(1.05); }
    66%  { transform: translate(-20px, 25px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ── Grid dots overlay ── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ── Main wrapper ── */
.login-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    max-width: 940px;
    margin: auto 24px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    animation: slideUp 0.6s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Left panel ── */
.panel-left {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 32px;
    background: linear-gradient(160deg, #0f3d24 0%, #1a6b3a 60%, #25924f 100%);
    position: relative;
    overflow: hidden;
}

@media (min-width: 900px) {
    .panel-left {
        display: flex;
    }
}

.panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
}

.panel-left::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 240px;
    background: linear-gradient(to top, rgba(13, 27, 42, 0.7), transparent);
}

.panel-left .brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.panel-left .brand img {
    height: 42px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.panel-left .brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.panel-left .brand-name span {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* ── Slider ── */
.auth-slider {
    position: relative;
    z-index: 2;
    width: 100%;
    aspect-ratio: 18 / 9;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

.panel-left .hero {
    position: relative;
    z-index: 2;
}

.panel-left .hero h1 {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 12px;
}

.panel-left .hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.panel-left .hero p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.65;
}

.panel-left .features {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ── Right panel (form) ── */
.panel-right {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 36px;
    position: relative;
}

@media (min-width: 900px) {
    .panel-right {
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .panel-right {
        padding: 40px 28px;
    }
}

/* ── Mobile brand (tampil hanya di layar kecil) ── */
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

@media (min-width: 900px) {
    .mobile-brand {
        display: none;
    }
}

.mobile-brand img {
    height: 42px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.mobile-brand .brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

.mobile-brand .brand-name span {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: uppercase;
}

/* ── Form heading ── */
.form-heading {
    margin-bottom: 24px;
}

.form-heading h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.form-heading p {
    font-size: 0.875rem;
    color: var(--muted);
}

/* ── Alert ── */
.alert-custom {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger-custom {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

/* ── Form group ── */
.fg {
    margin-bottom: 14px;
}

.fg label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: .3px;
}

/* ── Inputs ── */
.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 1rem;
    pointer-events: none;
    transition: color .2s;
}

.input-wrap:focus-within .input-icon {
    color: var(--primary);
}

.inp {
    width: 100%;
    padding: 13px 14px 13px 42px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-bdr);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}

.inp:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 107, 58, 0.1);
    background: #fff;
}

.inp.is-invalid {
    border-color: var(--danger);
}

.inp.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.invalid-msg {
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 5px;
}

/* ── Password toggle ── */
.pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 1.05rem;
    padding: 4px;
    border-radius: 6px;
    transition: color .2s;
}

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

/* ── CAPTCHA ── */
.captcha-text {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #e8f5ee, #f0fdf4);
    border: 1.5px dashed #86efac;
    border-radius: 8px;
    padding: 6px 14px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 6px;
    color: #166534;
    user-select: none;
    margin-bottom: 10px;
}

/* ── Remember me ── */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 2px;
}

.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.remember-row label {
    font-size: 0.82rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

/* ── Submit button ── */
.btn-login {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0;
    background-color: #1a6b3a;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.4px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    line-height: 48px;
    box-shadow: 0 6px 20px rgba(26, 107, 58, 0.4);
    transition: background-color .2s, box-shadow .2s, transform .15s;
}

.btn-login:hover {
    background-color: #25924f;
    box-shadow: 0 10px 28px rgba(26, 107, 58, 0.5);
    transform: translateY(-2px);
}

.btn-login:active {
    background-color: #155e32;
    box-shadow: 0 3px 10px rgba(26, 107, 58, 0.3);
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── Login footer ── */
.login-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e9eef5;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
}

.login-footer strong {
    color: var(--primary);
}

/* ── Error modal overlay ── */
.err-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.err-overlay.show {
    display: flex;
}

.err-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: scaleIn .3s cubic-bezier(.22, 1, .36, 1) both;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(.85); }
    to   { opacity: 1; transform: scale(1); }
}

.err-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fef2f2;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--danger);
}

.err-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.err-card p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-err-close {
    padding: 11px 32px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}

.btn-err-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.45);
}
