/* =========================================================
   THEABS DASHBOARD
   AUTHENTICATION / LOGIN
========================================================= */

.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(56,189,248,0.12),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(56,189,248,0.07),
            transparent 35%
        ),
        var(--bg-primary);
}


/* =========================================================
   CARD
========================================================= */

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 34px;

    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.20),
        0 2px 8px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   HEADER
========================================================= */

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

.auth-logo {
    width: 60px;
    height: 60px;

    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    font-size: 24px;
}

.auth-logo-favicon {
    width: 60px;
    height: 60px;
    display: block;
    object-fit: contain;
}

.auth-header h1 {
    margin: 0;

    color: var(--text-primary);

    font-size: 23px;
    font-weight: 700;

    letter-spacing: -0.02em;
}

.auth-header p {
    margin: 7px 0 0;

    color: var(--text-secondary);

    font-size: 13px;
}


/* =========================================================
   FORM
========================================================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* =========================================================
   FORM GROUP
========================================================= */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   INPUT
========================================================= */

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper > i {
    position: absolute;

    top: 50%;
    left: 14px;

    transform: translateY(-50%);

    color: var(--text-muted);

    font-size: 14px;

    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    min-height: 46px;

    padding: 11px 14px 11px 40px;

    border: 1px solid var(--border-color);
    border-radius: 10px;

    outline: none;

    background: var(--bg-primary);
    color: var(--text-primary);

    font-family: inherit;
    font-size: 14px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

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

.input-wrapper input:hover {
    border-color: var(--text-secondary);
}

.input-wrapper input:focus {
    border-color: var(--accent-color);

    box-shadow:
        0 0 0 3px rgba(56,189,248,0.12);
}


/* =========================================================
   PASSWORD INPUT
========================================================= */

.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 7px;

    width: 34px;
    height: 34px;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 7px;

    background: transparent;

    color: var(--text-muted);

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.password-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}


/* =========================================================
   MESSAGE
========================================================= */

.auth-message {
    width: 100%;

    padding: 11px 13px;

    border-radius: 9px;

    font-size: 13px;
    line-height: 1.45;
}

.auth-message-danger {
    border: 1px solid rgba(239, 68, 68, 0.25);

    background: rgba(239, 68, 68, 0.08);

    color: #bd654b;
}

.auth-message-success {
    border: 1px solid rgba(34, 197, 94, 0.25);

    background: rgba(34, 197, 94, 0.08);

    color: #245f8f;
}

.auth-message-warning {
    border: 1px solid rgba(245, 158, 11, 0.25);

    background: rgba(245, 158, 11, 0.08);

    color: #b78943;
}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.auth-submit {
    width: 100%;
    min-height: 46px;

    margin-top: 2px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);

    box-shadow:
        0 8px 22px var(--focus-ring);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* =========================================================
   LOADING SPINNER
========================================================= */

.auth-submit .spinner {
    width: 15px;
    height: 15px;

    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--primary-contrast);

    border-radius: 50%;

    animation: authSpinner 0.7s linear infinite;
}

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


/* =========================================================
   FOOTER
========================================================= */

.auth-footer {
    margin-top: 25px;
    padding-top: 18px;

    border-top: 1px solid var(--border-color);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    color: var(--text-muted);

    font-size: 11px;
}

.auth-footer span:first-child {
    color: var(--text-secondary);
    font-weight: 600;
}

.auth-footer span:last-child {
    text-align: right;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 520px) {

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        max-width: 100%;
        padding: 27px 20px;

        border-radius: 15px;
    }

    .auth-header {
        margin-bottom: 25px;
    }

    .auth-logo {
        width: 54px;
        height: 54px;

        margin-bottom: 14px;

        border-radius: 14px;

        font-size: 22px;
    }

    .auth-logo-favicon {
    width: 34px;
    height: 34px;
    display: block;
    object-fit: contain;
}

.auth-header h1 {
        font-size: 20px;
    }

    .auth-footer {
        flex-direction: column;
        justify-content: center;

        text-align: center;
    }

    .auth-footer span:last-child {
        text-align: center;
    }
}


/* =========================================================
   SHORT SCREENS
========================================================= */

@media (max-height: 650px) and (min-width: 521px) {

    .auth-page {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .auth-card {
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-logo {
        width: 50px;
        height: 50px;

        margin-bottom: 10px;
    }
}
