@font-face {
    font-family: Almarai;
    src: url("/fonts/Almarai-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Almarai;
    src: url("/fonts/Almarai-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Almarai;
    src: url("/fonts/Almarai-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-display: swap;
}

.lox {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: grid;
    place-items: center;
    padding: 1rem;
    font-family: Almarai, sans-serif;
    color: #1c2838;
    opacity: 0;
}

.lox[hidden] { display: none; }

.lox.is-open { opacity: 1; }

.lox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 23, 38, 0.48);
    backdrop-filter: blur(8px);
}

.lox[data-lox-page] { opacity: 1; }

.lox[data-lox-page] .lox-backdrop {
    background: #e7eef3;
    backdrop-filter: none;
}

body.lox-page {
    margin: 0;
    min-height: 100vh;
    background: #e7eef3;
    font-family: Almarai, sans-serif;
}

body.lox-lock { overflow: hidden; }

.lox-card {
    position: relative;
    z-index: 1;
    width: min(26.75rem, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.15rem 1.35rem 1.25rem;
    background: #fff;
    border: 1px solid #e6eef3;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
    text-align: center;
    transform: translateY(10px) scale(0.98);
}

.lox.is-open .lox-card,
.lox[data-lox-page] .lox-card { transform: none; }

.lox,
.lox-card { transition: opacity 0.2s ease, transform 0.22s ease; }

.lox-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #e6eef3;
}

.lox-brand {
    margin: 0;
    color: #12808d;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
}

.lox-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7b8794;
    cursor: pointer;
}

.lox-x:hover { background: #f4f7f9; color: #1c2838; }

.lox-mark {
    display: grid;
    place-items: center;
    width: 4.6rem;
    height: 4.6rem;
    margin: 1.35rem auto 0.15rem;
    border-radius: 50%;
    background: #e7f5f7;
    color: #12808d;
}

.lox-card h2 {
    margin: 0.85rem 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.45;
}

.lox-card #lox-desc {
    margin: 0;
    color: #5c6c7d;
    font-size: 0.98rem;
    line-height: 1.75;
}

.lox-note {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 1rem 0 0;
    padding: 0.8rem 0.9rem;
    background: #f4f7f9;
    border-radius: 12px;
    color: #3e4c5e;
    font-size: 0.92rem;
    line-height: 1.6;
}

.lox-note svg { flex: 0 0 auto; color: #128a98; }

.lox-error {
    margin: 0.75rem 0 0;
    color: #b44545;
    font-size: 0.88rem;
    font-weight: 700;
}

.lox-error[hidden] { display: none; }

.lox-actions {
    display: flex;
    flex-direction: row;
    gap: 0.65rem;
    margin-top: 1rem;
}

.lox-stay,
.lox-go {
    flex: 1 1 0;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
}

.lox-stay {
    background: #fff;
    color: #1c2838;
    border: 1px solid #d5dee6;
}

.lox-stay:hover { background: #f7fafb; }

.lox-go {
    background: #0e7c89;
    color: #fff;
    border: 1px solid #0e7c89;
}

.lox-go:hover { background: #0b6c78; }

.lox-stay:disabled,
.lox-go:disabled { cursor: progress; }

.lox-x:focus-visible,
.lox-stay:focus-visible,
.lox-go:focus-visible {
    outline: 3px solid rgba(18, 128, 141, 0.35);
    outline-offset: 2px;
}

.lox-spin {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lox-spin 0.7s linear infinite;
}

.lox-spin[hidden] { display: none; }

.workspace-topbar > a.workspace-signout {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--admin-border, #e1e7ed);
    background: #fff;
    border-radius: 7px;
    padding: 7px 12px;
    color: inherit;
    font-size: 14px;
    text-decoration: none;
}

@media (max-width: 420px) {
    .lox-card { padding: 1rem 0.9rem 1rem; border-radius: 18px; }
    .lox-card h2 { font-size: 1.15rem; }
    .lox-stay, .lox-go { font-size: 0.9rem; padding-inline: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .lox, .lox-card, .lox-spin { transition: none; animation: none; }
}

@keyframes lox-spin { to { transform: rotate(360deg); } }
