/* Vorstandsbereich SkiSport Baustetten */
:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --ink: #1c2633;
  --muted: #64707f;
  --line: #e1e6ec;
  --accent: #1d5ea8;
  --accent-ink: #ffffff;
  --accent-soft: #e6eff9;
  --top: #12355f;
  --red: #c23a3a;
  --red-soft: #fbeaea;
  --green: #1f7a4d;
  --green-soft: #e5f4ec;
  --amber: #9a6a00;
  --amber-soft: #fdf3dc;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 2px 8px rgba(16, 32, 56, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: 1.4rem 0 .5rem; }
code { background: var(--bg); padding: .15em .4em; border-radius: 5px; font-size: .9em; word-break: break-all; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Kopfzeile */
.top { background: var(--top); color: #fff; }
.topin { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { color: #fff; display: flex; align-items: center; gap: 10px; font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; color: #9cc3ee; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a, .who a { color: #d6e4f5; padding: 6px 11px; border-radius: 7px; }
.nav a:hover, .who a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.nav a.on, .who a.on { background: rgba(255,255,255,.16); color: #fff; }
.who { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.who form { margin: 0; }
.who .linkbtn { color: #d6e4f5; padding: 6px 11px; }

main.wrap { padding-top: 24px; padding-bottom: 24px; min-height: 60vh; }
.foot { color: var(--muted); font-size: .8rem; padding-bottom: 28px; }

/* Karten & Raster */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: visible; }
.card.narrow { max-width: 460px; margin: 30px auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid2 .card { margin-bottom: 0; }
.grid2 + * { margin-top: 18px; }
.empty { text-align: center; padding: 40px 20px; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pagehead h1 { margin: 0; }

/* Hinweise */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash.ok { background: var(--green-soft); border-color: #bfe3cf; color: #15553a; }
.flash.err { background: var(--red-soft); border-color: #efc4c4; color: #8e2424; }
.flash.info { background: var(--accent-soft); border-color: #c7dbf1; color: #174a85; }

/* Formulare */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 5px; font-weight: 600; font-size: .93rem; }
.form label small { font-weight: 400; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%; padding: 9px 11px;
  border: 1px solid #c9d2dc; border-radius: 8px; background: #fff;
}
input[type=checkbox] { width: auto; }
input[type=file] { padding: 7px; background: var(--bg); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .93rem; padding: 9px 15px; border-radius: 8px; cursor: pointer;
  border: 1px solid #c9d2dc; background: #fff; color: var(--ink); white-space: nowrap;
}
.btn:hover { background: #f4f7fa; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #174e8d; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { background: #a52f2f; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
form.inline { display: inline; }
.login h1 { margin-bottom: .2rem; }

/* Pfad & Suche */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 1.15rem; font-weight: 650; }
.crumbs span { color: var(--muted); font-weight: 400; }
.crumbs em { font-weight: 400; color: var(--muted); }
.search input { width: 300px; max-width: 100%; }

/* Hochladen */
.toolbar { display: flex; gap: 14px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap; }
.drop {
  flex: 1 1 420px; display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 2px dashed #b7c5d5; border-radius: var(--radius); background: #fafcfe; cursor: pointer; transition: .15s;
}
.drop svg { width: 34px; height: 34px; color: var(--accent); flex: none; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .uploading { margin-left: auto; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.drop .uploading[hidden] { display: none; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #c9d2dc; border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: 8px 12px; color: var(--ink); font-size: .9rem; font-weight: 600; }
.seg a + a { border-left: 1px solid #c9d2dc; }
.seg a.on { background: var(--accent-soft); color: var(--accent); }
.seg a:hover { text-decoration: none; background: #f4f7fa; }

/* Listen */
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tbody tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: #f8fafc; }
.list td.name a, .list td.name .nolink { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 550; min-width: 0; }
.list td.name a:hover span { color: var(--accent); }
.list td.name small { display: block; font-weight: 400; font-size: .83rem; color: var(--muted); }
.list td.name span { min-width: 0; overflow-wrap: anywhere; }
.list tr.up td { padding: 8px 14px; font-size: .9rem; }
.list .act { width: 1%; text-align: right; white-space: nowrap; }
.list.log td { font-size: .92rem; }
.ico { width: 30px; height: 30px; flex: none; }
.thumb { width: 30px; height: 30px; object-fit: cover; border-radius: 5px; flex: none; background: var(--bg); }
.stats { margin-top: 12px; }

/* Aktionsmenü */
details.menu { position: relative; display: inline-block; }
details.menu summary { list-style: none; cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 4px 10px 8px; border-radius: 7px; color: var(--muted); user-select: none; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary:hover, details.menu[open] summary { background: var(--accent-soft); color: var(--accent); }
.menubox {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 210px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,32,56,.16); padding: 6px;
}
.menubox.wide { min-width: 270px; }
.menubox > a, .menubox > button, .menubox form > button:not(.btn) {
  display: block; width: 100%; text-align: left; font: inherit; font-size: .93rem; padding: 8px 10px; border: 0; background: none;
  border-radius: 6px; color: var(--ink); cursor: pointer;
}
.menubox > a:hover, .menubox > button:hover, .menubox form > button:not(.btn):hover { background: var(--bg); text-decoration: none; }
.menubox .danger { color: var(--red); }
.menubox hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.menubox form { margin: 0; }
.menubox form.mini { display: flex; gap: 6px; padding: 6px; }
.menubox form.mini input { padding: 5px 8px; }

/* Kacheln */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.tile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tilehit { display: flex; flex-direction: column; padding: 10px; color: var(--ink); gap: 2px; }
.tilehit:hover { text-decoration: none; }
.tilehit:hover .tname { color: var(--accent); }
.tileimg { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--bg); border-radius: 7px; overflow: hidden; margin-bottom: 6px; }
.tileimg img { width: 100%; height: 100%; object-fit: cover; }
.tileimg .ico { width: 54px; height: 54px; }
.tname { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; line-height: 1.3; }
.tile details.menu { position: absolute; top: 14px; right: 14px; }
.tile details.menu summary { background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Kennzeichen */
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.blue { background: var(--accent-soft); color: var(--accent); }
.tag.grey { background: #eef1f4; color: #5b6673; }

/* Dialoge */
dialog { border: 0; border-radius: 12px; padding: 24px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(16,32,56,.3); }
dialog::backdrop { background: rgba(18, 30, 48, .45); }
dialog h2 { margin-bottom: .3rem; }
dialog p { margin: 0; }

/* Sonstiges */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.access { border-color: #bfe3cf; background: #f6fcf8; }
.access pre { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; white-space: pre-wrap; font-size: .92rem; }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filters label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.filters select, .filters input { min-width: 200px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: .9rem; z-index: 99; }

@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .hide-s { display: none; }
  .who { margin-left: 0; }
  .topin { gap: 8px; }
  h1 { font-size: 1.3rem; }
  .search, .search input { width: 100%; }
  .drop { flex-basis: 100%; }
  .card { padding: 16px; }
  .list td, .list th { padding: 9px 10px; }
  .filters label, .filters select, .filters input { width: 100%; min-width: 0; }
}
