/* ================================================================
   SchergenQR – Styles
   Gleiche Farbwelt wie die übrigen Werkzeuge.
   ================================================================ */

:root {
  --bg:            #0e1016;
  --surface:       rgba(255, 255, 255, .045);
  --surface-2:     rgba(255, 255, 255, .075);
  --line:          rgba(255, 255, 255, .10);
  --line-soft:     rgba(255, 255, 255, .06);
  --text:          #e8ebf2;
  --text-dim:      #98a1b5;
  --accent:        #7aa2ff;
  --accent-strong: #5b86ff;
  --ok:            #2fd68b;
  --warn:          #ffc861;
  --off:           #ff5468;
  --radius:        16px;
  --shadow:        0 18px 45px rgba(0, 0, 0, .45);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -10%, #26304a 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #2a2140 0%, transparent 55%);
}

/* ----------------------------------------------------------------
   Buttons, Kopfzeile, Gerüst
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: .5rem .9rem;
  font: inherit;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover  { background: var(--surface-2); border-color: rgba(255,255,255,.18); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #0b1020;
  font-weight: 650;
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; }
.btn--sm    { padding: .35rem .7rem; font-size: .84rem; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(14, 16, 22, .72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar__brand { display: flex; align-items: center; gap: .6rem; font-weight: 650; }
.topbar__logo  { font-size: 1.35rem; line-height: 1; }
.topbar__right { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.topbar__note  {
  color: var(--text-dim);
  font-size: .8rem;
  padding: .3rem .7rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 3rem;
}

.spalten { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1rem, 2vw, 1.4rem); align-items: start; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem clamp(1rem, 2vw, 1.3rem) 1.2rem;
  margin-bottom: clamp(.9rem, 2vw, 1.2rem);
}
.card--input { box-shadow: var(--shadow); }
.card__title { font-size: 1.05rem; margin-bottom: .9rem; }

.sub {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 1.3rem 0 .6rem;
}
.hint { color: var(--text-dim); font-size: .82rem; margin: .8rem 0 0; }
.dim  { color: var(--text-dim); }

/* ----------------------------------------------------------------
   Formular
   ---------------------------------------------------------------- */
.field { display: block; margin-bottom: .9rem; }
.field > span {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-bottom: .35rem;
}
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: .6rem .8rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  font: inherit;
}
.field textarea {
  min-height: 90px;
  resize: vertical;
  font-family: var(--mono);
  font-size: .88rem;
}
.field input[type="text"] { font-family: var(--mono); font-size: .92rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 162, 255, .18);
}
.field input[type="color"] {
  width: 100%;
  height: 2.6rem;
  padding: .2rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .28);
  cursor: pointer;
}
input[type="file"] {
  width: 100%;
  font: inherit;
  font-size: .85rem;
  color: var(--text-dim);
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row2--tight { gap: 0 .6rem; }

.pane[hidden] { display: none; }
#logoRow[hidden], #preview[hidden], #downloads[hidden], #wifiPassRow[hidden] { display: none; }

.check { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; font-size: .9rem; margin-bottom: .6rem; }
.check input { accent-color: var(--accent); margin-top: .25rem; flex: none; }
.check em { font-style: normal; color: var(--text-dim); font-size: .9em; }

.slider { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.slider label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  min-width: 7rem;
}
.slider input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 0; }
.slider output {
  font-family: var(--mono);
  font-weight: 650;
  color: var(--accent);
  min-width: 3.5ch;
  text-align: right;
}

.status {
  margin: .9rem 0 0;
  padding: .55rem .8rem;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: .86rem;
}
.status--ok  { border-color: rgba(47,214,139,.4); background: rgba(47,214,139,.10); color: #8ae9bf; }
.status--bad { border-color: rgba(255,84,104,.4); background: rgba(255,84,104,.10); color: #ffc3ca; }
.status .dim { color: inherit; opacity: .75; }

/* ----------------------------------------------------------------
   Vorschau
   ---------------------------------------------------------------- */
.card--vorschau { position: sticky; top: 5rem; }

.preview {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 12px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%),
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.03) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  border: 1px solid var(--line-soft);
}
#canvas {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;    /* Module scharf, nicht verwaschen */
  border-radius: 4px;
}

.actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

/* ----------------------------------------------------------------
   Hinweise
   ---------------------------------------------------------------- */
.note-item {
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  padding: .6rem .8rem;
  margin-bottom: .5rem;
  background: var(--surface-2);
}
.note-item__text { margin: .25rem 0 0; font-size: .85rem; color: var(--text-dim); }
.note-item--warn { border-color: rgba(255,200,97,.35); background: rgba(255,200,97,.08); }
.note-item--warn strong { color: #ffdca0; }
.note-item--info strong { color: #b9ccff; }
#notes:empty { display: none; }

/* ----------------------------------------------------------------
   Fußzeile und Meldung
   ---------------------------------------------------------------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  color: var(--text-dim);
  font-size: .8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.foot__sep { opacity: .5; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 140%);
  background: #1c2130;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .6rem 1rem;
  font-size: .87rem;
  box-shadow: var(--shadow);
  transition: transform .25s ease, opacity .25s;
  opacity: 0;
  z-index: 60;
  max-width: min(90vw, 460px);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { border-color: rgba(255, 84, 104, .5); color: #ffc3ca; }

@media (max-width: 900px) {
  .spalten { grid-template-columns: 1fr; }
  .card--vorschau { position: static; }
}
@media (max-width: 600px) {
  .row2 { grid-template-columns: 1fr; }
  .topbar__note { display: none; }
  .slider label { min-width: 5.5rem; font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
