/*
 * Minimal, semantic shell fallback.
 *
 * The full UI is produced by the compiled Tailwind bundle. These rules keep
 * authentication and the application frame usable if that bundle is missing
 * or damaged during a deployment, instead of falling back to document flow.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    position: relative;
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

#main-workspace {
    position: relative;
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow-y: auto;
}

#auth-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: auto;
    background: rgba(17, 24, 39, .4);
}

#auth-modal.hidden-important {
    display: none !important;
}

#auth-modal > div {
    position: relative;
    width: min(24rem, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 2rem;
    overflow-y: auto;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .28);
}

#auth-modal input,
#auth-modal button {
    max-width: 100%;
}

@media (max-width: 420px), (max-height: 560px) {
    #auth-modal > div {
        padding: 1.25rem;
    }
}
