/* Portal — Gestaltung angelehnt an den Shop (Theme Portland, Einstellungen vom 10.10.2026):
   Poppins, weiss mit hellgrauen Flächen, schwarze Akzente, runde Knöpfe (Radius 60px).
   Die Überschriftenschrift des Shops (Harmonia Sans) ist nur in Shopify lizenziert,
   darum auch dort Poppins. Schriftdateien liegen in /fonts (SIL Open Font License). */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
             src: url('/fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
             src: url('/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
             src: url('/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
             src: url('/fonts/poppins-latin-700-normal.woff2') format('woff2'); }

:root {
  --text: #000; --gedaempft: #555; --leise: #767676;
  --flaeche: #fff; --flaeche-2: #f7f7f7; --flaeche-3: #e4e4e4;
  --linie: #dfdfdf; --linie-hover: #bbb; --akzent: #000;
  --radius-knopf: 60px; --radius-feld: 10px; --radius-karte: 14px;
  --breite: 840px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
       background: var(--flaeche); color: var(--text); font-size: 16px; line-height: 1.5;
       display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; width: 100%; max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem 4rem; }
a { color: var(--text); text-underline-offset: 2px; }

/* Kopf: Logo mit Schriftzug links, Name und Abmelden rechts, feine Linie über die volle Breite */
.kopf-rahmen { border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        max-width: var(--breite); margin: 0 auto; padding: .9rem 1rem; }
.marke { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.marke img { width: 44px; height: 44px; flex-shrink: 0; }
.marke-text { display: flex; flex-direction: column; line-height: 1.2; }
.marke-name { font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.marke-zusatz { font-size: .85rem; color: var(--gedaempft); }
.abmelden { display: flex; align-items: center; gap: .9rem; }
.wer { color: var(--gedaempft); font-size: .9rem; }

/* Fuss: hellgraue Fläche wie im Shop */
.fuss { background: var(--flaeche-2); color: var(--text); font-size: .95rem; }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem 2.25rem; }
.fuss-text { display: flex; flex-direction: column; gap: .25rem; }
.fuss-text .leise { color: var(--gedaempft); font-size: .9rem; }

h1 { font-size: 2.25rem; font-weight: 500; line-height: 1.1; letter-spacing: -.04em; margin-bottom: .6rem; }
h2 { font-size: 1.5rem; font-weight: 500; line-height: 1.15; letter-spacing: -.03em; margin-bottom: .5rem; }
.untertitel { color: var(--gedaempft); font-size: 1rem; margin-bottom: 2rem; }

.section { background: var(--flaeche-2); border-radius: var(--radius-karte);
           padding: 1.75rem; margin-bottom: 1.25rem; }
.section-title { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
                 color: var(--text); margin-bottom: 1.1rem; }
.section-intro { font-size: .95rem; color: var(--gedaempft); margin-bottom: 1rem; }
.field-group { margin-bottom: 1.25rem; }
.field-group:last-child { margin-bottom: 0; }
label { display: block; font-size: .95rem; font-weight: 500; margin-bottom: .4rem; }
.hint, .field-desc { display: block; font-size: .875rem; font-weight: 400; color: var(--gedaempft);
                     margin-top: .25rem; line-height: 1.45; }
input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; padding: .7rem .95rem; border: 1px solid var(--linie); border-radius: var(--radius-feld);
  font-size: 1rem; background: var(--flaeche); color: var(--text); font-family: inherit; }
input:hover, select:hover, textarea:hover { border-color: var(--linie-hover); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: -1px; border-color: var(--akzent); }
textarea { min-height: 120px; resize: vertical; }
.required { color: #c62828; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) {
  .two-col { grid-template-columns: 1fr; }
  h1 { font-size: 1.75rem; }
  .section { padding: 1.25rem; }
  .wer { display: none; }
  .marke-name { font-size: .9rem; }
}

/* Meldungen */
.meldung { padding: 1rem 1.25rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: .9rem; line-height: 1.6; }
.meldung.fehler { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.meldung.erfolg { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.meldung.hinweis { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.meldung ul { margin: .5rem 0 0 1.1rem; }
.feldfehler { font-size: .875rem; color: #c62828; margin-top: .3rem; }
.feld-fehlerhaft input, .feld-fehlerhaft select, .feld-fehlerhaft textarea { border-color: #dc2626; background: #fff5f5; }
.notice { background: #fffbeb; border: 1px solid #fde68a; border-radius: 5px;
          padding: .75rem 1rem; font-size: .9rem; color: #92400e; margin-bottom: 1rem; }

/* Chips (Mehrfachauswahl) */
.chip-select { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.meta-chip { display: inline-flex; align-items: center; border: 1px solid var(--linie); border-radius: var(--radius-knopf);
             padding: .45rem 1.05rem; font-size: .925rem; cursor: pointer; background: var(--flaeche); color: var(--text);
             text-decoration: none;
             user-select: none; font-weight: 400; margin: 0; }
.meta-chip:hover { border-color: var(--text); }
.meta-chip.gesperrt { opacity: .4; cursor: not-allowed; }
.meta-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.meta-chip:has(input:checked) { border-color: var(--akzent); background: var(--akzent); color: #fff; }
.chip-count-msg { font-size: .875rem; color: #b45309; margin-top: .3rem; min-height: 1rem; }

/* Grössen / Formate */
.size-chip label { border: 1px solid var(--linie); border-radius: var(--radius-knopf); padding: .45rem 1.05rem; cursor: pointer;
                   font-size: .925rem; font-weight: 500; background: var(--flaeche); margin: 0; }
.size-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.size-chip:has(input:checked) label { border-color: var(--akzent); background: var(--akzent); color: #fff; }

/* Varianten */
.variant-table-header, .variant-row { display: grid; grid-template-columns: 130px 1fr 1fr 1fr; gap: .5rem; }
.variant-table-header { font-size: .85rem; font-weight: 600; color: var(--gedaempft); padding: .4rem 0;
                        border-bottom: 1px solid var(--linie); margin-top: 1rem; }
.variant-row { align-items: center; padding: .4rem 0; border-bottom: 1px solid #f3f3f3; }
.size-badge { font-size: .85rem; font-weight: 600; }
@media (max-width: 560px) {
  .variant-table-header { display: none; }
  .variant-row { grid-template-columns: 1fr 1fr; }
}

/* Bilder */
.image-upload-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
@media (max-width: 560px) { .image-upload-grid { grid-template-columns: repeat(3, 1fr); } }
.image-slot { position: relative; aspect-ratio: 1388/1317; border: 2px dashed var(--linie); border-radius: var(--radius-feld);
              overflow: hidden; background: var(--flaeche); }
.image-slot.required-slot { border-color: #fbbf24; }
.image-slot.has-image { border-style: solid; border-color: #22c55e; }
.image-slot.error { border-style: solid; border-color: #ef4444; }
.image-slot input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2; }
.slot-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
              justify-content: center; gap: .25rem; pointer-events: none; z-index: 1; }
.slot-icon { font-size: 1.4rem; }
.slot-label { font-size: .8rem; font-weight: 600; text-align: center; color: var(--gedaempft); line-height: 1.3; }
.image-preview { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 1; }
.img-delete-btn { position: absolute; top: 4px; right: 4px; z-index: 10; width: 22px; height: 22px;
                  border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; border: none; cursor: pointer;
                  font-size: 13px; line-height: 22px; text-align: center; padding: 0; margin: 0; }
.img-delete-btn:hover { background: #dc2626; }
.image-spec { font-size: .85rem; color: var(--gedaempft); margin-top: .6rem; }

/* Absenden */
.submit-area { margin-top: 1.5rem; }
button[type="submit"] { width: 100%; padding: .95rem 1.5rem; background: var(--akzent); color: #fff;
                        border: 1px solid var(--akzent); border-radius: var(--radius-knopf); font-size: 1rem;
                        font-weight: 600; cursor: pointer; font-family: inherit; transition: background .25s, color .25s; }
button[type="submit"]:hover { background: #333; border-color: #333; }
button[type="submit"]:disabled { background: #999; border-color: #999; cursor: not-allowed; }
.submit-note { font-size: .875rem; color: var(--gedaempft); text-align: center; margin-top: .6rem; }
.knopf { display: inline-block; padding: .8rem 1.6rem; background: var(--akzent); color: #fff; border-radius: var(--radius-knopf);
         text-decoration: none; font-size: 1rem; font-weight: 600; }
.knopf:hover { background: #333; }
button.leise { background: none; border: 0; color: var(--text); text-decoration: underline; cursor: pointer;
               font: inherit; font-size: .9rem; padding: 0; width: auto; }
button.leise:hover { background: none; color: var(--gedaempft); }

/* Listen */
.liste { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid var(--linie); border-radius: 8px; }
.liste th { text-align: left; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gedaempft);
            padding: .75rem 1rem; border-bottom: 1px solid var(--linie); }
.liste td { padding: .75rem 1rem; border-bottom: 1px solid #f3f3f3; font-size: .9rem; }
.liste tr:last-child td { border-bottom: 0; }
.schmal { max-width: 24rem; }
.entwicklerkasten { border: 1px dashed var(--linie); background: #fff; padding: 1rem; margin-top: 1.5rem;
                    word-break: break-all; font-size: .82rem; border-radius: 6px; }
.zusammenfassung { font-size: .9rem; }
.zusammenfassung dt { font-weight: 600; color: var(--gedaempft); font-size: .8rem; text-transform: uppercase;
                      letter-spacing: .06em; margin-top: .75rem; }

/* Formatauswahl (A6 / A5) */
.format-block { border: 1px solid var(--linie); border-radius: var(--radius-feld); padding: 1rem; margin-bottom: .75rem; background: var(--flaeche); }
.format-block:has(input[name="formate[]"]:checked) { background: #fff; border-color: var(--akzent); }
.format-wahl { display: inline-flex; align-items: center; gap: .6rem; margin: 0; }
.format-wahl input { position: absolute; opacity: 0; width: 0; height: 0; }
.format-name { border: 1px solid var(--linie); border-radius: var(--radius-knopf); padding: .4rem .9rem; background: #fff;
               font-weight: 600; cursor: pointer; display: inline-flex; align-items: baseline; gap: .5rem; }
.format-wahl:has(input:checked) .format-name { border-color: var(--akzent); background: var(--akzent); color: #fff; }
.format-wahl:has(input:checked) .format-mass { color: #ddd; }
.format-mass { display: inline; font-weight: 400; }
.format-felder { margin-top: 1rem; }

/* Menge/Anzahl als zweite Variantenachse */
.menge-wahl { margin-bottom: 1rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .4rem; }
.mengen-block + .mengen-block { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #ececec; }
.mengen-titel { font-size: .85rem; font-weight: 600; color: var(--gedaempft); text-transform: uppercase;
                letter-spacing: .06em; margin: 0 0 .5rem; }
body.eine-menge .mengen-titel { display: none; }

/* Katalogpflege (/verwaltung/katalog) */
button.zweitrangig { background: var(--flaeche); color: var(--text); border: 1px solid var(--akzent); margin-bottom: 1rem; }
button.zweitrangig:hover { background: var(--akzent); color: #fff; }
pre.bericht { white-space: pre-wrap; font-size: .85rem; line-height: 1.5; background: #f8f8f8;
  border: 1px solid var(--linie); border-radius: 6px; padding: 1rem; overflow-x: auto; }

/* Verwaltung (/verwaltung): breiter, eine Karte je Person statt enger Tabellenzeile */
[hidden] { display: none !important; }
body:has(.verwaltung) { --breite: 1200px; }
.personen-kopf { margin-bottom: 1rem; max-width: 30rem; }
.person { background: var(--flaeche-2); border-radius: var(--radius-karte); padding: 1.25rem 1.5rem; margin-bottom: .75rem; }
.person-felder { display: grid; grid-template-columns: 1.3fr 1.6fr .8fr .9fr auto; gap: .9rem; align-items: end; }
.person-felder .field-group { margin-bottom: 0; }
.person-knopf button.zweitrangig { margin: 0; padding: .65rem 1.2rem; width: auto; font-size: .95rem; }
.person-info { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin-top: .9rem; font-size: .9rem; color: var(--gedaempft); }
.person-info strong { color: var(--text); font-weight: 600; }
button.knopf-schmal { width: auto; padding: .7rem 1.6rem; margin-top: .25rem; }
@media (max-width: 900px) {
  .person-felder { grid-template-columns: 1fr 1fr; }
  .person-knopf { grid-column: 1 / -1; }
  .person-knopf button.zweitrangig { width: 100%; }
}
@media (max-width: 540px) { .person-felder { grid-template-columns: 1fr; } }
.knopf-zeile { margin-bottom: 1.5rem; }
.hint.abstand-oben { margin-top: .6rem; }
