/* ─── Studio Acrux — Design System ─────────────────────────────── */
:root {
  --font: 'Helvetica Neue', Helvetica, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #fffefb;
  --fg: #111111;
  --muted: #737373;
  --border: #e4dcd3;
  --surface: #faf6f1;
  --radius: 12px;
  --accent: #7a3020;
  --accent-hover: #9e3e29;
  --accent-text: #ffffff;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.85;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
h1 { font-size: 2.7rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.35rem; }
h5 { font-size: 0.95rem; }

/* ─── Header ─────────────────────────────────────────────────────── */
.sa-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.sa-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.sa-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sa-brand:hover { color: var(--fg); }
.sa-brand-logo { display: block; flex-shrink: 0; }
.sa-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sa-nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s;
}
.sa-nav a:hover { color: var(--fg); }
.sa-nav-right { margin-left: auto; }
.sa-nav-right a.sa-link-primary {
  font-size: 14px;
  color: var(--fg);
  font-weight: 500;
}

/* ─── Page wrapper ───────────────────────────────────────────────── */
.sa-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}
.sa-page-sm {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

/* ─── Inputs ─────────────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s;
  box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--fg);
  outline: none;
}
.form-control::placeholder { color: #b0b0b0; }
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 5px;
  display: block;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font);
  letter-spacing: 0.01em;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 9px 18px;
  transition: all 0.15s;
  line-height: 1.4;
}
.btn-dark {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-dark:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-outline-dark {
  border: 1px solid var(--border);
  color: var(--fg);
  background: transparent;
}
.btn-outline-dark:hover { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-outline-secondary {
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  border-radius: var(--radius);
}
.btn-outline-secondary:hover { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-sm { padding: 6px 13px; font-size: 13px; }

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  background: #fff;
}
.card-body { padding: 1.4rem 1.5rem; }
.card-title { font-size: 14px; font-weight: 500; margin-bottom: 0; }

/* ─── Tables ─────────────────────────────────────────────────────── */
.table {
  font-size: 14px;
  border-color: var(--border);
}
.table thead th {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
}
.table td {
  vertical-align: middle;
  border-color: var(--border);
  padding: 12px 12px;
  color: var(--fg);
}
.table th { padding: 12px 12px; }
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: var(--surface);
  box-shadow: none;
}

/* ─── Badges ─────────────────────────────────────────────────────── */
.badge {
  font-weight: 500;
  font-size: 11px;
  border-radius: 3px;
  padding: 3px 7px;
  letter-spacing: 0.02em;
}
.bg-success { background: #16a34a !important; }
.bg-warning { background: #b45309 !important; }
.bg-secondary { background: #9ca3af !important; }
.bg-danger { background: #dc2626 !important; }

/* ─── Alerts ─────────────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  font-size: 14px;
  border: none;
  padding: 12px 16px;
}
.alert-danger { background: #fef2f2; color: #991b1b; }
.alert-success { background: #f0fdf4; color: #166534; }

/* ─── Page section headers ───────────────────────────────────────── */
.sa-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.sa-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.sa-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .sa-footer { flex-direction: column; align-items: center; gap: 0.25rem; text-align: center; }
}

/* ─── Misc ───────────────────────────────────────────────────────── */
a { color: var(--fg); }
a:hover { color: var(--muted); }
.text-muted { color: var(--muted) !important; }

/* Carousel */
.carousel { border-radius: var(--radius); overflow: hidden; }

/* ─── Hamburger button ───────────────────────────────────────────── */
.sa-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.sa-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}
.sa-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sa-hamburger.open span:nth-child(2) { opacity: 0; }
.sa-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile nav drawer ──────────────────────────────────────────── */
.sa-mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1.5rem 1rem;
  gap: 0;
}
.sa-mobile-nav a {
  font-size: 15px;
  color: var(--fg);
  text-decoration: none;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.sa-mobile-nav a:last-child { border-bottom: none; }
.sa-mobile-nav.open { display: flex; }

/* ─── Responsive header ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .sa-nav { display: none; }
  .sa-hamburger { display: flex; }
  .sa-header-inner { padding: 0 1.25rem; }
  .sa-page { padding: 2rem 1.25rem; }
  .sa-page-sm { padding: 2rem 1.25rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}
