/* Anmeldung und Verwaltung */
body.ui { animation: none; background: var(--bg-alt); min-height: 100vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
code { background: rgba(0, 0, 0, .06); padding: .1rem .4rem; border-radius: 6px; font-size: .9em; }

/* Anmeldung */
.auth { display: grid; place-items: center; padding: 1.5rem; }
.auth__box { width: min(460px, 100%); background: var(--surface); border-radius: var(--radius); padding: 2rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .1); }
.auth__box h1 { font-size: 1.9rem; letter-spacing: -.025em; margin: .6rem 0 .8rem; }
.auth__logo { margin: 1rem 0 0; }
.auth__home { font-size: .9rem; }
.auth .form { margin-top: 1rem; }
.auth__box--wide { width: min(640px, 100%); }
.auth h2.step { font-size: 1.2rem; letter-spacing: -.02em; margin: 1.6rem 0 .6rem; }
.syscheck { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.syscheck li { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; }
.syscheck small { color: var(--muted); }
.syscheck__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: .35rem; background: #bbb; }
.syscheck .ok .syscheck__dot { background: var(--green-soft); }
.syscheck .bad .syscheck__dot { background: #ff453a; }
.syscheck .warn .syscheck__dot { background: #ff9f0a; }
.syscheck .bad { color: #a3201b; }

/* Verwaltung */
.adm { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.adm__side { background: var(--surface); border-right: 1px solid var(--line); padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.adm__brand { display: flex; align-items: center; gap: .7rem; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.adm__brand:hover { text-decoration: none; }
.adm__brand small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.adm__side nav { display: grid; gap: .2rem; }
.adm__side nav a { padding: .6rem .8rem; border-radius: 12px; color: var(--text); font-size: .95rem; transition: background .25s, color .25s; }
.adm__side nav a:hover { background: var(--bg-alt); text-decoration: none; }
.adm__side nav a[aria-current] { background: var(--green-tint); color: var(--green); font-weight: 600; }
.adm__foot { margin-top: auto; display: grid; gap: .4rem; font-size: .85rem; }
.adm__main { padding: clamp(1.2rem, 4vw, 3rem); max-width: 980px; width: 100%; }
.adm__main h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.03em; margin-bottom: .6rem; }
.adm__main h2 { font-size: 1.35rem; letter-spacing: -.02em; margin: 2.2rem 0 .7rem; }
.adm .lead { max-width: 60ch; font-size: 1.1rem; }
.adm .notice { margin-bottom: 1.2rem; }
@media (max-width: 800px) {
  .adm { grid-template-columns: 1fr; }
  .adm__side { position: static; height: auto; }
  .adm__side nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

.tiles { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1.5rem 0; }
.tile { background: var(--surface); border-radius: var(--radius-s); padding: 1.2rem 1.3rem; color: var(--text); display: grid; gap: .2rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, .09); }
.tile span { color: var(--muted); font-size: .9rem; }
.checks li.ok::before { background-color: var(--green-tint); }
.checks li.bad { color: #a3201b; }
.checks li.bad::before { background: #fdecec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3201b' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='m7 7 10 10M17 7 7 17'/%3E%3C/svg%3E") center/70% no-repeat; }

.card-form { background: var(--surface); padding: 1.5rem; border-radius: var(--radius-s); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.card-form h2 { margin-top: 1rem; }
.card-form hr { border: 0; border-top: 1px solid var(--line); margin: .5rem 0; }
.field input[type="file"] { background: transparent; padding: .5rem 0; }
.field input[type="date"] { min-height: 3rem; }
.lbl { font-size: .9rem; font-weight: 600; display: block; margin-bottom: .4rem; }
.switch { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { width: 1.2rem; height: 1.2rem; accent-color: var(--green); }
.perms { display: grid; gap: .5rem; margin: .4rem 0 .8rem; }
.perms label { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .95rem; }
.perms input { margin-top: .25rem; accent-color: var(--green); width: 1.1rem; height: 1.1rem; }
.btn--s { padding: .45rem 1rem; font-size: .88rem; }
.btn--danger { background: #fdecec; color: #a3201b; box-shadow: none; }
.btn--danger:hover { background: #a3201b; color: #fff; }
.btn--s.btn--ghost { background: transparent; }
.table { display: grid; gap: .6rem; }
.row { background: var(--surface); border-radius: var(--radius-s); padding: 1rem 1.2rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.row__act { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.row__act form { margin: 0; }
.row__more { grid-column: 1 / -1; }
.row__more summary, .user summary { cursor: pointer; color: var(--green); font-size: .9rem; padding: .3rem 0; }
.row__more .form { margin-top: .6rem; }
.badge { font-size: .7rem; font-weight: 700; padding: .15rem .55rem; border-radius: 980px; text-transform: uppercase; letter-spacing: .05em; vertical-align: middle; }
.badge.on { background: var(--green-tint); color: var(--green); }
.badge.off { background: #eee; color: #666; }
.user { background: var(--surface); border-radius: var(--radius-s); padding: .6rem 1.2rem; margin-bottom: .6rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.user summary { color: var(--text); font-size: 1rem; padding: .6rem 0; }
.user .form { margin-top: .6rem; }
.linkbox input { width: 100%; margin: .5rem 0; padding: .7rem; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: .85rem; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* Menü-Editor */
.menu-form { display: grid; gap: .8rem; }
.mi { background: var(--surface); border-radius: var(--radius-s); padding: .7rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); display: grid; gap: .5rem; }
.mi__row { display: grid; grid-template-columns: auto minmax(110px, 1fr) minmax(130px, 1.3fr) auto; gap: .5rem; align-items: center; }
.mi__row--c { margin-left: 1.6rem; padding-left: .8rem; border-left: 3px solid var(--green-tint); }
.mi input[type="text"], .mi input:not([type]) { font: inherit; padding: .6rem .8rem; border-radius: 10px; border: 1.5px solid transparent; background: var(--bg-alt); min-width: 0; }
.mi input:focus { outline: 0; border-color: var(--green-soft); background: #fff; }
.mi__btns { display: flex; gap: .3rem; flex-wrap: wrap; }
.mi__btns button { border: 0; background: var(--bg-alt); border-radius: 8px; padding: .45rem .7rem; cursor: pointer; font: inherit; font-size: .85rem; transition: background .2s, transform .1s; }
.mi__btns button:hover { background: var(--green-tint); }
.mi__btns button:active { transform: scale(.94); }
.mi__btns .del:hover { background: #fdecec; color: #a3201b; }
.menu-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }
@media (max-width: 640px) { .mi__row { grid-template-columns: auto 1fr; } .mi__row input:nth-of-type(2) { grid-column: 2; } .mi__btns { grid-column: 1 / -1; } }

/* Medien */
.mgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mcard { background: var(--surface); border-radius: var(--radius-s); padding: .8rem; display: grid; gap: .6rem; align-content: start; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.mcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.mcard__row { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mcard .field label { font-size: .8rem; }
.mcard input { padding: .55rem .7rem; font-size: .9rem; }
.num { width: 4.5rem; padding: .4rem .5rem; border-radius: 8px; border: 1px solid var(--line); font: inherit; }

/* Beitrag-Editor */
.rte-bar { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.rte-bar button { border: 0; background: var(--bg-alt); border-radius: 8px; padding: .4rem .7rem; cursor: pointer; font: inherit; font-size: .85rem; }
.rte-bar button:hover { background: var(--green-tint); }
.rte { min-height: 160px; padding: .9rem 1rem; border-radius: 14px; background: var(--bg-alt); border: 1.5px solid transparent; outline: 0; }
.rte:focus { background: #fff; border-color: var(--green-soft); box-shadow: 0 0 0 4px rgba(52, 199, 89, .18); }
.rte h3 { font-size: 1.15rem; margin: .6rem 0 .3rem; }
[hidden] { display: none !important; }
