/* ============================================================
   Projektecke – Admin-spezifische Stile (ergänzt style.css)
   ============================================================ */

.admin-shell { max-width: 1040px; margin: 0 auto; padding: 32px 22px 64px; }

.admin-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    padding: 16px 0; margin-bottom: 28px;
    border-bottom: 1px solid var(--line);
}
.admin-bar .left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-bar a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.admin-bar a:hover { color: var(--ink); }
.admin-bar .who { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

h1.admin-title { font-size: 1.7rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.admin-sub { color: var(--muted); margin: 0 0 26px; }

/* Karten / Panels */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}
.panel h2 { margin: 0 0 16px; font-size: 1.15rem; }

/* Modul-Kacheln im Dashboard */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mod-card {
    display: block; text-decoration: none; color: inherit;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.mod-card:hover { border-color: var(--line-strong); transform: translateY(-3px); background: var(--surface-2); }
.mod-card .ico { width: 26px; height: 26px; color: var(--accent); margin-bottom: 12px; }
.mod-card .ico svg { width: 100%; height: 100%; }
.mod-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.mod-card p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.mod-card .stat { font-family: var(--mono); font-size: .8rem; color: var(--accent); }

/* Tabellen */
table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.tbl th, table.tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
table.tbl tr:hover td { background: rgba(255,255,255,.02); }
table.tbl code { font-family: var(--mono); color: var(--accent); }

/* Formulare */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input, textarea.input, select.input {
    width: 100%; padding: 11px 13px; font-size: .96rem;
    background: var(--bg-2); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    font-family: inherit;
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 90px; }
.row-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn-sm { padding: 8px 15px; font-size: .85rem; }
.btn-danger { background: transparent; color: #ff7a7a; border: 1px solid rgba(255,122,122,.4); }
.btn-danger:hover { background: rgba(255,122,122,.1); border-color: #ff7a7a; }

.pill { display:inline-block; font-family: var(--mono); font-size:.72rem; padding:3px 9px; border-radius:999px; border:1px solid var(--line-strong); color: var(--muted); }
.pill.on { color: var(--accent); border-color: rgba(200,250,75,.4); }
.pill.off { color: #ff9d9d; border-color: rgba(255,157,157,.35); }

/* Flash */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; border: 1px solid var(--line-strong); }
.flash.ok { background: rgba(200,250,75,.08); border-color: rgba(200,250,75,.4); color: #e8ffb0; }
.flash.err { background: rgba(255,122,122,.08); border-color: rgba(255,122,122,.4); color: #ffc9c9; }

/* Login */
.login-wrap { max-width: 380px; margin: 8vh auto; padding: 0 22px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; }
.login-card h1 { margin: 0 0 4px; font-size: 1.4rem; }
.login-card p.sub { margin: 0 0 22px; color: var(--muted); font-size: .92rem; }

/* öffentliche Umfrage / Vorschläge */
.poll { max-width: 620px; }

/* Abstimmungsformular: Auswahl je Zeile */
.poll-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, background .15s ease;
}
.poll-opt:hover { border-color: var(--line-strong); background: var(--surface-2); }
.poll-opt input { accent-color: var(--accent); width: 17px; height: 17px; flex: none; }

/* Ergebnis: Beschriftung ÜBER dem Balken.
   Wichtig: Text nie in den limettenen Balken legen – hell auf hell ist
   nicht lesbar, und ein Label im Balken erbt sonst dessen Hintergrund. */
.poll-res { margin: 0 0 18px; }
.poll-res-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 7px;
}
.poll-res-lab {
    color: var(--ink);
    font-size: .97rem;
    line-height: 1.4;
}
.poll-res-pct {
    flex: none;
    font-family: var(--mono);
    font-size: .84rem;
    color: var(--muted);
    white-space: nowrap;
}
.poll-res-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}
.poll-res-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: rgba(200,250,75,.42);
}
/* Führende Option(en) hervorheben */
.poll-res.is-lead .poll-res-lab { font-weight: 700; }
.poll-res.is-lead .poll-res-pct { color: var(--accent); }
.poll-res.is-lead .poll-res-bar > span { background: var(--accent); }

@media (max-width: 480px) {
    .poll-res-head { flex-direction: column; gap: 2px; }
    .poll-res-pct { align-self: flex-start; }
}
