/* Modern Auth Styling */
body {
    background-color: #f0f2f5;
    font-family: 'Poppins', sans-serif;
}

.auth-container {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    position: relative;
}

/* Register page needs a wider card */
.auth-card.auth-card-wide {
    max-width: 800px;
}

.auth-header {
    background: linear-gradient(135deg, var(--btc-primary, #041463) 0%, var(--btc-primary-hover, #002bf7) 100%);
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.auth-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.auth-body {
    padding: 2.5rem;
}

.auth-body.text-center {
    text-align: center;
}

.form-group-modern {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label-modern {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control-modern {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

/* Adjust padding if no icon is present or if explicitly requested */
.form-control-modern.no-icon {
    padding-left: 1rem;
}

.form-control-modern:focus {
    border-color: var(--btc-primary, #041463);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(4, 20, 99, 0.1);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.form-control-modern:focus+.input-icon {
    color: var(--btc-primary, #041463);
}

.btn-auth {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--btc-primary, #041463) 0%, var(--btc-primary-hover, #002bf7) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(4, 20, 99, 0.3);
}

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

.btn-outline-modern {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: var(--btc-primary, #041463);
    border: 2px solid var(--btc-primary, #041463);
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline-modern:hover {
    background: var(--btc-primary, #041463);
    color: white;
    box-shadow: 0 5px 15px rgba(4, 20, 99, 0.2);
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.auth-link {
    color: var(--btc-primary, #041463);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    text-decoration: underline;
    color: var(--btc-primary-hover, #002bf7);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: #4a5568;
}

/* Activation Overlay Styles */
.activation-overlay {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: grid;
    place-items: center;
}

.activation-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .4s ease;
}

.activation-sheet {
    position: relative;
    z-index: 2;
    background: #fff;
    width: min(640px, 92vw);
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(.9);
    opacity: 0;
    transition: all .45s cubic-bezier(.22, .9, .2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.activation-overlay.show .activation-sheet {
    transform: scale(1);
    opacity: 1;
}

.activation-overlay.show .activation-backdrop {
    opacity: 1;
}

.success-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e3f2fd;
    color: var(--btc-primary, #041463);
    font-size: 32px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.success-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(4, 20, 99, 0.25);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(4, 20, 99, 0.28);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(4, 20, 99, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(4, 20, 99, 0);
    }
}

/* Custom Radio Buttons (Register Page) */
.custom-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.custom-radio {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.custom-radio:hover input~.checkmark {
    background-color: #ccc;
}

.custom-radio input:checked~.checkmark {
    background-color: var(--btc-primary, #041463);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-radio input:checked~.checkmark:after {
    display: block;
}

.custom-radio .checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Repeater Styles (Register Page) */
.zip-container {
    position: relative;
}

.btn-icon-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
}

.btn-delete {
    background-color: #ffebee;
    color: #ef5350;
}

.btn-delete:hover {
    background-color: #ef5350;
    color: white;
}

.btn-add {
    background-color: #e3f2fd;
    color: #1976d2;
}

.btn-add:hover {
    background-color: #1976d2;
    color: white;
}

/* Captcha (Register Page) */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-refresh {
    cursor: pointer;
    color: var(--btc-primary, #041463);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

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

/* Verification Icon (Verify Email Page) */
.verification-icon {
    font-size: 4rem;
    color: var(--btc-primary, #041463);
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Compact Register Page Styles */
.auth-card-compact {
    max-width: 900px;
    /* Slightly wider to fit content better side-by-side */
}

.auth-card-compact .auth-header {
    padding: 1rem 1.5rem;
}

.auth-card-compact .auth-title {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.auth-card-compact .auth-subtitle {
    font-size: 0.85rem;
}

.auth-card-compact .auth-body {
    padding: 1.5rem;
}

.auth-card-compact .form-group-modern {
    margin-bottom: 0.8rem;
}

.auth-card-compact .form-label-modern {
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
}

.auth-card-compact .form-control-modern {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
}

.auth-card-compact .btn-auth {
    padding: 0.6rem;
    font-size: 0.95rem;
}

.auth-card-compact .custom-radio {
    font-size: 0.85rem;
    padding-left: 25px;
}

.auth-card-compact .checkmark {
    height: 18px;
    width: 18px;
}

.auth-card-compact .checkmark:after {
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
}

.auth-card-compact .auth-footer {
    margin-top: 1rem;
    font-size: 0.85rem;
}

.auth-card-compact .zip-container .form-control-modern {
    padding: 0.5rem 0.8rem;
}

.auth-card-compact .btn-icon-small {
    width: 32px;
    height: 32px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
        min-height: auto;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
        min-height: 70vh;
    }

    .auth-card {
        border-radius: 12px;
    }

    .auth-header {
        padding: 1.25rem 1rem;
    }

    .auth-title {
        font-size: 1.35rem;
        margin-bottom: 0.25rem;
    }

    .auth-subtitle {
        font-size: 0.85rem;
    }

    .auth-body {
        padding: 1.25rem;
    }

    .form-group-modern {
        margin-bottom: 1rem;
    }

    .form-label-modern {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .form-control-modern {
        padding: 0.6rem 0.8rem 0.6rem 2.5rem;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .input-icon {
        font-size: 1.1rem;
        left: 0.8rem;
    }

    .btn-auth {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .auth-footer {
        margin-top: 1.5rem;
        font-size: 0.85rem;
    }

    /* Compact Register Page Mobile Adjustments */
    .auth-card-compact .auth-header {
        padding: 1rem 0.75rem;
    }

    .auth-card-compact .auth-body {
        padding: 1rem 0.75rem;
    }

    .auth-card-compact .auth-title {
        font-size: 1.2rem;
    }

    .auth-card-compact .form-group-modern {
        margin-bottom: 0.6rem;
    }

    .auth-card-compact .form-control-modern {
        padding: 0.5rem 0.75rem;
    }
}

/* Fix for navbar z-index issue */
#navbar_top {
    position: relative;
    z-index: 1050;
}

/* Large Checkbox for Accessibility */
.form-check-input-lg {
    width: 1.5em;
    height: 1.5em;
    margin-top: 0.1em;
    border: 3px solid var(--btc-primary, #041463);
    cursor: pointer;
}

.form-check-input-lg:checked {
    background-color: var(--btc-primary, #041463);
    border-color: var(--btc-primary, #041463);
}

.form-check-label-lg {
    font-size: 1.1rem;
    padding-left: 0.5rem;
    padding-top: 0.1rem;
    cursor: pointer;
    color: #2d3748;
}