/* ============================================================================
   LOGIN PAGE STYLES
   Extracted from index.php (lines 51-365)
   ============================================================================ */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================================
   LOGIN CONTAINER - Main Background with Gradient and Animations
   ============================================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1f3f 0%, #1a4d7a 50%, #2980b9 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background circles */
.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(41, 128, 185, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

/* ============================================================================
   KEYFRAME ANIMATIONS
   ============================================================================ */

/* Float animation for background circles */
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 30px); }
}

/* Slide up animation for login card */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for logo */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Shake animation for input errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Slide down animation for timeout alert */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   LOGIN CARD - Main Form Container
   ============================================================================ */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(52, 152, 219, 0.3), 0 0 1px rgba(52, 152, 219, 0.5);
    max-width: 480px;
    width: 100%;
    padding: 50px 45px;
    animation: slideUp 0.6s ease-out;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

/* ============================================================================
   LOGIN LOGO - Brand Icon
   ============================================================================ */
.login-logo {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 45px;
    color: white;
    box-shadow: 0 10px 30px rgba(41, 128, 185, 0.4);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.login-logo::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
}

/* ============================================================================
   LOGIN HEADINGS
   ============================================================================ */
.login-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 16px;
    color: #5a6c7d;
    text-align: center;
    margin-bottom: 35px;
    font-weight: 400;
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.form-label i {
    color: #3498db;
    margin-right: 8px;
}

/* Input field styling */
.form-control {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-family: 'Sarabun', sans-serif;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    background: white;
}

/* Error state for input */
.form-control.error {
    border-color: #e74c3c;
    animation: shake 0.5s ease;
}

/* Form error message */
.form-error {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

/* Input wrapper for icon positioning */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
    pointer-events: none;
}

.form-control.with-icon {
    padding-left: 48px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    padding: 16px 24px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    font-family: 'Sarabun', sans-serif;
}

/* Primary button */
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    width: 100%;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(41, 128, 185, 0.4);
}

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

/* ============================================================================
   INFO BOX
   ============================================================================ */
.info-box {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #ebf5fb 0%, #d6eaf8 100%);
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.info-box p {
    color: #34495e;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.info-box i {
    color: #3498db;
    font-size: 18px;
}

.info-box small {
    color: #7f8c8d;
}

/* ============================================================================
   VERSION INFO
   ============================================================================ */
.version-info {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   TIMEOUT ALERT
   ============================================================================ */
.timeout-alert {
    padding: 14px 18px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
    border-radius: 12px;
    margin-bottom: 25px;
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    animation: slideDown 0.5s ease;
}

.timeout-alert i {
    margin-right: 8px;
}

/* ============================================================================
   SWEETALERT CUSTOM STYLES
   ============================================================================ */

/* SweetAlert wide popup */
.swal-wide {
    width: 500px !important;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 600px) {
    .swal-wide {
        width: 90% !important;
    }
}
