/* 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;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a7c87 0%, #1a3560 50%, #0a7c87 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

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

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/bg-login.jpeg') center center;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.login-wrapper {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.left-panel {
    display: none;
}

.right-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.5);
    display: flex;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    align-items: start;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-form-container {
    width: 100%;
    position: relative;
    z-index: 1;
}

.welcome-logo {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.welcome-heading {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #0a7c87 0%, #1a3560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-align: center;
}

.welcome-subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 36px;
    line-height: 1.6;
    text-align: center;
}

.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #fca5a5;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.error::before {
    content: '⚠';
    font-size: 18px;
}

.form-group {
    margin-bottom: 24px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 44px;
}

#captcha_answer{
    padding-inline: 0 !important;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.toggle-password:hover {
    color: #0a7c87;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    color: #1a1a1a;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #0a7c87;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* CAPTCHA Styles */
.captcha-group {
    margin-bottom: 24px;
}

.captcha-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.captcha-display-box {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 8px;
    padding: 10px;
    border: 2px solid #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    max-width: 200px;
    margin: 0 auto;
}

.captcha-display-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(10, 124, 135, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

#captchaCanvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    max-width: 180px;
    margin: 0 auto;
}

.captcha-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
}

.btn-refresh-captcha {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-refresh-captcha:hover {
    background: rgba(10, 124, 135, 0.3);
    border-color: rgba(10, 124, 135, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 124, 135, 0.4);
}

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

.btn-refresh-captcha i {
    transition: transform 0.3s ease;
}

.btn-refresh-captcha:hover i {
    transform: rotate(180deg);
}

.btn-refresh-captcha span {
    font-size: 12px;
}

.captcha-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.captcha-icon {
    position: absolute;
    left: 12px;
    color: #0a7c87;
    font-size: 14px;
    z-index: 1;
    pointer-events: none;
}

.captcha-input {
    width: 100% !important;
    max-width: 220px;
    margin: 0 auto;
    padding: 10px 14px 10px 36px !important;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.captcha-input:focus {
    background: #ffffff;
    border-color: #0a7c87;
    box-shadow: 0 0 0 3px rgba(10, 124, 135, 0.1);
    letter-spacing: 3px;
}

.captcha-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
    font-style: normal;
}

.captcha-hint i {
    color: #0a7c87;
    font-size: 12px;
}

/* Rate Limit Warning */
.rate-limit-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #fde68a;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rate-limit-warning i {
    font-size: 16px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.forgot-password {
    color: #0a7c87;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #1a3560;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember-me label {
    margin: 0;
    font-size: 14px;
    color: #374151;
    font-weight: 400;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #0a7c87;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0a7c87 0%, #1a3560 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 14px;
    box-shadow: 0 4px 15px rgba(10, 124, 135, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-login::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-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 124, 135, 0.5);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(10, 124, 135, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 16px;
}

.btn-google {
    width: 100%;
    padding: 14px;
    background: white;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-google:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.google-icon {
    width: 20px;
    height: 20px;
    background: url('../images/google-icon.svg') no-repeat center;
    background-size: contain;
}

.signup-link {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.signup-link a {
    color: #0a7c87;
    text-decoration: none;
    font-weight: 500;
}

.signup-link a:hover {
    text-decoration: underline;
}

.external-link-container {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0a7c87;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.external-link:hover {
    color: #1a3560;
    background: rgba(10, 124, 135, 0.1);
    transform: translateY(-1px);
}

.external-link i {
    font-size: 12px;
}

@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .right-panel {
        padding: 36px 28px;
        border-radius: 20px;
    }
    
    .welcome-heading {
        font-size: 24px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
    }
    
    .welcome-logo {
        width: 160px;
        margin-bottom: 24px;
    }
}

