/* Modern Login Page Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #490e67 0%, #6b1a8d 25%, #005850 75%, #007a6e 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background circles */
.login-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(0, 88, 80, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 8s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(73, 14, 103, 0.1);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo img {
    max-width: 80px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(73, 14, 103, 0.2));
}

.official-logo {
    text-align: center;
    margin-top: 16px;
}

.official-logo img {
    max-width: 70px;
    height: auto;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #490e67 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
}

/* Modern Form Inputs - ALWAYS VISIBLE BORDERS */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    background: #ffffff;
    text-align: right;
    direction: rtl;
}

.form-control:focus {
    border-color: #005850;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 88, 80, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
    text-align: center;
}

/* Select/Dropdown styling */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 20px;
    padding: 12px 40px 12px 14px;
    cursor: pointer;
    color: #1A1A1A;
    text-align: right;
    height: auto;
    line-height: normal;
}

select.form-control option {
    padding: 10px;
    background: #ffffff;
    color: #1A1A1A;
}

/* Remember Me & Forgot Password */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #005850;
}

.forgot-password {
    color: #490e67;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #005850;
}

/* Primary Login Button */
.btn-login {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #005850 0%, #007a6e 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 88, 80, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 88, 80, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.login-divider span {
    padding: 0 16px;
}

/* PKI Login Buttons */
.pki-section {
    margin-top: 16px;
}

.btn-pki {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    margin-bottom: 10px;
}

.btn-theqa {
    background: linear-gradient(135deg, #490e67 0%, #6b1a8d 100%);
    border-color: #490e67;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(73, 14, 103, 0.3);
}

.btn-theqa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(73, 14, 103, 0.4);
    color: #ffffff;
}

.btn-mobile-pki {
    background: transparent;
    border-color: #005850;
    color: #005850;
}

.btn-mobile-pki:hover {
    background: #005850;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-pki i {
    font-size: 18px;
}

/* Mobile PKI Phone Input */
.mobile-pki-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.phone-input-wrapper {
    margin-bottom: 12px;
}

.phone-help-text {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.footer-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Validation Summary */
.validation-summary-errors {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c33;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-logo img {
        max-width: 60px;
    }

    .official-logo img {
        max-width: 55px;
    }

    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}
