.app-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.app-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1.5rem;
  padding: 2rem 1.5rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.case-list {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  height: fit-content;
}

.case-list h2 {
  margin: 0;
}

.case-list form {
  display: grid;
  gap: 0.6rem;
}

.case-list input,
.case-list select {
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.case-items {
  display: grid;
  gap: 0.6rem;
}

.case-item {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--surface-alt);
}

.case-item.active {
  border-color: var(--accent);
  background: #fff;
}

.case-detail {
  display: grid;
  gap: 1rem;
}

.case-header {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow);
}

.case-header h2 {
  margin: 0;
}

.case-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}

.app-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
}

.app-tab.active {
  background: var(--accent);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow);
}

.panel-card h3 {
  margin-top: 0;
}

.doc-list,
.task-list,
.approval-list,
.audit-list,
.extract-list,
.vendor-list {
  display: grid;
  gap: 0.6rem;
}

.inline-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.inline-actions button,
.inline-actions a {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.inline-actions .secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.notice {
  color: var(--muted);
  font-size: 0.9rem;
}

.extract-meta {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.35rem;
}

.card.needs-review {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.notice.needs-review {
  color: rgba(180, 83, 9, 0.95);
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.8rem;
}

.app-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: #0b1b3a;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  display: none;
  z-index: 80;
}

.toast.show {
  display: block;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}
