/* Authentication Pages - Immigration Theme */

:root {
    --immigration-navy: #061b36;
    --immigration-navy-mid: rgba(12, 42, 80, 0.95);
    --immigration-navy-soft: rgba(6, 27, 54, 0.98);
    --immigration-accent: #00ccff;
    --immigration-primary: #0072c6;
    --immigration-primary-hover: #0067b0;
    --immigration-text: #dddddd;
    --immigration-text-muted: rgba(255, 255, 255, 0.65);
    --immigration-border: rgba(255, 255, 255, 0.12);
}

body.auth-page {
    background: var(--immigration-navy);
    color: var(--immigration-text);
}

.auth-section {
    background: linear-gradient(135deg, rgba(6, 27, 54, 1) 0%, rgba(12, 42, 80, 0.98) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.auth-card {
    background: var(--immigration-navy-soft);
    border: 1px solid rgba(0, 204, 255, 0.18);
    border-radius: 4px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    background: linear-gradient(135deg, rgba(12, 42, 80, 0.95) 0%, var(--immigration-navy) 100%);
    color: #fff;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 1px solid var(--immigration-border);
}

.auth-header i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--immigration-accent);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.auth-header h2 {
    margin: 10px 0;
    font-weight: 700;
    font-size: 2rem;
    color: #fff;
}

.auth-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    color: var(--immigration-text);
}

.auth-body {
    padding: 40px 30px;
    background: rgba(6, 27, 54, 0.85);
}

.form-label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.form-label i {
    color: var(--immigration-accent);
    margin-right: 5px;
}

.form-check-label {
    color: var(--immigration-text);
}

.form-control {
    padding: 12px 15px;
    border: 1px solid var(--immigration-border);
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: rgba(12, 42, 80, 0.45);
    color: #fff;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.form-control:focus {
    border-color: var(--immigration-accent);
    background: rgba(12, 42, 80, 0.65);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(0, 204, 255, 0.15);
}

.form-control.is-invalid {
    border-color: #ed0033;
    padding-right: calc(1.5em + 0.75rem);
    background-color: rgba(12, 42, 80, 0.45);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ed0033'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ed0033' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-valid {
    border-color: #288054;
    padding-right: calc(1.5em + 0.75rem);
    background-color: rgba(12, 42, 80, 0.45);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23288054' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: none;
    color: #ff6b8a;
    font-size: 0.875rem;
    margin-top: 5px;
}

.invalid-feedback.d-block {
    display: block;
}

.text-accent {
    color: var(--immigration-accent) !important;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--immigration-text-muted);
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--immigration-accent);
}

.password-toggle i {
    font-size: 1.2rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.password-strength.show {
    display: block;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    background: var(--immigration-accent);
    width: 0%;
    transition: all 0.3s ease;
}

.password-strength.weak::after {
    width: 33%;
    background: #ed0033;
}

.password-strength.medium::after {
    width: 66%;
    background: #fd9f08;
}

.password-strength.strong::after {
    width: 100%;
    background: #288054;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--immigration-border);
}

.auth-footer p {
    margin: 0;
    color: var(--immigration-text-muted);
}

.auth-footer a {
    color: var(--immigration-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Forgot Password Link */
.forgot-password {
    color: var(--immigration-accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    color: #fff;
    text-decoration: underline;
}

/* Buttons */
.btn-auth,
.btn-danger {
    background: linear-gradient(135deg, var(--immigration-primary) 0%, var(--immigration-primary-hover) 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: #fff;
}

.btn-auth:hover,
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 114, 198, 0.35);
    background: linear-gradient(135deg, var(--immigration-primary-hover) 0%, #005a94 100%);
    color: #fff;
}

.btn-auth:active,
.btn-danger:active {
    transform: translateY(0);
}

.btn-auth:disabled,
.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Checkbox */
.form-check-input {
    background-color: rgba(12, 42, 80, 0.45);
    border-color: var(--immigration-border);
}

.form-check-input:checked {
    background-color: var(--immigration-primary);
    border-color: var(--immigration-primary);
}

.form-check-input:focus {
    border-color: var(--immigration-accent);
    box-shadow: 0 0 0 0.2rem rgba(0, 204, 255, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-section {
        padding: 16px 0;
    }

    .auth-header {
        padding: 30px 20px;
    }

    .auth-header i {
        font-size: 2.5rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .auth-body {
        padding: 30px 20px;
    }
}

/* Alert Messages */
.alert {
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(40, 128, 84, 0.25);
    border: 1px solid rgba(40, 128, 84, 0.5);
    color: #fff;
}

.alert-danger {
    background-color: rgba(237, 0, 51, 0.18);
    border: 1px solid rgba(237, 0, 51, 0.45);
    color: #fff;
}

/* Field Animation */
.form-control,
.form-label {
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
