/* Reset + base element styling. Structure comes from layout/spacing/typography, not decoration. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 var(--space-sm); font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 var(--space-sm); color: var(--text-secondary); }

a { color: var(--text-primary); text-decoration: none; }
a:hover { color: var(--textnewblue); }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: rgba(0,0,0,0.12); }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ================= APP SHELL ================= */

.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: var(--space-lg);
  max-width: var(--content-max-width);
  width: 100%;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.back-link:hover { color: var(--text-primary); }
.back-link svg { width: 14px; height: 14px; }

.page-header .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.section {
  margin-bottom: var(--space-lg);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 960px) {
  .app-shell { flex-direction: column; }
  .page-content { padding: var(--space-md); }
}
