/* fototour - dunkle, warme Buehne. Fotos stehen vorn, die Oberflaeche zurueck. */
:root {
  --bg: #100e0c;
  --bg-soft: #17140f;
  --panel: #1e1a16;
  --panel-2: #262119;
  --line: #322b23;
  --text: #f6f1e8;
  --muted: #a49a8d;
  --accent: #e9a53f;
  --accent-dim: #8a6222;
  --good: #7fb87a;
  --bad: #d4715f;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

img, video { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* --- Kopf ---------------------------------------------------------------- */
header.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px;
  background: rgba(16, 14, 12, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 620; letter-spacing: .04em; font-size: 15px;
  color: var(--text); display: flex; align-items: center; gap: 9px;
}
.brand b { color: var(--accent); font-weight: 700; }
header.top nav { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }

/* --- Bedienelemente ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: #46402f; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #241a08; font-weight: 600; }
.btn.primary:hover { background: #f4b656; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: #4a2a25; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

input[type=text], input[type=password], input[type=date], input[type=number],
textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: #14110e; border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 14px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-dim); outline-offset: 1px; }
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .07em; }

.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px;
  background: #241f19; border: 1px solid var(--line); color: var(--muted);
}
.chip.on { background: var(--accent-dim); color: #fff3dc; border-color: transparent; }

/* --- Anmeldung ---------------------------------------------------------- */
.center-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #241c13 0%, var(--bg) 60%);
}
.login { width: 100%; max-width: 380px; }
.login h1 { font-family: var(--serif); font-size: 30px; margin: 0 0 4px; font-weight: 500; }
.login p.lead { color: var(--muted); margin: 0 0 22px; }

/* --- Reise-Uebersicht --------------------------------------------------- */
.trip-grid {
  display: grid; gap: 20px; padding: 26px 0 60px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.trip-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  aspect-ratio: 4 / 3; display: block; color: var(--text);
}
.trip-card:hover { text-decoration: none; border-color: #4a4132; }
.trip-card img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease; }
.trip-card:hover img { transform: scale(1.04); }
.trip-card .meta {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(8,7,6,.94), rgba(8,7,6,.0));
}
.trip-card .meta h3 { margin: 0; font-size: 18px; font-weight: 600; }
.trip-card .meta .sub { color: #cfc4b4; font-size: 12.5px; }
.trip-card .badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--accent); color: #241a08; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.trip-card.empty { display: grid; place-items: center; border-style: dashed; color: var(--muted); }

/* --- Arbeitsbereich ----------------------------------------------------- */
.toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 0; position: sticky; top: 53px; z-index: 30;
  background: linear-gradient(to bottom, var(--bg) 70%, rgba(16,14,12,0));
}
.tabs { display: flex; gap: 4px; background: var(--panel); padding: 4px;
  border-radius: 12px; border: 1px solid var(--line); }
.tabs button {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  padding: 7px 14px; border-radius: 9px; cursor: pointer; font-size: 14px;
}
.tabs button.on { background: var(--panel-2); color: var(--text); }

.daygroup { margin: 26px 0; }
.daygroup > h2 {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 15px; font-weight: 600; margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.daygroup > h2 .date { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.daygroup > h2 .place { color: var(--accent); }

.grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.cell {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: #191512; cursor: pointer; border: 2px solid transparent;
}
.cell img { width: 100%; height: 100%; object-fit: cover; }
.cell.marked { border-color: var(--accent); }
.cell.dim img { opacity: .35; filter: grayscale(.6); }
.cell .pick {
  position: absolute; top: 6px; left: 6px; width: 20px; height: 20px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.7);
  background: rgba(0,0,0,.35); display: grid; place-items: center;
  font-size: 12px; color: #fff;
}
.cell.selected .pick { background: var(--accent); border-color: var(--accent); color: #241a08; }
.cell .corner {
  position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px;
}
.cell .tag {
  font-size: 10.5px; padding: 2px 6px; border-radius: 6px;
  background: rgba(8,7,6,.78); color: #e8ded0;
}
.cell .tag.warn { background: rgba(212,113,95,.85); color: #fff; }
.cell.busy::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(233,165,63,.16) 0 10px, transparent 10px 20px);
  animation: slide 1.1s linear infinite;
}
@keyframes slide { to { background-position: 28px 0; } }

/* --- Upload ------------------------------------------------------------- */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--muted);
  transition: border-color .15s, background .15s;
}
.dropzone.hot { border-color: var(--accent); background: rgba(233,165,63,.07); color: var(--text); }
.uplist { margin-top: 14px; display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.upitem { display: grid; grid-template-columns: 1fr auto; gap: 8px;
  align-items: center; font-size: 13px; padding: 7px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.upitem .bar { grid-column: 1 / -1; height: 3px; background: #2b2520; border-radius: 2px; overflow: hidden; }
.upitem .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.upitem.done .bar i { background: var(--good); }
.upitem.err { border-color: #4a2a25; }
.upitem.err .bar i { background: var(--bad); }

/* --- Dialoge ------------------------------------------------------------ */
.sheet {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(6, 5, 4, .78); backdrop-filter: blur(6px); padding: 20px;
}
.sheet .box {
  width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
}
.sheet .box h2 { margin: 0 0 14px; font-size: 19px; font-family: var(--serif); font-weight: 500; }
.sheet .box.wide { max-width: 1100px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 18px; border-radius: 11px; box-shadow: var(--shadow);
  z-index: 200; font-size: 14px; max-width: 90vw;
}

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state h2 { font-family: var(--serif); font-weight: 500; color: var(--text); }

.spin { display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--accent-dim); border-top-color: var(--accent);
  animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .toolbar { top: 49px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
  header.top { gap: 10px; padding: 10px 14px; }
}
