/* INFOBALKEN: RESPONSIVES DASHBOARD-DESIGN
   Kurz: Gestaltet Suche, Ergebnistabelle und Adminoberfläche als übersichtliche dunkle Ansicht.
*/

:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #090b10;
  --panel: #12151d;
  --panel-raised: #171b25;
  --line: #292f3c;
  --text: #f2f3f7;
  --muted: #a2a9b8;
  --accent: #c4b4ff;
  --good: #a9d8cb;
  --danger: #ff8b82;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.topbar { min-height: 68px; padding: 12px clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #0d0f15; }
.brand { font-size: 16px; font-weight: 750; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav form { margin: 0; }
.user-label, .small { font-size: 13px; }
.page-shell { width: min(1580px, 100%); margin: 0 auto; padding: 36px clamp(16px, 3vw, 42px) 80px; }
.hero { margin: 0 0 30px; max-width: 900px; }
.hero h1 { margin: 6px 0 8px; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; letter-spacing: -.045em; }
.hero p { margin: 6px 0; }
.eyebrow { color: var(--good); font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.panel, .login-card { margin: 20px 0; padding: clamp(18px, 2.2vw, 28px); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 48px #0002; }
.panel h2, .login-card h1 { margin: 0 0 8px; letter-spacing: -.025em; }
.search-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .28fr) minmax(180px, .28fr) auto; gap: 12px; margin: 18px 0 12px; }
input, select, textarea { min-width: 0; width: 100%; padding: 12px 14px; border: 1px solid #394151; border-radius: 10px; background: #0d1017; color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #aa94ff; box-shadow: 0 0 0 3px #aa94ff33; }
textarea { resize: vertical; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border: 1px solid #3b4352; border-radius: 10px; background: #1a1f29; color: var(--text); font-weight: 650; text-decoration: none; }
.button:hover { border-color: #777f91; background: #202633; }
.button.primary { border-color: #c4b4ff; background: var(--accent); color: #1a1427; }
.button.danger { border-color: #78433f; background: #321d1f; color: #ffc3bd; }
.button.quiet { background: transparent; }
.button.full { width: 100%; }
.button.compact { min-height: 34px; padding: 6px 9px; font-size: 12px; }
.button:disabled { opacity: .45; cursor: default; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; min-width: 920px; border-collapse: collapse; }
th { padding: 12px; color: #929aab; font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .12em; }
td { padding: 14px 12px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
td:first-child, td:nth-child(2) { font-weight: 650; }
td details { margin-top: 8px; color: var(--muted); font-size: 12px; }
td details div { padding: 5px 0; }
td details summary { cursor: pointer; }
td:last-child { min-width: 180px; }
td:last-child .button { margin: 3px; }
.empty-state { padding: 28px 12px; color: var(--muted); text-align: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding-top: 18px; }
.proposal-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.proposal-panel h2 { margin-bottom: 0; }
.activity-list { display: grid; gap: 8px; }
.activity-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-raised); }
.favorite-label { display: block; margin: 4px; color: var(--good); }
.login-card { width: min(460px, 100%); margin: 8vh auto 0; }
.login-card h1 { font-size: 32px; }
.stack-form { display: grid; gap: 10px; }
.stack-form label, .inline-form label { color: #cbd0dc; font-size: 13px; font-weight: 650; }
.small.muted { line-height: 1.5; }
.form-error { color: var(--danger); }
.messages { display: grid; gap: 8px; }
.message { margin: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-raised); }
.message.success { border-color: #315c50; color: var(--good); }
.message.error { border-color: #71403d; color: #ffc3bd; }
.editor-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(90vh, 900px); overflow-y: auto; padding: 24px; border: 1px solid #454d5d; border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: 0 30px 90px #0009; }
.editor-dialog::backdrop { background: #03040acc; backdrop-filter: blur(3px); }
.detail-grid { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 8px 14px; margin: 18px 0; }
.detail-grid dt { color: var(--muted); font-size: 12px; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.detail-links { display: grid; gap: 9px; padding-left: 20px; }
.detail-links li { display: grid; gap: 4px; overflow-wrap: anywhere; }
.detail-links span { color: var(--muted); font-size: 11px; }
.dialog-heading, .subsection-heading, .review-card header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dialog-heading h2, .review-card h3 { margin: 0; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text); font-size: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid > div { display: grid; gap: 8px; }
.subsection-heading h3 { margin: 8px 0; font-size: 15px; }
.link-rows { display: grid; gap: 8px; }
.link-row { display: grid; grid-template-columns: minmax(170px, .75fr) minmax(180px, 1fr) minmax(150px, .8fr) auto; gap: 8px; }
.place-rows { display: grid; gap: 8px; }
.place-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(130px, .6fr) minmax(180px, 1fr) auto; gap: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.count, .status-chip { display: inline-flex; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; vertical-align: middle; }
.status-chip.conflict { border-color: #734440; color: #ffc3bd; }
.review-card { margin: 14px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-raised); }
.review-card h3 { margin: 0 0 5px; }
.history-details { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.history-details summary { cursor: pointer; color: var(--text); font-weight: 650; }
.history-details li { margin: 6px 0; overflow-wrap: anywhere; font-size: 12px; }
.payload { max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #0d1017; color: #d8dce6; font-size: 12px; }
.review-actions, .comparison-grid, .account-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-actions form, .inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.comparison-grid { margin-top: 12px; }
.comparison-grid h4 { margin: 6px 0; }
.review-form { display: grid; gap: 12px; margin: 14px 0; }
.review-section { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.review-section legend { padding: 0 6px; color: var(--good); font-size: 13px; font-weight: 700; }
.review-field { display: grid; gap: 6px; margin: 8px 0; color: #cbd0dc; font-size: 12px; font-weight: 650; }
.review-link-list, .review-place-list { display: grid; gap: 10px; margin-top: 10px; }
.review-link-row, .review-place-row { display: grid; align-items: end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0d1017; }
.review-link-row { grid-template-columns: minmax(170px, .8fr) minmax(220px, 1.2fr) minmax(150px, .8fr) auto; }
.review-place-row { grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(90px, .5fr) minmax(150px, 1fr) minmax(140px, 1fr) auto; }
.current-values { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; font-size: 12px; }
.current-values dt { color: var(--muted); }
.current-values dd { margin: 0; overflow-wrap: anywhere; }
.check-label { display: flex; align-items: flex-start; gap: 8px; color: #f1d6a6; font-size: 13px; }
.check-label input { width: auto; }
.account-form { width: min(560px, 100%); }
.account-actions { grid-template-columns: minmax(220px, 1fr) auto; align-items: center; }
.account-actions form { display: flex; gap: 6px; }
.compact-list { display: grid; gap: 8px; padding-left: 20px; color: var(--muted); }
.inline { display: inline-flex; margin-left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .search-controls { grid-template-columns: 1fr 1fr; }
  .search-controls input, .search-controls .button { grid-column: 1 / -1; }
  .link-row, .place-row, .review-link-row, .review-place-row { grid-template-columns: 1fr 1fr; }
  .review-actions, .comparison-grid, .account-actions { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .topbar nav { width: 100%; justify-content: space-between; }
  .form-grid, .search-controls, .link-row, .place-row, .review-link-row, .review-place-row { grid-template-columns: 1fr; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}
