/* ============================================================
   GFS Partnerbereich — Stylesheet
   Gleiche Look-Familie wie die Akademie (Montserrat, Ink-CTA, Gold als Akzent).
   ============================================================ */

:root {
	--gfs-gold: #cfaf3e;
	--gfs-gold-dark: #b89b37;
	--gold-text: #8a6e1f;          /* Gold fuer Text auf hellem Grund (WCAG-konform) */
	--gfs-brown: #716551;
	--gfs-brown-dark: #5d513f;
	--gfs-navy: #082131;
	--ink: #0d2231;
	--ink-2: #1a3a52;
	--bg: #f6f4ef;
	--surface: #ffffff;
	--text: #20262e;
	--muted: #6f6857;
	--border: #e7e1d6;
	--border-soft: #efeae1;
	--green: #2f7a48;
	--radius-sm: 6px;
	--radius: 10px;
	--radius-lg: 14px;
	--shadow-sm: 0 1px 2px rgba(32, 38, 46, .05), 0 1px 3px rgba(32, 38, 46, .06);
	--shadow-soft: 0 18px 50px -28px rgba(8, 33, 49, .30);
	--font-ui: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--font-ui);
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
a { color: var(--gfs-brown); text-decoration: none; }
a:hover { color: var(--gold-text); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* layout shell */
.topbar { height: 2px; background: linear-gradient(90deg, transparent 0%, var(--gfs-gold) 22%, var(--gfs-gold-dark) 50%, var(--gfs-gold) 78%, transparent 100%); opacity: .85; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { height: 40px; display: block; }
.header-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.header-eyebrow { position: relative; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding-bottom: 5px; border-bottom: 1.5px solid transparent; }
.header-eyebrow:hover { color: var(--gfs-brown); }
.header-eyebrow.active { color: var(--gfs-brown); border-bottom-color: var(--gfs-gold-dark); }
.header-greeting { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; margin-left: 6px; }
.logout { margin: 0; }
.site-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 30px 24px 48px; }
.site-footer { padding: 22px 24px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.foot-mark { font-weight: 800; letter-spacing: .14em; color: var(--gfs-brown); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; font-size: 11px; }

/* headings */
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; margin: 0; }
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.04; letter-spacing: -.028em; color: var(--ink); }
.page-head p { margin: 11px 0 0; font-size: 17px; max-width: 58ch; color: var(--muted); }
.accent-line { display: block; width: 56px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--gfs-gold), var(--gfs-gold-dark)); margin: 15px 0 0; }
.section-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.section-eyebrow.gold { font-size: 11px; color: var(--gold-text); }
.back-link { margin: -12px 0 20px; font-size: 14px; }

/* buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--ink);
	color: #fff;
	border: none;
	border-radius: 7px;
	font-family: inherit;
	font-weight: 600;
	font-size: 14.5px;
	letter-spacing: .015em;
	padding: 12px 24px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(13, 34, 49, .2);
	transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--ink-2); color: #fff; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-ghost {
	display: inline-flex;
	align-items: center;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--border);
	border-radius: 999px;
	font-family: inherit;
	font-weight: 600;
	font-size: 13px;
	padding: 7px 16px;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}
.btn-ghost:hover { border-color: var(--gfs-gold); background: rgba(207, 175, 62, .08); }

/* form fields */
label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
input[type=email], input[type=text], input[type=date], select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 15px;
	color: var(--text);
	background: var(--surface);
	transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, select:focus { outline: none; border-color: var(--gold-text); box-shadow: 0 0 0 3px rgba(138, 110, 31, .16); }
input[inputmode=numeric] { letter-spacing: .3em; font-weight: 600; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.panel.narrow { max-width: 440px; margin: 60px auto; padding: 40px 36px; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.panel h1 { font-size: 28px; color: var(--ink); margin-bottom: 6px; }
.panel .lead { color: var(--muted); font-size: 15px; margin: 18px 0 22px; }
.panel .fineprint { margin: 22px 0 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.panel input { margin-bottom: 20px; }
.panel.narrow input[type=email], .panel.narrow input[type=text] { padding: 13px 15px; font-size: 16px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.list-panel { display: flex; flex-direction: column; gap: 14px; }
.list-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-panel .panel-head a { font-size: 13.5px; font-weight: 600; color: var(--gold-text); }
.form-panel .form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 16px; }
.form-panel .field { flex: 1 1 180px; }
.form-panel input { margin-bottom: 0; }

/* notices */
.notice { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13.5px; border: 1px solid transparent; }
.notice.info { background: #f4f6f8; border-color: #e3e8ec; color: var(--gfs-navy); }
.notice.error { background: #fbecea; border-color: #f3d4cf; color: #8a2c1f; }
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.flash-ok { background: rgba(207, 175, 62, .12); color: var(--gfs-brown-dark); border: 1px solid var(--gfs-gold); }
.flash-error { background: #fdecec; color: #a12626; border: 1px solid #e9b4b4; }
.empty-state { color: var(--muted); font-size: 15px; margin: 0; }

/* Stand des Zahlungsabgleichs — in P2 noch ein Platzhalter ohne echte Daten. */
.sync-note { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 13px; color: var(--muted); }
.sync-note svg { color: var(--gold-text); flex-shrink: 0; }

/* Stufenkarte */
.tier-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding: 22px 28px 22px 32px; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.tier-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--gfs-gold), var(--gfs-gold-dark)); }
.tier-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tier-headline { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tier-headline h2 { font-size: 34px; line-height: 1.1; color: var(--ink); }
.tier-headline span { font-size: 15px; color: var(--muted); }
.tier-progress { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.tier-progress-labels { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.tier-progress-labels strong { color: var(--ink); }
.progress-track { height: 8px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gfs-gold), var(--gfs-gold-dark)); }
.tier-note { margin: 4px 0 0; font-size: 14.5px; color: var(--text); max-width: 66ch; }
.tier-steps { flex-shrink: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tier-step { padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; display: flex; flex-direction: column; }
.tier-step span:first-child { font-size: 20px; font-weight: 700; color: var(--muted); }
.tier-step span:last-child { font-size: 11px; font-weight: 600; color: var(--muted); }
.tier-step.active { background: rgba(207, 175, 62, .14); border-color: rgba(207, 175, 62, .42); }
.tier-step.active span:first-child { color: var(--ink); }
.tier-step.active span:last-child { color: var(--gfs-brown-dark); }

/* Kacheln */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 30px; }
.tile-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.tile-link { transition: border-color .18s ease, transform .18s ease; }
.tile-link:hover { border-color: var(--gfs-gold); transform: translateY(-1px); }
.tile-label { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.tile-hint { font-size: 12.5px; color: var(--muted); }

/* Zeilenlisten */
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.row-item:last-child { border-bottom: none; }
.row-title { display: block; font-weight: 600; color: var(--ink); }
.row-meta { display: block; font-size: 12.5px; color: var(--muted); }

/* Tabellen */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.data-table th { text-align: left; padding: 12px 16px; font-size: 12.5px; background: #faf8f4; color: var(--gfs-brown); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.data-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.panel .data-table { margin-bottom: 0; box-shadow: none; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-width: 150px; padding: 8px 12px; font-size: 13.5px; margin-bottom: 0; }

/* Raten-Chips + Status */
.legend { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.legend > span { display: flex; align-items: center; gap: 6px; }
.rate-chip { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--border); background: var(--surface); }
.rate-chip.paid { background: var(--green); border-color: var(--green); }
.rate-chip.due { background: rgba(207, 175, 62, .28); border-color: var(--gfs-gold); }
.status-pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status-new { background: #eef1f4; color: var(--gfs-navy); }
.status-progress { background: rgba(207, 175, 62, .16); color: var(--gfs-brown-dark); }
.status-done { background: rgba(60, 160, 90, .14); color: var(--green); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; background: rgba(207, 175, 62, .12); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; font-size: 13px; color: var(--gfs-brown-dark); }

.status-warn { background: #fbecea; color: #8a2c1f; }
.rate-chip.open { background: var(--surface); border-color: var(--border); }

/* Zeilen mit Wert plus Status rechts (Kunden-Vorschau auf der Uebersicht) */
.row-end { display: flex; align-items: center; gap: 12px; }

/* Unterlagen-Block */
.docs-panel { display: flex; flex-direction: column; gap: 14px; }
.docs-list { display: flex; flex-direction: column; }
.docs-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.docs-row:last-child { border-bottom: none; }
.docs-info { display: flex; flex-direction: column; gap: 2px; }
.docs-action { display: flex; align-items: center; gap: 12px; }
.btn-ink { display: inline-flex; align-items: center; background: var(--ink); color: #fff; border: none; border-radius: 7px; font-family: inherit; font-weight: 600; font-size: 13px; padding: 9px 16px; white-space: nowrap; }
.btn-ink:hover { background: var(--ink-2); color: #fff; }
.docs-note { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px; background: #f4f6f8; border: 1px solid #e3e8ec; color: var(--gfs-navy); }

/* Zahlenspalten rechtsbuendig */
.col-num { text-align: right; }
.data-table td.col-num, .data-table th.col-num { text-align: right; }
.data-table tfoot td { background: #faf8f4; border-bottom: none; border-top: 1px solid var(--border-soft); }

/* Statement-Statuszelle */
.status-stack { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.status-sub { font-size: 12.5px; color: var(--muted); }
.pdf-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--gold-text); padding: 6px 11px; border: 1px solid var(--border); border-radius: var(--radius); }
.pdf-btn:hover { border-color: var(--gfs-gold); }

/* Hinweiskarten unter Tabellen */
.hint-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 24px; }
.hint-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.hint-card { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft); font-size: 13.5px; color: var(--text); line-height: 1.55; }
.hint-card strong { color: var(--ink); }

@media (max-width: 720px) {
	.header-greeting { display: none; }
	.site-header { position: static; }
	.header-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
	.header-nav { width: 100%; gap: 10px 16px; }
	.tier-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
	.tier-step { padding: 10px 6px; }
	.tier-progress-labels { flex-direction: column; gap: 2px; }
	.tier-step span:first-child { white-space: nowrap; }
	.data-table { display: block; overflow-x: auto; }
	.row-end { flex-direction: column; align-items: flex-end; gap: 4px; }
}
