@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #E7553C;
    --primary-hover: #d6442b;
    --primary-light: rgba(231, 85, 60, 0.15);
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Background Decorations */
.dot-pattern-top-right {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 90px;
    height: 90px;
    background-image: radial-gradient(#E7553C 2px, transparent 2px);
    background-size: 14px 14px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.bg-blob-bottom-left {
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(231, 85, 60, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 0;
    animation: blobMove 10s ease-in-out infinite;
}

/* Left Column Styling */
.left-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 3.5rem;
    position: relative;
    z-index: 1;
    min-width: 0; /* Prevents flex item overflow */
}

.left-column-content {
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
    max-width: 520px;
    min-width: 0; /* Prevents nested flex item overflow */
}

.orange-divider {
    width: 36px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.left-title {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 2.2rem;
    line-height: 1.25;
}

.left-title span {
    font-weight: 700;
    color: var(--primary-color);
}

.left-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.illustration-container {
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
    min-width: 0;
}

.illustration-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 380px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.4s ease;
}

.illustration-img:hover {
    transform: scale(1.02);
    animation-play-state: paused;
}

.animation-floating {
    animation: floating 4s ease-in-out infinite;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Right Column Styling */
.right-column {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
    background-color: transparent;
    min-width: 0; /* Prevents flex item overflow */
    padding: 2rem;
}

/* Card Styling */
.login-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    transition: box-shadow 0.3s ease;
    min-width: 0;
}

.login-card:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.05);
}

.card-header-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-title-main {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

/* Form Controls */
.form-label-custom {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    pointer-events: none;
}

.input-custom {
    width: 100%;
    height: 52px;
    padding-left: 48px;
    padding-right: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #FFFFFF;
    transition: all 0.3s ease;
}

.input-custom:focus {
    border-color: #E7553C;
    box-shadow: 0 0 0 4px rgba(231, 85, 60, 0.12);
    outline: none;
}

.input-custom:focus + i {
    color: var(--primary-color);
}

.password-input-custom {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

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

/* Checkbox and Links */
.form-check-input-custom {
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0;
}

.form-check-input-custom:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input-custom:focus {
    box-shadow: 0 0 0 4px var(--primary-light);
    border-color: var(--primary-color);
}

.form-check-label-custom {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    margin-left: 8px;
}

.link-primary-custom {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link-primary-custom:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Buttons */
.btn-primary-custom {
    width: 100%;
    height: 52px;
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 20px rgba(231, 85, 60, 0.20);
}

.btn-primary-custom:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 10px rgba(231, 85, 60, 0.15);
}

/* Micro Interactions */
button, a, i, .input-custom {
    transition: all 0.3s ease;
}

.register-prompt {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1.75rem;
}

/* Rakit AI Logo CSS Component */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 44px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.card-logo-img {
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-text-brand {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-dark);
    line-height: 1.1;
}

.logo-text-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    margin-top: 2px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    position: relative;
    display: inline-block;
}

.logo-mark-dome {
    width: 28px;
    height: 28px;
    background-color: var(--primary-color);
    border-radius: 50% 50% 15% 15%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-mark-dome::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #FFFFFF;
    border-radius: 50%;
}

.logo-mark-base {
    width: 28px;
    height: 6px;
    background-color: #334155;
    border-radius: 3px;
    position: absolute;
    bottom: 2px;
    left: 0;
}

.logo-mark-dot {
    width: 6px;
    height: 6px;
    background-color: #334155;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 0;
}

/* Large logo variation */
.logo-mark-lg {
    width: 48px;
    height: 48px;
}

.logo-mark-lg .logo-mark-dome {
    width: 36px;
    height: 36px;
}

.logo-mark-lg .logo-mark-dome::after {
    content: '';
    width: 10px;
    height: 10px;
}

.logo-mark-lg .logo-mark-base {
    width: 36px;
    height: 8px;
    border-radius: 4px;
    bottom: 2px;
}

.logo-mark-lg .logo-mark-dot {
    width: 8px;
    height: 8px;
    bottom: 2px;
    right: 2px;
}

/* Responsiveness Settings */
@media (max-width: 991.98px) {
    .left-column {
        min-height: auto;
        padding: 3rem 2rem 1rem 2rem;
    }
    
    .left-column-content {
        margin-top: 0;
        margin-bottom: 2rem;
        max-width: 100%;
        text-align: center;
    }
    
    .orange-divider {
        margin-left: auto;
        margin-right: auto;
    }
    
    .right-column {
        min-height: auto;
        padding: 1rem 1.5rem 3rem 1.5rem;
    }
    
    .login-card {
        padding: 2.5rem 1.75rem;
    }
}

@media (max-width: 576px) {
    .left-column {
        padding: 2rem 1rem 1rem 1rem;
    }
    
    .left-title {
        font-size: 1.8rem;
    }
    
    .right-column {
        padding: 1rem 1rem 2rem 1rem;
    }
    
    .login-card {
        padding: 2rem 1.25rem;
        border-radius: 16px;
    }
}

/* ==========================================================================
   FOOTER COPYRIGHT — Full width di bagian paling bawah (centered)
   ========================================================================== */
.login-page-footer {
    width: 100%;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: transparent;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

/* Pada mobile, tambah jarak bawah sedikit agar tidak tumpuk dengan konten */
@media (max-width: 991.98px) {
    .login-page-footer {
        position: relative;
        margin-top: 1rem;
        padding-bottom: 1.5rem;
    }
}

/* ==========================================================================
   LOGIN PAGE ANIMATIONS — Animasi saat halaman dimuat
   ========================================================================== */

/* Background decoration fade-in */
.dot-pattern-top-right {
    animation: loginFadeIn 1s ease 0.5s both;
}

.bg-blob-bottom-left {
    animation: loginFadeIn 1.2s ease 0.3s both;
}

/* Left column slide in dari kiri */
.left-column {
    animation: loginSlideLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Logo container */
.logo-container {
    animation: loginFadeDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* Judul hero */
.left-column-content .orange-divider {
    animation: loginFadeUp 0.5s ease 0.3s both;
}

.left-column-content .left-title {
    animation: loginFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.left-column-content .left-description {
    animation: loginFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.illustration-container {
    animation: loginFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

/* Login card slide in dari kanan */
.login-card {
    animation: cardFadeInUp 0.8s ease-out both;
}

.card-header-logo {
    animation: loginScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.card-title-main {
    animation: loginFadeUp 0.5s ease 0.5s both;
}

.card-subtitle {
    animation: loginFadeUp 0.5s ease 0.55s both;
}

/* Form fields stagger */
.login-card .mb-4:nth-child(1) { animation: loginFadeUp 0.5s ease 0.6s both; }
.login-card .mb-4:nth-child(2) { animation: loginFadeUp 0.5s ease 0.65s both; }
.login-card .d-flex            { animation: loginFadeUp 0.5s ease 0.7s both; }
.btn-primary-custom             { animation: loginFadeUp 0.5s ease 0.75s both; }

/* Enhanced input focus */
.input-custom {
    transition: all 0.3s ease;
}

.input-custom:focus {
    transform: translateY(-1px);
}

/* Keyframes untuk login page */
@keyframes loginFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes loginFadeDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes loginSlideLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes loginSlideRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes loginScaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* Error & success alert animasi */
.alert {
    animation: loginFadeDown 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Floating Animation */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Blob Movement Animation */
@keyframes blobMove {
    0% {
        transform: translateX(0px) scale(1);
    }
    50% {
        transform: translateX(12px) scale(1.03);
    }
    100% {
        transform: translateX(0px) scale(1);
    }
}

/* Card Slide Up Fade In Animation */
@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aksesibilitas: matikan animasi jika diinginkan */
@media (prefers-reduced-motion: reduce) {
    .left-column,
    .login-card,
    .logo-container,
    .card-header-logo,
    .left-title,
    .left-description,
    .card-title-main,
    .card-subtitle,
    .illustration-container,
    .left-column-content .orange-divider,
    .btn-primary-custom,
    .alert,
    .login-card .mb-4,
    .login-card .d-flex,
    .dot-pattern-top-right,
    .bg-blob-bottom-left {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .input-custom,
    .btn-primary-custom {
        transition: none !important;
    }
}

