﻿/* =========================================
   STYLELOGIN.CSS - Artisan Theme (Mobile Optimized)
   ========================================= */

/* Reset & Fonts */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212; /* Fallback color */
}

/* --- WRAPPER UTAMA (FULL SCREEN DESKTOP) --- */
.login-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Guna min-height supaya boleh scroll jika content panjang */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Padding tepi untuk mobile */
    background-image: url('../images/herobanner1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
}

/* Gelapkan background supaya tulisan jelas */
.login-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* Gelap 75% */
    backdrop-filter: blur(5px);
    z-index: 1;
}

/* --- KOTAK LOGIN (CARD) --- */
.auth-container {
    position: relative;
    z-index: 2;
    background: rgba(30, 30, 30, 0.65); /* Semi-transparent Dark */
    backdrop-filter: blur(15px); /* Glassmorphism Effect */
    -webkit-backdrop-filter: blur(15px); /* Safari Support */
    padding: 50px 40px;
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

/* Animasi masuk */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HEADER --- */
.auth-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: #fff;
    margin-bottom: 10px;
    margin-top: 0;
}

.auth-header p {
    color: #bbb;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.gold-divider {
    width: 50px;
    height: 3px;
    background-color: #c2a45d;
    margin: 0 auto 30px auto;
}

/* --- INPUT FIELDS --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

    .form-group label {
        display: block;
        color: #c2a45d; /* Label warna Emas */
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

.form-control {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

    .form-control::placeholder {
        color: #666;
    }

    .form-control:focus {
        background: rgba(255, 255, 255, 0.1);
        border-color: #c2a45d;
        box-shadow: 0 0 10px rgba(194, 164, 93, 0.2);
    }

/* --- PASSWORD TOGGLE --- */
.password-options {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.checkbox-container {
    color: #bbb;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

/* --- BUTTON SIGN IN --- */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #c2a45d, #a3863d);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 15px;
    letter-spacing: 1px;
}

    .btn-login:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(194, 164, 93, 0.4);
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* --- ERROR & VALIDATION --- */
.validation-text {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.alert-box {
    display: block;
    padding: 12px;
    background-color: rgba(255, 99, tomato, 0.2);
    border: 1px solid #ff6347;
    color: #ffcccc;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: left;
}

/* --- FOOTER LINK --- */
.auth-links {
    margin-top: 25px;
    font-size: 14px;
    color: #bbb;
}

    .auth-links a {
        color: #c2a45d;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.3s;
    }

        .auth-links a:hover {
            color: #fff;
            text-decoration: underline;
        }

/* =========================================
   ADDITIONS FOR REGISTER PAGE
   ========================================= */

/* Layout Grid untuk Password di Desktop */
.form-row {
    display: flex;
    gap: 15px;
}

.half-width {
    flex: 1;
}

/* Success Message Style */
.success-message-box {
    text-align: center;
    padding: 30px 20px;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    font-size: 50px;
    color: #c2a45d;
    margin-bottom: 20px;
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-message-box h3 {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
}

.success-message-box p {
    color: #bbb;
    font-size: 14px;
    line-height: 1.6;
}

@keyframes scaleUp {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* ==================================================================
   RESPONSIVE & MOBILE OPTIMIZATION (ANTI-BERTINDIH NAVBAR MOBILE)
   ================================================================== */

/* Tablet Screens (Max 768px) */
@media (max-width: 768px) {
    .login-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Susun bermula tengah secara horizontal */
        justify-content: flex-start !important; /* Benarkan elemen mengalir ke bawah secara natural */
        /* PERISAI UTAMA: Menolak kad login/register turun di bawah garisan navbar fixed mobile */
        padding-top: 140px !important;
        padding-bottom: 60px !important;
        height: auto !important;
        min-height: 100vh !important;
    }

    .auth-container {
        padding: 40px 30px; /* Padatkan ruang padding dalaman kad */
        max-width: 100%;
    }
}

/* Mobile Screens (Max 480px) */
@media (max-width: 480px) {
    .login-wrapper {
        padding-top: 120px !important; /* Jarak dilaraskan mengikut kesesuaian saiz skrin telefon pintar */
        padding-bottom: 40px !important;
    }

    .auth-container {
        padding: 30px 20px; /* Padding lebih kompak pada phone */
    }

    .auth-header h2 {
        font-size: 26px; /* Saiz tajuk dilaraskan untuk paparan peranti mudah alih */
    }

    .form-group {
        margin-bottom: 15px;
    }

    /* Mencegah isu auto-zoom pada skrin Safari/iOS iPhone */
    .form-control {
        font-size: 16px !important;
        padding: 12px;
    }

    /* REGISTER PAGE: Paksa bahagian input password & confirm bertukar menjadi 1 lajur menegak */
    .form-row {
        flex-direction: column !important;
        gap: 0;
    }

    .half-width {
        width: 100% !important;
    }
}

/* Mod Lanskap Telefon / Skrin Pendek */
@media (max-height: 700px) {
    .login-wrapper {
        justify-content: flex-start !important;
        align-items: center !important;
        padding-top: 130px !important;
        padding-bottom: 40px !important;
        height: auto !important;
    }
}
