/* styles.css — Bilal Taxi. Türkis-blaues Tanger-Taxi-Theme.
 * Shop-Karten-Regeln portiert aus notebook-web/report.css. */

:root {
  --bg: #0c1a1f;
  --bg-2: #102a31;
  --panel: #123139;
  --panel-2: #17414b;
  --border: #1f4e59;
  --text: #eaf6f8;
  --muted: #93b4bb;
  --accent: #1cc2d4;       /* Tanger-Taxi-Türkis */
  --accent-2: #14a3b5;
  --danger: #ef5350;
  --fav: #ff5a8a;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Trebuchet MS", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--accent); }

/* ============ Splash ============ */
#splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; background: radial-gradient(120% 80% at 50% 20%, #14323a 0%, var(--bg) 70%);
  transition: opacity .45s ease; padding: var(--safe-top) 16px var(--safe-bot);
}
#splash.hide { opacity: 0; pointer-events: none; }
.splash-img {
  width: min(72vw, 300px); aspect-ratio: 1/1; object-fit: cover;
  border-radius: 28px; border: 3px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.splash-name {
  font-size: 27px; font-weight: 800; letter-spacing: .3px; margin: 0;
}
.splash-name span { color: var(--accent); }
.splash-sub { color: var(--muted); font-size: 13px; margin: -10px 0 0; }
.splash-spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.15); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Login-Gate ============ */
#authGate {
  position: fixed; inset: 0; z-index: 900; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg); text-align: center; padding: 24px;
}
body.needs-login #authGate { display: flex; }
#authGate img { width: 96px; height: 96px; border-radius: 22px; }
#authGate h1 { margin: 6px 0 0; font-size: 24px; }
#authGate h1 span { color: var(--accent); }
.ag-sub { color: var(--muted); margin: 0 0 6px; font-size: 14px; }
.ag-hint { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ============ App-Shell ============ */
.app { display: none; }
body.authed .app { display: block; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  background: rgba(12,26,31,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; }
.topbar .brand img { width: 28px; height: 28px; border-radius: 8px; }
.topbar .brand span { color: var(--accent); }
.topbar .spacer { flex: 1; }
.icon-btn {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  width: 38px; height: 38px; border-radius: 11px; font-size: 17px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:active { transform: scale(.94); }

.toolbar {
  display: flex; gap: 9px; align-items: center;
  padding: 11px 14px; position: sticky; top: 0;
}
.tab-title { font-size: 20px; font-weight: 800; margin: 14px 14px 2px; }
.tab-sub { color: var(--muted); font-size: 13px; margin: 0 14px 6px; }
.shop-search, .shop-sort {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 11px; padding: 9px 12px; font-size: 14px; outline: none;
}
.shop-search { flex: 1 1 auto; min-width: 0; }
.shop-search:focus, .shop-sort:focus { border-color: var(--accent); }

/* ============ Inhalt / Grid ============ */
.content { padding: 0 14px calc(var(--tabbar-h) + var(--safe-bot) + 24px); }
.shop-grid {
  display: grid; gap: 13px;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}
@media (min-width: 720px) { .shop-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

.empty {
  text-align: center; color: var(--muted); padding: 60px 20px;
}
.empty-icon { font-size: 44px; opacity: .6; }

/* ---- Shop-Karte (portiert aus report.css, angepasst) ---- */
.shop-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 15px;
  overflow: hidden; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.shop-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.shop-badge {
  position: absolute; top: 8px; left: 8px; z-index: 3; font-size: 11px; font-weight: 800;
  color: #04121c; background: var(--accent); padding: 3px 9px; border-radius: 999px;
}
.card-acts { position: absolute; top: 7px; right: 7px; z-index: 3; display: flex; gap: 6px; }
.card-act {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px;
  border: none; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(6,16,20,.62); color: #fff; backdrop-filter: blur(3px);
}
.card-act:active { transform: scale(.9); }
.card-fav.is-on { background: rgba(255,90,138,.92); }
.card-excl:hover { background: rgba(239,83,80,.9); }
.card-restore { background: rgba(28,194,212,.85); color: #04121c; }

.shop-thumb {
  display: block; width: 100%; aspect-ratio: 4/3; background: var(--bg-2);
  position: relative; overflow: hidden; align-items: center; justify-content: center; display: flex;
}
.shop-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.shop-thumb-ph { font-size: 30px; opacity: .5; }
.shop-info { display: flex; flex-direction: column; gap: 6px; padding: 11px 12px 13px; }
.shop-title { margin: 0; font-size: 14.5px; line-height: 1.25; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-title a { color: var(--text); text-decoration: none; }
.shop-title a:hover { color: var(--accent); }
.shop-price { font-size: 16px; font-weight: 800; color: var(--accent); }
.shop-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.shop-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 7px;
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--border);
}
.shop-chip--source { color: var(--text); border-color: var(--accent); }
.shop-chip--spec b { color: var(--text); font-weight: 700; }
.shop-note { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.shop-cta {
  margin-top: 4px; align-self: flex-start; font-size: 13px; font-weight: 700;
  color: var(--accent); text-decoration: none;
}

/* ============ Bottom-Tab-Nav ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bot)); padding-bottom: var(--safe-bot);
  background: rgba(12,26,31,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.tab-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; position: relative; padding-top: 6px;
}
.tab-btn .ti { font-size: 20px; line-height: 1; }
.tab-btn.is-active { color: var(--accent); }
.tab-btn.is-active .ti { transform: translateY(-1px); }
.tab-count {
  position: absolute; top: 3px; left: 50%; margin-left: 6px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: #04121c; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.tab-count.zero { display: none; }
.tab-btn[data-tab="excluded"] .tab-count { background: var(--danger); color: #fff; }
.tab-btn[data-tab="fav"] .tab-count { background: var(--fav); color: #fff; }
