.auth-modal[hidden] {
    display: none;
}

.auth-modal {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        rgba(2, 4, 9, 0.82);
    backdrop-filter: blur(8px);
}

.auth-modal-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 22px;
    color: var(--text);
    background:
        linear-gradient(
            145deg,
            rgba(27, 31, 45, 0.99),
            rgba(13, 16, 25, 0.99)
        );
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.55);
}

.auth-modal-card h2 {
    margin: 8px 0 5px;
}

.auth-modal-card > p {
    margin: 0 0 22px;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-soft);
    background:
        rgba(255, 255, 255, 0.035);
    cursor: pointer;
}

.auth-modal-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-modal-card label {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
}

.auth-modal-card input {
    width: 100%;
    min-height: 45px;
    margin-top: 7px;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background:
        rgba(0, 0, 0, 0.24);
}

.auth-modal-card input:focus {
    border-color:
        rgba(167, 139, 250, 0.55);
    box-shadow:
        0 0 0 3px
        rgba(139, 92, 246, 0.09);
}

.auth-login-error {
    padding: 11px 12px;
    border: 1px solid
        rgba(248, 113, 113, 0.3);
    border-radius: 11px;
    color: #fca5a5;
    background:
        rgba(127, 29, 29, 0.2);
    font-size: 11px;
}

.auth-account-menu {
    position: fixed;
    z-index: 4000;
    width: 218px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background:
        rgba(16, 19, 29, 0.98);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45);
}

.auth-account-summary {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-bottom:
        1px solid var(--border);
}

.auth-account-summary strong {
    font-size: 13px;
}

.auth-account-summary span {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.auth-account-menu a,
.auth-account-menu button {
    display: flex;
    width: 100%;
    min-height: 37px;
    align-items: center;
    margin-top: 5px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    color: var(--text-soft);
    text-decoration: none;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.auth-account-menu a:hover,
.auth-account-menu button:hover {
    color: var(--text);
    background:
        rgba(255, 255, 255, 0.05);
}

.auth-floating-account {
    position: fixed;
    z-index: 2000;
    top: 18px;
    right: 20px;
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-soft);
    background:
        rgba(16, 19, 29, 0.92);
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.auth-admin-navigation {
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 0 12px;
    border-radius: 11px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 12px;
}

.auth-admin-navigation:hover {
    color: var(--text);
    background:
        rgba(255, 255, 255, 0.045);
}

.permission-denied {
    opacity: 0.38 !important;
    cursor: not-allowed !important;
}

.auth-locked-panel {
    position: relative;
    min-height: 250px;
}

.auth-locked-panel
> :not(.permission-overlay) {
    opacity: 0.15;
    pointer-events: none;
    user-select: none;
}

.permission-overlay {
    position: absolute;
    z-index: 25;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    padding: 30px;
    color: var(--text-soft);
    text-align: center;
    background:
        rgba(8, 10, 16, 0.72);
    backdrop-filter: blur(5px);
}

.permission-overlay span {
    font-size: 27px;
}

.permission-overlay strong {
    font-size: 13px;
}

.auth-console-locked {
    opacity: 0.58;
}

.auth-console-lock-message {
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid
        rgba(251, 191, 36, 0.22);
    border-radius: 11px;
    color: #fde68a;
    background:
        rgba(120, 53, 15, 0.16);
    font-size: 11px;
}

.guest-page {
    min-height: 100vh;
    color: var(--text);
    background: #090b12;
}

.guest-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    grid-template-columns:
        minmax(220px, 270px)
        minmax(0, 1fr);
}

.guest-sidebar {
    padding: 30px 23px;
    border-right:
        1px solid var(--border);
    background:
        rgba(10, 12, 19, 0.76);
}

.guest-main {
    display: grid;
    place-items: center;
    padding: 50px 30px;
}

.guest-content {
    width: min(680px, 100%);
}

.guest-content h1 {
    margin: 7px 0 4px;
    font-size:
        clamp(34px, 5vw, 62px);
    line-height: 1.03;
}

.guest-login-card {
    margin-top: 35px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(
            145deg,
            rgba(24, 28, 41, 0.9),
            rgba(14, 17, 27, 0.92)
        );
}

.guest-login-card h2 {
    margin: 0;
    font-size: 20px;
}

.guest-login-card p {
    margin: 8px 0 18px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.denied-card {
    width: min(520px, 100%);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 22px;
    text-align: center;
    background:
        rgba(17, 20, 31, 0.95);
}

.denied-card .denied-icon {
    font-size: 38px;
}

.denied-card h1 {
    margin: 12px 0 7px;
    font-size: 28px;
}

.denied-card p {
    margin: 0 0 20px;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .guest-shell {
        grid-template-columns: 1fr;
    }

    .guest-sidebar {
        border-right: 0;
        border-bottom:
            1px solid var(--border);
    }

    .guest-main {
        place-items: start;
        padding: 38px 20px;
    }
}
