/* Admin auth pages — login, forgot password, reset */

body.auth-page {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

body.auth-page .auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem;
    background: url("../images/auth-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Light overlay for better readability on busy backgrounds */
body.auth-page .auth-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
  /*  background: rgba(248, 250, 252, 0.55); */
    pointer-events: none;
}

body.auth-page .auth-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 24px 48px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    margin-right: 18%;
}

body.auth-page .auth-card .auth-header {
    background: transparent;
    color: inherit;
    padding: 1rem 1.25rem 0.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: auto;
    border-bottom: none;
}

body.auth-page .oe-brand--auth {
    display: block;
    width: 100%;
    line-height: 0;
}

body.auth-page .oe-brand--auth .oe-brand-link {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    line-height: 0;
}

body.auth-page .oe-auth-logo-stage {
    width: 100%;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
}

body.auth-page .oe-brand--auth .oe-brand-logo {
    display: block;
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
}

body.auth-page .oe-auth-logo-stage .oe-brand-logo--default {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 88px !important;
    filter: none;
    transform: none;
}

body.auth-page .oe-auth-logo-stage .oe-brand-logo--uploaded {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0;
    filter: none;
    transform: scale(2.35);
    transform-origin: center center;
}

body.auth-page .auth-card .auth-body {
    padding: 1.75rem 2rem 1.5rem;
}

body.auth-page .auth-card .auth-footer {
    padding: 0.875rem 2rem 1.25rem;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e8edf3;
}

body.auth-page .auth-card .auth-footer em {
    color: #64748b;
    font-size: 0.8125rem;
    font-style: normal;
}

.auth-form-head {
    margin-bottom: 1.5rem;
    text-align: left;
}

.auth-form-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.auth-form-sub {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-alert-danger > i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.1rem;
}

.auth-form .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.oe-field {
    margin-bottom: 1.125rem;
}

.oe-field-control {
    position: relative;
}

.oe-field-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

.oe-field-control .form-control {
    width: 100%;
    padding: 0.75rem 0.875rem 0.75rem 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    font-size: 0.9375rem;
    color: #0f172a;
    background-color: #fff;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    background-image: none !important;
    background-repeat: no-repeat;
}

.oe-field-control .form-control::placeholder {
    color: #94a3b8;
}

.oe-field-control .form-control:hover {
    border-color: #94a3b8;
}

.oe-field-control .form-control:focus {
    border-color: #095bac;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(9, 91, 172, 0.1);
    outline: none;
}

.oe-field-control .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.08);
}

.oe-field-error {
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 0.35rem;
    padding-left: 0.15rem;
}

.oe-field-error:empty {
    display: none;
}

.auth-form .oe-field:last-of-type {
    margin-bottom: 0.5rem;
}

.oe-field-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0.25rem 0.35rem;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    border-radius: 0.25rem;
}

.oe-field-toggle:hover {
    color: #095bac;
    background: #f1f5f9;
}

.oe-field--password .form-control {
    padding-right: 2.75rem;
}

.auth-form .form-check {
    margin-bottom: 1.25rem;
}

.auth-form .form-check-input:checked {
    background-color: #095bac;
    border-color: #095bac;
}

.btn-auth-submit {
    width: 100%;
    padding: 0.8125rem 1rem;
    margin-top: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    background: #fd6418;
    box-shadow: 0 1px 2px rgba(253, 100, 24, 0.2);
    transition: background-color 0.15s, box-shadow 0.15s;
}

.btn-auth-submit:hover {
    color: #fff;
    background: #e85a14;
    box-shadow: 0 2px 8px rgba(253, 100, 24, 0.25);
}

.btn-auth-submit:active {
    background: #d95212;
    box-shadow: none;
}

.btn-auth-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(253, 100, 24, 0.35);
}

.auth-link {
    font-size: 0.875rem;
    color: #095bac;
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    color: #fd6418;
    text-decoration: underline;
}

.auth-body .oe-validation-summary,
.auth-card .oe-validation-summary {
    margin-bottom: 1.25rem;
}

#toast-container > .toast {
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 1;
}

#toast-container > .toast-success { background-color: #198754; }
#toast-container > .toast-error { background-color: #dc3545; }
#toast-container > .toast-warning { background-color: #fd6418; }
#toast-container > .toast-info { background-color: #095bac; }

@media (max-width: 575.98px) {
    body.auth-page .auth-wrapper {
        padding: 1rem;
        align-items: flex-start;
        justify-content: center;
        padding-top: max(1.25rem, env(safe-area-inset-top));
    }

    body.auth-page .auth-card .auth-header {
        padding: 0.55rem 0.75rem 0.65rem;
        min-height: 100px;
    }

    body.auth-page .oe-auth-logo-stage {
        height: 92px;
    }

    body.auth-page .oe-auth-logo-stage .oe-brand-logo--default {
        max-height: 76px !important;
    }

    body.auth-page .auth-card {
        max-width: 100%;
        margin-right: 0;
    }

    body.auth-page .auth-card .auth-body {
        padding: 1.5rem 1.5rem 1.25rem;
    }

    body.auth-page .auth-card .auth-footer {
        padding: 0.75rem 1.5rem 1rem;
    }

    .auth-form-title {
        font-size: 1.25rem;
    }
}
