/* U8: review-card modal — shared shell + per-area styles. */

.review-card-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 5500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4em 1em;
  overflow-y: auto;
}

.review-card-modal {
  background: var(--surface, #fff);
  color: var(--text, #111);
  border-radius: 8px;
  max-width: 720px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1em 1.5em;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.review-card-header h2 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
}

.review-card-close {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  line-height: 1;
  color: var(--muted, #64748b);
}

.review-card-body {
  padding: 1.25em 1.5em;
  overflow-y: auto;
  max-height: 70vh;
}

.review-card-loading {
  color: var(--muted, #64748b);
  text-align: center;
  padding: 2em;
}

.review-card-warning {
  background: #fef9c3;
  color: #713f12;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.6em 0.9em;
  margin-bottom: 1em;
  font-size: 0.85em;
}

.review-card-footer {
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 0.9em 1.5em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.review-card-error {
  color: #b91c1c;
  font-size: 0.85em;
  display: none;
}

.review-card-actions {
  display: flex;
  gap: 0.5em;
  justify-content: flex-end;
}

.review-card-btn {
  padding: 0.5em 1.1em;
  border-radius: 5px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg, #f8fafc);
  color: var(--text, #111);
  font-size: 0.9em;
  cursor: pointer;
}

.review-card-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.review-card-cancel:hover { background: var(--bg, #f1f5f9); }

.review-card-skip {
  color: var(--muted, #64748b);
}

.review-card-done {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}

.review-card-done:hover { filter: brightness(1.1); }

.review-card-error-msg {
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 6px;
  padding: 0.8em;
}

/* ----- Services area ----- */
.svc-help, .pri-help, .sop-help, .voice-help {
  font-size: 0.9em;
  color: var(--muted, #64748b);
  margin: 0 0 0.8em;
}

.svc-table, .pri-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75em;
}

.svc-table th, .pri-table th {
  text-align: left;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #64748b);
  padding: 0.4em 0.5em;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.svc-table td, .pri-table td {
  padding: 0.4em 0.5em;
  vertical-align: middle;
}

.svc-table input, .pri-table input {
  width: 100%;
  padding: 0.45em 0.5em;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  font: inherit;
  background: var(--surface, #fff);
  color: var(--text, #111);
  box-sizing: border-box;
}

.svc-delete, .pri-delete {
  background: none;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 4px;
  width: 1.8em;
  height: 1.8em;
  font-size: 1em;
  cursor: pointer;
  color: var(--muted, #64748b);
}

.svc-delete:hover, .pri-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.svc-empty, .pri-empty {
  text-align: center;
  color: var(--muted, #64748b);
  padding: 0.9em;
  font-style: italic;
}

.svc-add-btn, .pri-add-btn {
  background: var(--bg, #f8fafc);
  border: 1px dashed var(--border, #e2e8f0);
  border-radius: 5px;
  padding: 0.5em 1em;
  cursor: pointer;
  font-size: 0.9em;
  color: var(--text, #111);
}

.svc-add-btn:hover, .pri-add-btn:hover {
  background: var(--bg, #f1f5f9);
}

/* ----- SOPs area ----- */
.sop-card {
  margin-bottom: 1em;
}

.sop-label {
  display: block;
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 0.3em;
}

.sop-textarea {
  width: 100%;
  padding: 0.5em;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  font: inherit;
  resize: vertical;
  background: var(--surface, #fff);
  color: var(--text, #111);
  box-sizing: border-box;
}

/* ----- Voice area ----- */
.voice-section {
  margin-bottom: 1.4em;
}

.voice-section-title {
  font-size: 0.95em;
  font-weight: 600;
  margin: 0 0 0.4em;
}

.voice-profile-list {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.92em;
  line-height: 1.5;
}

.voice-empty {
  color: var(--muted, #64748b);
  font-style: italic;
  font-size: 0.9em;
}

.voice-sample {
  background: var(--bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 0.6em 0.8em;
  margin-bottom: 0.6em;
  font-size: 0.88em;
}

.voice-sample-label {
  font-size: 0.75em;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3em;
}

.voice-corrections,
.voice-gold-1,
.voice-gold-2 {
  width: 100%;
  padding: 0.55em;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 5px;
  font: inherit;
  resize: vertical;
  background: var(--surface, #fff);
  color: var(--text, #111);
  box-sizing: border-box;
  margin-bottom: 0.4em;
}

body.review-card-open {
  overflow: hidden;
}
