.app-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.app-dialog-root.is-open {
    display: flex;
}

.app-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 23, 0.46);
    backdrop-filter: blur(2px);
}

.app-dialog-panel {
    position: relative;
    width: min(100%, 420px);
    max-height: min(82vh, 620px);
    overflow: hidden;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(28, 25, 23, 0.24);
}

.app-dialog-header {
    padding: 16px 18px 10px;
    border-bottom: 1px solid #f5f5f4;
}

.app-dialog-title {
    color: #1c1917;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.app-dialog-body {
    padding: 14px 18px 16px;
}

.app-dialog-message {
    color: #57534e;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-line;
}

.app-dialog-input-wrap {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.app-dialog-input-label {
    color: #78716c;
    font-size: 12px;
    font-weight: 700;
}

.app-dialog-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    background: #ffffff;
    color: #292524;
    padding: 8px 10px;
    font-size: 14px;
}

.app-dialog-input:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.app-dialog-actions {
    display: flex;
    gap: 10px;
    padding: 12px 18px 16px;
    background: #fafaf9;
}

.app-dialog-button {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid #d6d3d1;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
}

.app-dialog-button:disabled {
    opacity: 0.5;
    cursor: default;
}

.app-dialog-cancel {
    background: #ffffff;
    color: #57534e;
}

.app-dialog-cancel:hover:not(:disabled) {
    background: #f5f5f4;
}

.app-dialog-confirm {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
}

.app-dialog-confirm:hover:not(:disabled) {
    border-color: #115e59;
    background: #115e59;
}

.app-dialog-confirm.is-danger {
    border-color: #dc2626;
    background: #dc2626;
}

.app-dialog-confirm.is-danger:hover:not(:disabled) {
    border-color: #b91c1c;
    background: #b91c1c;
}

@media (max-width: 640px) {
    .app-dialog-root {
        align-items: flex-end;
        padding: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .app-dialog-panel {
        width: 100%;
        border-radius: 14px;
    }
}
