/* SVS Roadmap – neutrales Design mit farbigen Prio-Highlights an den Karten. */

/* Schrift aus dem Theme mitverwenden (liegt auf dem Server im Theme-Ordner). */
@font-face { font-family: 'Roboto'; src: url('/wp-content/themes/svs-theme-2026/assets/fonts/roboto-300.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/wp-content/themes/svs-theme-2026/assets/fonts/roboto-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/wp-content/themes/svs-theme-2026/assets/fonts/roboto-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/wp-content/themes/svs-theme-2026/assets/fonts/roboto-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg:        #f4f5f6;
  --surface:   #ffffff;
  --col-bg:    #eef0f2;
  --accent:    #3a4049;      /* neutrales Anthrazit */
  --accent-2:  #23282f;      /* dunkler (Hover) */
  --accent-ink:#ffffff;
  --ink:       #1d2125;
  --muted:     #6b7280;
  --line:      #e2e5e8;
  --chip-bg:   #eceef1;
  --chip-ink:  #40464e;
  --danger:    #c62828;

  /* Farb-Highlights der Prioritäten (bleiben bunt) */
  --prio-sehr-hoch: #c62828;
  --prio-hoch:      #d9641e;
  --prio-mittel:    #e0a100;
  --prio-niedrig:   #7a9f74;

  --radius:    8px;
  --radius-sm: 6px;
  --shadow:    0 1px 2px rgba(15,23,32,.06), 0 2px 8px rgba(15,23,32,.05);
  --font:      'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#1a1c1f; --surface:#24272b; --col-bg:#1e2125; --ink:#e6e8ea;
    --muted:#9aa2ab; --line:#333740; --accent:#cdd2d8; --accent-2:#e3e6e9;
    --accent-ink:#1a1c1f; --chip-bg:#2d3238; --chip-ink:#cfd4da;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 2px 10px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
/* Muss stärker sein als .asap-note{display:grid} bzw. .ticket-form label{display:grid} */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-text-size-adjust: 100%;
}

/* ---------- Grundelemente ---------- */
.muted { color: var(--muted); }
.small { font-size: 13px; }
a { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .55em 1.05em; border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn-primary   { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: var(--chip-bg); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { filter: brightness(.97); }
.btn-ghost     { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(0,0,0,.04); }
.inline { display: inline; margin: 0; }

.alert { padding: .7em 1em; border-radius: var(--radius); margin: 0 0 14px; font-size: 14px; }
.alert.success { background: #eef3ee; color: #2f5d2a; border: 1px solid #cfe0cb; }
.alert.error   { background: #fbe4e2; color: #8a231c; border: 1px solid #efbbb6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert.success { background:#232a22; color:#bcd6b6; border-color:#394636; }
  :root:not([data-theme="light"]) .alert.error   { background:#3a201e; color:#f0bdb8; border-color:#5e302b; }
}

/* ---------- Topbar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow); }
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .5em; font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: .2px; }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); display: inline-block; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role-badge { font-size: 12px; font-weight: 700; padding: .3em .7em; border-radius: 999px; }
.role-admin  { background: var(--accent); color: var(--accent-ink); }
.role-member { background: var(--chip-bg); color: var(--ink); }

/* ---------- Login ---------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; box-shadow: var(--shadow); padding: 30px; width: 100%; max-width: 380px; }
.login-card .brand { font-size: 21px; margin-bottom: 6px; }
.login-form { display: grid; gap: 14px; margin: 18px 0 2px; }
.login-form label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }

/* ---------- Eingabefelder ---------- */
input[type=text], input[type=password], input[type=search], select, textarea {
  font-family: var(--font); font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6em .7em; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; }

/* ---------- Board ---------- */
.board-main, .form-main { max-width: 1400px; margin: 0 auto; padding: 18px 16px 60px; }

.stats { display: flex; gap: 10px 20px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.stats strong { color: var(--ink); font-size: 16px; }
.stat-asap strong { color: var(--prio-sehr-hoch); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 16px; box-shadow: var(--shadow); }
.filters #f-search { flex: 1 1 240px; min-width: 180px; }
.filters select { width: auto; flex: 0 0 auto; }
.check { display: inline-flex; align-items: center; gap: .4em; font-size: 14px; white-space: nowrap; }
.check input { width: auto; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.column { background: var(--col-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.col-head { margin: 2px 2px 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.col-count { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .1em .6em; font-size: 12px; font-weight: 700; }
.col-body { display: grid; gap: 10px; min-height: 20px; }
.col-empty { color: var(--muted); text-align: center; padding: 10px; margin: 0; }

/* ---------- Karten (mit farbigen Prio-Highlights) ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 4px solid var(--prio-niedrig); }
.card.prio-sehr-hoch { border-left-color: var(--prio-sehr-hoch); }
.card.prio-hoch      { border-left-color: var(--prio-hoch); }
.card.prio-mittel    { border-left-color: var(--prio-mittel); }
.card.prio-niedrig   { border-left-color: var(--prio-niedrig); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tid { font-size: 12px; font-weight: 700; color: var(--muted); }
.card-title { margin: 0 0 6px; font-size: 15px; font-weight: 500; line-height: 1.3; }
.card-desc { margin: 0 0 8px; font-size: 13.5px; color: var(--ink); white-space: pre-wrap; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; font-weight: 500; padding: .28em .62em; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink); }
.chip-prio { font-weight: 700; color: #fff; }
.chip-prio.prio-sehr-hoch { background: var(--prio-sehr-hoch); }
.chip-prio.prio-hoch      { background: var(--prio-hoch); }
.chip-prio.prio-mittel    { background: var(--prio-mittel); color: #4a3700; }
.chip-prio.prio-niedrig   { background: var(--prio-niedrig); color: #0f240d; }
.chip-date.due { background: var(--prio-sehr-hoch); color: #fff; }
.chip-asap { background: var(--prio-sehr-hoch); color: #fff; font-weight: 700; }
.card-reporter { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: italic; }

.card-actions { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-select { font-size: 12.5px; padding: .35em .4em; width: auto; }
.btn-mini { font-size: 12.5px; font-weight: 500; padding: .4em .6em; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn-mini:hover { background: rgba(0,0,0,.05); }
.btn-danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn-danger:hover { background: rgba(198,40,40,.1); }

.noresults { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- Formular ---------- */
.form-main h1 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 6px 0 14px; }
.ticket-form { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 14px; max-width: 720px; }
.ticket-form label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.asap-note { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.asap-note .label-like { color: var(--ink); }
.asap-box { display: flex; align-items: center; gap: .4em; background: #fbe4e2; color: var(--prio-sehr-hoch); border: 1px solid #efbbb6; border-radius: var(--radius-sm); padding: .6em .7em; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .asap-box { background:#3a201e; border-color:#5e302b; color:#f0a9a3; } }

/* ---------- Drawer (Dialog rechts) ---------- */
dialog.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(460px, 100%);
  border: none; padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: -10px 0 40px rgba(15,23,32,.22); overflow: hidden;
}
dialog.drawer[open] { display: flex; flex-direction: column; animation: drawerIn .24s ease; }
dialog.drawer::backdrop { background: rgba(15,23,32,.45); }
dialog.drawer[open]::backdrop { animation: backdropIn .24s ease; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.drawer-close { background: transparent; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 6px; border-radius: 6px; }
.drawer-close:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.drawer-body { padding: 16px 18px 28px; overflow-y: auto; flex: 1 1 auto; }

/* Formular im Drawer: ohne Karten-Rahmen, volle Breite */
.drawer-body .ticket-form { border: none; box-shadow: none; border-radius: 0; padding: 0; max-width: none; background: transparent; }
.drawer-body .form-tip { margin-top: 0; }

/* ---------- Deadline-Dropdown (farbige Zahlen) ---------- */
.dd { position: relative; }
.dd-toggle { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6em .7em; font: inherit; color: var(--ink); cursor: pointer; }
.dd-toggle::after { content: '▾'; margin-left: auto; color: var(--muted); }
.dd-toggle[aria-expanded="true"]::after { content: '▴'; }
.dd-list { position: absolute; z-index: 6; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 4px; }
.dd-option { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: none; border-radius: 6px; padding: .5em .55em; font: inherit; color: var(--ink); cursor: pointer; }
.dd-option:hover, .dd-option.sel { background: rgba(0,0,0,.06); }
.dc-date { font-variant-numeric: tabular-nums; }
.dc-none { color: var(--muted); }
.dc-counts { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.dc-zero { color: var(--muted); font-weight: 400; }
.c-sh { color: #c62828; } .c-h { color: #c2561a; } .c-m { color: #9a7400; } .c-n { color: #1f9d74; }
.dl-legend { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.dl-legend .c-sh, .dl-legend .c-h, .dl-legend .c-m, .dl-legend .c-n { font-weight: 700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dd-option:hover,
  :root:not([data-theme="light"]) .dd-option.sel { background: rgba(255,255,255,.08); }
  :root:not([data-theme="light"]) .c-sh { color: #ef7676; }
  :root:not([data-theme="light"]) .c-h  { color: #e8935a; }
  :root:not([data-theme="light"]) .c-m  { color: #d9b24a; }
  :root:not([data-theme="light"]) .c-n  { color: #56c79a; }
}

/* ---------- Responsiv ---------- */
@media (max-width: 920px) { .board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .topbar-inner { gap: 8px; }
  .brand { font-size: 16px; }
}
