/* copperbuy — eigenes Design-System.
   Zwei Farbwelten: dunkel am Schreibtisch, hell am Handy im Freien.
   Umgeschaltet wird nach der Systemeinstellung des Geraets. */

:root {
  --kupfer:      #c87137;
  --kupfer-hell: #e08f52;
  --gruen:       #2e9e5b;
  --gelb:        #d4a017;
  --rot:         #d1495b;
  --grau:        #8a8f98;

  --bg:      #14161a;
  --flaeche: #1c1f25;
  --flaeche2:#242830;
  --linie:   #333944;
  --text:    #e8eaee;
  --text2:   #9aa1ad;
  --schatten: 0 1px 3px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:      #f4f5f7;
    --flaeche: #ffffff;
    --flaeche2:#eef0f3;
    --linie:   #d9dde3;
    --text:    #1b1e23;
    --text2:   #5f6672;
    --schatten: 0 1px 3px rgba(0,0,0,.10);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0 0 .6rem; font-weight: 600; line-height: 1.25; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .95rem; color: var(--text2); text-transform: uppercase;
     letter-spacing: .04em; }
a { color: var(--kupfer-hell); }
p { line-height: 1.5; }

/* ------------------------------------------------------------ Kopfleiste */

header.kopf {
  display: flex; align-items: center; gap: .8rem;
  padding: .45rem 1rem;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 50;
}
.marke { display: flex; align-items: center; gap: .5rem;
         font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.marke .punkt { width: 12px; height: 12px; border-radius: 50%;
                background: var(--kupfer); flex: 0 0 auto; }
nav.haupt { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
nav.haupt a {
  padding: .4rem .75rem; border-radius: 7px; text-decoration: none;
  color: var(--text2); font-weight: 500;
}
nav.haupt a:hover { background: var(--flaeche2); color: var(--text); }
nav.haupt a.aktiv { background: var(--kupfer); color: #fff; }
.wer { color: var(--text2); font-size: .85rem; white-space: nowrap; }

main { padding: 1rem; max-width: 1500px; margin: 0 auto; }

/* --------------------------------------------------------------- Bausteine */

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: var(--schatten);
}
.karte + .karte { margin-top: 1rem; }

.zahlen { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); }
.zahl { background: var(--flaeche); border: 1px solid var(--linie);
        border-radius: 10px; padding: .8rem .9rem; }
.zahl .titel { font-size: .78rem; color: var(--text2); text-transform: uppercase;
               letter-spacing: .04em; }
.zahl .wert { font-size: 1.6rem; font-weight: 650; margin-top: .15rem;
              font-variant-numeric: tabular-nums; }
.zahl .neben { font-size: .8rem; color: var(--text2); }
.zahl.wichtig { border-left: 3px solid var(--kupfer); }
.zahl.achtung .wert { color: var(--gelb); }
.zahl.gut .wert { color: var(--gruen); }

table.liste { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.liste th { text-align: left; font-weight: 600; color: var(--text2);
                 font-size: .78rem; text-transform: uppercase; letter-spacing: .03em;
                 padding: .4rem .5rem; border-bottom: 1px solid var(--linie); }
table.liste td { padding: .45rem .5rem; border-bottom: 1px solid var(--linie); }
table.liste tr:last-child td { border-bottom: none; }
.zahlrechts { text-align: right; font-variant-numeric: tabular-nums; }

.marke-status {
  display: inline-block; padding: .1rem .45rem; border-radius: 20px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--linie); color: var(--text2);
}
.s-interesse      { background: rgba(46,158,91,.15);  color: var(--gruen);  border-color: transparent; }
.s-vielleicht     { background: rgba(212,160,23,.15); color: var(--gelb);   border-color: transparent; }
.s-kein_interesse { background: rgba(209,73,91,.13);  color: var(--rot);    border-color: transparent; }
.s-kunde          { background: var(--kupfer);        color: #fff;          border-color: transparent; }
.s-nicht_erreicht { background: var(--flaeche2); }
.s-neu            { background: var(--flaeche2); }
.s-kontaktiert    { background: var(--flaeche2); }

/* ---------------------------------------------------------------- Knoepfe */

button, .knopf {
  font: inherit; font-weight: 550;
  padding: .5rem .9rem; border-radius: 8px;
  border: 1px solid var(--linie); background: var(--flaeche2); color: var(--text);
  cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .knopf:hover { border-color: var(--kupfer); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.haupt { background: var(--kupfer); border-color: var(--kupfer); color: #fff; }
button.haupt:hover { background: var(--kupfer-hell); }
button.gross { padding: .8rem 1rem; font-size: 1rem; }

input, select, textarea {
  font: inherit; width: 100%;
  padding: .5rem .6rem; border-radius: 8px;
  border: 1px solid var(--linie); background: var(--bg); color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--kupfer); outline-offset: -1px; border-color: var(--kupfer);
}
label { display: block; font-size: .8rem; color: var(--text2); margin-bottom: .2rem; }
.feld { margin-bottom: .7rem; }
.reihe { display: flex; gap: .6rem; flex-wrap: wrap; }
.reihe > * { flex: 1 1 120px; }

/* ---------------------------------------------------------------- Meldung */

.meldung { padding: .6rem .8rem; border-radius: 8px; margin-bottom: .8rem;
           border: 1px solid var(--linie); font-size: .9rem; }
.meldung.fehler { background: rgba(209,73,91,.12); border-color: var(--rot); color: var(--rot); }
.meldung.gut    { background: rgba(46,158,91,.12); border-color: var(--gruen); color: var(--gruen); }
.meldung.hinweis{ background: rgba(212,160,23,.10); border-color: var(--gelb); }
.leer { color: var(--text2); text-align: center; padding: 2rem 1rem; }

/* --------------------------------------------------------------- Anmeldung */

body.anmeldeseite { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.anmeldebox { width: 100%; max-width: 360px; }
.anmeldebox .marke { justify-content: center; font-size: 1.3rem; margin-bottom: 1.2rem; }
.anmeldebox .fuss { text-align: center; color: var(--text2); font-size: .78rem;
                    margin-top: 1rem; line-height: 1.5; }

/* ------------------------------------------------------- Einkaufsseite */

main.einkauf {
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: minmax(280px, 380px) 1fr;
  max-width: 1600px;
}

.filterleiste { background: var(--flaeche); border: 1px solid var(--linie);
                border-radius: 10px; padding: .7rem; margin-bottom: .6rem; }
.filterleiste .reihe { margin-top: .5rem; }
.filterleiste .anzahl { margin-top: .5rem; font-size: .8rem; color: var(--text2); }
.ankreuz { display: flex; align-items: center; gap: .4rem; font-size: .85rem;
           color: var(--text); margin: 0; cursor: pointer; }
.ankreuz input { width: auto; }

.liste-rollt { max-height: calc(100vh - 250px); overflow-y: auto;
               border: 1px solid var(--linie); border-radius: 10px;
               background: var(--flaeche); }
.listenzeile {
  display: block; width: 100%; text-align: left; border: none;
  border-bottom: 1px solid var(--linie); border-radius: 0;
  background: transparent; padding: .55rem .7rem; cursor: pointer;
}
.listenzeile:hover { background: var(--flaeche2); }
.listenzeile.aktiv { background: var(--flaeche2); box-shadow: inset 3px 0 0 var(--kupfer); }
.listenzeile .zeile1 { display: flex; justify-content: space-between;
                       align-items: center; gap: .5rem; }
.listenzeile .firma { font-weight: 600; }
.listenzeile .zeile2 { display: flex; gap: .7rem; font-size: .8rem;
                       color: var(--text2); margin-top: .15rem; }
.listenzeile .faellig { color: var(--gelb); font-weight: 600; }

.preisbox { padding: .8rem; }
.preiskopf { display: flex; justify-content: space-between;
             align-items: flex-start; gap: .5rem; margin-bottom: .5rem; }
.preistabelle { margin: .3rem 0; }
.preistabelle .stark { font-weight: 700; font-size: 1.05rem; color: var(--kupfer-hell); }
.preistabelle .lohnt-nicht { opacity: .45; }

.detailkopf { display: flex; justify-content: space-between;
              align-items: flex-start; gap: .5rem; }
.kontaktwege { display: flex; gap: .5rem; flex-wrap: wrap; margin: .7rem 0 .5rem; }
.notiz { margin-top: .5rem; padding: .5rem .6rem; background: var(--flaeche2);
         border-radius: 8px; font-size: .9rem; }
.klein { font-size: .8rem; color: var(--text2); line-height: 1.45; }

.erfassung .kreuzfeld { display: flex; flex-wrap: wrap; gap: .4rem .9rem;
                        margin: .2rem 0 .8rem; }
.ergebnisknoepfe { display: grid; gap: .5rem;
                   grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ergebnisknoepfe .erg { padding: .85rem .6rem; font-size: 1rem; font-weight: 650; }
.erg.gut      { border-color: var(--gruen); color: var(--gruen); }
.erg.gut:hover      { background: var(--gruen); color: #fff; }
.erg.mittel   { border-color: var(--gelb); color: var(--gelb); }
.erg.mittel:hover   { background: var(--gelb); color: #000; }
.erg.schlecht { border-color: var(--rot); color: var(--rot); }
.erg.schlecht:hover { background: var(--rot); color: #fff; }

.verlaufszeile { display: flex; gap: .5rem; align-items: baseline;
                 flex-wrap: wrap; padding: .35rem 0;
                 border-bottom: 1px solid var(--linie); font-size: .88rem; }
.verlaufszeile:last-child { border-bottom: none; }

.leitfaden summary { cursor: pointer; }
.leitfaden ol { margin: .6rem 0; padding-left: 1.2rem; line-height: 1.6; font-size: .9rem; }
.leitfaden li { margin-bottom: .3rem; }

dialog { border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche);
         color: var(--text); padding: 1.2rem; max-width: 460px; width: 92vw; }
dialog::backdrop { background: rgba(0,0,0,.55); }

/* ------------------------------------------------------ Prüfkorb + Preise */

.korbeintrag { border: 1px solid var(--linie); border-radius: 9px;
               padding: .6rem .7rem; margin-bottom: .5rem; background: var(--flaeche2); }
.korbkopf { display: flex; justify-content: space-between; align-items: flex-start;
            gap: .6rem; flex-wrap: wrap; margin-bottom: .2rem; }
.korbknoepfe { display: flex; gap: .4rem; flex: 0 0 auto; }
.prio { display: inline-block; width: 1.35rem; height: 1.35rem; line-height: 1.35rem;
        text-align: center; border-radius: 5px; font-weight: 700; font-size: .8rem;
        margin-right: .3rem; }
.prio-A { background: var(--kupfer); color: #fff; }
.prio-B { background: var(--flaeche); color: var(--text2); border: 1px solid var(--linie); }
.prio-C { background: transparent; color: var(--text2); border: 1px solid var(--linie); }

.kurve { width: 100%; height: auto; max-height: 130px; display: block;
         margin: .3rem 0; }

.schnellknoepfe { display: flex; flex-wrap: wrap; gap: .4rem; }
textarea { resize: vertical; font-family: inherit; }
.auftrag { border-left: 3px solid var(--linie); padding: .4rem .7rem;
           margin-bottom: .6rem; background: var(--flaeche2); border-radius: 0 8px 8px 0; }
.auftragkopf { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.auftragtext { font-weight: 550; margin: .2rem 0; }
.antwort { white-space: pre-wrap; word-break: break-word; margin: .4rem 0 0;
           font-family: inherit; font-size: .88rem; line-height: 1.5;
           background: var(--flaeche); border: 1px solid var(--linie);
           border-radius: 8px; padding: .55rem .7rem; max-height: 420px;
           overflow-y: auto; }
table.liste .stark { font-weight: 650; color: var(--kupfer-hell); }

/* -------------------------------------------------------------- Handy */

@media (max-width: 900px) {
  main.einkauf { grid-template-columns: 1fr; }
  .liste-rollt { max-height: 45vh; }
}

@media (max-width: 760px) {
  main { padding: .7rem; }
  header.kopf { gap: .5rem; padding: .5rem .7rem; }
  nav.haupt a { padding: .35rem .55rem; font-size: .9rem; }
  .wer { display: none; }
  button, .knopf { padding: .6rem 1rem; }   /* daumengross */
}

/* ------------------------------------- Warnhinweise beim Anrufen */

.warnkasten { border: 1px solid var(--warnung); border-left-width: 3px;
              background: color-mix(in srgb, var(--warnung) 8%, transparent);
              border-radius: 8px; padding: .5rem .7rem; margin-bottom: .6rem; }
.warnkasten ul { margin: .3rem 0 .3rem 1rem; padding: 0; }
.warnkasten li { margin: .15rem 0; font-size: .9rem; }
.herkunft { margin-bottom: .4rem; }
.aussortieren { width: 100%; margin-top: .5rem; background: transparent;
                border: 1px dashed var(--linie); color: var(--text2);
                font-size: .85rem; }
.aussortieren:hover { border-color: var(--schlecht); color: var(--schlecht); }
.marke-neu { display: inline-block; font-size: .7rem; padding: .05rem .3rem;
             border-radius: 4px; background: var(--kupfer); color: #fff;
             margin-left: .3rem; vertical-align: middle; }

/* --------------------------------------------------------------- Marke */

.logo { display: block; flex: 0 0 auto; height: 60px; width: auto; }
.marke { font-size: 1.15rem; }
.grossesLogo { display: block; width: 100%; max-width: 340px; height: auto;
                margin: 0 auto .8rem; }
.anmeldebox { max-width: 380px; }
@media (max-width: 700px) {
  /* Auf dem Handy nur das Logo — der Schriftzug steckt ohnehin darin, und der
     Text daneben wuerde die Leiste auf zwei Zeilen sprengen. */
  .logo { height: 38px; }
  .marke { font-size: 0; gap: 0; }
  header.kopf { gap: .5rem; padding: .4rem .6rem; }
  nav.haupt a { padding: .35rem .5rem; font-size: .9rem; }
  .wer { display: none; }
}

/* -------------------------------------------------- Begrüßung Übersicht */

.begruessung { display: flex; align-items: center; gap: 1.2rem;
               margin-bottom: 1.2rem; flex-wrap: wrap; }
.logoGross { height: 150px; width: auto; flex: 0 0 auto; display: block; }
.begruessungText h1 { margin: 0 0 .2rem; font-size: 1.7rem; }
.begruessungText p { margin: 0; }

@media (max-width: 700px) {
  .begruessung { gap: .8rem; justify-content: center; text-align: center; }
  .logoGross { height: 110px; }
  .begruessungText { flex: 1 1 100%; }
  .begruessungText h1 { font-size: 1.35rem; }
}

/* ------------------------------------------------- Reiter + Einstellungen */

nav.reiter { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem;
             border-bottom: 1px solid var(--linie); padding-bottom: .5rem; }
nav.reiter button { background: transparent; border-color: transparent;
                    color: var(--text2); }
nav.reiter button:hover { background: var(--flaeche2); color: var(--text); }
nav.reiter button.aktiv { background: var(--kupfer); border-color: var(--kupfer);
                          color: #fff; }

details.karte > summary { cursor: pointer; list-style: none; font-size: 1.05rem;
                          padding: .1rem 0; }
details.karte > summary::-webkit-details-marker { display: none; }
details.karte > summary::before { content: "▸ "; color: var(--kupfer); }
details.karte[open] > summary::before { content: "▾ "; }

.einstellzeile { display: flex; align-items: flex-start; gap: 1rem;
                 padding: .6rem 0; border-top: 1px solid var(--linie); }
.einstelltext { flex: 1 1 auto; min-width: 0; }
.einstelltext label { font-size: .95rem; color: var(--text); font-weight: 550;
                      margin-bottom: .15rem; }
.einstellwert { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; }
.einstellwert input { width: 110px; text-align: right;
                      font-variant-numeric: tabular-nums; }
.einstellwert .klein { white-space: nowrap; min-width: 74px; }

td.abzug { color: var(--rot); }
tr.summe td { border-top: 2px solid var(--linie); font-size: 1.05rem; }

@media (max-width: 700px) {
  .einstellzeile { flex-wrap: wrap; gap: .4rem; }
  .einstellwert { flex: 1 1 100%; justify-content: flex-start; }
}
.warnzeichen { color: var(--gelb); cursor: help; }
