/* ========== Authentication Pages Styles ========== */

.auth-page {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 25%, #e0d4ff 50%, #d8ccfe 75%, #ddd6fe 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* === Dot Grid Pattern Overlay === */
.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(124, 58, 237, 0.06) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    z-index: 0;
    pointer-events: none;
}

/* === Main Gradient Mesh Overlay === */
.auth-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 600px at 10% 10%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 500px 500px at 90% 85%, rgba(167, 139, 250, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 400px 400px at 50% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 350px 350px at 80% 20%, rgba(196, 181, 253, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 300px 300px at 20% 80%, rgba(109, 40, 217, 0.08) 0%, transparent 55%);
    z-index: 0;
    pointer-events: none;
    animation: meshShift 12s ease-in-out infinite alternate;
}

@keyframes meshShift {
    0% {
        opacity: 0.8;
        filter: hue-rotate(0deg);
    }

    50% {
        opacity: 1;
        filter: hue-rotate(8deg);
    }

    100% {
        opacity: 0.85;
        filter: hue-rotate(-5deg);
    }
}

.auth-section {
    padding: 50px 0 40px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

/* === Animated Floating Blobs (via box-shadows on auth-section) === */
.auth-section::before {
    content: '';
    position: fixed;
    top: -80px;
    left: -60px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.14) 0%, rgba(124, 58, 237, 0.04) 50%, transparent 70%);
    border-radius: 50%;
    animation: blobFloat1 9s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    filter: blur(2px);
}

.auth-section::after {
    content: '';
    position: fixed;
    bottom: -60px;
    right: -60px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, rgba(196, 181, 253, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    animation: blobFloat2 11s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    filter: blur(2px);
}

@keyframes blobFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    25% {
        transform: translate(50px, 40px) scale(1.08) rotate(3deg);
    }

    50% {
        transform: translate(20px, 70px) scale(0.95) rotate(-2deg);
    }

    75% {
        transform: translate(-30px, 30px) scale(1.03) rotate(1deg);
    }
}

@keyframes blobFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    25% {
        transform: translate(-40px, -50px) scale(1.1) rotate(-3deg);
    }

    50% {
        transform: translate(30px, -30px) scale(0.93) rotate(2deg);
    }

    75% {
        transform: translate(-15px, -60px) scale(1.05) rotate(-1deg);
    }
}

/* === Extra Floating Orbs === */
.auth-card::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 8%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
    border-radius: 50%;
    animation: orbPulse1 6s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes orbPulse1 {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-30px) scale(1.15);
        opacity: 1;
    }
}

/* === Glow ring behind the card === */
.auth-card::after {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 65%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateX(-50%) scale(1.3);
        opacity: 1;
    }
}

/* ========== Breadcrumb Navigation ========== */
.auth-breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.auth-breadcrumb .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.auth-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #9ca3af;
    font-weight: bold;
}

.auth-breadcrumb .breadcrumb-item a {
    color: #7c3aed;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-breadcrumb .breadcrumb-item a:hover {
    color: #6d28d9;
    text-decoration: underline;
}

.auth-breadcrumb .breadcrumb-item.active {
    color: #6b7280;
    font-weight: 500;
}

/* ========== Field Icons ========== */
.field-icon {
    color: #7c3aed;
    margin-right: 10px;
    font-weight: bold;
    font-size: 0.9rem;
}

.auth-icon {
    font-size: 4rem;
    color: #7c3aed;
    opacity: 0.8;
}

.submit-btn i {
    margin-right: 8px;
}

/* ========== Decorative Elements ========== */
.auth-decoration {
    position: relative;
    text-align: center;
    padding: 40px;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.decoration-circle.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -50px;
    left: -50px;
    animation: circleGrow1 7s ease-in-out infinite;
}

@keyframes circleGrow1 {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.15;
    }
}

.decoration-circle.circle-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    bottom: -30px;
    right: -30px;
    animation: circleGrow2 9s ease-in-out infinite;
}

@keyframes circleGrow2 {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.18;
    }
}

.decoration-icon {
    position: relative;
    z-index: 1;
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(124, 58, 237, 0.2));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
        filter: drop-shadow(0 8px 20px rgba(124, 58, 237, 0.2));
    }

    50% {
        transform: translateY(-50px);
        filter: drop-shadow(0 20px 30px rgba(124, 58, 237, 0.15));
    }
}

.auth-decoration h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.auth-decoration p {
    font-size: 1.1rem;
    color: var(--text-gray);
    position: relative;
    z-index: 1;
}

/* ========== Auth Card ========== */
.auth-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.5s ease-out;
}

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

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

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

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* ========== Form Styles ========== */
.auth-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Three columns for larger screens - for company register */
@media (min-width: 1200px) {
    .form-row {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .form-row.two-col {
        grid-template-columns: 1fr 1fr;
    }
}

.form-col {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-group-text {
    background: var(--bg-light);
    border: 1px solid #e5e7eb;
    color: var(--text-gray);
    font-size: 1rem;
}

.form-control {
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
    border-radius: 8px;
    height: auto;
    min-height: 48px;
}

.input-group>.form-control {
    border-right: 2px solid #e5e7eb;
    border-radius: 8px 0 0 8px;
}

.input-group>.input-group-text {
    border-right: none;
}

.input-group>.form-control:focus {
    border-right: 2px solid #7c3aed;
    border-color: #7c3aed;
}

.input-group:has(.form-control:focus) .input-group-text {
    border-color: #7c3aed;
    background: var(--white);
}

.form-control:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
    background-color: var(--white);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control.is-invalid {
    border-color: #ef4444 !important;
    background: #fff5f5;
}

.form-control.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08) !important;
}

.form-control.is-valid {
    border-color: #e5e7eb !important;
    background: var(--white);
}

.form-control.is-valid:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08) !important;
}

/* Error message styling */
.form-text.text-danger {
    display: none;
    color: #ef4444 !important;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.form-text.text-danger:not(.d-none) {
    display: block !important;
}

.form-text.text-danger.d-none {
    display: none !important;
}

.input-group .btn-outline-secondary {
    border: 2px solid #e5e7eb !important;
    border-left: none !important;
    border-radius: 0 8px 8px 0 !important;
    color: #6b7280 !important;
    background: var(--white) !important;
    padding: 12px 16px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group .btn-outline-secondary:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    border-left: none !important;
    color: #374151 !important;
}

.input-group .btn-outline-secondary:focus,
.input-group .btn-outline-secondary:active {
    border-color: #e5e7eb !important;
    border-left: none !important;
    box-shadow: none !important;
    color: #374151 !important;
    outline: none !important;
    background: var(--white) !important;
}

.form-text {
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.form-text.text-muted {
    color: var(--text-light) !important;
}

/* ========== Button Styles ========== */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ========== Footer Links ========== */
.auth-footer {
    text-align: center;
    color: var(--text-gray);
    margin-top: 20px;
    font-size: 0.95rem;
}

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

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

.forgot-password {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

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

/* ========== Checkbox Styles ========== */
.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Override Bootstrap's invalid color for checkbox label */
.form-check-input.is-invalid~.form-check-label,
.was-validated .form-check-input:invalid~.form-check-label {
    color: var(--text-gray) !important;
}

/* Override Bootstrap's invalid color for checked checkbox */
.form-check-input.is-invalid:checked,
.was-validated .form-check-input:invalid:checked {
    background-color: #2b7bf5 !important;
    border-color: #d5dce7 !important;
}

/* ========== Verification Steps ========== */
.verification-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-gray);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.step p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0;
}

.step.active p {
    color: var(--text-dark);
    font-weight: 600;
}

.step-divider {
    flex: 0.5;
    height: 2px;
    background: #d1d5db;
    margin: 0 10px;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.step-divider.active {
    background: var(--primary-color);
}

/* ========== OTP Input ========== */
.otp-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 30px 0;
}

.otp-input {
    width: 56px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
    cursor: text;
}

.otp-input:hover {
    border-color: #d1d5db;
}

.otp-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.08);
    outline: none;
}

.otp-input.is-invalid {
    border-color: #ef4444 !important;
    background: #fff5f5;
}

.otp-input.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08) !important;
}

.otp-input::-webkit-outer-spin-button,
.otp-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.otp-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ========== Resend Button ========== */
.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-link:disabled {
    color: var(--text-light);
    cursor: not-allowed;
}

/* ========== Alert Styles ========== */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #0c2d6b;
}

/* ========== Responsive Design ========== */
@media (max-width: 992px) {
    .auth-card {
        padding: 30px;
    }

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

    .decoration-icon {
        font-size: 60px;
    }

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .auth-section {
        padding: 100px 0 40px;
        margin-top: 10px;
    }

    .auth-card {
        padding: 20px;
        margin: 0 15px;
    }

    .auth-header h1 {
        font-size: 1.3rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .otp-input-group {
        gap: 8px;
    }

    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .verification-steps {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .step-divider {
        width: 2px;
        height: 30px;
        margin: 0;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* ========== Logo Preview ========== */
.logo-preview-container {
    text-align: center;
    padding: 15px;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-container:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

#logoPreview {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

#logoPreviewPlaceholder {
    color: #9ca3af;
}

#logoPreviewPlaceholder i {
    color: #d1d5db;
    margin-bottom: 8px;
}

#logoPreviewPlaceholder p {
    font-size: 0.85rem;
    margin: 0;
}

/* ========== Loading State ========== */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 8px;
}

/* ========== Error Messages ========== */
.form-text.text-danger {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
}

.form-text.text-danger.d-none {
    display: none;
}

/* ========== Input Validation ========== */
.form-control.is-invalid {
    border-color: #dc2626;
}

.form-control.is-invalid:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control.is-valid {
    border-color: #16a34a;
}

.form-control.is-valid:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* ========== English Numerals ========== */
#age {
    font-variant-numeric: lining-nums;
    direction: ltr;
    text-align: left;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Show number input spinners */
#age::-webkit-outer-spin-button,
#age::-webkit-inner-spin-button {
    -webkit-appearance: auto;
    appearance: auto;
    opacity: 1;
    cursor: pointer;
}

/* ========== Select Dropdown ========== */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
    cursor: pointer;
    background-color: var(--white);
}