:root {
  --bg: #0d0d11;
  --bg-elev: #16161d;
  --bg-card: #1c1c25;
  --border: #2a2a36;
  --text: #f2f2f5;
  --text-dim: #9a9aa8;
  --accent: #e4322b;       /* rockrött */
  --accent-2: #ffb000;     /* gult */
  --here: #18b56b;         /* grönt = här nu */
  --warn: #ff7a45;
  --radius: 14px;
  --maxw: 680px;
}

:root { color-scheme: dark; } /* gör inbyggda datum-/kalenderväljare synliga på mörkt tema */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Kalenderikon i datumfält syns tydligt på mörk bakgrund */
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .85; cursor: pointer; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13,13,17,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  height: 40px; width: auto; display: block;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  max-width: 50%;
}
.user-chip #userName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-initial {
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 800;
  flex: 0 0 auto;
}

/* ---------- Day tabs ---------- */
.day-tabs {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 6px;
  padding: 0 10px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: 1 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
}
.day-tab .dt-sub { display:block; font-size: 11px; font-weight: 500; }
.day-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Filters ---------- */
.filters { max-width: var(--maxw); margin: 0 auto; padding: 0 10px 10px; }
.seg {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
}
.seg button.active { background: var(--bg-elev); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* ---------- List ---------- */
.list { max-width: var(--maxw); margin: 0 auto; padding: 12px 10px 80px; }
.loading, .empty { text-align: center; color: var(--text-dim); padding: 40px 10px; }

.time-group { margin-bottom: 18px; }
.time-head {
  font-size: 13px; font-weight: 800; color: var(--accent-2);
  letter-spacing: .5px; margin: 4px 4px 8px;
  position: sticky; top: 0;
}

/* ---------- Band card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.card.want { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.card.conflict { border-color: var(--warn); }

.card-top { display: flex; align-items: flex-start; gap: 10px; }
.card-time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 14px;
  color: var(--text);
  min-width: 86px;
}
.card-time .dur { display:block; font-size:11px; color: var(--text-dim); font-weight:600; }
.card-main { flex: 1 1 auto; min-width: 0; }
.card-name { font-weight: 800; font-size: 17px; line-height: 1.2; }
.card-meta { display:flex; align-items:center; gap:8px; margin-top: 4px; flex-wrap: wrap; }

.flag { font-size: 14px; }
.stage-badge {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.stage-festival { color:#ff5a52; border-color:#ff5a52; }
.stage-rock     { color:#ffb000; border-color:#ffb000; }
.stage-sweden   { color:#4aa3ff; border-color:#4aa3ff; }
.stage-blaklader{ color:#18b56b; border-color:#18b56b; }
.stage-pistonhead{ color:#c47bff; border-color:#c47bff; }

.conflict-tag {
  font-size: 11px; font-weight: 800; color: var(--warn);
  border: 1px solid var(--warn); border-radius: 999px; padding: 2px 8px;
}

/* Actions */
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.act {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700; font-size: 14px;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.act .cnt { font-size: 12px; color: var(--text-dim); font-weight: 700; }
.act.on-want { background: var(--accent); border-color: var(--accent); color:#fff; }
.act.on-want .cnt { color: rgba(255,255,255,.85); }
.act.on-here { background: var(--here); border-color: var(--here); color:#04190f; }
.act.on-here .cnt { color: rgba(0,0,0,.6); }

/* People chips */
.people { display:flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.person {
  display:inline-flex; align-items:center; gap:5px;
  font-size: 12px; font-weight: 700;
  padding: 3px 9px 3px 3px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.person.is-here { color: var(--here); border-color: rgba(24,181,107,.5); }
.person .av {
  width: 18px; height: 18px; border-radius: 50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 10px; font-weight: 800; color: #fff;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  width: 100%; max-width: 380px;
}
.modal-card h2 { margin: 0 0 6px; }
.modal-card p { margin: 0 0 14px; color: var(--text-dim); font-size: 14px; }
.modal-card input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-size: 16px;
}
.login-logo { display:block; height: 120px; width:auto; margin: 2px auto 14px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.fld-label { display:block; font-size:12px; color: var(--text-dim); font-weight:700; margin: 10px 0 4px; }
.modal-card input + .fld-label { margin-top: 10px; }
.login-msg { margin-top: 12px; font-size: 14px; font-weight:600; color: var(--warn); min-height: 18px; }
.btn-primary {
  width: 100%; margin-top: 6px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 10px;
  padding: 13px; font-size: 16px; font-weight: 800; cursor: pointer;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; z-index: 60;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  transition: opacity .2s;
}
.toast.hidden { opacity: 0; pointer-events: none; }

/* ============================================================
   Plattform: resepicker, flikar, reskontra, förfrågningar, karta
   ============================================================ */

.main { min-height: 60vh; }
.view { }
.sub { color: var(--text-dim); font-size: 13px; }
.two { display:flex; gap: 8px; } .two > div { flex: 1; }

.icon-btn {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  width: 38px; height: 38px; border-radius: 10px; font-size: 18px; cursor: pointer; flex: 0 0 auto;
}
.trip-title { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* generell avatar */
.av {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 11px; font-weight: 800; color: #fff; margin-right: 5px;
}

/* Flikar */
.tabs {
  max-width: var(--maxw); margin: 0 auto; display: flex; gap: 6px;
  padding: 0 10px 8px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-dim); padding: 8px 14px; border-radius: 10px;
  font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.tab.active { background: var(--accent); border-color: var(--accent); color:#fff; }

/* Container för flik-innehåll och vyer */
#tabContent, #tripsView { max-width: var(--maxw); margin: 0 auto; padding: 12px 12px 90px; }
#tripsView .list, #tabContent .list { padding: 0; }
#tabContent .day-tabs, #tabContent .filters { padding-left: 0; padding-right: 0; }

/* Resepicker */
.picker-head { display:flex; align-items:center; justify-content:space-between; margin: 6px 2px 14px; }
.picker-head h2 { margin: 0; font-size: 20px; }
.trip-list { display:flex; flex-direction: column; gap: 10px; }
.trip-card {
  display:flex; align-items:center; gap: 12px; text-align: left;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; cursor: pointer; color: var(--text); width: 100%;
}
.trip-icon { font-size: 28px; flex: 0 0 auto; }
.trip-body { flex: 1 1 auto; min-width: 0; }
.trip-name { display:block; font-weight: 800; font-size: 17px; }
.trip-sub { display:block; color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.trip-go { font-size: 24px; color: var(--text-dim); flex: 0 0 auto; }

/* Knappar */
.btn-sm { width: auto; padding: 8px 12px; font-size: 13px; margin: 0; }
.btn-ghost {
  background: var(--bg-elev); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px; font-weight: 700; font-size: 14px; cursor: pointer; width: 100%;
}
.btn-danger {
  background: transparent; color: var(--warn); border: 1px solid var(--warn);
  border-radius: 10px; padding: 11px; font-weight: 700; font-size: 14px; cursor: pointer; width: 100%;
}
.link-btn { background: none; border: none; color: var(--accent-2); font-weight: 700; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.link-btn.danger { color: var(--warn); }
.card-h { margin: 0 0 10px; font-size: 16px; }
.seg-wrap { flex-wrap: wrap; }

/* Generella inputs i flikar */
#tabContent input, #tabContent select, #tabContent textarea,
#tripsView input, #tripsView select {
  width: 100%; padding: 11px 13px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 16px;
}
#tabContent .seg button, #tripsView .seg button { width: auto; }

/* Rader (medlemmar, inbjudningar, blocklista) */
.row { display:flex; align-items:center; justify-content:space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row .nm { font-weight: 600; display:flex; align-items:center; flex-wrap: wrap; }
.row .acts { display:flex; gap: 8px; flex: 0 0 auto; }
.role-tag { font-size: 11px; font-weight: 800; color: var(--accent-2); border:1px solid var(--accent-2); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }

/* Reskontra */
.share-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.share-list { display:flex; flex-direction: column; gap: 6px; }
.share-line { display:flex; align-items:center; gap: 8px; }
.share-line .chk { flex: 1 1 auto; }
#tabContent .personalInp { width: 120px; flex: 0 0 auto; }
.personalInp:disabled { opacity: .4; }
.chk { display:flex; align-items:center; gap: 4px; font-size: 13px; background: var(--bg-elev); border:1px solid var(--border); border-radius: 8px; padding: 7px 9px; cursor: pointer; }
.chk input { width: auto !important; }
.share-quick { display:flex; gap: 8px; margin: 8px 0; }
.settle-list { display:flex; flex-direction: column; gap: 8px; }
.settle-row { display:flex; align-items:center; justify-content:space-between; gap: 8px; background: var(--bg-elev); border:1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; }
.settle-row span { display:flex; align-items:center; }
.settle-arrow { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.bal-details { margin-top: 10px; } .bal-details summary { cursor: pointer; color: var(--text-dim); font-size: 13px; }
.bal-row { display:flex; align-items:center; justify-content:space-between; padding: 6px 0; font-size: 14px; }
.pos { color: var(--here); font-weight: 800; } .neg { color: var(--warn); font-weight: 800; }
.exp-row { display:flex; align-items:center; justify-content:space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.exp-row:last-child { border-bottom: none; }
.exp-main { min-width: 0; } .exp-desc { font-weight: 700; }
.exp-sub { color: var(--text-dim); font-size: 12px; margin-top: 2px; display:flex; align-items:center; flex-wrap: wrap; }
.exp-right { text-align: right; flex: 0 0 auto; } .exp-amt { font-weight: 800; font-variant-numeric: tabular-nums; }
.exp-acts { display:flex; gap: 6px; justify-content: flex-end; margin-top: 2px; }

/* Förfrågningar */
.poll-head { display:flex; align-items:flex-start; justify-content:space-between; gap: 8px; }
.poll-acts { display:flex; gap: 8px; flex: 0 0 auto; }
.poll-meta { margin: 0 0 10px; }
.closed-tag { font-size: 11px; color: var(--text-dim); border:1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.poll-opt { background: var(--bg-elev); border:1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.poll-opt.best { border-color: var(--accent-2); }
.poll-opt-top { display:flex; align-items:center; justify-content:space-between; gap: 8px; flex-wrap: wrap; }
.poll-opt-label { font-weight: 700; }
.tally { font-size: 12px; color: var(--text-dim); }
.t-yes { color: var(--here); } .t-no { color: var(--warn); }
.vote-btns { display:flex; gap: 6px; }
.vote-btn { background: var(--bg-card); border:1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 14px; cursor: pointer; }
.vote-btn.on { background: var(--accent); border-color: var(--accent); color:#fff; }
.vote-btn:disabled { opacity: .5; cursor: default; }
.vchips { display:flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.vchip .av { margin: 0; width: 20px; height: 20px; }
.opt-row { display:flex; align-items:center; gap: 8px; margin-bottom: 6px; }

/* Karta */
.map-controls { display:flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.map-controls .btn-sm { flex: 1 1 auto; }
.map-controls .active { background: var(--accent); border-color: var(--accent); color:#fff; }
.map-el { height: 60vh; min-height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-av { width: 30px; height: 30px; border-radius: 50%; display:flex; align-items:center; justify-content:center; color:#fff; font-weight: 800; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ov-handle { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight: 800; font-size: 14px; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.6); cursor: move; }

/* Join-sida */
.join-main { display:flex; justify-content:center; padding: 30px 16px; }
.join-card { max-width: 400px; }
.join-card .seg button { width: auto; }

/* Kvitton */
.receipts { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; align-items:center; }
.receipt-chip { display:inline-flex; align-items:center; gap:4px; background:var(--bg-elev); border:1px solid var(--border); border-radius:8px; padding:3px 6px; font-size:12px; }
.receipt-chip a { color:var(--text); text-decoration:none; display:inline-flex; align-items:center; gap:5px; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.receipt-thumb { width:30px; height:30px; object-fit:cover; border-radius:5px; border:1px solid var(--border); }
.add-receipt { display:inline-flex; align-items:center; gap:4px; cursor:pointer; }


/* ================= Alkofriend ================= */

/* Lägesväxlare Resor | Alkofriend */
.mode-switch {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 3px;
  padding: 0 14px 8px;
}
.mode-switch button {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.mode-switch button.active {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #1a1200;
}

/* Honeypot – utanför skärmen, aldrig display:none (bottar kollar det) */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; opacity: 0; }

/* Dryck-autocomplete */
.af-drink-picker { position: relative; }
.af-suggest {
  position: absolute;
  top: 100%; left: 0; right: 0;
  z-index: 30;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.af-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}
.af-suggest-item:last-child { border-bottom: none; }
.af-suggest-item:hover { background: var(--bg-card); }
.af-suggest-new { color: var(--accent-2); }
.af-suggest-count { float: right; color: var(--text-dim); font-size: 12px; }
.af-drink-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--accent-2);
  border-radius: 10px;
  padding: 10px 12px;
}
.af-chip-x {
  margin-left: auto;
  background: none; border: none; color: var(--text-dim);
  font-size: 16px; cursor: pointer;
}
.af-newdrink { margin-top: 4px; }
.af-place-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* Flöde */
.af-feed-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.af-feed-head h3 { margin: 0; }
.af-feed-toggle { display: flex; gap: 6px; }
.af-checkin { margin-bottom: 10px; }
.af-checkin-head { display: flex; align-items: center; gap: 10px; }
.af-checkin-who { display: flex; flex-direction: column; min-width: 0; }
.af-checkin-who .sub { font-size: 12px; }
.af-del { margin-left: auto; }
.af-checkin-drink { margin-top: 8px; }
.af-checkin-comment { margin-top: 6px; color: var(--text-dim); font-style: italic; }

/* Statistik + märken */
.af-stats { display: flex; gap: 8px; justify-content: space-between; text-align: center; }
.af-stat { flex: 1; display: flex; flex-direction: column; }
.af-stat b { font-size: 22px; color: var(--accent-2); }
.af-stat span { font-size: 12px; color: var(--text-dim); }
.af-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.af-badge { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.af-badge-icon { font-size: 34px; line-height: 1; }
.af-badge.locked { opacity: .45; filter: grayscale(1); }
.af-badge-points { color: var(--accent-2); font-size: 12px; font-weight: 700; }
.af-badge-date { color: var(--here); font-size: 12px; }

/* Badge-firande */
.af-celebrate { text-align: center; }
.af-celebrate-icons { font-size: 56px; line-height: 1.1; }
.af-badge-pop { display: inline-block; animation: afPop .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes afPop {
  0% { transform: scale(0) rotate(-30deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Vänner + QR */
.af-qr { display: flex; justify-content: center; margin: 10px 0; }
.af-qr img { border-radius: 10px; background: #fff; padding: 6px; }
.af-code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.af-code-row code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  letter-spacing: 2px;
  font-weight: 700;
}
.af-add-row { display: flex; gap: 8px; }
.af-add-row input { flex: 1; }
.af-scan { margin-top: 10px; text-align: center; }
.af-scan video {
  width: 100%;
  max-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}
.af-friend-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.af-friend-row:last-child { border-bottom: none; }
.af-friend-info { display: flex; flex-direction: column; min-width: 0; }
.af-row-actions { margin-left: auto; display: flex; gap: 6px; }
.af-friend-row > .btn-ghost { margin-left: auto; }

/* Karta */
.af-map-bar { margin-bottom: 10px; display: flex; }
.af-map-bar button { flex: 1; }
.af-map {
  height: 60vh;
  min-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 1;
}
.af-pin {
  font-size: 20px;
  line-height: 26px;
  text-align: center;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
}

/* Dryckestyp-chips + vänkategorier */
.af-type-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.af-type-chip {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.af-type-chip.active {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #1a1200;
}
.af-cat-select, select#afAudience {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  max-width: 160px;
}
select#afAudience { display: block; width: 100%; max-width: none; }
.af-cat-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.af-cat-tag {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
}
.af-cat-picker {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  margin: -4px 0 8px 44px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.af-cat-check { color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 8px; }

/* Glaset töms långsamt (Beer with me-mätaren) */
.af-glass-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.af-glass {
  flex: 1;
  height: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.af-glass-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b96e00, var(--accent-2));
  transition: width .6s ease;
}
.af-glass-pct { color: var(--text-dim); font-size: 11px; min-width: 32px; text-align: right; }
#afSubmit:disabled { opacity: .55; cursor: default; }

/* Farlig åtgärd (radera konto) */
.btn-danger { color: var(--accent) !important; border-color: var(--accent) !important; }

/* Kommentarstrådar / chatt */
.af-cmt-btn { margin-top: 8px; }
.af-thread { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.af-cmt-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.af-cmt { max-width: 85%; align-self: flex-start; background: var(--bg-elev); border: 1px solid var(--border);
          border-radius: 12px 12px 12px 4px; padding: 7px 11px; }
.af-cmt.me { align-self: flex-end; background: #2a2210; border-color: #4a3a10; border-radius: 12px 12px 4px 12px; }
.af-cmt-who { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
.af-cmt-msg { font-size: 14px; word-break: break-word; }
.af-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.af-quick-chip { background: var(--bg-elev); border: 1px solid var(--accent-2); color: var(--accent-2);
                 border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.af-quick-chip:hover { background: var(--accent-2); color: #1a1200; }
.af-quick-manage-btn { background: none; border: none; color: var(--text-dim); font-size: 12px;
                       cursor: pointer; margin-top: 6px; padding: 0; }
.af-quick-manage { margin-top: 6px; }

/* Större glas: typ-väljaren som glasgalleri + större ikon i flödet */
.af-type-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 76px;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 12px;
}
.af-type-ico { font-size: 30px; line-height: 1.1; }
.af-drink-ico { font-size: 22px; vertical-align: -3px; }
.af-suggest-item { font-size: 15px; }

/* Färgade SVG-glas + färgväljare */
.af-glass-svg { vertical-align: -6px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.af-type-chip .af-glass-svg { vertical-align: baseline; }
.af-color-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.af-color-chip {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer; padding: 0;
}
.af-color-chip.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent-2); }
.af-pin .af-glass-svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }

/* Publik-chips (flerval) */
.af-aud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.af-aud-chip {
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.af-aud-chip.active { background: var(--accent-2); border-color: var(--accent-2); color: #1a1200; }

/* Kartnålar: mörk platta bakom glasen (ljus kontur syns inte mot ljusa kartan) */
.af-pin {
  background: rgba(13,13,17,.85);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  padding: 2px 3px;
  display: inline-block;
  line-height: 0;
}

/* Senaste incheckningen per person markeras med guldram på kartan */
.af-pin-latest { border-color: var(--accent-2); border-width: 2px; box-shadow: 0 0 6px rgba(255,176,0,.5); }

/* Nivåspår för märken */
.af-badge-lvl { color: var(--accent-2); font-size: 13px; font-weight: 800; }
.af-lvl-dots { display: flex; gap: 4px; margin: 2px 0 4px; }
.af-lvl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--border); }
.af-lvl-dot.on { background: var(--accent-2); border-color: var(--accent-2); }
.af-badge.locked { opacity: .7; filter: none; }
