/* Additions for the DB-driven A prototype.
   Reuses ../concepts/a-tokens.css + a.css; only platform/theme bits live here. */

[data-theme="letobar"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef5ea;
  --surface-3: #d6e5cc;
  --text: #1d241b;
  --muted: #5f6c58;
  --line: #d9e3d2;
  --line-strong: #bccdaf;
  --primary: #3daa19;
  --primary-hover: #2f8a12;
  --primary-ink: #ffffff;
  --accent: #3daa19;
  --focus: #3daa19;
  --focus-ring: rgba(61, 170, 25, 0.16);
  --selection-bg: #3daa19;
  --selection-ink: #ffffff;
  --eyebrow: #2f8a12;
  --btn-line: #c7d7bd;
  --toast-bg: #1d241b;
  --toast-ink: #ffffff;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.location-note {
  max-width: 32ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Two-level category rail: sections -> categories */
.rail-group {
  margin-bottom: 16px;
}

.rail-group-title {
  display: block;
  margin: 0 0 4px;
  padding: 6px 10px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rail-group .cat-link {
  padding-left: 20px;
}

.menu-category {
  margin-top: 20px;
}

.menu-category:first-of-type {
  margin-top: 0;
}

.menu-category-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-head .section-total {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.service-switch--one {
  grid-template-columns: 1fr;
}

.summary-row--muted span:last-child {
  color: var(--muted);
  font-weight: 500;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #e7ddcf;
  font-size: 13px;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-head .proto-brand {
  color: var(--eyebrow);
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 899px) {
  .menu-rail .cat-nav {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .rail-group {
    display: contents;
  }

  .rail-group-title {
    display: none;
  }

  .rail-group .cat-link {
    padding-left: 13px;
  }
}

/* Mobile header menu + slide-over navigation */
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  color: var(--text);
  flex: none;
}

.menu-btn:hover {
  background: var(--surface-2);
}

.menu-btn .icon {
  width: 20px;
  height: 20px;
}

@media (min-width: 900px) {
  .menu-btn {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.mobile-menu::backdrop {
  background: rgba(20, 16, 12, 0.42);
  backdrop-filter: blur(2px);
}

.mobile-menu .sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(360px, 100%);
  padding: 20px;
  overflow-y: auto;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.mobile-menu-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.mobile-menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--surface-2);
  border: 0;
  border-radius: var(--radius-full);
  color: var(--text);
}

.mobile-menu nav {
  display: grid;
  gap: 2px;
}

.mobile-menu nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 600;
}

.mobile-menu nav a:hover {
  color: var(--primary);
}

.mobile-menu nav a .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  background: var(--primary);
  border-radius: var(--radius-full);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 700;
}

.mobile-menu-foot {
  margin-top: auto;
  padding-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-menu-foot a {
  color: var(--primary);
  font-weight: 650;
}

/* History */
.history-list {
  display: grid;
  gap: 12px;
}

.history-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.history-card:hover {
  border-color: var(--line-strong);
}

.history-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.history-title {
  font-size: 15px;
  font-weight: 700;
}

.history-total {
  color: var(--primary);
  font-family: var(--font-number);
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
}

.history-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-empty {
  padding: 28px 8px;
  color: var(--muted);
}

/* Steward */
.steward-panel {
  display: grid;
  gap: 18px;
  max-width: 560px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.steward-current {
  color: var(--muted);
  font-size: 13px;
}

.steward-current strong {
  color: var(--primary);
  font-size: 18px;
}

.steward-actions {
  display: grid;
  gap: 8px;
}

.steward-actions .btn {
  justify-content: center;
}

@media (min-width: 600px) {
  .steward-actions {
    grid-template-columns: 1fr 1fr;
  }

  .steward-actions .btn:last-child:nth-child(odd) {
    grid-column: span 2;
  }
}


.readonly-bar {
  padding: 8px 16px;
  background: #fff4d6;
  border-bottom: 1px solid #efd9a8;
  color: #7a4a00;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
