/* SunSolar — shared styles */
:root {
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --orange: #c2410c;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #047857;
  --warn: #b45309;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--amber-dark); }
button, input, select, textarea { font: inherit; }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 3px solid var(--amber);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a, .nav-links button {
  padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600;
  background: none; border: 0; cursor: pointer;
}
.nav-links a:hover, .nav-links button:hover { background: #fef3c7; }
.nav-links a[aria-current="page"] { background: #fef3c7; color: var(--amber-dark); }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }

/* Cards / buttons / forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 0;
  background: var(--amber); color: #1f1300; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #d97706; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f3f4f6; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text);
}
textarea { min-height: 80px; resize: vertical; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.error { color: var(--danger); background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.muted { color: var(--muted); }
.loading { color: var(--muted); padding: 24px 0; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #f9fafb; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 12px 18px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 50; max-width: calc(100% - 32px);
}
.toast.err { background: var(--danger); }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
