/* ==========================================================================
   Suna Ops — shared tool stylesheet
   Palette drawn from the public site (sand / limestone / sea / dark olive).
   ========================================================================== */

:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --ink: #1f2a0d;
  --muted: #6b6b6b;
  --brand: #0f5132;
  --brand-strong: #0a3d26;
  --accent: #c49a5a;
  --border: #e3ddd0;
  --danger: #b23b3b;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-header__bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}
.app-brand__logo { height: 26px; width: auto; }
.app-brand__name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.app-nav {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
  flex: 1;
}
.app-nav a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}
.app-nav a:hover { background: #efebe0; }
.app-nav a.is-active { background: var(--brand); color: #fff; }
.app-auth { margin-left: auto; }

.app-btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.app-btn:hover { border-color: var(--brand); color: var(--brand); }
.app-btn--ghost { background: transparent; }
.app-btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.app-btn--primary:hover { background: var(--brand-strong); color: #fff; }

.app-header__toast {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 0.75rem;
  font-size: 0.85rem;
  color: var(--brand);
}

/* ---------- Main ---------- */
.app-main { flex: 1; }
.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.app-title { font-size: 1.9rem; letter-spacing: -0.02em; margin-bottom: 0.35rem; }
.app-sub { color: var(--muted); max-width: 720px; margin-bottom: 2rem; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s, transform 0.15s;
}
.app-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.app-card h2 { font-size: 1.1rem; }
.app-card p { font-size: 0.88rem; color: var(--muted); }
.app-card__status {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
}

.app-empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--muted);
}
.app-empty p + p { margin-top: 0.5rem; }
.app-empty code, .app-note code {
  background: #efe9dc;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.app-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.app-note h2 { font-size: 1.05rem; margin-bottom: 0.4rem; }

/* ---------- Footer ---------- */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
}
.app-footer__motto {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.app-footer__nav {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.app-footer__nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
}
.app-footer__nav a:hover { color: var(--brand); }
.app-footer__copy { color: var(--muted); font-size: 0.8rem; }

/* ---------- Shell error ---------- */
.shell-error {
  margin: 1rem;
  padding: 1rem;
  background: #fbe9e9;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .app-header__bar { gap: 0.75rem; }
  .app-auth { margin-left: 0; }
}
