.shutdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
}

.shutdown-overlay.shutdown-overlay-active {
    display: flex;
}

.shutdown-dialog {
    width: 360px;
    background: #d4d0c8;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #404040;
    border-bottom: 2px solid #404040;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, .5);
    font-family: Tahoma, sans-serif;
}

.shutdown-dialog-titlebar {
    height: 26px;
    background: #1B2689;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.shutdown-dialog-x {
    width: 20px;
    height: 18px;
    background: #d4d0c8;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.shutdown-dialog-x:active {
    border-top: 1px solid #404040;
    border-left: 1px solid #404040;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
}

.shutdown-dialog-body {
    display: flex;
    gap: 16px;
    padding: 18px 20px 6px;
}

.shutdown-dialog-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex: 0 0 auto;
}

.shutdown-dialog-content p {
    margin: 0 0 10px;
    font-size: 12px;
    color: #1a1a1a;
}

.shutdown-radio-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #1a1a1a;
    padding: 4px 0;
    cursor: pointer;
}

.shutdown-radio-row .underline {
    text-decoration: underline;
}

.shutdown-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px 18px;
}

.shutdown-dialog-actions button {
    font-family: Tahoma, sans-serif;
    font-size: 12px;
    min-width: 76px;
    padding: 5px 10px;
    background: #d4d0c8;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    cursor: pointer;
}

.shutdown-dialog-actions button:active {
    border-top: 1px solid #404040;
    border-left: 1px solid #404040;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
}

/* ---- Stage: sky "please wait" screen ---- */

.shutdown-wait-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 45%),
        radial-gradient(ellipse at 75% 65%, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 40%),
        linear-gradient(180deg, #2f7fd6 0%, #6fb3e8 55%, #bfe0f7 100%);
}

.shutdown-wait-screen.shutdown-stage-active {
    display: flex;
}

.shutdown-wait-text {
    font-family: Tahoma, sans-serif;
    font-weight: bold;
    font-style: italic;
    font-size: 22px;
    color: #f2811d;
    text-align: center;
    line-height: 1.4;
}

/* ---- Stage: final black screen ---- */
.shutdown-final-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
}

.shutdown-final-screen.shutdown-stage-active {
    display: flex;
}

.shutdown-final-text {
    font-family: Tahoma, sans-serif;
    font-weight: bold;
    font-size: 26px;
    color: #f2811d;
    text-align: center;
    line-height: 1.4;
    letter-spacing: .5px;
}