:root {
  --ls-orange: #d35400;
  --ls-orange-deep: #e68a3d;
  --ls-ink: #3a3a3a;
  --ls-heading: #4a4a4a;
  --ls-muted: #6a6a6a;
  --ls-cream: #fff8f0;
  --ls-border: #e6d9c8;
  --ls-header: #555555;
  --ls-row: #f7f7f7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body.davesafe {
  font-family: "Open Sans", "Segoe UI", sans-serif;
  color: var(--ls-ink);
  background: #fff;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.ds-top {
  background: var(--ls-orange-deep);
  border-bottom: 3px solid #c46e28;
}

.ds-top-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ds-logo {
  height: 56px;
  width: min(280px, 55vw);
  object-fit: cover;
  object-position: center;
  display: block;
}

.ds-back {
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
}

.ds-back:hover {
  text-decoration: underline;
}

.ds-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px calc(64px + env(safe-area-inset-bottom));
}

.ds-section + .ds-section {
  margin-top: 36px;
}

.ds-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ds-title {
  font-family: "Roboto Slab", "Rockwell", serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ls-heading);
  margin: 0;
}

.ds-box {
  background: var(--ls-cream);
  border: 1px solid var(--ls-border);
  border-radius: 8px;
  padding: 18px 20px 16px;
}

.ds-subhead {
  color: var(--ls-orange);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 10px;
}

.ds-box ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: #222;
}

.ds-payouts-head {
  margin-top: 16px;
}

.ds-payouts {
  list-style: none;
  padding-left: 0;
}

.ds-payouts li {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 4px 0;
}

.ds-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.ds-stat {
  background: #fff;
  border: 1px solid var(--ls-border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}

.ds-stat-value {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: #333;
}

.ds-stat-value.unpaid {
  color: var(--ls-orange);
}

.ds-stat-label {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
  font-weight: 700;
}

.ds-table-wrap {
  overflow-x: auto;
  border: 1px solid #ddd;
}

.ds-cards {
  display: none;
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ds-activity-table {
  min-width: 640px;
}

.ds-empty {
  margin: 0;
  color: var(--ls-muted);
}

.ds-table th {
  background: var(--ls-header);
  color: #fff;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 12px;
  white-space: nowrap;
}

.ds-table td {
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #5a5a5a;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
}

.ds-table tbody tr:nth-child(even) {
  background: var(--ls-row);
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4a4a4a;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.owner-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.owner-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4a4a4a;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.owner-team {
  font-size: 0.75rem;
  color: #888;
  text-transform: none;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.status {
  font-weight: 700;
  color: #555;
  flex-shrink: 0;
}

.status.unpaid {
  color: var(--ls-orange);
}

.empty {
  color: #bbb;
}

@media (max-width: 800px) {
  .ds-top-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px 10px;
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .ds-logo {
    width: min(100%, 340px);
    height: 48px;
  }

  .ds-back {
    align-self: flex-start;
    font-size: 0.9rem;
  }

  .ds-page {
    padding: 20px 14px calc(40px + env(safe-area-inset-bottom));
  }

  .ds-section + .ds-section {
    margin-top: 28px;
  }

  .ds-title {
    font-size: 1.12rem;
  }

  .ds-box {
    padding: 14px;
  }

  .ds-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .ds-stat {
    padding: 10px 4px;
  }

  .ds-stat-value {
    font-size: 0.95rem;
  }

  .ds-table-wrap {
    display: none;
  }

  .ds-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .ds-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 14px 10px;
    background: #fff;
  }

  .ds-card.unpaid {
    border-left: 4px solid var(--ls-orange);
    background: #fffaf6;
  }

  .ds-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }

  .ds-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin: 10px 0 0;
  }

  .ds-card-grid div {
    min-width: 0;
  }

  .ds-card-grid dt {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
  }

  .ds-card-grid dd {
    margin: 2px 0 0;
    font-size: 0.95rem;
    color: #444;
    font-weight: 600;
  }
}
