/* ============================================================================
 * WEB — Gestaltung
 * Warm, ruhig, große Überschrift oben, Dateien unten.
 * ========================================================================== */
:root {
  --creme: #fdf6ee;
  --creme-2: #f8ecdd;
  --karte: #ffffff;
  --linie: #ecdfd1;
  --text: #241b13;
  --leise: #7f6c5b;
  --orange: #ff7a1a;
  --orange-tief: #e8630a;
  --gruen: #1f9d67;
  --gelb: #d9a300;
  --rot: #d24b4b;
  --schatten: 0 18px 40px -28px rgba(84, 52, 20, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 12% -10%, #ffe9d3 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 0%, #ffe2c4 0%, transparent 55%),
    var(--creme);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.leise { color: var(--leise); }
.klein-text { font-size: 13px; }

/* ------------------------------------------------------------------ Marke */
.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 13px;
  color: var(--orange-tief);
}
.marke-punkt {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(160deg, #ff9a4d, var(--orange));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 8px 18px -10px rgba(255, 122, 26, .9);
}
.marke.klein .marke-punkt { width: 28px; height: 28px; border-radius: 9px; font-size: 15px; }

/* -------------------------------------------------------------- Anmeldung */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
.login-karte {
  width: 100%;
  max-width: 430px;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 24px;
  padding: 30px 28px 24px;
  box-shadow: var(--schatten);
  display: grid;
  gap: 14px;
}
.login-karte h1 {
  margin: 6px 0 0;
  font-size: 30px;
  letter-spacing: -.02em;
}
.login-karte p { margin: 0; line-height: 1.5; }

.form { display: grid; gap: 8px; margin-top: 10px; }
.form label { font-size: 13px; font-weight: 600; color: var(--leise); }

input[type="email"], input[type="text"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--linie);
  border-radius: 13px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #fffdfa;
  transition: border-color .15s, box-shadow .15s;
}
input[type="email"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, .14);
}
.code-feld {
  font-size: 26px !important;
  letter-spacing: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ Knöpfe */
.knopf {
  border: 1px solid var(--linie);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 13px;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.knopf:hover { border-color: #dcc8b4; background: #fffaf4; }
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .55; cursor: default; }
.knopf.haupt {
  background: linear-gradient(160deg, #ff8f3c, var(--orange));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 26px -16px rgba(232, 99, 10, .95);
}
.knopf.haupt:hover { background: linear-gradient(160deg, #ff8a30, var(--orange-tief)); }
.knopf.leise { background: transparent; border-color: transparent; color: var(--leise); }
.knopf.leise:hover { background: #fff4e8; color: var(--text); }
.knopf.winzig { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.knopf.gefahr { color: var(--rot); }

.hinweis {
  font-size: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff3e3;
  border: 1px solid #ffdcb8;
  color: #8a4b10;
  line-height: 1.45;
}
.hinweis b { letter-spacing: 3px; font-size: 17px; }
.hinweis.fehler { background: #fdecec; border-color: #f6c9c9; color: #8f2222; }

.fusszeile { font-size: 12px; color: var(--leise); text-align: center; margin-top: 4px !important; }

/* ---------------------------------------------------------------- Dashboard */
.dashboard {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 20px 48px;
  display: grid;
  gap: 18px;
}
.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.kopf-rechts { display: flex; align-items: center; gap: 8px; }
.konto {
  font-size: 13px;
  color: var(--leise);
  background: #fff;
  border: 1px solid var(--linie);
  padding: 7px 12px;
  border-radius: 999px;
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Web-Name: die große Überschrift */
.webname-karte {
  background: linear-gradient(165deg, #ffffff, #fff6ea);
  border: 1px solid var(--linie);
  border-radius: 22px;
  padding: 22px 24px 16px;
  box-shadow: var(--schatten);
}
.webname-zeile { display: flex; align-items: center; gap: 12px; }
.webname {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  font-size: clamp(26px, 5.2vw, 46px) !important;
  font-weight: 800;
  letter-spacing: -.025em;
  border-bottom: 2px dashed transparent !important;
  border-radius: 0 !important;
}
.webname::placeholder { color: #d8c4b0; font-weight: 700; }
.webname:hover { border-bottom-color: #ecd9c6 !important; }
.webname:focus { border-bottom-color: var(--orange) !important; }
.webname-fuss {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Karten */
.karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--schatten);
}
.karte-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.karte-kopf h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.karte-aktionen { display: flex; gap: 8px; }

/* Abwurf-Fläche */
.abwurf {
  margin-top: 16px;
  border: 2px dashed #e8d6c2;
  border-radius: 16px;
  padding: 24px 16px;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
  font-size: 14px;
  color: var(--leise);
  background: #fffcf8;
  transition: border-color .15s, background .15s, transform .12s;
}
.abwurf.aktiv {
  border-color: var(--orange);
  background: #fff3e5;
  transform: scale(1.005);
}
.abwurf-symbol {
  font-size: 20px;
  color: var(--orange);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff1e0;
}

/* Datei-Liste */
.datei-liste {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.datei {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: #fffdfa;
}
.datei:hover { background: #fff8f0; }
.datei-typ {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-tief);
  background: #fff0df;
  text-transform: uppercase;
}
.datei-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.datei-meta { font-size: 12.5px; color: var(--leise); margin-top: 2px; }
.datei-aktionen { display: flex; gap: 4px; }
.datei-aktionen a {
  font-size: 13px;
  color: var(--orange-tief);
  text-decoration: none;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 9px;
}
.datei-aktionen a:hover { background: #fff1e2; }
.leer { grid-column: 1 / -1; }

/* Datenbanken */
.db-liste { display: grid; gap: 10px; margin-top: 14px; }
.db {
  border: 1px solid var(--linie);
  border-radius: 15px;
  padding: 14px 16px;
  background: #fffdfa;
}
.db-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.db-titel { font-weight: 700; }
.db-punkt {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--leise);
  flex: none;
}
.db-punkt.an { background: var(--gruen); box-shadow: 0 0 0 4px rgba(31, 157, 103, .14); }
.db-punkt.aus { background: var(--gelb); box-shadow: 0 0 0 4px rgba(217, 163, 0, .14); }
.db-punkt.fehler { background: var(--rot); box-shadow: 0 0 0 4px rgba(210, 75, 75, .14); }
.db-text { font-size: 13px; color: var(--leise); margin-top: 6px; line-height: 1.5; }
.db-tabellen { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.db-tabelle {
  font-size: 12px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #fff4e7;
  border: 1px solid #f3dfc9;
  color: #7a4a17;
  padding: 4px 8px;
  border-radius: 8px;
}
.db-daten { margin-top: 10px; display: grid; gap: 6px; }
.db-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff7ee;
  font-size: 14px;
  flex-wrap: wrap;
}
.db-zeile .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--leise); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: #241b13;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  z-index: 50;
  max-width: 88vw;
  text-align: center;
}
.toast.fehler { background: #8f2222; }

.fuss { display: flex; justify-content: center; padding-top: 6px; }

/* ------------------------------------------------------------- Deine Seite */
.seite-inhalt { margin-top: 12px; }
.seite-inhalt p { margin: 0; }
.seite-da { display: grid; gap: 10px; }
.seite-adresse {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: #fffaf4;
}
.seite-symbol { font-size: 17px; line-height: 1; }
.seite-link {
  color: var(--orange-tief);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
  font-size: 15px;
}
.seite-link:hover { text-decoration: underline; }
.seite-zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Ein Knopf, der ein Link ist („Ansehen“) */
.karte-aktionen a.knopf { display: inline-flex; align-items: center; text-decoration: none; }

/* ------------------------------------------------- Der Code deiner Seite */
.code-teil { display: grid; gap: 10px; margin-top: 6px; }
.code-reiter {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--linie);
  border-radius: 13px;
  background: #fffaf4;
  flex-wrap: wrap;
}
.code-tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--leise);
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}
.code-tab:hover { background: #fff; color: var(--text); }
.code-tab.aktiv { background: #fff; color: var(--orange-tief); box-shadow: 0 6px 14px -10px rgba(84, 52, 20, .5); }
.code-marke-text { margin-left: auto; padding-right: 8px; }

.code-text {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: #fffdfa;
  color: #241b13;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
.code-text:focus { outline: 2px solid #ffd0a6; outline-offset: 1px; border-color: #ffc391; }

.code-fuss { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-bild {
  border: 1px solid var(--linie);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.code-bild-kopf {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  background: #fffaf4;
  border-bottom: 1px solid var(--linie);
}
.code-rahmen { display: block; width: 100%; height: 360px; border: 0; background: #fff; }

/* Code, der im Fenster steht, solange noch kein Mail-Konto eingerichtet ist */
.code-marke {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #ffd9b5;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 3px;
  color: #8a4a12;
}

/* ------------------------------------------------------------- Klein & Handy */
@media (max-width: 640px) {
  .dashboard { padding: 16px 14px 36px; }
  .karte, .webname-karte { padding: 16px; border-radius: 18px; }
  .webname-zeile { flex-direction: column; align-items: stretch; }
  .webname-zeile .knopf { width: 100%; }
  .datei { grid-template-columns: 34px 1fr; }
  .datei-typ { width: 34px; height: 34px; }
  .datei-aktionen { grid-column: 1 / -1; justify-content: flex-end; }
  .abwurf { padding: 18px 12px; }
  .konto { max-width: 40vw; }
  .code-text { min-height: 180px; font-size: 13px; }
  .code-rahmen { height: 280px; }
  .code-marke-text { display: none; }
}
