/* CashewApps shared theme — header, brand colours, base font
   Include this in every app BEFORE your page-specific styles. */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
  --bg:     #0a0e1f;
  --bg2:    #10162a;
  --card:   #131929;
  --border: #1e2540;
  --accent: #60a5fa;
  --accent2:#3b82f6;
  --muted:  #94a3b8;   /* improved contrast over old #64748b */
  --text:   #eef2f7;
}

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── Cashew header bar ───────────────────────────────────────── */
.cashew-hdr {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  align-items: stretch;
  padding: 0 28px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

/* ── Brand (logo + name) ─────────────────────────────────────── */
.cashew-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease-in-out;
  flex-shrink: 0;
}
.cashew-brand:hover { border-bottom-color: var(--accent); }

.cashew-logo { width: 24px; height: 24px; object-fit: contain; }

.cashew-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}
.cashew-name-accent { color: var(--accent); }

/* ── App title (optional, centred, non-interactive) ──────────── */
.cashew-app-title {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  font-size: 14px;    /* match cashew-name so cap heights align */
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--accent);
  pointer-events: none;
  white-space: nowrap;
}

/* ── Desktop nav ─────────────────────────────────────────────── */
.cashew-nav {
  display: flex;
  align-items: stretch;
  margin-left: auto;
}
.cashew-nav a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.2px;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease-in-out, border-color 0.25s ease-in-out;
  white-space: nowrap;
}
.cashew-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* ── Hamburger ───────────────────────────────────────────────── */
.cashew-burger {
  display: none;
  margin-left: auto;  /* push to far right when nav is hidden */
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  padding: 14px 8px;
  line-height: 1;
  transition: color 0.25s ease-in-out;
  flex-shrink: 0;
}
.cashew-burger:hover { color: var(--accent); }

/* ── Mobile dropdown ─────────────────────────────────────────── */
.cashew-drop {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 4px 0;
  min-width: 160px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: none;
}
.cashew-drop.open { display: block; }
.cashew-drop a {
  display: block;
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  border-left: 2px solid transparent;
  transition: color 0.25s ease-in-out, border-color 0.25s ease-in-out, background 0.25s ease-in-out;
}
.cashew-drop a:hover { color: var(--text); border-left-color: var(--accent); background: rgba(255,255,255,0.03); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .cashew-hdr { padding: 0 16px; }
  .cashew-nav { display: none; }
  .cashew-burger { display: flex; align-items: center; }
}

/* ── Safe-area (notched phones) ──────────────────────────────── */
@supports (padding-top: env(safe-area-inset-top)) {
  .cashew-hdr { padding-top: max(env(safe-area-inset-top), 0px); }
}
