:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --primary: #0f7f8a;
  --primary-dark: #0b3554;
  --accent: #f5a623;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --dark: #0f172a;
  --shadow: 0 20px 50px rgba(15, 23, 42, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 127, 138, .16), transparent 30rem),
    radial-gradient(circle at top right, rgba(245, 166, 35, .10), transparent 28rem),
    var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 3vw, 2rem);
  background: rgba(15, 23, 42, .92);
  color: #fff;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand { color: #fff; display: flex; align-items: center; gap: .75rem; text-decoration: none; min-width: max-content; }
.brand:hover { text-decoration: none; }
.brand-logo-wrap {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  overflow: hidden;
}
.brand-logo-wrap img { width: 38px; height: 38px; object-fit: contain; display: block; }
.brand strong { font-size: 1.08rem; letter-spacing: -.035em; }
.brand small { display: block; color: #b6c2d6; font-size: .78rem; margin-top: .1rem; }
.main-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.main-nav a { color: #dbeafe; padding: .58rem .8rem; border-radius: 999px; font-weight: 650; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.nav-toggle { display: none; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: .6rem .8rem; }

.content { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1rem, 3vw, 2rem) 0 2.5rem; flex: 1; }
.footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2rem); color: var(--muted); font-size: .9rem; }

.hero, .page-head {
  display: flex; justify-content: space-between; align-items: stretch; gap: 1rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15,23,42,.98), rgba(11,53,84,.94)),
    var(--dark);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}
.hero::after, .page-head::after {
  content: ""; position: absolute; right: -5rem; bottom: -5rem; width: 16rem; height: 16rem;
  border: 1.4rem solid rgba(255,255,255,.06); border-radius: 50%;
}
.hero > *, .page-head > * { position: relative; z-index: 1; }
.hero h1, .page-head h1 { margin: .2rem 0 .4rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: .98; letter-spacing: -.055em; }
.hero p, .page-head p { max-width: 56rem; color: #dbeafe; margin: 0; }
.hero.compact h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; color: #8ee1e7 !important; margin: 0 0 .3rem !important; }
.hero-logo-card, .login-logo-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  padding: .65rem .85rem;
  width: min(560px, 100%);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  margin-bottom: 1rem;
}
.hero-logo-card { width: min(360px, 100%); padding: .55rem .75rem; }
.hero-logo-card img, .login-logo-card img { display: block; width: 100%; height: auto; }
.hero-stat {
  min-width: 240px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.1); border-radius: 24px; padding: 1rem;
  display: grid; align-content: center; backdrop-filter: blur(12px); z-index: 1;
}
.hero-stat span { color: #bfdbfe; }
.hero-stat strong { font-size: 2.1rem; letter-spacing: -.05em; }
.hero-stat small { color: #dbeafe; }

.card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(219,227,239,.9);
  border-radius: 24px;
  padding: clamp(1rem, 2.4vw, 1.4rem);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card h2, .card h3 { margin-top: 0; letter-spacing: -.035em; }
.card.narrow { max-width: 620px; margin-inline: auto; }
.card-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.align-start { align-items: start; }

.login-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1rem; min-height: min(640px, calc(100vh - 7rem)); align-items: center; }
.login-panel { color: #fff; background: linear-gradient(135deg, #0f172a, #0b3554 62%, #0f7f8a); padding: clamp(1.5rem, 4vw, 3rem); border-radius: 32px; box-shadow: var(--shadow); }
.login-panel h1 { font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: .96; letter-spacing: -.06em; margin: .2rem 0 1rem; }
.login-panel p { color: #dbeafe; font-size: 1.1rem; }
.login-card { margin: 0; }
.mini-stats { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.mini-stats span { background: rgba(255,255,255,.12); color: #fff; padding: .45rem .7rem; border-radius: 999px; font-weight: 700; }

.form-grid, .start-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.form-grid label, .start-form label { display: grid; gap: .35rem; font-weight: 750; color: #334155; }
label small { color: var(--muted); font-weight: 500; }
.span-2 { grid-column: span 2; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: .82rem .9rem;
  font: inherit; color: var(--text); background: #fff;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(37, 99, 235, .16); border-color: var(--primary); }
.inline-form { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 0; border-radius: 999px; padding: .78rem 1rem;
  font-weight: 800; cursor: pointer; text-decoration: none; line-height: 1;
  background: #e2e8f0; color: var(--text);
}
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn.primary:hover { box-shadow: 0 10px 24px rgba(15, 127, 138, .18); }
.btn.secondary { background: #dbeafe; color: #1d4ed8; }
.btn.danger { background: #fee2e2; color: #991b1b; }
.btn.ghost { background: #f1f5f9; color: #334155; }
.btn.wide { width: 100%; }
.btn.tiny { padding: .46rem .65rem; font-size: .82rem; }
.button-row { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.quicklinks { display: flex; gap: .7rem; flex-wrap: wrap; }

.active-timer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; border-left: 8px solid var(--success); }
.active-timer.status-paused { border-left-color: var(--warning); }
.timer-box { text-align: right; padding: .8rem 1rem; background: #f8fafc; border-radius: 18px; min-width: 170px; }
.timer-box span { display: block; font-size: 2rem; font-weight: 900; letter-spacing: -.05em; }
.timer-box small { color: var(--muted); }
.note { background: #f8fafc; border: 1px solid var(--line); padding: .8rem; border-radius: 14px; }

.metric-list { display: grid; gap: .7rem; }
.metric-list div, .day-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.metric-list div:last-child, .day-list div:last-child { border-bottom: 0; }
.metric-list span, .day-list span { color: var(--muted); }
.metric-list strong, .day-list strong { font-size: 1.1rem; }
.positive { color: var(--success); }
.negative { color: var(--danger); }
.muted { color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1rem; box-shadow: var(--shadow); }
.stat-card span, .stat-card small { color: var(--muted); display: block; }
.stat-card strong { display: block; font-size: 1.8rem; letter-spacing: -.05em; margin: .25rem 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .75rem .65rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #334155; font-size: .86rem; text-transform: uppercase; letter-spacing: .06em; }
td small { color: var(--muted); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }
.pill { display: inline-flex; padding: .32rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 800; background: #e2e8f0; }
.pill.running { background: #dcfce7; color: #166534; }
.pill.paused { background: #fef3c7; color: #92400e; }
.pill.completed { background: #dbeafe; color: #1e40af; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-card { position: relative; display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.project-card.inactive { opacity: .55; }
.color-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 5px color-mix(in srgb, var(--dot) 20%, transparent); }
.project-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.project-actions form { margin: 0; }
.info-card { background: #f8fafc; }
.info-list { display: grid; gap: .7rem; }
.info-list div { display: grid; gap: .2rem; border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.info-list dt { color: var(--muted); font-weight: 700; }
.info-list dd { margin: 0; word-break: break-word; }
code { background: #e2e8f0; border-radius: 8px; padding: .15rem .35rem; }

.bar-list { display: grid; gap: .9rem; }
.bar-row { display: grid; gap: .4rem; }
.bar-row small { display: block; color: var(--muted); }
.bar { height: 12px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--bar, var(--primary)); min-width: 4px; }

.flash { padding: .85rem 1rem; border-radius: 16px; margin-bottom: 1rem; border: 1px solid transparent; font-weight: 700; }
.flash.success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.flash.error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.flash.warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }

@media (max-width: 920px) {
  .grid.two, .login-layout { grid-template-columns: 1fr; }
  .stats-grid, .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero, .page-head, .active-timer { grid-template-columns: 1fr; display: grid; }
  .timer-box { text-align: left; }
}

@media (max-width: 680px) {
  .content { width: min(100% - 1rem, 1180px); }
  .topbar { align-items: flex-start; }
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: .75rem; right: .75rem; top: 4.6rem; padding: .75rem; border-radius: 20px; background: rgba(15,23,42,.96); box-shadow: var(--shadow); }
  .main-nav.open { display: grid; }
  .main-nav a { width: 100%; }
  .form-grid, .start-form, .stats-grid, .project-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .footer { flex-direction: column; }
  .hero h1, .page-head h1 { font-size: 2rem; }
  .brand-logo-wrap { width: 40px; height: 40px; border-radius: 14px; }
  .brand-logo-wrap img { width: 32px; height: 32px; }
  .brand small { display: none; }
}


.check-fieldset {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: #f8fafc;
  display: grid;
  gap: .7rem;
}
.check-fieldset legend {
  font-weight: 900;
  color: #0f172a;
  padding: 0 .25rem;
}
.small { font-size: .9rem; }
.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: .65rem !important;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}
.check-row input {
  width: auto;
  margin-top: .15rem;
  accent-color: var(--primary);
}
.check-row span { display: grid; gap: .15rem; }
.badge-row { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .55rem; }
.legal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .48rem;
  margin: .1rem .16rem .1rem 0;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.muted-badge { background: #f1f5f9; color: #64748b; }
.legal-check-card { border-left: 8px solid #0891b2; }
.legal-check-list { display: grid; gap: .65rem; margin-top: .8rem; }
.legal-check {
  display: grid;
  gap: .22rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafc;
}
.legal-check.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.legal-check.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.legal-check strong { color: inherit; }
.ok-line {
  margin: .8rem 0 0;
  padding: .85rem 1rem;
  border-radius: 16px;
  background: #dcfce7;
  color: #166534;
  font-weight: 800;
}

/* RFID/NFC */
.rfid-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rfid-card {
  display: grid;
  gap: .9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.rfid-card.inactive { opacity: .58; }
.rfid-card h3 { margin: 0 0 .35rem; }
.rfid-card label { display: grid; gap: .35rem; font-weight: 750; color: #334155; margin-top: .55rem; }
.rfid-card input[readonly], .info-card input[readonly] { font-size: .88rem; background: #f8fafc; cursor: copy; }
.terminal-card {
  border-left: 8px solid var(--primary);
  background:
    radial-gradient(circle at top right, rgba(15, 127, 138, .12), transparent 18rem),
    rgba(255,255,255,.9);
}
.terminal-form { display: grid; gap: 1rem; }
.terminal-form label { display: grid; gap: .4rem; font-weight: 800; }
.terminal-form input {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  padding: 1.1rem;
  border-radius: 22px;
}
.soft-separator { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.pill.success { background: #dcfce7; color: #166534; }
.pill.warning { background: #fef3c7; color: #92400e; }
.pill.error { background: #fee2e2; color: #991b1b; }
@media (max-width: 920px) { .rfid-grid { grid-template-columns: 1fr; } }

/* Pausen-Editor */
.pause-editor {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  padding: 1rem;
  display: grid;
  gap: .8rem;
}
.pause-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
}
.pause-editor-head strong { display: block; font-size: 1rem; color: #0f172a; }
.pause-editor-head small { display: block; margin-top: .18rem; color: var(--muted); font-weight: 600; }
.pause-rows { display: grid; gap: .65rem; }
.pause-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: end;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.pause-row label { display: grid; gap: .35rem; font-weight: 750; color: #334155; }
.legacy-break-note {
  margin: 0;
  padding: .75rem .85rem;
  border-radius: 14px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}
@media (max-width: 680px) {
  .pause-editor-head { display: grid; }
  .pause-row { grid-template-columns: 1fr; }
  .pause-row .btn { width: 100%; }
}


/* Feiertage */
.hero-note {
  margin-top: .85rem !important;
  display: inline-flex;
  padding: .55rem .75rem;
  border-radius: 999px;
  color: #fff7ed !important;
  background: rgba(245, 166, 35, .18);
  border: 1px solid rgba(245, 166, 35, .28);
  font-weight: 800;
}
.holiday-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .5rem;
  margin: .1rem .16rem .1rem 0;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.holiday-card { border-left: 8px solid var(--accent); }
.holiday-list { display: grid; gap: .5rem; margin-top: .8rem; }
.holiday-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem .85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.holiday-list strong { white-space: nowrap; }
.holiday-list span { color: var(--muted); text-align: right; }
@media (max-width: 680px) {
  .holiday-list div { display: grid; gap: .2rem; }
  .holiday-list span { text-align: left; }
}


/* Urlaub & Abwesenheiten */
.absence-card { border-left: 8px solid #14b8a6; }
.absence-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem .5rem;
  margin: .1rem .16rem .1rem 0;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #a5f3fc;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.absence-badge.type-vacation { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.absence-badge.type-sick { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.absence-badge.type-comp_time { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.metric-list.compact div { padding: .65rem .75rem; }


/* v0.1.9: reduzierter Login */
body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(15, 127, 138, .18), transparent 32rem),
    radial-gradient(circle at 85% 20%, rgba(245, 166, 35, .11), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}
body.login-page .topbar,
body.login-page .footer {
  display: none;
}
body.login-page .content {
  width: min(100% - 2rem, 760px);
  padding: clamp(2.2rem, 7vh, 5rem) 0;
  display: grid;
  place-items: center;
}
.simple-login-layout {
  width: 100%;
  min-height: calc(100vh - clamp(4rem, 14vh, 10rem));
  display: grid;
  place-items: center;
}
.simple-login-card {
  width: min(100%, 560px);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(219,227,239,.95);
  border-radius: 34px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .11);
  padding: clamp(1.35rem, 4vw, 2.5rem);
}
.simple-login-logo {
  width: min(100%, 420px);
  margin: 0 auto clamp(1.3rem, 4vw, 2rem);
  padding: clamp(.45rem, 2vw, .85rem);
  border-radius: 26px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(219,227,239,.82);
}
.simple-login-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.simple-login-form {
  display: grid;
  gap: 1rem;
}
.simple-login-form label {
  display: grid;
  gap: .4rem;
  color: #334155;
  font-weight: 800;
}
.simple-login-form input {
  border-radius: 18px;
  padding: 1rem 1.05rem;
  font-size: 1.03rem;
  background: #fff;
}
.simple-login-form .login-submit {
  min-height: 3.25rem;
  margin-top: .15rem;
  font-size: 1rem;
}

@media (max-width: 680px) {
  body.login-page .content {
    width: min(100% - 1rem, 760px);
    padding: 1rem 0;
  }
  .simple-login-card {
    border-radius: 26px;
    padding: 1rem;
  }
  .simple-login-logo {
    border-radius: 20px;
    margin-bottom: 1rem;
  }
}


/* v0.2.0: optimiertes Logo */
.simple-login-logo { width: min(100%, 460px); }
.hero-logo-card img, .login-logo-card img, .simple-login-logo img { image-rendering: auto; }

.project-export-row { grid-template-columns: minmax(0, 1fr); }
.compact-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .15rem; }

/* v0.2.2: Monatsabschluss & Änderungsprotokoll */
.btn.warning { background: #fef3c7; color: #92400e; }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: grayscale(.2); }
.button-row.left { justify-content: flex-start; }
.closure-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  border-left: 6px solid var(--primary);
  flex-wrap: wrap;
}
.closure-alert.is-closed,
.closure-status-card.is-closed { border-left-color: var(--accent); }
.closure-alert.is-open,
.closure-status-card.is-open { border-left-color: var(--success); }
.closure-alert strong { font-size: 1rem; }
.closure-alert span { color: var(--muted); flex: 1; min-width: 220px; }
.closure-status-card { border-left: 8px solid var(--success); }
.closure-links { margin-top: 1rem; }
.closure-badge {
  display: inline-flex;
  align-items: center;
  padding: .28rem .52rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 850;
  background: #fef3c7;
  color: #92400e;
}
.tiny-reason {
  min-width: 150px;
  width: 150px;
  padding: .42rem .55rem;
  border-radius: 999px;
  font-size: .82rem;
}
details summary { cursor: pointer; font-weight: 800; color: var(--primary); }
pre {
  max-width: 540px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 14px;
  padding: .8rem;
  font-size: .78rem;
  line-height: 1.35;
}
@media (max-width: 700px) {
  .closure-alert { align-items: stretch; }
  .closure-alert .btn { width: 100%; }
  .tiny-reason { width: 100%; min-width: 0; border-radius: 12px; }
}


.workday-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .75rem;
  padding: .85rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 1rem;
  background: rgba(248, 250, 252, .78);
}
.workday-grid label {
  margin: 0;
}
.workday-grid input {
  text-align: center;
  font-weight: 700;
}
.model-presets {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.stat-card small,
.day-list small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  margin-top: .18rem;
}

.offline-sync-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(245, 158, 11, .35);
    border-radius: 1rem;
    background: #fff7ed;
    color: #7c2d12;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.offline-sync-banner[hidden] { display: none !important; }
.offline-sync-banner.is-offline {
    border-color: rgba(14, 165, 233, .35);
    background: #eff6ff;
    color: #075985;
}
.offline-sync-banner.has-queue {
    font-weight: 700;
}
@media (max-width: 680px) {
    .offline-sync-banner {
        align-items: stretch;
        flex-direction: column;
    }
    .offline-sync-banner .btn {
        width: 100%;
    }
}

.pwa-update-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(20, 184, 166, .35);
    border-radius: 1rem;
    background: #ecfeff;
    color: #134e4a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.pwa-update-banner[hidden] { display: none !important; }
.pwa-update-banner strong,
.pwa-update-banner span { display: block; }
.pwa-update-banner span { margin-top: .1rem; font-size: .92rem; font-weight: 600; }
@media (max-width: 680px) {
    .pwa-update-banner {
        align-items: stretch;
        flex-direction: column;
    }
    .pwa-update-banner .btn {
        width: 100%;
    }
}

/* v0.3.1 Backup & Wiederherstellung */
.inline-details { position: relative; display: inline-block; }
.inline-details > summary { list-style: none; }
.inline-details > summary::-webkit-details-marker { display: none; }
.compact-danger-form {
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 30;
  min-width: min(360px, 90vw);
  display: grid;
  gap: .7rem;
  padding: .9rem;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}
.compact-danger-form label { display: grid; gap: .35rem; font-weight: 750; color: #334155; }
.danger-zone { border-color: #fecaca; background: rgba(255, 247, 247, .9); }
.note-card { background: #f8fafc; }
.compact-metrics div { padding: .55rem 0; }
@media (max-width: 760px) {
  .compact-danger-form { position: static; margin-top: .6rem; min-width: 0; width: 100%; }
  .actions { align-items: stretch; }
}


/* v0.3.2 Benutzer & Rollen */
.project-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .6rem;
}
.project-access-grid .check-row {
  background: rgba(15, 23, 42, .03);
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: .65rem .75rem;
}
.role-badge, .pill.completed, .pill.paused {
  white-space: nowrap;
}


/* v0.3.6 Zeitkonto */
.stat-card.highlight { border-color: rgba(20, 184, 166, .45); background: linear-gradient(135deg, rgba(20,184,166,.12), rgba(15,23,42,.03)); }
.table-wrap tr.is-current-row { background: rgba(20, 184, 166, .08); }
.positive { color: #047857; }
.negative { color: #b91c1c; }
.btn.danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.btn.danger:hover { background: #fecaca; }

/* v0.3.6.1 Zeitkonto-Buchungsformular-Hotfix */
.time-account-booking-form select:invalid { color: var(--muted); }

/* v0.3.6.3: robustes Zeitkonto-Buchungsformular */
.time-account-add-card .badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .78rem;
  font-weight: 750;
  background: #e0f2fe;
  color: #075985;
}
.time-account-booking-form.plain-form input,
.time-account-booking-form.plain-form select {
  min-height: 2.75rem;
}
@media (max-width: 760px) {
  .time-account-plain-grid { grid-template-columns: 1fr !important; }
}

/* v0.3.7 Urlaub beantragen & genehmigen */
.absence-request-card .table-wrap { margin-top: .5rem; }
.request-list.compact { display: grid; gap: .65rem; }
.request-item { padding: .75rem .85rem; border: 1px solid rgba(148, 163, 184, .25); border-radius: 1rem; background: rgba(248, 250, 252, .78); }
.request-item strong { display: block; color: var(--text, #0f172a); }
.request-item span { display: block; margin-top: .15rem; color: var(--muted, #64748b); font-size: .9rem; }
.inline-decision-form { display: grid; grid-template-columns: minmax(12rem, 1fr) auto auto; gap: .4rem; align-items: center; }
.inline-decision-form input { min-width: 12rem; }
.wide-actions { min-width: 24rem; }
.pill.rejected, .pill.planned { background: rgba(245, 158, 11, .14); color: #92400e; }
.pill.approved, .pill.taken { background: rgba(34, 197, 94, .14); color: #166534; }
.absence-row.status-rejected { opacity: .72; }
.btn.success { background: #16a34a; color: #fff; border-color: #16a34a; }
@media (max-width: 760px) {
  .inline-decision-form { grid-template-columns: 1fr; }
  .wide-actions { min-width: 0; }
}
