/* Login New Styles - DEIS 3.0 */

/* Ensure Font Awesome icons load properly */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Font Awesome specific fixes */
.fas, .fa-solid, .fab, .fa-brands, .far, .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}

.fab, .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

/* Override font-family for icons specifically */
i[class*="fa-"], i.fas, i.fab, i.far {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

body, html {
    height: 100%;
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    overflow: hidden;
}

/* Background Wrapper */
.background-wrapper {
    height: 100vh;
    width: 100vw;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-image 0.5s ease;
}

.background-wrapper.light {
    background-image: url('../images/w-light.jpg');
}

.background-wrapper.dark {
    background-image: url('../images/w-dark.jpg');
}

/* Centered Container */
.centered-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 2rem;
}

/* Login Card */
.login-card {
    display: flex;
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    min-height: 550px;
}

/* Info Panel (Left Side) */
.info-panel {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.logo-kz {
    margin-bottom: 2rem;
    text-align: center;
}

.kz-logo-img {
    max-height: 60px;
    height: auto;
    filter: drop-shadow(0px 4px 8px white);
}

.company-info {
    margin-bottom: 2rem;
    text-align: center;
}

.company-info h1 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.company-info h2 {
    color: #555;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.company-info h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

.company-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.company-info .address {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.company-info .contact {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.company-info .website {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.deis-info {
    text-align: center;
}

.deis-main-title {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #058805 0%, #ddff1e 100%);
    background-clip: text;
    font-weight: 900;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.5));
}

.deis-subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.deis-version {
    font-size: 0.9rem;
    color: #666;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(51, 51, 51, 0.15);
    border: 2px solid rgba(51, 51, 51, 0.4);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #333 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem !important;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
}

.social-icons a:hover {
    background: rgba(51, 51, 51, 0.25);
    border-color: #333;
    color: #555 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 51, 51, 0.4);
}


/* Login Panel (Right Side) */
.login-panel {
    flex: 0 0 400px;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 1.4rem;
    color: #333 !important;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(0, 0, 0, 0.2);
    color: #222 !important;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.login-form {
    width: 100%;
    max-width: 350px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #333 !important;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}

.login-header p {
    color: #666 !important;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group .form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #333 !important;
    z-index: 1;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
}

.form-control {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3rem;
    border: 2px solid rgba(34, 139, 34, 0.3) !important;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #333 !important;
    font-family: 'Roboto', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #333 !important;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
}

.password-toggle:hover {
    color: #555 !important;
}

.form-control:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #228B22 0%, #32CD32 100%);
    color: white !important;
    border: 2px solid rgba(34, 139, 34, 0.4);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 139, 34, 0.4);
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
    border-color: rgba(34, 139, 34, 0.6);
}

.forgot-password-section {
    text-align: center;
    margin: 1rem 0;
}

.forgot-password-link {
    color: #228B22 !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password-link:hover {
    color: #32CD32 !important;
    text-decoration: underline;
    transform: translateY(-1px);
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    color: #999;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 0;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: none;
}

.alert-danger {
    background: #fee;
    color: #c33;
}

.alert-success {
    background: #efe;
    color: #3c3;
}

/* Mobile First Responsive Design */
@media (max-width: 768px) {
    /* Full screen mobile layout */
    .background-wrapper {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }
    
    .centered-container {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    
    /* Login card mobile layout */
    .login-card {
        flex-direction: row;
        max-width: none;
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Hide info panel completely on mobile */
    .info-panel {
        display: none !important;
    }
    
    /* Login panel full width on mobile */
    .login-panel {
        flex: 1;
        width: 100vw;
        padding: 2rem 1.5rem;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(15px) !important;
    }
    
    /* Mobile form styling */
    .login-form {
        max-width: none;
        width: 100%;
    }
    
    .login-header {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .login-header h2 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        color: #333 !important;
    }
    
    .login-header p {
        font-size: 1.1rem;
        color: #666 !important;
    }
    
    /* Form controls mobile */
    .form-control {
        padding: 1rem 3rem;
        font-size: 1.1rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .login-btn {
        padding: 1.25rem;
        font-size: 1.1rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    /* Theme toggle mobile */
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    /* Forgot password mobile */
    .forgot-password-link {
        font-size: 1rem;
        padding: 0.5rem;
        text-align: center;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .login-panel {
        padding: 1.5rem 1rem;
    }
    
    .login-header h2 {
        font-size: 2rem;
    }
    
    .form-control {
        padding: 0.875rem 2.5rem;
        font-size: 1rem;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Dark mode mobile adjustments */
@media (max-width: 768px) {
    .dark-mode .background-wrapper {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
    }
    
    .dark-mode .login-panel {
        background: rgba(30, 30, 30, 0.95) !important;
        color: white !important;
    }
    
    .dark-mode .login-header h2 {
        color: white !important;
    }
    
    .dark-mode .login-header p {
        color: #e0e0e0 !important;
    }
}

/* Dark mode adjustments */
.dark-mode .theme-toggle {
    background: rgba(30, 30, 30, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .theme-toggle:hover {
    background: rgba(40, 40, 40, 1) !important;
    border-color: rgba(255, 255, 255, 0.4);
    color: #f0f0f0 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.dark-mode .login-card {
    background: transparent !important;
    color: white;
}

.dark-mode .login-panel {
    background: rgba(20, 20, 20, 0.7) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.dark-mode .info-panel {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
}

.dark-mode .login-header h2 {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .login-header p {
    color: #e0e0e0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .form-control {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(144, 238, 144, 0.4) !important;
    color: white !important;
    font-weight: 500;
}

.dark-mode .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.dark-mode .form-control:focus {
    border-color: #90EE90 !important;
    box-shadow: 0 0 0 3px rgba(144, 238, 144, 0.2) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}


.dark-mode .login-header p {
    color: #ccc;
}

.dark-mode .divider {
    color: #ccc;
}

.dark-mode .divider::before {
    background: rgba(255, 255, 255, 0.2);
}

.dark-mode .divider span {
    background: rgba(40, 40, 40, 0.98);
}

.dark-mode .password-toggle {
    color: #333 !important;
}

.dark-mode .password-toggle:hover {
    color: #555 !important;
}

/* Additional icon fixes for dark mode */
.dark-mode .form-icon {
    color: #333 !important;
}

.dark-mode .forgot-password-link {
    color: white !important;
}

.dark-mode .forgot-password-link:hover {
    color: #f0f0f0 !important;
}

/* Dark mode - Text colors untuk panel kiri */
.dark-mode .company-info h1 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .company-info .address,
.dark-mode .company-info .contact,
.dark-mode .company-info .website {
    color: #e0e0e0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .company-info h2 {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .company-info p {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .deis-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dark-mode .deis-version {
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Dark mode - Social icons */
.dark-mode .social-icons a {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white !important;
}

.dark-mode .social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #f0f0f0 !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.dark-mode .deis-main-title {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Dark mode - Logo background */
.dark-mode .logo-kz {
    position: relative;
}

.dark-mode .logo-kz::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    z-index: -1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .kz-logo-img {
    position: relative;
    z-index: 1;
}
