/* Modern Two-Panel Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #667eea 50%, #764ba2 75%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #667eea 50%, #764ba2 75%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(240, 147, 251, 0.2));
    animation: float 20s infinite linear;
    box-shadow: 0 8px 32px rgba(240, 147, 251, 0.1);
}

.shape-1 {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    left: 20%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    left: 70%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    left: 80%;
    animation-delay: 6s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Login Container */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    border-radius: 28px;
    box-shadow:
        0 25px 50px rgba(30, 60, 114, 0.15),
        0 15px 35px rgba(118, 75, 162, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(240, 147, 251, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Panel - Branding */
.login-left-panel {
    flex: 1;
    background: linear-gradient(135deg, #1e3c72, #2a5298, #667eea);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    border-radius: 28px 0 0 28px;
    overflow: hidden;
}

.brand-content {
    text-align: center;
    z-index: 2;
}

.logo-container {
    margin-bottom: 30px;
}

.brand-logo {
    max-width: 100px;
    height: auto;
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.brand-info {
    color: white;
}

.gps-integration {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.company-name {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.system-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.system-description {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Decorative Elements */
.decorative-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: floatSlow 15s infinite ease-in-out;
}

.deco-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.deco-2 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 15%;
    animation-delay: 5s;
}

.deco-3 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 20%;
    animation-delay: 10s;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Right Panel - Login Form */
.login-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 28px 28px 0;
    position: relative;
}

/* Flash Messages */
.flash-container {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
}

.flash-container .alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    font-weight: 500;
    animation: slideDown 0.5s ease-out;
}

.flash-container .alert-success {
    background: linear-gradient(135deg, #00c851, #007e33);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 200, 81, 0.3);
}

.flash-container .alert-danger {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Container */
.login-form-container {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    padding: 0 30px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 14px;
    color: #64748b;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    width: 100%;
}

.input-group {
    margin-bottom: 16px;
    width: 100%;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-input {
    width: 100%;
    padding: 14px 50px 14px 45px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    height: 48px;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #f093fb;
    box-shadow: 0 0 0 3px rgba(240, 147, 251, 0.15);
    background: rgba(240, 147, 251, 0.02);
}

.form-input:focus~.input-icon {
    color: #f093fb;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.password-toggle:hover {
    color: #f093fb;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    height: 48px;
    box-sizing: border-box;
}

@keyframes gradientButton {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
}

.login-footer p {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        height: auto;
        max-width: 400px;
        margin: 20px;
    }

    .login-left-panel {
        border-radius: 28px 28px 0 0;
        padding: 40px 30px;
        min-height: 200px;
    }

    .login-right-panel {
        border-radius: 0 0 28px 28px;
        padding: 40px 20px;
    }

    .login-form-container {
        max-width: 320px;
        padding: 0 20px;
    }

    .company-name {
        font-size: 24px;
    }

    .system-name {
        font-size: 18px;
    }

    .form-title {
        font-size: 24px;
    }

    .form-input {
        padding: 12px 45px 12px 40px;
        height: 44px;
        box-sizing: border-box;
    }

    .input-icon {
        left: 14px;
        font-size: 14px;
        top: 50%;
        transform: translateY(-50%);
    }

    .password-toggle {
        right: 14px;
        font-size: 14px;
        width: 22px;
        height: 22px;
        top: 50%;
        transform: translateY(-50%);
    }

    .login-btn {
        padding: 12px;
        height: 44px;
        font-size: 14px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .login-wrapper {
        margin: 10px;
        border-radius: 20px;
    }

    .login-left-panel {
        border-radius: 20px 20px 0 0;
        padding: 30px 20px;
    }

    .login-right-panel {
        border-radius: 0 0 20px 20px;
        padding: 30px 15px;
    }

    .login-form-container {
        max-width: 280px;
        padding: 0 15px;
    }

    .company-name {
        font-size: 20px;
    }

    .system-name {
        font-size: 16px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-input {
        padding: 10px 40px 10px 36px;
        font-size: 13px;
        height: 40px;
        box-sizing: border-box;
    }

    .input-icon {
        left: 12px;
        font-size: 13px;
        top: 50%;
        transform: translateY(-50%);
    }

    .password-toggle {
        right: 12px;
        font-size: 13px;
        width: 20px;
        height: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .login-btn {
        height: 40px;
        font-size: 13px;
        box-sizing: border-box;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-wrapper {
        background: white;
        border: 2px solid #000;
    }

    .form-input {
        border-color: #000;
    }

    .login-btn {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shapes {
        display: none;
    }
}