body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 16px;
}

#display {
    width: 100%;
    height: calc(100vh - 140px);
    border-radius: 10px;
    overflow: hidden;
}

#status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #111827;
    font-size: 14px;
}

/* Login overlay */
#loginOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: grid;
    place-items: center;
    z-index: 9999;
}

.modal {
    width: min(420px, calc(100vw - 32px));
    background: #ffffff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.modal h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.modal label {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #374151;
}

.modal input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    outline: none;
    font-size: 14px;
}

#loginErr {
    margin-top: 10px;
    color: #b91c1c;
    font-size: 13px;
    min-height: 18px;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

.actions button {
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.actions button#loginOk {
    background: #111827;
    border-color: #111827;
    color: white;
}

#loginOverlay[hidden] {
    display: none !important;
}

