/* ZS-Einsatz – gemeinsames Stylesheet für Portal und alle Anwendungen
   Grundlage: CD-Manual Kanton Zürich (Arial Regular/Black, Cyan & Blau ZH, Halbgeviertstrich-Aufzählungen,
   nur Hyperlinks unterstrichen, WCAG-AA-Kontraste). */

:root {
  --zh-cyan: #009EE0;      /* Flagge / Spickel – nur Flächen, nicht für Text auf Weiss */
  --zh-blau: #0070B4;      /* Hintergrund Löwenbild, Buttons */
  --zh-blau-text: #0062A0; /* Links auf Weiss (Kontrast > 5:1) */
  --zh-rot: #B8001A;
  --zh-gruen: #2E7D32;
  --ink: #000;
  --ink-2: #4a4a4a;
  --line: #d6d6d6;
  --bg: #f4f6f8;
  --card: #fff;
  --radius: 4px;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-black: "Arial Black", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.45 var(--font); color: var(--ink); background: var(--bg);
}
h1, h2, h3 { font-family: var(--font-black); font-weight: 900; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--zh-blau-text); }
a:hover { color: #003f6b; }
:focus-visible { outline: 3px solid var(--zh-cyan); outline-offset: 2px; }

/* Aufzählungen mit Halbgeviertstrich gemäss CD */
.zs-main ul:not(.zs-plain) { list-style: none; padding-left: 1.1em; }
.zs-main ul:not(.zs-plain) > li { position: relative; }
.zs-main ul:not(.zs-plain) > li::before { content: "–"; position: absolute; left: -1.1em; }

.zs-skip { position: absolute; left: -9999px; }
.zs-skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }

/* ---------- Kopfzeile ---------- */
.zs-top { background: #fff; border-bottom: 1px solid var(--line); }
.zs-top-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.zs-brand { display: flex; align-items: flex-start; gap: 10px; text-decoration: none; color: var(--ink); }
.zs-flag { flex: none; color: #000; display: block; }
.zs-absender { display: flex; flex-direction: column; font-size: 12px; line-height: 15px; }
.zs-strong { font-family: var(--font-black); font-weight: 900; }
.zs-apptitle { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 24px; }
.zs-platform { font-size: 12px; color: var(--ink-2); }
.zs-appname { font-family: var(--font-black); font-weight: 900; font-size: 18px; }
.zs-usernav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; flex-wrap: wrap; }
.zs-usernav a { color: var(--ink); text-decoration: none; }
.zs-usernav a:hover { text-decoration: underline; }
.zs-inline { display: inline; margin: 0; }
.zs-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--zh-blau-text); cursor: pointer; text-decoration: underline; }

/* ---------- Inhalt ---------- */
.zs-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 16px 48px; }
.zs-main.zs-wide { max-width: none; }
.zs-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.zs-narrow { max-width: 560px; }
.zs-lead { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }

.zs-msg { border-left: 6px solid var(--zh-blau); background: #fff; padding: 12px 16px; margin: 0 0 20px; border-radius: var(--radius); }
.zs-msg-ok { border-color: var(--zh-gruen); }
.zs-msg-error { border-color: var(--zh-rot); }
.zs-msg-warn { border-color: #EB690B; }

/* ---------- Anwendungs-Kacheln ---------- */
.zs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.zs-tile {
  position: relative; display: flex; flex-direction: column; min-height: 170px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 22px 22px; text-decoration: none; color: var(--ink); overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.zs-tile::after { /* Spickel: 100 % Cyan, 45° */
  content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 44px;
  background: linear-gradient(45deg, var(--zh-cyan) 50%, transparent 50%);
}
.zs-tile:hover { border-color: var(--zh-blau); box-shadow: 0 4px 18px rgba(0,60,100,.12); transform: translateY(-2px); }
.zs-tile h2 { font-size: 1.2rem; margin-bottom: .35em; }
.zs-tile p { color: var(--ink-2); margin: 0 0 1.2em; font-size: .95rem; }
.zs-tile .zs-host { margin-top: auto; padding-left: 34px; font-size: 12px; color: var(--ink-2); }
.zs-empty { color: var(--ink-2); }

/* ---------- Formulare ---------- */
label { display: block; font-weight: bold; font-size: 14px; margin: 0 0 6px; }
.zs-field { margin-bottom: 18px; }
.zs-hint { font-weight: normal; color: var(--ink-2); font-size: 13px; margin-top: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #8a8a8a; border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--zh-blau); outline: 2px solid var(--zh-cyan); outline-offset: 0; }
.zs-check { display: flex; gap: 10px; align-items: flex-start; font-weight: normal; margin-bottom: 10px; }
.zs-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 18px; }
legend { font-weight: bold; padding: 0 6px; }

.zs-btn {
  display: inline-block; font: bold 15px var(--font); padding: 11px 20px; border-radius: var(--radius);
  background: var(--zh-blau); color: #fff; border: 2px solid var(--zh-blau); cursor: pointer; text-decoration: none;
}
.zs-btn:hover { background: #005a91; border-color: #005a91; color: #fff; }
.zs-btn-sec { background: #fff; color: var(--zh-blau-text); }
.zs-btn-sec:hover { background: #eaf4fb; color: #003f6b; }
.zs-btn-danger { background: #fff; color: var(--zh-rot); border-color: var(--zh-rot); }
.zs-btn-danger:hover { background: var(--zh-rot); color: #fff; border-color: var(--zh-rot); }
.zs-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* ---------- Tabellen ---------- */
.zs-tablewrap { overflow-x: auto; }
table.zs-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.zs-table th, .zs-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.zs-table th { font-family: var(--font-black); font-weight: 900; font-size: 13px; background: #eef2f5; }
.zs-table tr:hover td { background: #f8fafb; }
.zs-badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #e6eef4; color: #12384f; margin: 0 4px 4px 0; white-space: nowrap; }
.zs-badge-admin { background: #0070B4; color: #fff; }
.zs-badge-off { background: #f3d6da; color: #6b0010; }

.zs-pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.zs-pagehead h1 { margin: 0; }
.zs-subnav { display: flex; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; border-bottom: 2px solid var(--line); }
.zs-subnav a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.zs-subnav a[aria-current=page] { border-color: var(--zh-blau); font-weight: bold; }

.zs-secret { font: bold 20px/1.2 ui-monospace, Menlo, Consolas, monospace; background: #eef2f5; padding: 12px 16px; border-radius: var(--radius); display: inline-block; letter-spacing: .05em; user-select: all; }

/* ---------- Login-Seite (Löwe auf Blau gemäss CD) ---------- */
body.zs-bare { background: var(--zh-blau); }
.zs-main-bare { max-width: none; padding: 0; display: flex; }
.zs-login {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 460px); min-height: 100vh;
  background: #0070B4 url("loewe.jpg") left center / auto 100% no-repeat;
}
.zs-login-brand { min-height: 200px; }
.zs-login-panel .zs-platformname { font-family: var(--font-black); font-weight: 900; font-size: 2.6rem; line-height: 1; letter-spacing: -.02em; margin: 0 0 28px; color: var(--zh-blau); }
.zs-login-panel { background: #fff; padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.zs-login-panel .zs-brand { margin-bottom: 40px; }
.zs-login-panel h1 { font-size: 1.35rem; }
.zs-login-panel .zs-btn { width: 100%; padding: 13px; font-size: 16px; }
.zs-login-panel .zs-note { margin-top: 28px; font-size: 13px; color: var(--ink-2); }
.zs-bare .zs-foot { display: none; }

/* ---------- Fusszeile ---------- */
.zs-foot { border-top: 1px solid var(--line); background: #fff; font-size: 12px; color: var(--ink-2); }
.zs-foot { display: flex; justify-content: space-between; gap: 16px; padding: 14px max(16px, calc((100% - 1148px) / 2)); flex-wrap: wrap; }

@media (max-width: 820px) {
  .zs-login { grid-template-columns: 1fr; background-size: auto 32vh; background-position: left top; }
  .zs-login-brand { min-height: 32vh; }
  .zs-login-panel { padding: 28px 20px 40px; justify-content: flex-start; }
  .zs-login-panel .zs-brand { margin-bottom: 24px; }
  .zs-login-panel .zs-platformname { font-size: 2rem; margin-bottom: 16px; }
  .zs-apptitle { border-left: 0; padding-left: 0; }
  .zs-usernav { margin-left: 0; width: 100%; }
  h1 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) { .zs-tile { transition: none; } .zs-tile:hover { transform: none; } }
@media print { .zs-top, .zs-foot, .zs-usernav { display: none; } body { background: #fff; } }
