/* Agentur-Oberfläche — Stil aus dem Claude-Design-Entwurf.
   Die Werte stehen einmal hier, statt in jedem Element: der Entwurf hatte
   sie inline, weil er ein Entwurf ist. */

:root {
	--schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, monospace;

	--text: #1d1d1f;
	--text-2: #6e6e73;
	--text-3: #86868b;
	--text-4: #a1a1a6;
	--text-5: #c7c7cc;

	--linie: #e8e8ea;        /* Bereichsgrenze */
	--linie-2: #f0f0f1;      /* Tabellenzeile */
	--linie-3: #ededee;      /* Abschnitt in Karten */
	--linie-4: #f4f4f5;      /* feinste Trennung */
	--rand: #dededf;         /* Eingabefelder, sekundäre Knöpfe */

	--flaeche: #f5f5f7;      /* Codezeile, ausgewählte Zeile */
	--flaeche-2: #f2f2f4;    /* Segmentleiste */
	--flaeche-3: #fafafa;    /* Zeile beim Überfahren */
	--flaeche-4: #ececee;    /* Kürzelkreis */

	--blau: #0066cc;
	--blau-dunkel: #004fa3;

	--breite: 1280px;
	--breite-weit: 1440px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	background: #fff; color: var(--text);
	font-family: var(--schrift);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
a { color: var(--blau); text-decoration: none; }
a:hover { color: var(--blau-dunkel); }
input, button, select, textarea { font: inherit; color: inherit; }
::selection { background: rgb(0 102 204 / .16); }
code, .mono { font-family: var(--mono); }

@keyframes om-rise { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes om-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Kopfleiste ─────────────────────────────────────────────────────────── */
.kopf {
	position: sticky; top: 0; z-index: 40;
	background: rgb(255 255 255 / .82);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--linie);
}
.kopf__zeile {
	max-width: var(--breite); margin-inline: auto; padding-inline: 40px;
	height: 52px; display: flex; align-items: center; gap: 32px;
}
.kopf--weit .kopf__zeile { max-width: var(--breite-weit); }
.kopf__marke { color: var(--text); font-size: 15px; font-weight: 590; letter-spacing: -.012em; }
.kopf__marke:hover { color: var(--text); }
.kopf nav { display: flex; align-items: center; gap: 24px; flex: 1; font-size: 13px; }
.kopf nav a { color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kopf nav a:hover { color: var(--text); }
.kopf nav a.ist-hier { color: var(--text); font-weight: 510; }
.kopf nav .zahl { color: var(--blau); font-weight: 510; }
.kopf__wer { display: flex; align-items: center; gap: 10px; }
.kopf__wer span:first-child { font-size: 13px; color: var(--text-2); }
.kuerzel {
	width: 26px; height: 26px; border-radius: 13px; background: var(--flaeche-4);
	display: flex; align-items: center; justify-content: center;
	font-size: 11px; font-weight: 590; color: var(--text-2);
}
.kopf__wer button {
	border: 0; background: none; color: var(--text-2); font-size: 13px; cursor: pointer; padding: 0;
}
.kopf__wer button:hover { color: var(--text); }

/* ── Seitenrumpf ────────────────────────────────────────────────────────── */
.bahn { max-width: var(--breite); margin-inline: auto; padding: 56px 40px 120px; }
.bahn--weit { max-width: var(--breite-weit); }
.bahn--eng { padding-top: 32px; }

h1 { margin: 0 0 8px; font-size: 34px; font-weight: 600; letter-spacing: -.021em; }
h2 { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -.016em; }
.fuehrung { margin: 0; font-size: 17px; color: var(--text-2); max-width: 70ch; line-height: 1.5; }
.leise { font-size: 13px; color: var(--text-3); }
.notiz { margin: 0; font-size: 13px; color: var(--text-3); max-width: 70ch; line-height: 1.6; }
.krume { font-size: 13px; color: var(--text-3); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.krume .pfeil { color: var(--text-5); }
.titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.titelzeile--oben { align-items: flex-start; margin-bottom: 32px; }

/* ── Knöpfe ─────────────────────────────────────────────────────────────── */
.knopf {
	height: 36px; padding: 0 16px; border: 0; border-radius: 10px;
	background: var(--text); color: #fff; font-size: 14px; font-weight: 510;
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
	flex: none; text-decoration: none;
	/* Eine Beschriftung ist ein Wort oder zwei — sie bricht nicht um. Wird
	   es eng, ist die Spalte zu schmal, nicht der Knopf zu breit. */
	white-space: nowrap;
}
.knopf:hover { color: #fff; }
.knopf--blau { background: var(--blau); }
.knopf--blau:hover { background: var(--blau-dunkel); }
.knopf--leise {
	background: #fff; color: var(--text); border: 1px solid var(--rand); font-weight: 400;
}
.knopf--leise:hover { color: var(--text); background: var(--flaeche-3); }
.knopf--klein { height: 28px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.knopf--mittel { height: 34px; padding: 0 16px; }
.knopf[disabled] { background: #b9d4f0; cursor: default; }

/* Ein Knopf, der wie ein Link aussieht — für Nebensächliches, das eine
   Fläche öffnet statt zu navigieren. */
.alslink {
	border: 0; background: none; padding: 0; cursor: pointer;
	color: var(--blau); font: inherit; text-decoration: none;
}
.alslink:hover { color: var(--blau-dunkel); text-decoration: underline; }

/* Die Schritte eines laufenden Zurufs. Der erledigte bekommt einen Punkt,
   der laufende einen Ring, der sich dreht — man soll ohne Lesen sehen,
   dass gerade etwas passiert und wo es steht. */
@keyframes wm-dreht { to { transform: rotate(360deg); } }
@keyframes wm-atmet { 50% { opacity: .35; } }
.schritt { display: flex; align-items: flex-start; gap: 10px; padding: 3px 0; color: var(--text-3); }
.schritt__zeichen {
	width: 13px; height: 13px; margin-top: 4px; flex: none; border-radius: 50%;
	background: var(--text-5);
	box-shadow: inset 0 0 0 4px #fff;   /* Punkt mit Loch: erledigt */
}
.schritt--laeuft { color: var(--text); }
.schritt--laeuft .schritt__zeichen {
	background: none;
	border: 2px solid var(--linie-3);
	border-top-color: var(--blau);
	box-shadow: none;
	animation: wm-dreht .8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
	.schritt--laeuft .schritt__zeichen {
		animation: wm-atmet 1.6s ease-in-out infinite;
		border-color: var(--blau);
	}
}

/* Ein Formular, das gerade arbeitet. Der Knopf sagt schon, was läuft; der
   laufende Streifen sagt, dass es noch läuft — das ist der Unterschied
   zwischen „dauert" und „hängt". */
@keyframes wm-laeuft { to { background-position: -200px 0; } }
form.arbeitet { position: relative; }
form.arbeitet::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
	border-radius: 1px;
	background: repeating-linear-gradient(90deg,
		var(--blau) 0 12px, transparent 12px 24px);
	background-size: 200px 2px;
	animation: wm-laeuft 1.1s linear infinite;
	opacity: .55;
}
form.arbeitet textarea, form.arbeitet input { opacity: .6; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { form.arbeitet::after { animation: none; } }

/* Datei wählen: das Eingabefeld selbst wird versteckt, geklickt wird ein
   <label>, das wie jeder andere leise Knopf aussieht. Der native Knopf sah
   je nach Browser verschieden aus und fiel in der Vorschau auf 22 px
   zusammen; ein <label> kann das nicht. Rückmeldung, welche Datei gewählt
   wurde, gibt es dafür erst nach dem Speichern — dann steht das Logo da.
   Das ist der Preis, und für einen Knopf auf einem Bildschirm ist er klein. */
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
input[type=file]:focus-visible + .knopf { outline: 2px solid var(--blau); outline-offset: 2px; }

/* ── Eingaben ───────────────────────────────────────────────────────────── */
label.feldname { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=email], input[type=number], select, textarea {
	width: 100%; height: 36px; padding: 0 12px;
	border: 1px solid var(--rand); border-radius: 10px; background: #fff;
	font-size: 15px; outline: none;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--text-5); }
.feld { margin-bottom: 18px; }

/* ── Segmentleiste ──────────────────────────────────────────────────────── */
.segmente { display: flex; padding: 2px; background: var(--flaeche-2); border-radius: 9px; }
.segmente a, .segmente button {
	height: 28px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent;
	color: var(--text-2); font-size: 13px; font-weight: 510; cursor: pointer;
	display: flex; align-items: center; gap: 6px; text-decoration: none;
}
.segmente .ist-hier { background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .06); color: var(--text); }
.segmente .zahl { color: var(--text-4); }
.segmente .zahl--blau { color: var(--blau); }

/* ── Reiter ─────────────────────────────────────────────────────────────── */
.reiter { display: flex; gap: 28px; border-bottom: 1px solid var(--linie); margin-bottom: 8px; }
.reiter a {
	padding: 0 0 12px; border-bottom: 2px solid transparent; color: var(--text-2);
	font-size: 15px; font-weight: 510; margin-bottom: -1px;
	display: flex; align-items: center; gap: 7px;
}
.reiter a:hover { color: var(--text); }
.reiter a.ist-hier { border-bottom-color: var(--text); color: var(--text); }
.reiter .zahl { color: var(--blau); }

/* ── Tabellen ───────────────────────────────────────────────────────────── */
.tabellenkopf {
	display: grid; gap: 16px; padding: 14px 12px;
	border-bottom: 1px solid var(--linie); font-size: 13px; color: var(--text-3);
}
.zeile {
	display: grid; gap: 16px; align-items: center; padding: 20px 12px;
	border-bottom: 1px solid var(--linie-2); color: var(--text); border-radius: 10px;
}
a.zeile:hover, .zeile--klickbar:hover { background: var(--flaeche-3); color: var(--text); }
.zeile .stark { font-size: 17px; font-weight: 510; }
.zeile .schwach { font-size: 13px; color: var(--text-3); }
.zeile .wert { font-size: 15px; }
.zeile .pfeil { color: var(--text-5); font-size: 15px; }

/* ── Codezeile ──────────────────────────────────────────────────────────── */
.codezeile {
	display: flex; align-items: center; gap: 14px; padding: 12px 14px;
	background: var(--flaeche); border-radius: 10px;
}
.codezeile code {
	flex: 1; font-size: 12.5px; line-height: 1.5; color: var(--text); word-break: break-all;
}

/* ── Dialog ─────────────────────────────────────────────────────────────── */
dialog.blatt {
	border: 0; padding: 0; border-radius: 14px; width: 100%; max-width: 460px;
	background: #fff; color: var(--text);
	box-shadow: 0 1px 3px rgb(0 0 0 / .05), 0 40px 96px rgb(0 0 0 / .18);
	animation: om-rise .2s cubic-bezier(.2,.8,.2,1);
}
dialog.blatt::backdrop { background: rgb(0 0 0 / .16); animation: om-fade .16s ease-out; }
dialog.blatt .rumpf { padding: 28px 28px 24px; }
dialog.blatt .fuss {
	display: flex; justify-content: flex-end; gap: 10px;
	padding: 16px 28px; border-top: 1px solid var(--linie-3);
}
dialog.blatt p { margin: 0 0 22px; font-size: 14px; color: var(--text-2); line-height: 1.55; }
dialog.blatt h2 { margin: 0 0 6px; }

/* ── Meldung ────────────────────────────────────────────────────────────── */
.meldung {
	position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 90;
	padding: 12px 18px; background: var(--text); color: #fff; border-radius: 12px;
	font-size: 14px; line-height: 1.45; max-width: min(520px, 80vw);
	box-shadow: 0 1px 3px rgb(0 0 0 / .06), 0 18px 48px rgb(0 0 0 / .22);
	animation: om-rise .2s cubic-bezier(.2,.8,.2,1);
}
.meldung a { color: #fff; text-decoration: underline; }

/* ── Zustandspunkt ──────────────────────────────────────────────────────── */
.punkt { width: 7px; height: 7px; border-radius: 4px; flex: none; display: inline-block; }
.punkt--offen { background: var(--blau); }
.punkt--angenommen { background: #fff; box-shadow: inset 0 0 0 2px var(--text); }
.punkt--geliefert { background: var(--text-5); }
.punkt--abgelehnt { background: #fff; box-shadow: inset 0 0 0 1px var(--text-5); }

@media (max-width: 900px) {
	.kopf__zeile, .bahn { padding-inline: 20px; }
	.kopf nav { gap: 16px; overflow-x: auto; }
	.kopf__wer span:first-child { display: none; }
	.titelzeile { flex-direction: column; align-items: stretch; gap: 16px; }
}
