/* Chris Inn – Verwaltung: klar, freundlich, handytauglich */
:root {
  --green: #1d5c3c; --green-d: #133f29; --gold: #c9a14a; --cream: #faf6ec; --ink: #241f19;
  --muted: #7a7064; --line: #e6dfcf; --red: #a8322d; --ok: #2f7d4f; --r: 12px;
  --side: 250px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.admin { margin: 0; font: 16px/1.5 'Source Sans 3', system-ui, sans-serif; color: var(--ink); background: var(--cream); }
a { color: var(--green); }
h1, h2 { font-family: 'Fraunces', Georgia, serif; line-height: 1.2; }
h1 { font-size: 1.9rem; margin: .2em 0 .5em; }
h2 { font-size: 1.2rem; margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .9rem; } .ok { color: var(--ok); }

/* Kopf & Navigation */
.a-top { position: fixed; inset: 0 0 auto 0; height: 56px; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
  background: var(--green-d); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.a-brand { color: #fff; text-decoration: none; font: 400 1.35rem 'Uncial Antiqua', serif; }
.a-brand small { font: 600 .75rem 'Source Sans 3', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-left: .4rem; }
.a-site { margin-left: auto; color: #fff; opacity: .85; font-size: .9rem; }
.a-burger { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }
.a-nav { position: fixed; top: 56px; bottom: 0; left: 0; width: var(--side); background: #fff; border-right: 1px solid var(--line);
  padding: 1rem .6rem; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; z-index: 20; }
.a-nav a, .a-nav .linkbtn { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 10px; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: .98rem; }
.a-nav a span, .a-nav .linkbtn span { width: 1.4rem; text-align: center; }
.a-nav a:hover, .a-nav .linkbtn:hover { background: var(--cream); }
.a-nav a.on { background: var(--green); color: #fff; }
.a-user { margin-top: auto; border-top: 1px solid var(--line); padding-top: .6rem; }
.linkbtn { background: none; border: 0; width: 100%; cursor: pointer; font: inherit; }
.a-main { padding: 80px 2rem 4rem calc(var(--side) + 2rem); max-width: calc(1100px + var(--side)); }
body:not(:has(.a-top)) .a-main { padding: 2rem 1rem; max-width: none; }

@media (max-width: 860px) {
  .a-burger { display: block; }
  .a-site { display: none; }
  .a-nav { transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  body.nav-open .a-nav { transform: none; }
  .a-main { padding: 72px 1rem 5rem; }
}

/* Karten & Listen */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; margin-bottom: 1.2rem; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.list li:last-child { border: 0; }
.list small, .item small { color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 1.4rem 0; }
.tile { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.2rem .8rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; color: var(--ink); font-weight: 700; text-align: center; transition: .15s; }
.tile span { font-size: 2rem; }
.tile:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(29,92,60,.12); }

.item { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item > img, .noimg { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.noimg { display: grid; place-items: center; background: var(--cream); font-size: 1.7rem; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-body a { text-decoration: none; color: var(--ink); }
.item-actions { display: flex; gap: .4rem; align-items: center; }
.item-actions form { margin: 0; }
.faded { opacity: .55; }
details summary { cursor: pointer; color: var(--green); font-weight: 600; margin-top: .3rem; }
details form { margin: .6rem 0; }
@media (max-width: 600px) { .item { flex-wrap: wrap; } .item-actions { width: 100%; justify-content: flex-end; } }

.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .45rem 1rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.tabs a.on { background: var(--green); color: #fff; border-color: var(--green); }

/* Formulare */
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; margin-bottom: 1rem; }
.form label small { font-weight: 400; color: var(--muted); }
input, textarea, select { font: inherit; padding: .65rem .8rem; border: 1px solid #d8cfbb; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
textarea { resize: vertical; } .mono { font: 14px/1.5 ui-monospace, Menlo, monospace; }
label.check { flex-direction: row !important; align-items: center; gap: .5rem !important; font-weight: 600; }
label.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--green); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
.row .wide { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; }
.inline-form label { margin: 0; flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: .3rem; font-weight: 600; }
.special-row { padding-bottom: .5rem; margin-bottom: .8rem; border-bottom: 1px dashed var(--line); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .65rem 1.2rem; border-radius: 10px; border: 1px solid #d8cfbb;
  background: #fff; color: var(--ink); font: 700 1rem 'Source Sans 3', sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-d); }
.btn-danger { color: var(--red); border-color: #e3c3c1; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: .4rem .75rem; font-size: .9rem; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.actions form { margin: 0; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%); padding: 1rem 0 .4rem; z-index: 5; }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed #e3c3c1; }

.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; white-space: pre-line; }
.flash-ok { background: #e3f2e8; color: #1e5a35; }
.flash-err { background: #f8e1df; color: #8a2622; }
.flash-info { background: #fbf1d8; color: #6b5317; }

.imgfield { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.imgfield img { width: 140px; height: 100px; object-fit: cover; border-radius: 10px; }
.imgfield label { flex: 1; margin: 0; }

/* Login */
.auth-box { max-width: 420px; margin: 8vh auto; background: #fff; padding: 2rem; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.08); }
.auth-box h1 { font-family: 'Uncial Antiqua', serif; color: var(--green); }
.auth-box .btn { width: 100%; }

/* Alben & Fotos */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.album { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.album img, .album .noimg { width: 100%; height: 150px; object-fit: cover; border-radius: 0; }
.album strong { padding: .6rem .8rem 0; } .album small { padding: 0 .8rem .7rem; color: var(--muted); }
.album:hover { border-color: var(--green); }
.dropzone { display: grid; place-items: center; border: 2px dashed #cfc3a8; border-radius: var(--r); padding: 2rem 1rem; cursor: pointer; background: var(--cream); font-weight: 700; text-align: center; position: relative; }
.dropzone.over { border-color: var(--green); background: #e9f3ec; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress { margin-top: 1rem; background: var(--cream); border-radius: 99px; overflow: hidden; position: relative; }
.progress div { height: 10px; width: 0; background: var(--green); transition: width .2s; }
.progress span { display: block; padding: .5rem .2rem; font-weight: 600; white-space: pre-line; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.ph { position: relative; background: var(--cream); border-radius: 10px; padding: 6px; border: 2px solid transparent; }
.ph.is-cover { border-color: var(--gold); }
.ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.ph input[name^=caption] { margin-top: 6px; padding: .35rem .5rem; font-size: .85rem; }
.ph .sel { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 3px; display: flex; }
.ph .sel input { width: 1.2rem; height: 1.2rem; margin: 0; }
.ph-tools { display: flex; gap: 4px; margin-top: 4px; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: .2rem .5rem; cursor: pointer; font-size: .85rem; }
.mini:hover { border-color: var(--ink); } .mini.danger:hover { background: var(--red); color: #fff; }
.ph.is-cover .ph-tools .mini:first-child { background: var(--gold); color: #fff; }

/* Speisekarte */
.mrow { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mrow-main { display: grid; gap: .35rem; }
.mrow-main input:last-child { font-size: .9rem; color: var(--muted); }
.mrow-price { display: flex; gap: .35rem; }
.mrow-price label { margin: 0; display: flex; flex-direction: column; font-weight: 600; font-size: .8rem; gap: 2px; }
.mrow-price input { width: 78px; padding: .45rem; text-align: right; }
.mrow-tools { display: flex; flex-direction: column; gap: 3px; }
#add-row { margin-top: 1rem; }
@media (max-width: 700px) { .mrow { grid-template-columns: 1fr auto; } .mrow-price { grid-column: 1; flex-wrap: wrap; } .mrow-tools { grid-row: 1 / 3; grid-column: 2; } }

/* Öffnungszeiten */
.hours { border-collapse: collapse; margin-bottom: 1rem; }
.hours th { text-align: left; padding: .3rem 1rem .3rem 0; }
.hours td { padding: .25rem .3rem; }
.hours input[type=time] { width: auto; }
.hours tr.is-closed input[type=time] { opacity: .3; }
@media (max-width: 600px) { .hours th { display: block; padding-top: .8rem; } .hours tr { display: block; } .hours td { display: inline-block; } }
