/* ========== AUTHENTICATION PAGES STYLES ========== */
/* Aligns with bootstrap-msc.css design tokens and color scheme */

/* ========== AUTH CONTAINER ========== */
.auth-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100dvh;
    width: 100%;
    padding: 1rem;
    background-color: #f8f9fa;
    overflow-y: auto;
}

/* ========== AUTH CARD ========== */
.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 1.25rem 1.5rem;
    background-color: #fff;
    border: 1px solid #e0e2e7;
    border-radius: 16px;
    box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

/* ========== AUTH CARD SIZE VARIANTS ========== */
.auth-card.sm {
    max-width: 400px;
}

.auth-card.lg {
    max-width: 600px;
}

@media (min-width: 640px) {
    .auth-card {
        padding: 1.75rem 2rem;
        max-width: 500px;
        width: 100%;
    }

    .auth-card.sm {
        max-width: 450px;
    }

    .auth-card.lg {
        max-width: 650px;
        width: 100%;
    }
}

/* ========== AUTH HEADER ========== */
.auth-header {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.5rem;
    display: block;
    object-fit: contain;
}

.auth-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.4rem;
    font-weight: var(--font-weight-semi-bold);
    color: rgb(34, 34, 33);
    letter-spacing: -0.5px;
    font-family: var(--font-family-primary) !important;
}

@media (min-width: 640px) {
    .auth-title {
        font-size: 1.6rem;
    }
}

.auth-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.5;
    font-family: var(--font-family-primary) !important;
}

/* ========== AUTH CONTENT ========== */
.auth-content {
    margin-bottom: 0.75rem;
}

/* ========== AUTH FORM ========== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-form-group {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-semi-bold);
    font-size: 0.8rem;
    color: rgb(34, 34, 33);
    letter-spacing: 0.5px;
    font-family: var(--font-family-primary) !important;
}

.auth-form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgb(34, 34, 33);
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: var(--font-family-primary) !important;
    box-sizing: border-box;
}

.auth-form-input::placeholder {
    color: #6c757d;
}

.auth-form-input:focus {
    color: rgb(34, 34, 33);
    background-color: #fff;
    border-color: rgb(238, 212, 132);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(238, 212, 132, 0.25);
}

.auth-form-input:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

/* ========== AUTH ERROR ========== */
.auth-error {
    background-color: #edd1d5;
    border: 1px solid #dcc0c5;
    border-left: 4px solid rgb(166, 25, 46);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: rgb(166, 25, 46);
    font-size: 0.8rem;
    line-height: 1.5;
    box-sizing: border-box;
}

.auth-error-list {
    margin: 0;
    padding-left: 1.25rem;
}

.auth-error-list li {
    margin-bottom: 0.25rem;
}

.auth-error-list li:last-child {
    margin-bottom: 0;
}

/* ========== AUTH SUCCESS ========== */
.auth-success {
    background-color: #cce1df;
    border: 1px solid #b8cbc9;
    border-left: 4px solid rgb(0, 104, 94);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: rgb(0, 104, 94);
    font-size: 0.8rem;
    line-height: 1.5;
    box-sizing: border-box;
}

/* ========== AUTH BUTTON GROUP ========== */
.auth-button-group {
    display: flex;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

/* ========== AUTH BUTTON ========== */
.auth-button {
    width: 100%;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: var(--font-weight-semi-bold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s ease-in-out, background-color 0.15s ease-in-out;
    font-family: var(--font-family-primary) !important;
    box-sizing: border-box;
}

.auth-button-primary {
    color: #000;
    background-color: rgb(238, 212, 132);
    box-shadow: 0px 2px 8px 0 rgba(0, 0, 0, 0.2);
}

.auth-button-primary:hover:not(:disabled) {
    opacity: 0.9;
    background-color: rgb(238, 212, 132);
}

.auth-button-primary:focus:not(:disabled) {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(238, 212, 132, 0.25);
}

.auth-button-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ========== AUTH DIVIDER ========== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #dee2e6;
}

.auth-divider-text {
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.85rem;
    white-space: nowrap;
    font-family: var(--font-family-primary) !important;
}

/* ========== AUTH FOOTER ========== */
.auth-footer {
    text-align: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
    font-size: 0.8rem;
    color: #6c757d;
}

.auth-footer-text {
    margin: 0;
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.5;
}

.auth-footer-link {
    color: rgb(238, 212, 132);
    text-decoration: none;
    font-weight: var(--font-weight-semi-bold);
    transition: color 0.15s ease-in-out;
}

.auth-footer a {
    color: rgb(238, 212, 132);
    text-decoration: none;
    font-weight: var(--font-weight-semi-bold);
    transition: color 0.15s ease-in-out;
}

.auth-footer a:hover,
.auth-footer-link:hover {
    color: rgb(242, 224, 181);
    text-decoration: underline;
}

.auth-footer a:focus,
.auth-footer-link:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(238, 212, 132, 0.25);
    border-radius: 2px;
}

/* ========== AUTH CHECKBOX ========== */
.auth-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.auth-checkbox-input {
    width: 1em;
    height: 1em;
    margin-right: 0.5rem;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 0.25em;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    box-sizing: border-box;
}

.auth-checkbox-input:checked {
    background-color: rgb(238, 212, 132);
    border-color: rgb(238, 212, 132);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.auth-checkbox-input:focus {
    border-color: rgb(238, 212, 132);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(238, 212, 132, 0.25);
}

.auth-checkbox-label {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-family-primary) !important;
}

/* ========== LOADING STATE ========== */
.auth-loading {
    opacity: 0.6;
    pointer-events: none;
}

.auth-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 0.2em solid #f3f3f3;
    border-top: 0.2em solid rgb(238, 212, 132);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== VALIDATION MESSAGE ========== */
.validation-message {
    color: rgb(166, 25, 46);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ========== UTILITY CLASSES ========== */
.mt-4 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-muted {
    color: #6c757d;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 639px) {
    .auth-card {
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 2rem 1rem;
        background-color: transparent;
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-form {
        gap: 1rem;
    }
}
