/* lohnrechner.com – app.css
   Design-Tokens 1:1 aus dem Redesign-Mockup übernommen (siehe Design-Handoff). */

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/source-sans-3-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/source-sans-3-latin-500-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/source-sans-3-latin-600-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/source-sans-3-latin-700-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 800;
  src: url('../fonts/source-sans-3-latin-800-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/source-serif-4-latin-500-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/source-serif-4-latin-700-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --fs: 16px;
  --bg: #eaf0e6;
  --card: #ffffff;
  --card2: #f4f7f0;
  --ink: #16231a;
  --soft: #5a6b5f;
  --line: #e5ece3;
  --brand: #1b5e20;
  --brandInk: #f3fbee;
  --brandText: #1b5e20;
  --accent: #fde047;
  --accentInk: #17410f;
  --field: #ffffff;
  --fieldLine: #cfdbd0;
  --pos: #1c7a34;
  --neg: #b4512e;
  --shadow: rgba(20, 50, 25, .10);
}

[data-theme="dark"] {
  --bg: #0d1310;
  --card: #151f19;
  --card2: #1b2820;
  --ink: #e8f0e8;
  --soft: #9cb0a2;
  --line: #26362c;
  --brand: #153f1b;
  --brandInk: #eafce2;
  --brandText: #57c46f;
  --field: #101a14;
  --fieldLine: #2c3f33;
  --pos: #57c46f;
  --neg: #e18a5c;
  --shadow: rgba(0, 0, 0, .45);
}

html { font-size: var(--fs); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: calc(var(--fs) * 1);
  transition: background .2s ease, color .2s ease;
}

h1, h2, .serif, .lr-logo-word, .lr-amount {
  font-family: 'Source Serif 4', Georgia, serif;
}

a { color: var(--brandText); }

/* ---------- Header ---------- */
.lr-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand);
  color: var(--brandInk);
  box-shadow: 0 2px 10px var(--shadow);
}
.lr-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.lr-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.lr-logo-mark {
  width: 38px; height: 44px; border-radius: 9px; background: var(--accent);
  display: flex; flex-direction: column; padding: 4px; gap: 3px;
}
.lr-logo-mark .bar { height: 9px; background: var(--brand); border-radius: 3px; }
.lr-logo-mark .grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.lr-logo-mark .grid span { background: var(--brand); border-radius: 2px; }
.lr-logo-word { font-size: calc(var(--fs) * 1.35); font-weight: 700; line-height: 1; }
.lr-logo-word .dotcom { color: var(--accent); }
.lr-tagline { font-size: 0.72em; opacity: .82; margin-top: 2px; }

.lr-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lr-pill-group {
  display: inline-flex; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.lr-pill-group a, .lr-pill-group button {
  border: none; background: transparent; color: inherit; padding: 5px 11px; border-radius: 999px;
  font-size: .85em; text-decoration: none; cursor: pointer;
}
.lr-pill-group a.active, .lr-pill-group button.active {
  background: var(--accent); color: var(--accentInk); font-weight: 700;
}
.lr-country-select {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: var(--brandInk);
  border-radius: 999px; padding: 6px 30px 6px 14px; font-size: .85em; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f3fbee'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.lr-country-select option { color: #16231a; }

.lr-dark-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .85em; }
.lr-switch {
  width: 44px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.25);
  position: relative; border: none; cursor: pointer;
}
.lr-switch .knob {
  width: 18px; height: 18px; border-radius: 50%; background: var(--brandInk); position: absolute; top: 3px; left: 3px;
  transition: left .15s ease;
}
.lr-switch.on { background: var(--accent); }
.lr-switch.on .knob { left: 23px; background: var(--accentInk); }

/* ---------- Ad placeholders ---------- */
.lr-ad {
  border: 1px dashed var(--fieldLine); border-radius: 12px;
  background: repeating-linear-gradient(45deg, var(--card2) 0 12px, transparent 12px 24px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px;
  color: var(--soft); font-family: 'Source Code Pro', ui-monospace, monospace; font-size: .65em;
  width: 100%; height: 100%;
}
.lr-ad-leaderboard-wrap { max-width: 1200px; margin: 14px auto 0; height: 90px; overflow: hidden; text-align: center; }
.lr-ad-aside-wrap { width: 100%; margin-bottom: 16px; }
.lr-ad-aside-wrap.lr-ad-300x250 { min-height: 250px; }
.lr-ad-aside-wrap.lr-ad-300x400 { min-height: 400px; }
.lr-ad-leaderboard { width: 100%; height: 100%; }
.lr-ad-aside { width: 100%; }

/* ---------- Layout ---------- */
.lr-shell { max-width: 1200px; margin: 0 auto; padding: 20px; }
.lr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .lr-grid { grid-template-columns: 1fr; } }
.lr-aside { position: sticky; top: 92px; }
@media (max-width: 900px) {
  .lr-aside { position: static; display: flex; gap: 16px; }
  .lr-aside .lr-ad-aside-wrap { margin-bottom: 0; }
}

/* ---------- Card ---------- */
.lr-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  box-shadow: 0 10px 34px var(--shadow);
}
.lr-card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.lr-card-head h1 { font-size: calc(var(--fs) * 1.95); font-weight: 700; margin: 0; }
.lr-card-head .stand { color: var(--soft); font-size: .85em; }
.lr-service-of { color: var(--soft); margin-top: 2px; }

.lr-intro {
  background: var(--card2); border-radius: 13px; padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start;
  margin: 18px 0; font-size: .9em; color: var(--soft);
}
.lr-intro .i {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brandInk);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-style: italic;
}

.lr-notice {
  background: rgba(253, 224, 71, .13); border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 12px 16px; display: flex; gap: 10px; align-items: flex-start;
  margin: 14px 0; font-size: .85em; color: var(--soft);
}
.lr-notice-icon {
  flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: var(--accentInk);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-style: italic; font-size: .8em;
}

.lr-tabs { display: flex; background: var(--card2); border-radius: 13px; padding: 5px; gap: 4px; margin-bottom: 14px; }
.lr-tabs a { flex: 1; text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--soft); font-weight: 600; }
.lr-tabs a.active { background: var(--card); color: var(--brandText); box-shadow: 0 2px 6px var(--shadow); }

.lr-yearrow { background: var(--card2); border-radius: 13px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; flex-wrap: wrap; gap: 10px; }

.lr-field-row { display: grid; grid-template-columns: 1fr 190px; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); align-items: center; }
@media (max-width: 560px) { .lr-field-row { grid-template-columns: 1fr; } }
.lr-field-row label { font-weight: 600; font-size: calc(var(--fs) * 1.02) / var(--fs) * 1em; }
.lr-field-help { color: var(--soft); font-size: .85em; margin-top: 2px; }
.lr-field-row .control { min-width: 170px; }

.form-select, .form-control {
  background: var(--field) !important; color: var(--ink) !important; border: 1px solid var(--fieldLine) !important;
  border-radius: 11px !important; height: 46px;
}
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 2px var(--accent) !important; border-color: var(--accent) !important; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.lr-money-field { position: relative; }
.lr-money-field .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--soft); }
.lr-money-field input { padding-left: 26px; text-align: right; }

.lr-sz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .lr-sz-grid { grid-template-columns: 1fr; } }
.lr-sz-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.lr-sz-item.highlight { background: var(--card2); }
.lr-sz-item .mm { font-family: 'Source Code Pro', ui-monospace, monospace; width: 28px; color: var(--soft); }

.lr-cta {
  width: 100%; height: 54px; background: var(--accent); color: var(--accentInk); border: none; border-radius: 13px;
  font-weight: 800; font-size: 1.05em; box-shadow: 0 8px 20px var(--shadow); margin-top: 18px;
}
.lr-cta-outline {
  border: 1.5px solid var(--brandText); color: var(--brandText); background: transparent; border-radius: 13px;
  padding: 12px 20px; font-weight: 700;
}

/* ---------- Result page ---------- */
.lr-summary { background: var(--brand); color: var(--brandInk); border-radius: 16px; padding: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.lr-summary .meta { font-size: .9em; opacity: .85; }
.lr-summary .amount { font-family: 'Source Serif 4', serif; font-weight: 700; font-size: 2.1em; color: var(--accent); }
.lr-summary .per-month { font-size: .8em; opacity: .8; text-align: right; }

.lr-section-title { font-weight: 700; display: inline-block; border-bottom: 2px solid var(--accent); padding-bottom: 4px; margin: 26px 0 12px; font-size: calc(var(--fs) * 1.15); }
.lr-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lr-line .val.pos { color: var(--pos); font-weight: 700; }
.lr-line .val.neg { color: var(--neg); }
.lr-line.total { font-weight: 700; }

.lr-bar { height: 18px; border-radius: 9px; overflow: hidden; display: flex; margin-top: 8px; }
.lr-bar .sv { background: var(--neg); }
.lr-bar .lst { background: var(--soft); }
.lr-bar .netto { background: var(--brand); }
.lr-legend { display: flex; gap: 18px; margin-top: 8px; font-size: .85em; color: var(--soft); flex-wrap: wrap; }
.lr-legend .sq { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

.lr-note { color: var(--soft); font-size: .85em; margin-top: 14px; }

/* ---------- Footer ---------- */
.lr-footer { background: var(--card); border-top: 1px solid var(--line); }
.lr-footer-shell { padding-top: 0; padding-bottom: 0; }
.lr-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .85em; padding: 16px 0; }
.lr-footer-inner a { color: var(--brandText); font-weight: 600; text-decoration: none; margin-right: 16px; }
.lr-footer-brands { display: flex; align-items: center; gap: 16px; }
.lr-footer-brands img { height: 26px; width: auto; display: block; }
.lr-footer-service { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lr-footer-inline-logo { margin-right: 0 !important; display: inline-flex; align-items: center; }
.lr-footer-inline-logo img { height: 18px; width: auto; }
.lr-footer-spacer { display: block; }
@media (max-width: 900px) { .lr-footer-spacer { display: none; } }

/* ---------- Admin ---------- */
.lr-admin-nav a { color: var(--brandInk); }
textarea.lr-json-editor { font-family: ui-monospace, monospace; font-size: 13px; min-height: 480px; }
