/* ============================================
   PERINTIS STUDIO - ADMIN LOGIN STYLING
   Stylish login page with gold (#FFD700) theme
   FINAL VERSION - Fixed input fields & compatibility
============================================ */

/* ===== 1. RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gold: #FFD700;
    --gold-light: #FFE44D;
    --gold-dark: #FFA500;
    --dark-bg: #0a0a0a;
    --dark-card: #1a1a1a;
    --light-text: #ffffff;
    --gray-text: #cccccc;
    --gray-border: rgba(255, 255, 255, 0.1);
    --error-color: #ff6b6b;
}

/* Hide original login form completely */
.wrapper-page,
.account-pages,
.account-box {
    display: none !important;
}

/* ===== 2. HEADER STYLES ===== */
.login-header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    padding: 1rem 0;
    position: relative;
    z-index: 1000;
}

.login-header .navbar {
    padding: 0 1rem;
}

.login-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 0;
}

.brand-logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.back-home {
    color: var(--gray-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.back-home:hover {
    color: var(--primary-gold);
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    text-decoration: none;
}

/* ===== 3. ANIMATED BACKGROUND ===== */
.login-bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0) 70%);
    animation: float 20s infinite linear;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.circle-2 {
    width: 500px;
    height: 500px;
    bottom: 10%;
    right: 10%;
    animation-delay: 5s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 80%;
    animation-delay: 10s;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 165, 0, 0.03) 0%, transparent 50%);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, 20px) rotate(90deg);
    }
    50% {
        transform: translate(0, 40px) rotate(180deg);
    }
    75% {
        transform: translate(-20px, 20px) rotate(270deg);
    }
}

/* ===== 4. MAIN CONTENT ===== */
.login-main {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.login-container > .row {
    min-height: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    overflow: hidden;
}

/* ===== 5. SHOWCASE PANEL ===== */
.login-showcase {
    height: 100%;
    min-height: 600px;
    background: 
        linear-gradient(135deg, 
            rgba(255, 215, 0, 0.1) 0%, 
            rgba(255, 165, 0, 0.05) 100%),
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9));
    /* Jika ingin background image, uncomment line di bawah dan tambahkan file login-bg.jpg */
    /* background: 
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9)),
        url('../assets/images/login-bg.jpg') center/cover; */
    position: relative;
    overflow: hidden;
}

.showcase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 165, 0, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.showcase-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.showcase-logo {
    width: 350px;
    height: 350px;
    /*margin-bottom: 2rem;*/
    /*filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));*/
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.showcase-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    line-height: 1.2;
}

.showcase-subtitle {
    color: var(--gray-text);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.showcase-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--gray-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    color: var(--primary-gold);
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.2rem;
    color: var(--primary-gold);
}

/* ===== 6. LOGIN FORM CONTAINER ===== */
.login-form-container {
    height: 100%;
    min-height: 600px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255, 215, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-subtitle {
    color: var(--gray-text);
    font-size: 1rem;
    line-height: 1.5;
}

/* ===== 7. FORM ELEMENTS - FIXED VERSION ===== */
.form-body {
    width: 100%;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    color: var(--gray-text);
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* INPUT GROUP STYLING */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    min-height: 50px;
}

.input-group:focus-within {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

/* INPUT GROUP PREPEND (icons on left) */
.input-group-prepend {
    display: flex;
    align-items: center;
}

.input-group-text {
    background: rgba(255, 215, 0, 0.1);
    border: none;
    color: var(--primary-gold);
    padding: 0 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 100%;
}

/* FORM CONTROLS (inputs) */
.login-form-container .form-control {
    background: transparent;
    border: none;
    color: var(--light-text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    height: auto;
    flex: 1;
    min-height: 48px;
}

.login-form-container .form-control:focus {
    background: transparent;
    color: var(--light-text);
    box-shadow: none;
    outline: none;
}

.login-form-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* INPUT GROUP APPEND (toggle password button) */
.input-group-append {
    display: flex;
    align-items: stretch;
}

.input-group-append .btn {
    background: rgba(255, 215, 0, 0.1);
    border: none;
    color: var(--primary-gold);
    padding: 0 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.input-group-append .btn:hover {
    background: rgba(255, 215, 0, 0.2);
}

.input-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

/* ===== 8. VALIDATION MESSAGES ===== */
.modalPanah {
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 9. LOGIN BUTTON ===== */
.btn-login {
    background: linear-gradient(135deg, var(--primary-gold), var(--gold-dark));
    color: #000000;
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--primary-gold));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-text, .btn-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-spinner .fa-spinner {
    font-size: 1.2rem;
}

/* ===== 10. SECURITY NOTE ===== */
.security-note {
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.note-icon {
    color: var(--primary-gold);
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.note-content {
    color: var(--gray-text);
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.note-content strong {
    color: var(--primary-gold);
    font-weight: 600;
}

/* ===== 11. SUPPORT INFO ===== */
.support-info {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-border);
    color: var(--gray-text);
    font-size: 0.95rem;
}

.support-link {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.support-link:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

.text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ===== 12. FOOTER ===== */
.login-footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    padding: 1.5rem 0;
    position: relative;
    z-index: 1000;
}

.login-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    width: 30px;
    height: 30px;
}

.footer-brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-gold);
}

.footer-text {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.footer-info {
    color: var(--gray-text);
    font-size: 0.9rem;
    text-align: right;
}

.text-warning {
    color: var(--primary-gold) !important;
}

/* ===== 13. LOADER MODAL STYLING ===== */
#loaderModal.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#loaderModal .mask {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loaderModal .mask-inner {
    text-align: center;
}

#loaderModal .loader img {
    width: 80px;
    height: 80px;
}

/* ===== 14. COMPATIBILITY FIXES ===== */
/* Pastikan form controls dari Bootstrap 4 tetap bekerja */
.login-form-container input.form-control,
.login-form-container input.form-control-lg {
    height: auto !important;
    min-height: 48px;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* Pastikan icon alignment tetap baik */
.input-group-prepend .input-group-text i,
.input-group-append .btn i {
    line-height: 1;
    vertical-align: middle;
}

/* ===== 15. RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 991.98px) {
    .login-container > .row {
        min-height: 500px;
    }
    
    .login-showcase,
    .login-form-container {
        min-height: 500px;
    }
    
    .login-form-container {
        padding: 2.5rem;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .showcase-title {
        font-size: 1.8rem;
    }
    
    .brand-text {
        font-size: 1.4rem;
    }
    
    .login-form-container .form-control {
        min-height: 46px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .login-main {
        padding: 1rem;
        min-height: calc(100vh - 120px);
    }
    
    .login-container {
        padding: 0;
    }
    
    .login-container > .row {
        min-height: auto;
        border-radius: 12px;
        margin: 0;
    }
    
    .login-showcase {
        min-height: 300px;
        display: block;
    }
    
    .login-form-container {
        min-height: auto;
        padding: 2rem 1.5rem;
        border-left: none;
        border-top: 1px solid rgba(255, 215, 0, 0.1);
    }
    
    .form-header {
        margin-bottom: 2rem;
    }
    
    .form-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-title i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .input-group {
        min-height: 46px;
    }
    
    .login-form-container .form-control {
        min-height: 44px;
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
    
    .input-group-text,
    .input-group-append .btn {
        padding: 0 0.875rem;
        min-width: 45px;
        font-size: 1rem;
    }
    
    .btn-login {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        height: 52px;
    }
    
    .security-note {
        margin: 1.5rem 0;
        padding: 0.875rem;
        flex-direction: column;
        text-align: center;
    }
    
    .note-icon {
        margin-top: 0;
        margin-bottom: 0.5rem;
    }
    
    .support-info {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    /* Header Mobile */
    .login-header {
        padding: 0.75rem 0;
    }
    
    .login-header .container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .navbar-brand {
        justify-content: center;
        width: 100%;
    }
    
    .brand-text {
        font-size: 1.3rem;
    }
    
    .navbar-nav {
        width: 100%;
        justify-content: center;
    }
    
    .back-home {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Footer Mobile */
    .login-footer .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .showcase-overlay {
        padding: 2rem;
    }
    
    .showcase-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }
    
    .showcase-title {
        font-size: 1.6rem;
        margin-bottom: 0.75rem;
    }
    
    .showcase-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .showcase-features {
        margin-top: 2rem;
        gap: 1rem;
    }
    
    .feature-item {
        font-size: 0.9rem;
    }
    
    .feature-icon {
        font-size: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .login-form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-title {
        font-size: 1.4rem;
    }
    
    .form-subtitle {
        font-size: 0.9rem;
    }
    
    .input-group {
        min-height: 44px;
    }
    
    .login-form-container .form-control {
        min-height: 42px;
        padding: 0.625rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .input-group-text,
    .input-group-append .btn {
        padding: 0 0.75rem;
        min-width: 40px;
        font-size: 1rem;
    }
    
    .btn-login {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        height: 48px;
    }
    
    .security-note {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .support-info {
        font-size: 0.9rem;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .back-home {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .footer-brand-text {
        font-size: 1.1rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
}

/* Very Small Mobile */
@media (max-width: 375px) {
    .login-form-container {
        padding: 1.25rem 0.875rem;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .btn-login {
        font-size: 0.9rem;
    }
    
    .showcase-logo {
        width: 100px;
        height: 100px;
    }
    
    .showcase-title {
        font-size: 1.4rem;
    }
    
    .login-form-container .form-control {
        min-height: 40px;
        padding: 0.5rem 0.625rem;
        font-size: 0.9rem;
    }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
    .login-main {
        padding: 1rem;
        min-height: auto;
    }
    
    .login-container > .row {
        min-height: 400px;
    }
    
    .login-showcase,
    .login-form-container {
        min-height: 400px;
    }
    
    .login-form-container {
        padding: 1.5rem;
    }
    
    .form-header {
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .security-note {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .support-info {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .login-form-container .form-control {
        min-height: 42px;
    }
}

/* ===== 16. PRINT STYLES ===== */
@media print {
    .login-bg-elements,
    .login-header,
    .login-footer,
    .security-note,
    .support-info {
        display: none !important;
    }
    
    .login-main {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 0;
    }
    
    .login-form-container {
        background: white !important;
        color: black !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .form-title {
        color: black !important;
    }
    
    .form-control {
        color: black !important;
        border: 1px solid #ddd !important;
    }
}

/* ===== 17. ICON FIXES ===== */
.fa-solid, .fas {
    font-weight: 900;
}

/* ===== 18. SPECIFIC SELECTOR FIX ===== */
/* Target input fields hanya di login form container */
.login-form-container #userNameInput,
.login-form-container #passwordInput {
    height: auto !important;
    min-height: 48px;
    line-height: 1.5 !important;
}

/* Pastikan input group alignment baik */
.input-group > .form-control:not(:first-child) {
    border-left: 0;
}

.input-group > .form-control:not(:last-child) {
    border-right: 0;
}

.fa-solid, .fas {
    font-weight: 900;
    margin-right: 5px !important;
}