/* Beandar — single small stylesheet, mobile-first, system fonts. */
:root {
  --bean: #4b2e19;
  --crema: #c89b6d;
  --paper: #faf7f2;
  --ink: #2b2118;
  --muted: #8a7a6b;
  --line: #e7ddd0;
  --accent: #1a6ee0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--bean); }
main { max-width: 860px; margin: 0 auto; padding: 0 1rem 3rem; }

/* Header / footer */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1rem; background: var(--bean); color: #fff;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: 0.45rem; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--crema);
  box-shadow: 0 0 0 3px rgba(200,155,109,0.35);
  animation: ping 2.2s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(200,155,109,0.5); }
  70% { box-shadow: 0 0 0 9px rgba(200,155,109,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,155,109,0); }
}
.site-footer { border-top: 1px solid var(--line); padding: 1rem; text-align: center; font-size: 0.85rem; }

/* Type */
h1 { font-size: 1.5rem; margin: 0.8rem 0 0.3rem; }
h2 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.hero { text-align: center; padding: 1rem 0 0.4rem; }
.hero h1 { font-size: 1.6rem; }
.hero p { margin: 0.2rem 0 0; }

/* Buttons & controls */
.btn {
  display: inline-block; padding: 0.55rem 0.95rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none;
  font-size: 0.95rem; cursor: pointer;
}
.btn:hover { border-color: var(--crema); }
.btn-primary { background: var(--bean); border-color: var(--bean); color: #fff; }
.btn-small { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
.btn-danger { border-color: #b3402e; color: #b3402e; }
.btn-danger:hover { background: #fdecea; border-color: #b3402e; }
.site-header .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.8rem 0; }

.controls { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: end; margin: 0.8rem 0; }
.control-group { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.geocode { display: flex; gap: 0.4rem; }
input, select, textarea {
  font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%;
}
select { padding-right: 1.6rem; }

/* Map */
#map { width: 100%; height: 46vh; min-height: 280px; border-radius: 12px; border: 1px solid var(--line); background: #eee; }
.map-small { height: 34vh; min-height: 220px; }

/* Results list */
.shop-list { list-style: none; margin: 1rem 0; padding: 0; }
.shop-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0 0.6rem;
  padding: 0.75rem 0.4rem; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.shop-row:hover { background: #fff; }
.shop-name { font-weight: 600; }
.shop-meta { text-align: right; white-space: nowrap; }
.shop-addr { grid-column: 1 / -1; font-size: 0.85rem; }
.stars { color: #b8860b; font-weight: 600; }
.tag {
  display: inline-block; padding: 0 0.45rem; border-radius: 99px;
  font-size: 0.7rem; font-weight: 600; vertical-align: 2px; text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tag-cart { background: #e3f2fd; color: #0d47a1; }
.tag-roaster { background: #efebe9; color: #4b2e19; border: 1px solid var(--crema); }
.tag-open { background: #e8f5e9; color: #1b5e20; }
.tag-closing { background: #fff8e1; color: #7a5c00; }
.tag-closed { background: #f1ece5; color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.toggle input { width: auto; }
.shop-dirs { display: block; font-size: 0.82rem; padding: 0 0.4rem 0.6rem; }
.shop-item { border-bottom: 1px solid var(--line); }
.shop-item .shop-row { border-bottom: none; }
.stars.big { font-size: 1.2rem; }
.dist { font-variant-numeric: tabular-nums; }

/* Detail page */
.detail .addr { margin: 0.2rem 0 0.6rem; }
.rating-line { margin: 0.1rem 0; }
.info-links { list-style: none; padding: 0; margin: 1rem 0; }
.info-links li { padding: 0.3rem 0; }
.hours ul { list-style: none; padding: 0.3rem 0 0; margin: 0; }
.hours li { padding: 0.1rem 0; font-size: 0.92rem; }

/* Reviews */
.reviews { margin-top: 1.5rem; }
.from-google { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.review { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.review header { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; font-size: 0.92rem; }
.review p { margin: 0.4rem 0 0; font-size: 0.95rem; }

/* Forms */
.form label { display: block; margin: 0.8rem 0 0.2rem; font-weight: 600; }
.form label .muted { font-weight: 400; }
.form input:not([type=hidden]), .form textarea { width: 100%; }
.form .hp { position: absolute; left: -9999px; top: -9999px; }
.choice-group { border: 1px solid var(--line); border-radius: 8px; margin: 0.8rem 0 0; padding: 0.6rem 0.8rem; }
.choice-group legend { font-weight: 600; padding: 0 0.3rem; }
.choice-group label.inline { display: inline-block; font-weight: 400; margin: 0.2rem 1rem 0.2rem 0; }
.choice-group input { width: auto; }
.notice { padding: 0.6rem 0.8rem; border-radius: 8px; margin: 0.6rem 0; }
.notice.ok { background: #e8f5e9; border: 1px solid #a5d6a7; }
.notice.err { background: #fdecea; border: 1px solid #f5b7b1; }
.notice.warn { background: #fff8e1; border: 1px solid #ffe082; }

/* Admin dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem; }
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: 0.8rem; color: var(--muted); }
.meter-row { margin: 0.6rem 0; }
.meter-label { font-size: 0.9rem; margin-bottom: 0.2rem; }
.meter { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; min-width: 2px; }
.meter-ok { background: var(--bean); }
.meter-warn { background: #b8860b; }
.meter-critical { background: #b3402e; }
.citybar-cell { width: 30%; min-width: 90px; }
.citybar { height: 10px; background: var(--crema); border: 1px solid var(--bean); border-radius: 99px; min-width: 2px; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 99px; font-size: 0.75rem; background: var(--line); }
.badge.pending { background: #fff3cd; }
.badge.approved { background: #d4edda; }
.badge.rejected, .badge.unpublished { background: #f8d7da; }
.inline-form { display: inline; }
.place-results { list-style: none; padding: 0; margin: 0.4rem 0; }
.place-results li { padding: 0.3rem 0; border-bottom: 1px dashed var(--line); }

@media (max-width: 560px) {
  .shop-meta { text-align: left; }
  .shop-row { grid-template-columns: 1fr; }
}
