/* =========================================
   AUTH - COMPACT PROFESSIONAL LOGIN
   ========================================= */

.authentication-wrapper {
    display: flex;
    flex-basis: 100%;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(180deg,
    rgba(var(--theme-color_rgb), 0.06) 0%,
    var(--background-color) 40%);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.authentication-wrapper.authentication-basic .authentication-inner {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* Decorative subtle elements */
.authentication-inner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-color_rgb), 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.authentication-inner::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-color_rgb), 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

@media(max-width: 575.98px) {
    .authentication-inner::before,
    .authentication-inner::after {
        display: none;
    }
}

/* =========================================
   COMPACT FORM CARD
   ========================================= */

.form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background-color: var(--background-color);
    padding: 1.75rem 1.5rem;
    width: 100%;
    border-radius: var(--radius-lg);
    margin: 0 auto;
    box-shadow: var(--shadow-md), 0 12px 40px rgba(var(--theme-color_rgb), 0.1);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.35s ease-out;
}

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

.form .logo {
    max-width: 70px !important;
    height: auto;
    transition: transform 0.25s ease;
}

.form .logo:hover {
    transform: scale(1.03);
}

.form h5 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0.25rem 0 0.1rem;
    text-align: center;
}

.form .text-center p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* =========================================
   COMPACT INPUT GROUPS
   ========================================= */

.flex-column > label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.825rem;
    margin-bottom: 0.35rem;
    display: block;
    letter-spacing: 0.01em;
}

.inputForm {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 0.85rem;
    transition: all 0.2s ease;
    background-color: var(--surface-color);
    gap: 0.6rem;
}

.inputForm i {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.inputForm:focus-within {
    border-color: var(--theme-color);
    background-color: var(--background-color);
    box-shadow: 0 0 0 3px rgba(var(--theme-color_rgb), 0.1);
}

.inputForm:focus-within i {
    color: var(--theme-color);
}

.input {
    border: none;
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0;
}

.input::placeholder {
    color: var(--text-muted);
}

.input:focus {
    outline: none;
    box-shadow: none;
}

/* Invalid state */
.inputForm:has(.is-invalid),
.inputForm:has(input:invalid:not(:placeholder-shown)) {
    border-color: var(--danger-color);
    background-color: rgba(220, 38, 38, 0.03);
}

.invalid-feedback {
    font-size: 0.775rem;
    color: var(--danger-color);
    margin-top: 0.15rem;
    margin-left: 0.25rem;
}

/* =========================================
   CAPTCHA - COMPACT ROW
   ========================================= */

.inputForm:has(#captcha) {
    height: auto;
    padding: 0.5rem 0.85rem;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
}

.inputForm:has(#captcha) .input {
    width: 110px;
    flex-shrink: 0;
}

#captcha {
    background: var(--background-color);
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}

#captcha:hover {
    border-color: var(--theme-color);
    filter: brightness(0.98);
}

.inputForm:has(#captcha) button {
    padding: 0.3rem;
    border-radius: var(--radius-xs);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inputForm:has(#captcha) button:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: white;
}

.inputForm:has(#captcha) button i {
    font-size: 0.9rem;
    margin: 0;
}

/* =========================================
   BUTTON - COMPACT PROFESSIONAL
   ========================================= */

.button-submit {
    margin: 0.5rem 0 0.25rem;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color-hover));
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    height: 44px;
    width: 100%;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(var(--theme-color_rgb), 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.button-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(var(--theme-color_rgb), 0.35);
    background: linear-gradient(135deg, var(--theme-color-hover), var(--theme-color));
}

.button-submit:active {
    transform: translateY(0);
}

.button-submit:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   UTILITY & MISC
   ========================================= */

.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.flex-row > div > label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.span {
    font-size: 0.8rem;
    color: var(--theme-color);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.span:hover {
    color: var(--theme-color-hover);
    text-decoration: none;
}

/* Alerts - Compact */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    border-left: 3px solid;
    font-size: 0.825rem;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
}

.alert-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger-color);
    border-left-color: var(--danger-color);
}

/* Password toggle */
#togglePassword {
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: var(--radius-xs);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    background: none;
    border: none;
}

#togglePassword:hover {
    color: var(--theme-color);
    background: rgba(var(--theme-color_rgb), 0.08);
}

#togglePassword i {
    font-size: 1rem;
    margin: 0;
}

/* Spinner */
.spinner-border {
    width: 0.9rem;
    height: 0.9rem;
    border-width: 0.125em;
}

/* =========================================
   RESPONSIVE - ULTRA COMPACT
   ========================================= */

@media(max-width: 575.98px) {
    .form {
        padding: 1.5rem 1.25rem;
        gap: 0.75rem;
    }

    .inputForm {
        height: 40px;
        padding: 0 0.75rem;
    }

    .inputForm:has(#captcha) {
        padding: 0.45rem 0.75rem;
    }

    .inputForm:has(#captcha) .input {
        width: 100px;
    }

    #captcha {
        width: 90px;
        height: 32px;
    }

    .button-submit {
        height: 42px;
        font-size: 0.9rem;
    }

    .flex-row {
        gap: 0.4rem;
    }
}

@media(max-height: 636px) {
    .auth-multisteps-bg-height {
        height: 100% !important;
    }
    .form {
        padding: 1.25rem;
        gap: 0.65rem;
    }
}

/* Dark mode support */
[data-theme="dark"] .authentication-wrapper {
    background: linear-gradient(180deg,
    rgba(var(--theme-color_rgb), 0.12) 0%,
    var(--background-color) 40%);
}

[data-theme="dark"] .form {
    background: var(--surface-color);
    border-color: var(--border-light);
}

[data-theme="dark"] .inputForm {
    background: var(--background-color);
    border-color: var(--border-light);
}

[data-theme="dark"] .inputForm:has(#captcha) {
    background: var(--background-color);
}

[data-theme="dark"] #captcha {
    background: var(--surface-color);
    border-color: var(--border-light);
}
