/* Altanativ dashboard: lock screen, password and access pages. Brand orange #E65100. */
:root {
    --alt-orange: #E65100;
    --alt-orange-dark: #BF4300;
    --alt-ink: #202020;
    --alt-muted: #6b6b6b;
    --alt-surface: #ffffff;
    --alt-line: #e7e3df;
    --alt-scrim: rgba(24, 18, 14, 0.72);
}

/* ---------- self-contained basics (these screens must not depend on the theme) ---------- */
.alt-auth-body { margin: 0; }
.alt-lock, .alt-auth { font-family: "Poppins", "Segoe UI", Roboto, Arial, sans-serif; }
.alt-lock *, .alt-auth * { box-sizing: border-box; }
.alt-lock .visually-hidden, .alt-auth .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.alt-lock .form-control, .alt-auth .form-control {
    display: block; width: 100%; padding: 10px 14px; font-size: 15px; color: var(--alt-ink);
    background: #fff; border: 1px solid #d9d3cd; border-radius: 8px;
}
.alt-lock .form-control:focus, .alt-auth .form-control:focus {
    outline: none; border-color: var(--alt-orange); box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.18);
}
.alt-auth .form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--alt-ink); }
.alt-auth .mb-3 { margin-bottom: 14px; }
.alt-lock__button, .alt-auth__button {
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
    border: 1px solid var(--alt-orange); border-radius: 8px; font-size: 15px; cursor: pointer;
}

/* ---------- in-page lock overlay ---------- */
html.alt-locked body { overflow: hidden; }
html.alt-locked #main-wrapper { filter: blur(6px); pointer-events: none; user-select: none; }

.alt-lock {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--alt-scrim);
}
.alt-lock.is-visible { display: flex; }

.alt-lock__panel,
.alt-auth__panel {
    width: 100%;
    max-width: 380px;
    background: var(--alt-surface);
    color: var(--alt-ink);
    border-radius: 14px;
    padding: 32px 28px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    border-top: 4px solid var(--alt-orange);
}
.alt-lock__logo, .alt-auth__logo { width: 150px; height: auto; margin: 0 auto 20px; display: block; }
.alt-lock__avatar, .alt-auth__avatar {
    width: 64px; height: 64px; border-radius: 50%;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: #fff1e8; color: var(--alt-orange);
    font-size: 26px; font-weight: 600;
}
.alt-lock__title, .alt-auth__title { font-size: 20px; font-weight: 600; margin: 0 0 4px; color: var(--alt-ink); }
.alt-lock__name, .alt-auth__name { font-size: 15px; margin: 0 0 6px; color: var(--alt-ink); }
.alt-lock__hint, .alt-auth__hint { font-size: 13px; color: var(--alt-muted); margin: 0 0 18px; line-height: 1.45; }
.alt-lock__form, .alt-auth__form { text-align: left; }
.alt-lock__form .form-control, .alt-auth__form .form-control { height: 46px; }
.alt-lock__error, .alt-auth__error { min-height: 20px; margin: 6px 0 8px; font-size: 13px; color: #c62828; }
.alt-lock__button, .alt-auth__button {
    width: 100%; height: 46px;
    background: var(--alt-orange); border-color: var(--alt-orange); color: #fff; font-weight: 600;
}
.alt-lock__button:hover, .alt-lock__button:focus,
.alt-auth__button:hover, .alt-auth__button:focus { background: var(--alt-orange-dark); border-color: var(--alt-orange-dark); color: #fff; }
.alt-lock__button:disabled, .alt-auth__button:disabled { opacity: 0.7; }
.alt-lock__signout, .alt-auth__link { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--alt-muted); }
.alt-lock__signout:hover, .alt-auth__link:hover { color: var(--alt-orange); }

/* ---------- standalone auth pages (lock, change password) ---------- */
.alt-auth {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    background: linear-gradient(160deg, #2a1a10 0%, var(--alt-ink) 55%, #120c08 100%);
}
.alt-auth__panel { max-width: 420px; }
.alt-auth__rules { font-size: 12px; color: var(--alt-muted); margin: -4px 0 12px; }

/* ---------- permission matrix (staff accounts) ---------- */
.alt-perm-table th, .alt-perm-table td { vertical-align: middle; }
.alt-perm-table td.alt-perm-check { width: 110px; text-align: center; }
.alt-perm-table .form-check-input { float: none; margin: 0; width: 1.2em; height: 1.2em; }
.alt-perm-table .form-check-input:checked { background-color: var(--alt-orange); border-color: var(--alt-orange); }
.alt-perm-desc { font-size: 12px; color: var(--alt-muted); }
.alt-role-badge { font-size: 11px; padding: 4px 8px; border-radius: 10px; font-weight: 600; letter-spacing: 0.02em; }
.alt-role-super_admin { background: #fff1e8; color: var(--alt-orange-dark); }
.alt-role-admin { background: #ecebff; color: #3d35a6; }
.alt-role-staff { background: #eef2f0; color: #2f5d46; }

@media (prefers-reduced-motion: no-preference) {
    .alt-lock.is-visible .alt-lock__panel { animation: alt-lock-in 160ms ease-out; }
    @keyframes alt-lock-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
}
