/* Farbschema angelehnt an procon-sv-gmbh.de: gedecktes Petrol-/Tiefblau als
   Leitfarbe (Vertrauen, Facility-Dienstleistung), warmes Terrakotta-Orange als
   Akzent, dazu ein Grünton für Gala/Bau (Garten- und Landschaftsbau). */
:root {
  --procon-blue: #336633;
  --procon-blue-dark: #093953;
  --procon-blue-light: #E7EFF3;
  --procon-accent: #D97A34;
  --gb-green: #4C8C4A;
  --txt: #1B2B34;
  --grey: #5B6472;
  --lightgrey: #E4E9ED;
  --offwhite: #F5F7F8;
  --red: #B03A2E;
  --amber: #C68A1F;
  --green: #3E7D3E;
  --red-bg: #F8CBAD;
  --amber-bg: #FFE699;
  --green-bg: #C6E0B4;
  --u-bg: #BFD9EA;
  --input-bg: #FFF6E9;
  --auto-bg: #F0F3F4;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--txt); background: #fff;
}
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; margin: 0; }

header { background: var(--procon-blue); color: #fff; }
.header-inner { padding: 22px 32px 20px; max-width: 1500px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  height: 44px; width: auto; border-radius: 6px; background: #fff; padding: 4px; flex-shrink: 0;
}
header .eyebrow { font-size: 12px; letter-spacing: 2px; color: #BBD3E0; font-weight: 600; text-transform: uppercase; }
header h1 { font-size: 26px; margin-top: 2px; }
header .tagline { color: #CFE0E9; margin: 10px 0 0; font-size: 13.5px; }

nav.tabs {
  display: flex; flex-wrap: wrap; gap: 4px; background: var(--offwhite);
  padding: 8px 24px 0; border-bottom: 2px solid var(--lightgrey); position: sticky; top: 0; z-index: 50;
}
nav.tabs button {
  border: none; background: transparent; padding: 10px 16px; font-size: 13.5px; font-weight: 600;
  color: var(--grey); cursor: pointer; border-radius: 6px 6px 0 0; transition: all .15s;
}
nav.tabs button:hover { background: var(--lightgrey); color: var(--txt); }
nav.tabs button.active { background: #fff; color: var(--procon-blue); border: 2px solid var(--lightgrey); border-bottom: 2px solid #fff; margin-bottom: -2px; }

main { padding: 24px 32px 60px; max-width: 1500px; margin: 0 auto; }
section.tabpanel { display: none; }
section.tabpanel.active { display: block; }

.card { background: var(--offwhite); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.download-card { border: 2px dashed var(--procon-accent); background: #FFFBF6; }
.note { font-size: 12.5px; font-style: italic; color: var(--grey); margin: 4px 0 14px; }
.step { background: var(--procon-blue-light); border-radius: 6px; padding: 10px 14px; margin: 14px 0 4px; font-weight: 700; color: var(--procon-blue); font-size: 14px; }
.legend-row { display:flex; align-items:center; gap:10px; margin: 4px 0; font-size: 13px; }
.legend-swatch { width: 26px; height: 16px; border-radius: 3px; flex-shrink:0; }

table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border: 1px solid var(--lightgrey); padding: 6px 8px; text-align: left; }
th { background: var(--procon-blue); color: #fff; font-size: 12px; position: sticky; top: 0; }
input[type=text], input[type=date], input[type=number], select {
  border: 1px solid #cfd6e4; border-radius: 4px; padding: 5px 6px; font-size: 13px; font-family: inherit;
  background: #fff;
}
table input[type=text], table input[type=date], table select { width: 100%; }
.color-field { width: 44px; height: 30px; padding: 2px; cursor: pointer; }
.autofield { background: var(--auto-bg); color: #595959; font-style: italic; padding: 6px 8px; }
.inputfield { background: var(--input-bg); }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar label { font-size: 12.5px; color: var(--grey); display: flex; flex-direction: column; gap: 3px; font-weight: 600; }
button.btn {
  border: none; border-radius: 6px; padding: 8px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--procon-accent); color: #fff; align-self: flex-end;
}
button.btn.secondary { background: var(--lightgrey); color: var(--txt); }
button.btn:hover { filter: brightness(1.08); }
.del-btn { background: none; border: none; color: var(--red); cursor: pointer; font-size: 15px; }

.kpi-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.kpi { background: #fff; border-radius: 8px; padding: 10px 16px; min-width: 160px; border: 1px solid var(--lightgrey); }
.kpi .label { font-size: 11px; color: var(--grey); text-transform: uppercase; letter-spacing: .5px; }
.kpi .value { font-size: 20px; font-weight: 700; color: var(--procon-blue); }

.year-picker { display:flex; align-items:center; gap:8px; margin-bottom: 14px; }
.year-picker select { width: auto; font-weight: 700; }

.jp-wrap { overflow-x: auto; border: 1px solid var(--lightgrey); border-radius: 8px; }
table.jp { min-width: 1400px; }
table.jp th, table.jp td { padding: 3px 4px; font-size: 10.5px; text-align: center; white-space: nowrap; }
table.jp td.name, table.jp th.name { text-align: left; position: sticky; left: 0; background: var(--offwhite); z-index: 2; min-width: 170px; font-style: italic; color: #595959;}
table.jp th.name { background: var(--procon-blue); color:#fff; z-index: 3; }
table.jp tr.gewerk-header th { color: #fff; text-align: left; font-size: 13px; padding: 6px 8px; }
table.jp td.u { background: var(--u-bg); font-weight: 700; }
table.jp tr.anwesend td { font-weight: 700; background: #FAFAFA; }
table.jp tr.soll td { background: #FAFAFA; }
table.jp td.green { background: var(--green-bg); }
table.jp td.amber { background: var(--amber-bg); }
table.jp td.red { background: var(--red-bg); color: #9C0006; font-weight: 800; }
table.jp td.kw { font-weight:700; background: var(--lightgrey); }

.error-msg { color: var(--red); font-size: 12.5px; margin-top: 6px; }

footer { text-align: center; padding: 20px; color: var(--grey); font-size: 12px; }
@media print { nav.tabs, .toolbar, button { display: none !important; } section.tabpanel { display: block !important; } }
