.app-modal-root {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.55);
  z-index: 10000;
}

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

.app-modal-panel {
  width: min(92vw, 420px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  padding: 22px 20px;
  text-align: center;
}

.app-modal-title {
  margin: 0 0 10px;
  font-size: 22px;
  color: #111827;
}

.app-modal-message {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}

.app-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.app-modal-actions button {
  flex: 1 1 0;
  width: auto;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.app-modal-btn-primary {
  background: #111827;
  color: #fff;
}

.app-modal-btn-secondary {
  background: #e5e7eb;
  color: #111827;
}

.app-modal-btn-danger {
  background: #dc2626;
  color: #fff;
}

.app-modal-meta {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.app-modal-item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 12px;
  background: #f9fafb;
}

.app-modal-item-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}

.app-modal-item strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0.03em;
  color: #111827;
}

.app-modal-item.is-accent {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.app-modal-item.is-accent strong {
  color: #1d4ed8;
}

.app-modal-loading .app-modal-panel {
  width: min(90vw, 360px);
}

.app-modal-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: app-modal-spin 0.9s linear infinite;
}

body.app-modal-lock {
  overflow: hidden;
}

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

.work-confirm-modal .app-modal-btn-secondary {
  background: #eef4ff;
  color: #2457c5;
  border: 1px solid #c9d8ff;
}
