:root {
  --bg: #e8e2d8;
  --surface: rgba(255, 250, 243, 0.92);
  --sidebar: #231d24;
  --sidebar-soft: #342a36;
  --text: #201922;
  --muted: #7a6c75;
  --accent: #c56238;
  --accent-soft: rgba(197, 98, 56, 0.12);
  --line: rgba(32, 25, 34, 0.08);
  --shadow: 0 18px 40px rgba(46, 30, 20, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 217, 177, 0.6), transparent 24%),
    linear-gradient(160deg, #efe7dc 0%, #e8e2d8 55%, #ddd3c5 100%);
}

button { font: inherit; }

.desktop-bg {
  min-height: 100vh;
  padding: 22px;
}

.app-window {
  min-height: calc(100vh - 44px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 30px 70px rgba(35, 29, 36, 0.18);
  background: rgba(255, 250, 243, 0.38);
  backdrop-filter: blur(8px);
}

.window-bar {
  height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(245,237,228,0.92));
  border-bottom: 1px solid var(--line);
}

.window-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.window-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #e5a07e 100%);
  color: #fff7f0;
  font-size: 0.84rem;
  font-weight: 700;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-control {
  width: 34px;
  height: 30px;
  border-radius: 10px;
  border: 0;
  background: rgba(32, 25, 34, 0.06);
  cursor: pointer;
}

.window-control.close {
  background: rgba(198, 64, 57, 0.16);
}

.desktop-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 56px - 44px);
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-soft) 100%);
  color: #fff9f2;
  padding: 28px 22px;
}

.brand-block {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, #e5a07e 100%);
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  color: inherit;
  opacity: 0.72;
}

.brand-block h1,
.workspace-topbar h2,
.section-head h3 {
  margin: 0;
}

.nav-list {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.nav-item,
.action-card,
.primary-button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.nav-item {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  background: transparent;
  color: #f6efe7;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-card,
.surface-card,
.stat-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.sidebar-card {
  margin-top: 28px;
  padding: 18px;
  color: var(--text);
}

.workspace {
  padding: 26px;
}

.workspace-topbar,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.primary-button {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff8f1;
}

.owner-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 250, 243, 0.82);
  border: 1px solid var(--line);
  color: var(--muted);
}

.panel {
  display: none;
  margin-top: 22px;
}

.panel.active {
  display: block;
}

.stat-grid,
.dashboard-grid,
.action-grid,
.payment-card-grid {
  display: grid;
  gap: 18px;
}

.stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: 1.2fr 1fr;
  margin-top: 18px;
}

.stat-card,
.surface-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 12px 0 8px;
}

.stat-card span,
.stack-item span,
.payment-card p {
  color: var(--muted);
}

.stack-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.stack-item,
.payment-card,
.action-card {
  border-radius: 16px;
  background: #fffdf9;
  border: 1px solid var(--line);
}

.stack-item,
.payment-card {
  padding: 16px;
}

.action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.action-card {
  padding: 22px 18px;
  text-align: left;
}

.action-card:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.payment-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.payment-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.payout-card {
  margin-top: 18px;
}

.detector-card {
  margin-top: 18px;
}

.payout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.payout-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.payout-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--text);
}

.payout-button {
  margin-top: 18px;
}

.payout-destination {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .desktop-bg {
    padding: 12px;
  }

  .desktop-shell {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .dashboard-grid,
  .payment-card-grid,
  .payout-grid {
    grid-template-columns: 1fr;
  }
}
