* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 1rem; }
.site-header { background: #0f172a; color: #fff; }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  margin-bottom: 1rem;
}
.narrow { max-width: 540px; margin: 2rem auto; }
.grid { display: grid; gap: 1rem; }
.grid.one { grid-template-columns: 1fr; }
.grid.two, .grid.two-top { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.full { grid-column: 1 / -1; }
label span { display: block; margin-bottom: 0.35rem; font-weight: 600; }
input, select, textarea, button {
  font: inherit;
}
input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
textarea { resize: vertical; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
}
.button-secondary { background: #334155; }
.button-danger { background: #b91c1c; }
.actions-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.muted { color: #6b7280; }
.small { font-size: 0.92rem; }
.alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}
dt { font-weight: 700; margin-top: 0.5rem; }
dd { margin: 0 0 0.5rem; }
.stack { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.owner-item, .doc-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}
hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 1.25rem 0;
}
.filters {
  grid-template-columns: 2fr 1fr auto;
}
@media (max-width: 720px) {
  .filters { grid-template-columns: 1fr; }
  .owner-item, .doc-item, .header-row, .section-head { flex-direction: column; }
}
