/* public/assets/css/custom/login.css */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --accent: #1B5E8C;
    --accent-hover: #154B70;
    --accent-glow: rgba(27, 94, 140, 0.35);
    --text-dark: #1a2332;
    --text-body: #3d4a5c;
    --text-muted: #7a8599;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --input-focus-border: var(--accent);
    --error-color: #dc2626;
    --error-bg: #fef2f2;
    --success-color: #16a34a;
    --radius-sm: 6px;
    --radius-md: 8px;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f172a;
}

/* ─── Background & Overlays ─── */
.bg-layer {
    position: fixed;
    inset: -20px;
    z-index: -2;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    animation: bgZoom 30s linear infinite alternate;
}

@keyframes bgZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 40%, rgba(15, 23, 42, 0.2) 100%);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

/* ─── Layout Container ─── */
.login-wrapper {
    width: 100%;
    max-width: 1200px;
    min-height: 100vh;
    padding: 2rem 2rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.login-content {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

/* ─── Brand Header (Kiri) ─── */
.brand-header {
    text-align: left;
    color: #ffffff;
    flex: 1;
    max-width: 480px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 0 1.5rem 0;
    opacity: 0;
    animation: logoEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.desktop-logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    display: block;
}

.mobile-logo {
    display: none;
}

.brand-title {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    opacity: 0;
    animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
    line-height: 1.15;
}

.brand-subtitle {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s forwards;
}

.brand-divider {
    width: 48px;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    margin: 1.25rem 0;
    opacity: 0;
    animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
}

.brand-description {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.6);
    max-width: 380px;
    opacity: 0;
    animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s forwards;
}

/* ─── Form Card (Seimbang: tidak terlalu lebar) ─── */
.form-card {
    width: 100%;
    max-width: 380px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 14px;
    padding: 2.25rem 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: formZoomOut 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s forwards;
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h1 {
    font-family: var(--font-sans);
    color: var(--text-dark);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

/* ─── Form Elements ─── */
.field-group {
    margin-bottom: 1.1rem;
}

.field-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.input-icon svg {
    width: 16px;
    height: 16px;
}

.input-wrap input {
    width: 100%;
    padding: 0.7rem 0.85rem 0.7rem 2.5rem;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-dark);
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.2s;
}

.input-wrap input::placeholder {
    color: #94a3b8;
}

.input-wrap input:focus {
    background: #ffffff;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.input-wrap.has-error input {
    border-color: var(--error-color);
    background: var(--error-bg);
}

.input-wrap.has-error .input-icon {
    color: var(--error-color);
}

.field-error {
    color: var(--error-color);
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 0.3rem;
    display: none;
}

.field-group.has-error .field-error {
    display: block;
}

/* ─── Password Toggle ─── */
.pass-toggle {
    position: absolute;
    right: 0.65rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.pass-toggle:hover {
    color: var(--accent);
}

.pass-toggle svg {
    width: 16px;
    height: 16px;
    display: block;
}

.pass-toggle .d-none {
    display: none !important;
}

/* ─── Actions Row ─── */
.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    margin-top: 0.35rem;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

.checkbox-wrap span {
    font-size: 0.8rem;
    color: var(--text-body);
    font-weight: 500;
    user-select: none;
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ─── Submit Button ─── */
.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ─── Alerts & Toasts ─── */
.alert-box {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    position: relative;
    background: var(--error-bg);
    color: var(--error-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
    animation: slideDown 0.3s ease-out;
}

.alert-box ul {
    list-style: none;
    margin-left: 0.5rem;
}

.alert-box ul li::before {
    content: '•';
    margin-right: 0.5rem;
}

.alert-close {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

.toast-notif {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    background: #f0fdf4;
    color: var(--success-color);
    border: 1px solid rgba(22, 163, 74, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease-out;
}

/* ─── Copyright Footer ─── */
.login-footer-bottom {
    position: absolute;
    bottom: 2rem;
    left: 4rem; /* matches wrapper padding */
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.01em;
    opacity: 0;
    animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.65s forwards;
}

.login-footer-bottom span {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
}

/* ─── Keyframes ─── */
@keyframes logoEntrance {
    0% { opacity: 0; transform: scale(0.5) translateY(-20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes textEntrance {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes formZoomOut {
    0% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive: Tablet & Mobile ─── */
@media (max-width: 860px) {
    .login-wrapper {
        padding: 2rem 1.5rem;
    }

    .login-content {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }

    .brand-header {
        text-align: center;
        max-width: 100%;
    }

    .brand-logo {
        margin: 0 auto 1.25rem auto;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(8px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .desktop-logo {
        display: none;
    }

    .mobile-logo {
        display: block;
        width: 50px;
        height: 50px;
        object-fit: contain;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

    .brand-title {
        font-size: 1.6rem;
    }

    .brand-title br {
        display: none;
    }

    .brand-subtitle {
        font-size: 0.9rem;
    }

    .brand-divider {
        margin: 1rem auto;
    }

    .brand-description {
        font-size: 0.82rem;
        max-width: 340px;
        margin: 0 auto;
        text-align: center;
    }

    .login-footer-bottom {
        position: static;
        margin-top: 2rem;
        text-align: center;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 1.75rem 1.5rem;
        max-width: 100%;
    }
    .brand-logo { width: 70px; height: 70px; margin-bottom: 1rem; }
    .mobile-logo { width: 44px; height: 44px; }
    .brand-title { font-size: 1.4rem; }
    .brand-subtitle { font-size: 0.82rem; }
    .brand-description { font-size: 0.78rem; }
}
