/* Modul 8.2 – Stakeholder: Erwartungen / Verträge */

.mod82-shell {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.mod82-section {
  padding: 1.3rem 1.5rem;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 16px 32px rgba(0,0,0,0.04);
  margin-top: 0.5rem;
}

.mod82-section h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.mod82-section p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 0.8rem;
}

.mod82-grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 900px) {
  .mod82-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mod82-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Tabellen */

.mod82-table-wrap {
  margin-top: 0.6rem;
  overflow-x: auto;
}

.mod82-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.mod82-table th,
.mod82-table td {
  border: 1px solid #e5e7eb;
  padding: 0.3rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.mod82-table th {
  background: #f3f4f6;
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mod82-table td {
  background: #fff;
}

.mod82-table input,
.mod82-table select,
.mod82-table textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font: inherit;
  font-size: 0.8rem;
}

.mod82-table textarea {
  min-height: 50px;
  resize: vertical;
}

.mod82-table .num-input {
  width: 50px;
  text-align: center;
}

/* Inputs & Textareas */

.mod82-input,
.mod82-select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.875rem;
}

.mod82-textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.875rem;
  resize: vertical;
}

/* Contract Cards (1-Pager pro Stakeholder) */

.mod82-contract-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.mod82-contract-card.expanded {
  border-color: #3b82f6;
  box-shadow: 0 8px 24px rgba(59,130,246,0.1);
}

.mod82-contract-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #f3f4f6;
}

.mod82-contract-header:hover {
  background: #fafafa;
  margin: -0.5rem;
  padding: 0.5rem;
  padding-bottom: 0.6rem;
  border-radius: 12px;
}

.mod82-contract-id {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.mod82-contract-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
}

.mod82-contract-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.mod82-clarity-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-weight: 600;
}

.mod82-clarity-badge.high {
  background: #d1fae5;
  color: #065f46;
}

.mod82-clarity-badge.medium {
  background: #fef3c7;
  color: #92400e;
}

.mod82-clarity-badge.low {
  background: #fee2e2;
  color: #991b1b;
}

.mod82-expand-icon {
  font-size: 1.2rem;
  color: #9ca3af;
  transition: transform 0.2s;
}

.mod82-contract-card.expanded .mod82-expand-icon {
  transform: rotate(180deg);
}

.mod82-contract-body {
  display: none;
  padding-top: 1rem;
}

.mod82-contract-card.expanded .mod82-contract-body {
  display: block;
}

/* Contract Sections */

.mod82-contract-section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.mod82-contract-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.mod82-contract-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mod82-contract-section-title .icon {
  font-size: 1rem;
}

/* RACI Grid */

.mod82-raci-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 0.3rem;
  font-size: 0.75rem;
}

.mod82-raci-header {
  background: #f3f4f6;
  padding: 0.3rem;
  text-align: center;
  font-weight: 600;
  border-radius: 4px;
}

.mod82-raci-cell {
  padding: 0.2rem;
}

.mod82-raci-cell input {
  width: 100%;
  text-align: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 0.2rem;
  font-size: 0.75rem;
}

/* Guardrails List */

.mod82-guardrails-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mod82-guardrails-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.mod82-guardrails-list li:last-child {
  border-bottom: none;
}

.mod82-guardrail-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  min-width: 100px;
  flex-shrink: 0;
}

.mod82-guardrail-input {
  flex: 1;
}

/* SLA Table */

.mod82-sla-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.mod82-sla-row.header {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
}

.mod82-sla-row input,
.mod82-sla-row select {
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

/* Risks & Assumptions */

.mod82-risk-row {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
}

.mod82-risk-row .mod82-grid {
  gap: 0.5rem;
}

/* Change Rules */

.mod82-change-rules {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.6rem;
}

.mod82-change-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.mod82-change-item:last-child {
  margin-bottom: 0;
}

.mod82-change-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
  min-width: 120px;
}

/* Sign-off Section */

.mod82-signoff {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0.8rem;
}

.mod82-signoff-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.mod82-signoff-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mod82-signoff-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #1e40af;
  text-transform: uppercase;
}

/* Mini Dialog Script */

.mod82-dialog-script {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  padding: 0.8rem;
}

.mod82-dialog-step {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.mod82-dialog-step:last-child {
  margin-bottom: 0;
}

.mod82-dialog-num {
  font-weight: 700;
  color: #7c3aed;
  min-width: 1.2rem;
}

/* Energy Log */

.mod82-energy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.mod82-energy-badge.positive {
  background: #d1fae5;
  color: #065f46;
}

.mod82-energy-badge.negative {
  background: #fee2e2;
  color: #991b1b;
}

.mod82-energy-badge.neutral {
  background: #f3f4f6;
  color: #6b7280;
}

/* Pills & Summary */

.mod82-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #d4d4d4;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: #f9fafb;
  color: #6b7280;
}

.mod82-summary-block {
  margin-top: 0.6rem;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
}

/* Actions */

.mod82-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* DoD Checklist */

.mod82-dod-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.mod82-dod-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}

.mod82-dod-list li:last-child {
  border-bottom: none;
}

.mod82-dod-list input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: #111;
}

/* Smells Box */

.mod82-smells-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 0.8rem;
}

.mod82-smell-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.mod82-smell-item:last-child {
  margin-bottom: 0;
}

.mod82-smell-bad {
  color: #991b1b;
  font-weight: 500;
}

.mod82-smell-fix {
  color: #166534;
}

/* Responsive */

@media (max-width: 640px) {
  .mod82-section {
    padding: 1rem;
  }

  .mod82-table {
    font-size: 0.75rem;
  }

  .mod82-raci-grid {
    grid-template-columns: 1fr;
  }

  .mod82-sla-row {
    grid-template-columns: 1fr;
  }

  .mod82-contract-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mod82-signoff-row {
    flex-direction: column;
  }
}
