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

:root {
  --bg: #eef1f5;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #667;
  --accent: #2545D3;
  --border: #dde2ea;
  --topbar-h: 52px;
  --tab-h: 44px;
}

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-y;
  position: fixed;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, select { -webkit-user-select: text; user-select: text; font-size: 16px; }

.app { height: 100%; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* Topbar */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  padding-top: env(safe-area-inset-top);
}
.menu-btn { background: none; border: none; font-size: 24px; color: var(--accent); cursor: pointer; line-height: 1; }
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-spacer { flex: 1; }

/* Slide-Menü */
.side-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 240px;
  background: var(--card);
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  padding-top: env(safe-area-inset-top);
}
.side-menu.open { transform: translateX(0); }
.side-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.side-brand { font-size: 18px; font-weight: 700; color: var(--accent); }
.menu-close { background: none; border: none; font-size: 28px; color: var(--muted); cursor: pointer; line-height: 1; }
.side-nav { display: flex; flex-direction: column; padding: 8px; }
.side-link { text-align: left; background: none; border: none; padding: 14px 16px; font-size: 16px; color: var(--text); cursor: pointer; border-radius: 8px; }
.side-link:active, .side-link.active { background: var(--accent); color: #fff; }

.menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 99; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }

/* Content */
.content { flex: 1; overflow: hidden; position: relative; }
.page { position: absolute; inset: 0; display: none; flex-direction: column; padding: 12px; }
.page.active { display: flex; }

/* Dashboard */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-card { background: var(--card); padding: 16px; border-radius: 12px; border: 1px solid var(--border); text-align: center; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Buttons */
.btn { padding: 13px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: #1a3aa3; }
.btn-block { width: 100%; }
.btn-save { margin-top: 10px; }

/* Tab-Bar */
.tab-bar { display: flex; gap: 6px; margin-bottom: 10px; min-height: var(--tab-h); }
.tab-btn { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Form */
.form-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.tab-panel { display: none; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tab-panel.active { display: block; }
.fg { display: flex; flex-direction: column; margin-bottom: 8px; }
.fg-row { display: flex; gap: 8px; }
.fg-row .fg { flex: 1; }
.fg label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.fg input, .fg select, .fg textarea { padding: 9px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; background: var(--card); }
.fg input:focus, .fg select:focus, .fg textarea:focus { outline: none; border-color: var(--accent); }
.fg textarea { resize: none; }

/* Ratings */
.ratings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.rating-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; }
.rating-item label { font-size: 12px; font-weight: 600; grid-column: 1 / -1; margin-bottom: -2px; }
.rating-item input[type=range] { width: 100%; }
.rating-value { font-size: 14px; font-weight: 700; color: var(--accent); min-width: 20px; text-align: center; }

/* Liste */
.hotel-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.hotel-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.hotel-card h3 { font-size: 15px; }
.hotel-card .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 14px; }

.form-actions-row { display: flex; gap: 8px; margin-top: 10px; }
.form-actions-row .btn-save { flex: 1; }
.btn-danger { background: #e03131; color: #fff; padding: 13px 18px; }
.btn-danger:active { background: #c92a2a; }
.hc-top { display: flex; justify-content: space-between; align-items: center; }
.hc-rating { font-size: 15px; font-weight: 700; color: var(--accent); background: #eef1fb; padding: 2px 8px; border-radius: 6px; }
.hotel-card { cursor: pointer; }
.hotel-card:active { border-color: var(--accent); }

.rating-item .na-row { display: flex; align-items: center; gap: 4px; grid-column: 1 / -1; }
.rating-item .na-check { width: 14px; height: 14px; }
.rating-item .na-label { font-size: 10px; color: var(--muted); }
.rating-item.na input[type=range] { opacity: 0.3; }
.rating-item.na .rating-value { color: var(--muted); font-size: 11px; }
.btn-google { background: #2b8a3e; color: #fff; width: 100%; margin-bottom: 8px; }
.btn-google:active { background: #237032; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1a1a1a; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.status-switch { display: flex; gap: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 3px; margin-bottom: 10px; }
.status-opt { flex: 1; padding: 8px; border: none; background: none; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.status-opt.active { background: var(--accent); color: #fff; }
.status-opt[data-status=published].active { background: #2b8a3e; }

/* Tab-Bar bei 5 Tabs: scrollbar, kleiner */
.tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn { min-width: 72px; font-size: 12px; padding: 8px 4px; flex: 0 0 auto; }

/* Fotos-Tab */
.photo-hint { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 10px; padding: 8px; background: var(--bg); border-radius: 8px; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot { aspect-ratio: 4/3; border: 2px dashed var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--card); position: relative; }
.photo-slot span { font-size: 13px; font-weight: 600; color: var(--muted); }
.photo-slot::before { content: "+"; position: absolute; top: 6px; right: 10px; font-size: 18px; color: var(--border); }

/* Fertig-Tab (Aktionen) */
.done-label { font-size: 12px; font-weight: 600; color: var(--muted); display: block; margin-bottom: 6px; }
#tab-done .btn { margin-top: 10px; }
#tab-done .status-switch { margin-bottom: 0; }
