/* Entwurf: gemeinsame Tokens, noch keine bestätigten Detailwerte. */
:root {
  --bg:#f5f5f5;
  --surface:#fff;
  --text:#24272e;
  --muted:#555b66;
  --border:#767a84;
  --accent:#c93f36;
  --action:#ff6257;
  --on-accent:#24272e;
  --focus:#c93f36;
  --error:#982436;
  --error-bg:#fff0f2;
  --success:#176143;
  --success-bg:#edf8f2;
  --warning:#835200;
  --warning-bg:#fff3d6;
  --action-hover:#ff7b71;
  --on-error:#fff;
  --hover-bg:#f0f0f1;
  --neutral:#3f444e;
  --neutral-bg:#ecedef;
  --hairline:#d9dbe0;
  --radius:18px;
  --ui-card-padding:24px;
  --ui-section-gap:20px;
  --ui-field-gap:16px;
  --ui-sidebar-width:248px;
  --ui-content-block:32px;
  --ui-content-inline:clamp(20px,4vw,64px);
  --ui-control-height:44px;
  --ui-control-padding:8px 12px;
  --ui-nav-padding:8px 12px;
  font-size:90%;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color-scheme:light;

}

:root[data-theme=dark] {
  --bg:#1b1d22;
  --surface:#24272e;
  --text:#fff;
  --muted:#b8bcc5;
  --border:#767a84;
  --accent:#ff6257;
  --on-accent:#24272e;
  --focus:#ff6257;
  --error:#ffb5c0;
  --error-bg:#3b202b;
  --success:#9be0bf;
  --success-bg:#1b352b;
  --warning:#ffd58c;
  --warning-bg:#392e1b;
  --on-error:#24272e;
  --hover-bg:#2c2f37;
  --neutral:#d7dae0;
  --neutral-bg:#33363e;
  --hairline:#3a3e47;
  color-scheme:dark;

}

* {
  box-sizing:border-box;

}
 body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  line-height:1.6;

}
 a {
  color:var(--accent);
  text-underline-offset:4px;

}
 button,input,select,textarea {
  font:inherit;

}
 a,button,input,select,summary {
  -webkit-tap-highlight-color:transparent;

}
 :focus-visible {
  outline:3px solid var(--focus);
  outline-offset:4px;

}
 h1,h2,p {
  margin-top:0;

}
 h1 {
  font-size:clamp(2rem,4vw,3.6rem);
  line-height:1.12;
  letter-spacing:-.04em;
  max-width:850px;
  margin-bottom:24px;
  overflow-wrap:anywhere;

}
 h2 {
  font-size:1.3rem;
  line-height:1.35;

}
 header {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:28px 6vw;
  align-items:center;

}
 .brand {
  font-size:1.55rem;
  letter-spacing:-.04em;
  font-weight:750;
  color:var(--text);
  text-decoration:none;

}
 main {
  max-width:1120px;
  padding:var(--ui-content-block) var(--ui-content-inline);
  margin:auto;

}
 main:focus {
  outline:none;

}
 .hero {
  max-width:800px;
  padding-top:5vh;

}
 .eyebrow {
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--accent);
  font-weight:700;
  font-size:.78rem;
  margin-bottom:20px;

}
 .lead {
  font-size:1.18rem;
  color:var(--muted);
  max-width:650px;
  margin-bottom:36px;

}
 .card {
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  padding:var(--ui-card-padding);
  margin:var(--ui-section-gap) 0;

}
 .auth-card {
  max-width:520px;
  margin:24px auto;

}
 .auth-card h1 {
  font-size:2.2rem;

}
 label {
  display:block;
  font-weight:600;
  margin-top:var(--ui-field-gap);
  margin-bottom:8px;

}
 input,select,textarea {
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--text);
  border-radius:12px;
  min-height:var(--ui-control-height);
  padding:var(--ui-control-padding);

}
 input {
  width:100%;

}
 input[aria-invalid=true],textarea[aria-invalid=true] {
  border-color:var(--error);

}
 button,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:var(--ui-control-height);
  padding:var(--ui-control-padding);
  border:1px solid transparent;
  border-radius:12px;
  color:var(--on-accent);
  background:var(--action);
  font-weight:650;
  text-decoration:none;
  cursor:pointer;
  transition:background-color .12s,filter .12s,box-shadow .12s;

}
 button:hover,.button:hover {
  filter:brightness(1.08);

}
 button:active:not(:disabled),.button:active {
  box-shadow:inset 0 2px 0 rgb(0 0 0 / .18);

}
 button:disabled {
  opacity:.5;
  cursor:not-allowed;
  filter:none;

}
 form>button {
  margin-top:var(--ui-section-gap);
  width:100%;

}
 .muted,.draft {
  color:var(--muted);

}
 .draft {
  font-size:.76rem;
  margin-top:40px;

}
 .theme-picker {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  margin:0;
  font-size:.88rem;

}
 .error {
  background:var(--error-bg);
  color:var(--error);
  border:1px solid var(--error);
  border-radius:12px;
  padding:20px;

}
 .error ul {
  padding-left:20px;
  margin-bottom:0;

}
 .notice {
  color:var(--success);

}
 .sidebar {
  width:var(--ui-sidebar-width);
  height:100dvh;
  position:fixed;
  top:0;
  left:0;
  background:var(--surface);
  border-right:1px solid var(--border);
  padding:30px 20px 20px;
  display:flex;
  flex-direction:column;
  gap:var(--ui-section-gap);

}
 .authenticated main {
  margin-left:var(--ui-sidebar-width);
  max-width:1300px;

}
 nav {
  display:flex;
  flex-direction:column;
  gap:12px;

}
 nav a,nav summary {
  display:block;
  min-height:var(--ui-control-height);
  padding:var(--ui-nav-padding);
  border-radius:12px;
  color:var(--text);
  text-decoration:none;

}
 nav a[aria-current=page] {
  background:var(--bg);
  color:var(--accent);
  font-weight:650;

}
 summary {
  cursor:pointer;

}
 nav summary {
  display:list-item;
  margin-left:20px;
  padding-left:0;

}
 nav .subitem {
  padding-left:32px;

}
 .mobile-menu {
  overflow:auto;
  flex:1;

}
 .mobile-menu>summary {
  display:none;

}
 .userbar {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:auto;

}
 .userbar form {
  flex:none;

}
 .userlink {
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  text-decoration:none;
  font-size:.88rem;
  flex:1;

}
 .userlink>span:last-child {
  overflow-wrap:anywhere;

}
 .avatar {
  background:var(--bg);
  border:1px solid var(--border);
  width:38px;
  height:38px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:none;
  font-weight:650;

}
 .icon-button {
  padding:10px;
  width:44px;
  min-height:44px;
  background:transparent;
  color:var(--text);

}
 svg {
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;

}
 .company-list {
  max-width:760px;

}
 .company-link {
  display:flex;
  justify-content:space-between;
  gap:20px;
  text-decoration:none;
  font-size:1.12rem;
  font-weight:650;

}
 dt {
  color:var(--muted);
  font-size:.9rem;

}
 dd {
  margin:0 0 24px;
  overflow-wrap:anywhere;

}
 .skip {
  position:fixed;
  top:-100px;
  left:20px;
  background:var(--surface);
  padding:10px;
  z-index:10;

}
 .skip:focus {
  top:10px;

}
 .sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);

}

@media(max-width:760px) {
  header {
  padding:20px;
  align-items:flex-start;

}
 header .theme-picker {
  justify-content:flex-end;
  max-width:160px;

}
 main {
  padding:32px 20px;

}
 .hero {
  padding-top:16px;

}
 .card {
  padding:min(var(--ui-card-padding),24px);

}
 .sidebar {
  position:static;
  height:auto;
  width:100%;
  border-right:0;
  border-bottom:1px solid var(--border);
  padding:20px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:20px;

}
 .mobile-menu {
  grid-column:1/-1;
  grid-row:2;

}
 .mobile-menu>summary {
  display:list-item;
  min-height:44px;
  padding:8px;

}
 .userbar {
  margin:0;
  max-width:60vw;

}
 .userlink {
  font-size:.8rem;

}
 .authenticated main {
  margin-left:0;

}
 nav {
  margin-top:12px;

}
 .auth-card {
  margin-top:12px;

}
 h1 {
  font-size:2.25rem;

}

}

@media(prefers-reduced-motion:reduce) {
  * {
  scroll-behavior:auto!important;
  animation:none!important;
  transition:none!important;

}

}

.userbar .icon-button {
  margin:0;
  width:44px;

}

.userlink {
  min-height:44px;

}

@media(max-width:760px) {
  .sidebar {
  grid-template-columns:minmax(0,1fr) auto;

}
 .userbar {
  max-width:48vw;

}
 .sidebar .brand {
  font-size:1.35rem;

}

}

.person-row { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:16px 0; border-bottom:1px solid var(--border); text-decoration:none; overflow-wrap:anywhere; }
.field-grid,.history-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.field-grid input,.field-grid select { width:100%; min-width:0; }
.image-picker-preview { display:block; max-width:100%; width:240px; height:120px; object-fit:contain; object-position:left center; margin:var(--ui-field-gap) 0; }
.contract-summary,.change { padding:20px 0; border-top:1px solid var(--border); }
.pagination { flex-direction:row; flex-wrap:wrap; justify-content:space-between; gap:16px; margin-top:24px; }
.pagination a { padding:8px; }
/* #479: shared page selection for ->links() */
.page-nav { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 16px; margin-top:var(--ui-field-gap); }
.page-nav-count { margin:0; color:var(--muted); }
.page-nav-list { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin:0; padding:0; list-style:none; }
.page-nav-page,.page-nav-step,.page-nav-gap { display:inline-flex; align-items:center; justify-content:center; min-width:var(--ui-control-height); min-height:var(--ui-control-height); padding:0 10px; border-radius:10px; text-decoration:none; }
a.page-nav-page,a.page-nav-step { color:var(--text); border:1px solid var(--hairline); }
a.page-nav-page:hover,a.page-nav-step:hover { background:var(--hover-bg); }
.page-nav-page[aria-current="page"] { background:var(--action); color:var(--on-accent); font-weight:700; }
.page-nav-step[aria-disabled="true"] { color:var(--muted); }
.issue-filter { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 12px; margin-bottom:var(--ui-field-gap); }
.issue-filter label { display:flex; flex-direction:column; gap:4px; }
@media(max-width:760px) { .field-grid,.history-grid { grid-template-columns:minmax(0,1fr); } }

.error { margin-bottom:24px; }
select[aria-invalid=true] { border-color:var(--error); }
.time-actions { display:flex; gap:16px; flex-wrap:wrap; }
.time-actions form { flex:1; min-width:140px; }
.time-actions button { margin-top:0; }
.timer output { font-size:2.4rem; font-weight:700; font-variant-numeric:tabular-nums; }

.time-actions { margin-bottom:16px; }

.check-field { display:flex; gap:12px; align-items:flex-start; }
.check-field input { width:24px; min-height:24px; flex:none; margin-top:3px; }

.account-select { width:100%; min-width:0; max-width:100%; }

.activity-text { white-space: pre-wrap; overflow-wrap: anywhere; }
textarea { font: inherit; width: 100%; max-width: 100%; padding: .75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); resize: vertical; }
.sidebar-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.notification-bell { position:relative; flex-shrink:0; }
.notification-badge { position:absolute; top:0; right:0; min-width:20px; padding:1px 5px; border-radius:20px; background:var(--action); color:var(--on-accent); font-size:.7rem; text-align:center; }
.notification-badge[hidden] { display:none; }
.notification-dialog { width:min(560px, calc(100vw - 24px)); max-height:calc(100dvh - 40px); padding:24px; border:1px solid var(--border); border-radius:18px; background:var(--surface); color:var(--text); overflow:auto; }
.notification-dialog::backdrop { background:var(--bg); opacity:.75; }
.notification-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.notification-heading h2 { margin:0; }
.notification-heading form { margin:0; }
.notification-item { border-top:1px solid var(--border); padding:16px 0; overflow-wrap:anywhere; }
.notification-item h3 { font-size:1rem; }
.notification-item p { margin:8px 0; }
.notification-item form { margin-top:12px; }
.notification-heading h2 { min-width:0; flex:1; overflow-wrap:anywhere; }
.notification-heading form { flex-shrink:0; }
@media(max-width:380px) {
  .notification-dialog { padding:18px; }
  .notification-heading { gap:8px; }
  .notification-heading h2 { font-size:1.1rem; }
}
.notification-heading .icon-button { margin:0; }
.notification-bell { display:inline-flex; align-items:center; justify-content:center; }
.avatar { overflow:hidden; }
.avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.avatar-large { width:96px; height:96px; font-size:2rem; }
.avatar-current { display:flex; align-items:center; gap:16px; margin:20px 0; }
.avatar-presets { display:flex; gap:16px; flex-wrap:wrap; }
.avatar-choice { display:flex; flex-direction:column; align-items:center; gap:8px; }
.avatar-choice img { width:64px; height:64px; border-radius:50%; }
.avatar-choice input { width:auto; min-height:20px; }
.avatar-preview { width:min(256px,100%); aspect-ratio:1; border-radius:50%; overflow:hidden; border:1px solid var(--border); background:var(--bg); margin:20px 0; }
.avatar-preview canvas { display:block; width:100%; height:100%; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.avatar-preview canvas.is-dragging { cursor:grabbing; }
.avatar-preview canvas:focus-visible { outline:none; }
.avatar-preview:has(canvas:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.avatar-fine { margin:var(--ui-field-gap) 0; }
.avatar-fine > summary { cursor:pointer; color:var(--muted); }
input[type=range] { padding:0; accent-color:var(--accent); }
input[type=file] { max-width:100%; overflow:hidden; }
fieldset { min-width:0; border:1px solid var(--border); border-radius:12px; padding:16px; }
@media(max-width:760px) {
  .sidebar { gap:12px; }
  .sidebar-heading { grid-column:1/-1; grid-row:1; min-width:0; }
  .mobile-menu { grid-column:1/-1; grid-row:2; }
  .userbar { grid-column:1/-1; grid-row:3; width:100%; max-width:none; }
}

/* Persönliche Größenstufen; Werte sind ein gemeinsamer Implementierungsentwurf. */
:root[data-scale=compact] {
  font-size:82.5%;
  --ui-card-padding:18px; --ui-section-gap:16px; --ui-field-gap:12px;
  --ui-sidebar-width:232px; --ui-content-block:24px;
  --ui-content-inline:clamp(16px,3vw,48px);
  --ui-control-padding:6px 10px; --ui-nav-padding:6px 10px;
}
:root[data-scale=large] {
  font-size:100%;
  --ui-card-padding:32px; --ui-section-gap:24px; --ui-field-gap:20px;
  --ui-sidebar-width:270px; --ui-content-block:48px; --ui-content-inline:6vw;
  --ui-control-height:48px; --ui-control-padding:12px 22px; --ui-nav-padding:12px;
}
select { max-width:100%; }
.field-grid,.history-grid { gap:var(--ui-field-gap); }

/* Dialog placement and dimensions are implementation drafts within shared tokens. */
.popup { width:min(680px,calc(100% - 32px)); max-height:calc(100dvh - 32px); border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); padding:var(--ui-card-padding); overflow:auto; }
.popup::backdrop { background:rgb(0 0 0 / 55%); }
.popup-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0; margin-bottom:var(--ui-section-gap); flex-wrap:wrap; }
.popup-heading h2 { margin:0; }
.popup-heading button { width:auto; }
.day-picker-row,.day-picker-range { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin-bottom:var(--ui-field-gap); }
.day-picker-row label,.day-picker-range label { flex:1 1 150px; min-width:0; }
.day-picker-row button,.day-picker-range button { width:auto; }
fieldset { min-width:0; border:1px solid var(--border); border-radius:var(--radius); margin:var(--ui-field-gap) 0; padding:16px; }
.statistics-scroll { overflow:auto; }
.statistics-table { border-collapse:collapse; width:100%; }
.statistics-table th,.statistics-table td { padding:12px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
@media(max-width:760px) {
  .popup { width:calc(100% - 12px); max-height:calc(100dvh - 12px); padding:16px; }
  .statistics-table thead { display:none; }
  .statistics-table,.statistics-table tbody,.statistics-table tr,.statistics-table td,.statistics-table th { display:block; }
  .statistics-table tr { padding:12px 0; border-bottom:1px solid var(--border); }
  .statistics-table td::before { content:attr(data-label) ': '; font-weight:600; }
  .statistics-table th,.statistics-table td { border:0; padding:6px 0; overflow-wrap:anywhere; }
}
.day-picker-row label,.day-picker-range label { display:flex; flex-direction:column; gap:4px; }
.day-picker-row input,.day-picker-row select,.day-picker-range input { width:100%; min-width:0; max-width:100%; }
/* Confirmed dense desktop direction; exact values remain an implementation draft. */
:root { --ui-title-size:1.6rem; }
:root[data-scale=standard] { --ui-card-padding:12px; --ui-section-gap:10px; --ui-field-gap:8px; --ui-sidebar-width:224px; --ui-content-block:20px; --ui-content-inline:24px; --ui-nav-padding:6px 8px; }
:root[data-scale=compact] { --ui-title-size:1.45rem; --ui-card-padding:10px; --ui-section-gap:8px; --ui-field-gap:6px; --ui-sidebar-width:208px; --ui-content-block:16px; --ui-content-inline:18px; }
:root[data-scale=large] { --ui-title-size:2rem; }
.authenticated main h1 { font-size:var(--ui-title-size); letter-spacing:-.02em; margin-bottom:16px; }
.authenticated main h2 { font-size:1.15rem; }
.authenticated main .eyebrow { margin-bottom:10px; }
.authenticated main .lead { font-size:1rem; margin-bottom:20px; }
.filter-bar { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.filter-bar label { display:flex; flex-direction:column; gap:4px; flex:1 1 150px; }
.filter-bar input,.filter-bar select { width:100%; min-width:0; }
.filter-bar button { width:auto; }
@media(min-width:761px) {
  .authenticated .sidebar { padding:18px 12px 12px; }
  .authenticated main { max-width:none; }
  .authenticated nav { gap:4px; }
  .statistics-table th,.statistics-table td { padding:8px; font-size:.9rem; }
  .authenticated .person-row { padding:10px 0; }
  .authenticated .contract-summary { padding:12px 0; }
}
@media(max-width:760px) { .filter-bar label,.filter-bar button { flex-basis:100%; width:100%; } }

[hidden] { display:none !important; }

.authenticated main .record-tabs { display:flex; flex-direction:row; flex-wrap:wrap; gap:6px; margin:0 0 20px; padding-bottom:10px; border-bottom:1px solid var(--border); }
.record-tab { display:flex; align-items:center; max-width:100%; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.record-tab.selected { border-color:var(--accent); box-shadow:inset 0 -2px var(--accent); }
.record-tab a { display:flex; flex-direction:column; padding:8px 10px; min-width:0; overflow-wrap:anywhere; text-decoration:none; }
.record-tab a span { font-weight:600; }
.record-tab small { color:var(--muted); }
.record-tab form { margin:0; flex-shrink:0; }
.record-tab .icon-button { margin:0; min-width:var(--ui-control-height); min-height:var(--ui-control-height); }
@media(max-width:760px) { .authenticated main .record-tabs { flex-direction:column; } .record-tab a { flex:1; } }

.dashboard-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ui-section-gap); }
.dashboard-widget { min-width:0; }
.dashboard-clock { margin-bottom:var(--ui-section-gap); max-width:720px; }
.dashboard-clock .card { margin-top:8px; }
.dashboard-widget .card { margin-top:8px; }
.dashboard-wide { grid-column:1 / -1; }
.widget-actions,.widget-actions form { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.widget-actions { justify-content:space-between; }
.widget-actions form { margin:0; }
.widget-actions button { width:auto; min-width:var(--ui-control-height); padding:6px 10px; }
.widget-company { margin-top:8px; color:var(--muted); }
.dashboard-hours + .dashboard-hours { border-top:1px solid var(--border); margin-top:16px; padding-top:12px; }
.dashboard-hours dl { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; }
.dashboard-hours dt,.dashboard-hours dd { margin:0; }
.dashboard-hours dd { font-weight:650; }
.personal-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.calendar-date { display:flex; flex-direction:column; gap:4px; padding:10px; min-height:76px; border:1px solid var(--border); border-radius:10px; overflow-wrap:anywhere; }
.calendar-date[aria-current=date] { border-color:var(--accent); box-shadow:inset 0 -2px var(--accent); }
.calendar-date span { color:var(--muted); font-size:.85rem; }
.calendar-event { border-top:1px solid var(--border); padding:12px 0; overflow-wrap:anywhere; }
@media(max-width:1100px) { .dashboard-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
  .personal-calendar { display:flex; flex-direction:column; }
  .calendar-weekday,.calendar-blank { display:none; }
  .calendar-date { flex-direction:row; flex-wrap:wrap; justify-content:space-between; min-height:44px; }
  .widget-actions { align-items:start; flex-direction:column; }
}

/* Personal dashboard edit controls use the shared appearance and size tokens. */
[data-dashboard-editor] .dashboard-widget { position:relative; cursor:grab; touch-action:none; }
[data-dashboard-editor] .dashboard-widget:active { cursor:grabbing; }
.widget-remove { position:absolute; top:6px; right:6px; color:var(--error); background:var(--surface); border:1px solid currentColor; opacity:0; }
.dashboard-widget:hover .widget-remove,.dashboard-widget:focus-within .widget-remove { opacity:1; }
.widget-preview { pointer-events:none; }
.widget-dragging { outline:2px solid var(--accent); }
.catalog-widget { padding:12px 0; border-top:1px solid var(--border); }
@media (hover:none), (pointer:coarse) { .widget-remove { opacity:1; } }

.calendar-markers { display:flex; flex-direction:column; gap:4px; min-width:0; max-width:100%; }
.calendar-marker { border-left:3px solid var(--accent); padding-left:5px; overflow-wrap:anywhere; }
.calendar-marker-absence { border-left-color:var(--muted); }
.calendar-marker-project { border-left-style:dashed; }
@media(max-width:760px) { .calendar-date .calendar-markers { flex-basis:100%; } }

.source-reference { overflow-wrap:anywhere; }

/* Month bands share the existing semantic colors; mobile keeps accessible daily rows. */
.calendar-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.calendar-toolbar h3 { margin:0; }
.calendar-month-navigation { display:flex; gap:8px; align-items:center; }
.calendar-month-navigation a { margin:0; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin:12px 0; font-size:.85rem; }
.calendar-key { border-left:4px solid var(--accent); padding-left:6px; }
.calendar-key-absence { border-color:var(--success); }
.calendar-key-project { border-left-style:dashed; }
.calendar-key-task { border-left-color:var(--warning); }
.calendar-bar-appointment { border-left-width:5px; }
.calendar-month { border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.calendar-weekdays,.calendar-week { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays { background:var(--bg); font-size:.85rem; font-weight:650; }
.calendar-weekdays span { padding:8px; border-right:1px solid var(--border); }
.calendar-week { min-height:140px; grid-template-rows:40px repeat(var(--calendar-lanes),30px) minmax(16px,1fr); }
.calendar-day { grid-row:1 / -1; min-width:0; padding:6px 8px; background:var(--surface); border-right:1px solid var(--border); border-top:1px solid var(--border); color:var(--text); text-decoration:none; font-size:.85rem; }
.calendar-weekend,.calendar-outside { background:var(--bg); }
.calendar-outside { color:var(--muted); }
.calendar-day[aria-current=date] { box-shadow:inset 0 0 0 2px var(--accent); }
.calendar-today time { display:inline-flex; align-items:center; justify-content:center; min-width:26px; min-height:26px; border-radius:50%; background:var(--action); color:var(--on-accent); font-weight:700; }
.calendar-today-label { display:inline-block; margin-left:4px; font-weight:650; font-size:.8rem; }
.calendar-bar { z-index:1; display:block; align-self:start; min-width:0; min-height:26px; margin:1px 2px; padding:4px 6px; border-left:3px solid currentColor; border-radius:4px; font-size:.8rem; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; color:var(--accent); background:color-mix(in srgb,var(--accent) 15%,var(--surface)); }
.calendar-bar-time { color:var(--on-accent); background:var(--action); }
.calendar-bar-project { border-left-style:dashed; }
.calendar-bar-absence { color:var(--success); background:var(--success-bg); }
.calendar-bar-sick { color:var(--error); background:var(--error-bg); }
.calendar-bar-pending { color:var(--warning); background:var(--warning-bg); }
.calendar-bar-muted { color:var(--muted); background:var(--bg); border-left-style:dotted; text-decoration:line-through; }
.calendar-mobile { display:none; }
@media(max-width:760px) {
  .calendar-month { display:none; }
  .calendar-mobile { display:flex; }
  .calendar-toolbar { gap:8px; }
}

.dashboard-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dashboard-heading h1 { margin:0; }
.dashboard-heading .icon-button { flex-shrink:0; margin:0; font-size:1.5rem; }
button.danger,.button.danger { color:var(--on-error); background:var(--error); border-color:var(--error); }
.widget-dragging { opacity:.55; }

/* Shared list density follows the personal scale; controls retain their touch target. */
:root { --ui-list-block:4px; --ui-list-inline:8px; }
:root[data-scale=compact] { --ui-list-block:2px; --ui-list-inline:6px; }
:root[data-scale=large] { --ui-list-block:8px; --ui-list-inline:12px; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.authenticated .page-heading h1 { margin:0; }
.page-heading .icon-button { flex-shrink:0; margin:0; font-size:1.5rem; }
.data-table { width:100%; border-collapse:collapse; font-size:inherit; }
.data-table th,.data-table td { text-align:left; vertical-align:middle; padding:var(--ui-list-block) var(--ui-list-inline); border-bottom:1px solid var(--border); overflow-wrap:anywhere; }
.data-table th { hyphens:auto; color:var(--muted); font-weight:600; }
.data-table tbody tr:hover,.data-table tbody tr:focus-within { background:var(--bg); }
.data-value { min-width:0; }
.data-label { display:none; }
.data-table .data-name { min-width:12ch; }
.data-action { white-space:nowrap; display:inline-flex; align-items:center; gap:8px; min-height:var(--ui-control-height); padding:0 8px; border-radius:10px; font-weight:600; text-decoration:none; }
.data-action:hover { background:var(--hover-bg); text-decoration:underline; }
.data-table details { margin:0; }
.data-table summary { min-height:var(--ui-control-height); display:flex; align-items:center; }
@media(max-width:1000px) {
  .data-table,.data-table tbody { display:block; }
  .data-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); }
  .data-table tr { display:block; border-bottom:1px solid var(--border); padding:var(--ui-list-inline) 0; }
  .data-table td { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr); gap:var(--ui-list-inline); border:0; padding:var(--ui-list-block) 0; }
  .data-table .data-name { min-width:0; }
  .data-label { display:block; color:var(--muted); overflow-wrap:anywhere; }
}
.authenticated .person-row { padding:calc(var(--ui-list-block) + 4px) 0; gap:var(--ui-field-gap); }
.statistics-table th,.statistics-table td { padding:calc(var(--ui-list-block) + 2px) var(--ui-list-inline); }

.personnel-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:16px; padding:0; margin-bottom:var(--ui-section-gap); }
.personnel-identity { display:flex; align-items:center; gap:16px; min-width:0; }
.personnel-identity h1,.personnel-identity p { margin:0; overflow-wrap:anywhere; }
.personnel-initial { display:grid; place-items:center; width:56px; height:56px; flex-shrink:0; border-radius:50%; background:var(--action); color:var(--on-accent); font-weight:700; }
.personnel-tabs { display:flex; flex-direction:row; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--border); margin-bottom:var(--ui-section-gap); }
.personnel-tabs a { min-height:var(--ui-control-height); display:flex; align-items:center; padding:8px 12px; text-decoration:none; border-bottom:3px solid transparent; }
.personnel-tabs a[aria-selected=true], .personnel-tabs a[aria-current=page] { border-color:var(--accent); font-weight:700; }
.operator-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ui-field-gap); margin-bottom:var(--ui-section-gap); }
.operator-toolbar .personnel-tabs { flex:1 1 220px; min-width:0; margin:0; }
.operator-toolbar form { margin:0; }
.operator-toolbar button { width:auto; margin:0; }
.personnel-columns { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:var(--ui-section-gap); }
.profile-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--ui-field-gap); }
.profile-fields input,.profile-fields select { width:100%; min-width:0; }
.personnel-record { border-top:1px solid var(--border); padding:var(--ui-section-gap) 0; overflow-wrap:anywhere; }
.personnel-record h3,.personnel-record p { margin:4px 0; }
.personnel-record form button { width:auto; }
.profile-fallback-heading { margin-top:var(--ui-section-gap); }
[role=tabpanel] > .profile-fallback-heading { display:none; }
@media(max-width:1200px) { .profile-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:900px) { .personnel-columns { grid-template-columns:minmax(0,1fr); } }
@media(max-width:540px) { .profile-fields { grid-template-columns:minmax(0,1fr); } .personnel-identity { align-items:start; } }

.profile-heading-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.profile-heading-actions button { width:auto; margin:0; }
button.secondary,.button.secondary { background:var(--surface); color:var(--text); border:1px solid var(--border); }
button.secondary:hover,.button.secondary:hover { background:var(--hover-bg); filter:none; }
/* Hour exports reuse the shared responsive statistics table and popup. */
.export-hash { overflow-wrap: anywhere; font-family: monospace; }
#export-recipient [data-popup-confirm] { color: var(--error); border-color: var(--error); background: var(--error-bg); }

/* Read-only absence planning. Colors always have a text code and accessible label. */
.planning-filters { display:flex; flex-wrap:wrap; gap:var(--ui-field-gap); align-items:end; margin-bottom:12px; }
.planning-filters > div { flex:1 1 140px; min-width:0; }
.planning-filters button { width:auto; margin:0; }
.planning-legend { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; font-size:.85em; }
.planning-scroll { max-width:100%; overflow:auto; border:1px solid var(--border); border-radius:8px; }
.planning-table { border-collapse:separate; border-spacing:0; width:100%; font-size:.8em; }
.planning-table th,.planning-table td { min-width:30px; padding:3px 1px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); text-align:center; vertical-align:middle; }
.planning-table thead th { background:var(--surface); color:var(--muted); }
.planning-table thead span { display:block; }
.planning-table .planning-person { position:sticky; left:0; z-index:1; min-width:140px; max-width:180px; text-align:left; padding:6px 8px; background:var(--surface); overflow-wrap:anywhere; }
.planning-table thead .planning-person { z-index:2; }
.planning-weekend { background:var(--bg); }
.planning-empty { color:var(--muted); }
.plan-event { display:block; padding:2px 3px; border:1px solid currentColor; border-radius:4px; font-weight:600; text-align:center; text-decoration:none; line-height:1.4; }
a.plan-event { min-height:44px; display:flex; align-items:center; justify-content:center; }
.plan-pending { color:var(--warning); background:var(--warning-bg); }
.plan-approved { color:var(--success); background:var(--success-bg); }
.plan-time-off { color:var(--accent); background:var(--bg); }
.plan-sick { color:var(--error); background:var(--error-bg); }
.plan-other { color:var(--muted); background:var(--surface); }
.plan-cancelling { border-style:dashed; }
.planning-table [aria-current=date] { box-shadow:inset 0 -3px var(--accent); }
@media(max-width:540px) { .planning-table .planning-person { min-width:110px; max-width:120px; } .planning-filters > div { flex-basis:calc(50% - 12px); } }

@media(max-width:540px) { .planning-filters > div:first-child,.planning-filters > div:has(#personnel-filter) { flex-basis:100%; } }

.warning { color:var(--warning); }

/* Compact shared spacing; larger personal scale and touch targets remain available. */
.authenticated label { margin-bottom:4px; }
:root[data-scale=large] .authenticated label { margin-bottom:8px; }
.field-grid > div > label:first-child,.company-fields > div > label:first-child { margin-top:0; }
:root:not([data-scale=large]) .authenticated .card > h2 { margin-bottom:8px; }
:root:not([data-scale=large]) .authenticated .card > p { margin-bottom:8px; }
.settings-grid { display:grid; grid-template-columns:minmax(0,1fr) 208px; gap:var(--ui-section-gap); align-items:start; margin:var(--ui-section-gap) 0; }
.settings-grid > .card { margin:0; min-width:0; }
.company-fields { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:var(--ui-field-gap); }
.company-fields > div { grid-column:span 6; min-width:0; }
.company-fields .company-field-name { grid-column:1 / 9; grid-row:1; }
.company-fields .company-field-vat_id { grid-column:9 / 13; grid-row:1; }
.company-fields .company-field-street { grid-column:span 8; }
.company-fields .company-field-house_number { grid-column:span 4; }
.company-fields .company-field-postal_code { grid-column:span 3; }
.company-fields .company-field-city { grid-column:span 5; }
.company-fields .company-field-country { grid-column:span 4; }
.settings-section-heading { margin:var(--ui-section-gap) 0 var(--ui-field-gap); padding-top:var(--ui-field-gap); border-top:1px solid var(--border); }
.settings-actions { display:flex; gap:var(--ui-field-gap); align-items:start; flex-wrap:wrap; margin-top:var(--ui-section-gap); }
.settings-help { flex:1; min-width:120px; }
.settings-help summary { min-height:var(--ui-control-height); padding:8px 0; cursor:pointer; color:var(--accent); }
.image-picker-current { display:flex; flex-wrap:wrap; align-items:center; gap:var(--ui-field-gap); }
.image-picker-current > .image-picker-preview { width:160px; height:72px; margin:0; }
.image-picker-current > p { margin:0; }
@media(max-width:1100px) { .settings-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
  .company-fields > div[class] { grid-column:1 / -1; grid-row:auto; }
  .image-picker-current > .image-picker-preview { width:112px; height:56px; }
}

/* Shared compact page patterns; preserve separate touch targets and larger scale. */
.project-overview { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:var(--ui-section-gap); align-items:start; margin:var(--ui-section-gap) 0; }
.project-heading { flex-wrap:wrap; }
.project-heading h1 { flex:1 1 280px; min-width:0; }
.project-heading > button { max-width:100%; }
.project-overview > .card { min-width:0; margin:0; }
.project-overview .page-heading h2 { margin:0; }
/* Shared compact read list (#337): same row height, hover and padding tokens as the data table. */
.category-list { list-style:none; margin:0; padding:0; }
.category-list > li { padding:var(--ui-list-block) var(--ui-list-inline); border-top:1px solid var(--border); overflow-wrap:anywhere; }
.category-list > li:not(.category-row) { color:var(--muted); }
.category-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--ui-field-gap); min-height:var(--ui-control-height); }
.category-row:hover,.category-row:focus-within { background:var(--bg); }
.category-row > div,.category-row > label { flex:1 1 8rem; min-width:0; overflow-wrap:anywhere; }
.category-row > label.check-field { margin:0; }
.category-row .muted { display:block; font-size:.85rem; }
.category-row details { margin:2px 0 0; }
.category-row summary { min-height:var(--ui-control-height); display:flex; align-items:center; }
.category-actions,.category-row > .actions { display:flex; flex:none; flex-wrap:wrap; align-items:center; gap:var(--ui-field-gap); margin:0; }
.category-row .data-action { flex:none; }
@media(max-width:1100px) { .project-overview { grid-template-columns:minmax(0,1fr); } }
:root { --ui-calendar-week-height:104px; --ui-calendar-date-height:32px; --ui-calendar-lane-height:28px; }
:root[data-scale=compact] { --ui-calendar-week-height:92px; --ui-calendar-date-height:28px; }
:root[data-scale=large] { --ui-calendar-week-height:140px; --ui-calendar-date-height:40px; --ui-calendar-lane-height:30px; }
.calendar-week { min-height:var(--ui-calendar-week-height); grid-template-rows:var(--ui-calendar-date-height) repeat(var(--calendar-lanes),var(--ui-calendar-lane-height)) minmax(8px,1fr); }
.overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--ui-section-gap); align-items:start; margin:var(--ui-section-gap) 0; }
.overview-grid > .card { margin:0; min-width:0; }
.key-values { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:6px var(--ui-field-gap); margin:var(--ui-field-gap) 0; }
.key-values dt,.key-values dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.key-values dt { color:var(--muted); }
.form-section-heading { margin:var(--ui-section-gap) 0 var(--ui-field-gap); padding-top:var(--ui-field-gap); border-top:1px solid var(--border); }
.profile-fields > div > label:first-child { margin-top:0; }
.filter-bar > div { flex:1 1 180px; min-width:0; }
.filter-bar > div > label:first-child { margin-top:0; }
.authenticated .contract-summary,.authenticated .change { padding:var(--ui-field-gap) 0; }
.authenticated .contract-summary h3,.authenticated .contract-summary p { margin:4px 0; }
.authenticated main .record-tabs { margin-bottom:var(--ui-section-gap); padding-bottom:var(--ui-field-gap); flex-wrap:nowrap; overflow-x:auto; max-width:100%; gap:4px; }
.record-tabs .record-tab { flex:0 0 auto; min-width:0; max-width:300px; border-radius:8px; }
.record-tab a { flex:1; min-height:var(--ui-control-height); justify-content:center; padding:3px 8px; font-size:.9rem; line-height:1.2; }
.record-tab a span,.record-tab a small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.record-tab a small { font-size:.75rem; line-height:1.2; }
.personnel-tabs { gap:2px; }
.personnel-tabs a { padding:4px 8px; font-size:.9rem; }
:root[data-scale=large] .record-tab a,:root[data-scale=large] .personnel-tabs a { font-size:1rem; }
.authenticated main .lead { margin-bottom:var(--ui-section-gap); }
.authenticated .notification-dialog { padding:var(--ui-card-padding); }
.authenticated .notification-item { padding:var(--ui-field-gap) 0; }
.authenticated .avatar-current { margin:var(--ui-section-gap) 0; }
.authenticated .avatar-presets { gap:var(--ui-field-gap); }
@media(max-width:1100px) { .overview-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
  .filter-bar > div { flex-basis:100%; }
  .key-values { grid-template-columns:minmax(0,1fr); gap:2px; }
  .key-values dd { margin-bottom:var(--ui-field-gap); }
}

.vehicle-specs, .vehicle-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:var(--ui-field-gap); }
.vehicle-specs > div, .vehicle-fields > div { min-width:0; overflow-wrap:anywhere; }
.vehicle-specs dt { color:var(--muted); font-size:.9em; }
.vehicle-specs dd { margin:0; }
@media(min-width:1001px) {
  .vehicle-list .data-table { table-layout:fixed; }
  .vehicle-list th:first-child { width:38%; }
  .vehicle-list th:nth-child(2) { width:20%; }
  .vehicle-list th:nth-child(3) { width:26%; }
  .vehicle-list th:nth-child(4) { width:16%; }
}
.form-help { margin:var(--ui-field-gap) 0; }
.form-help > summary { min-height:var(--ui-control-height); padding:8px 0; cursor:pointer; }
.authenticated label:has(>input[type=checkbox]),.authenticated label:has(>input[type=radio]) { display:flex; align-items:flex-start; gap:var(--ui-field-gap); min-height:var(--ui-control-height); padding:4px 0; }
.authenticated input[type=checkbox],.authenticated input[type=radio] { width:24px; min-height:24px; flex:none; padding:0; }
@media(max-width:760px) {
  .authenticated main .record-tabs { flex-direction:row; flex-wrap:nowrap; overflow-x:auto; max-width:100%; }
  .record-tabs .record-tab { flex:0 0 208px; }
  .personnel-tabs { flex-wrap:nowrap; overflow-x:auto; max-width:100%; }
  .personnel-tabs a { flex:none; white-space:nowrap; }
}

@media (max-width: 480px) { .category-row { flex-wrap:wrap; } .category-row > div,.category-row > label { flex-basis:100%; } }

/* Native Safari selects need custom appearance to honor the shared touch height. */
.country-picker { display:block; position:relative; min-width:0; }
.country-picker select { appearance:none; width:100%; min-width:0; padding-right:2.25rem; }
.country-picker::after { content:""; position:absolute; right:1rem; top:50%; width:.45rem; height:.45rem; margin-top:-.35rem; border-right:2px solid var(--text); border-bottom:2px solid var(--text); transform:rotate(45deg); pointer-events:none; }

/* Date creation uses existing dialog, action sizes and semantic theme tokens. */
.calendar-create-options { list-style:none; padding:0; display:grid; gap:var(--ui-field-gap); }
.calendar-create-options li { border-bottom:1px solid var(--border); padding-block:4px; }
.calendar-create-options p { margin-block:4px; }
.calendar-create-options .button { max-width:100%; white-space:normal; overflow-wrap:anywhere; }

#calendar-date-create { width:min(480px,calc(100% - 32px)); }

/* Calendar view controls share the compact navigation and personal size tokens. */
.calendar-view-tabs { display:flex; flex-wrap:nowrap; gap:4px; margin-block:var(--ui-field-gap); max-width:100%; overflow-x:auto; }
.calendar-view-tabs .data-action { flex:none; margin:0; padding:4px 8px; }
.calendar-view-tabs [aria-current=page] { color:var(--accent); box-shadow:inset 0 -2px var(--accent); font-weight:700; }
.calendar-date-navigation { align-items:end; }
.calendar-agenda-day { border-top:1px solid var(--border); padding-block:var(--ui-field-gap); }
.calendar-agenda-day h4 { margin:0; }
.calendar-agenda-day .calendar-event { padding-block:var(--ui-field-gap); }
.calendar-agenda-day .calendar-event p { margin-block:4px; }
.calendar-agenda-day .calendar-toolbar { gap:4px; }
.calendar-week { grid-template-rows:max(var(--ui-control-height),var(--ui-calendar-date-height)) repeat(var(--calendar-lanes),max(var(--ui-control-height),var(--ui-calendar-lane-height))) minmax(8px,1fr); }
.calendar-bar { min-height:var(--ui-control-height); }
.calendar-view-tabs,.calendar-month-navigation { flex-direction:row; }
.calendar-date-navigation label { flex:0 1 240px; }
.calendar-date-navigation button { flex:none; }
@media(max-width:760px) { .calendar-date-navigation label { flex:1 1 150px; } .calendar-date-navigation button { flex:0 1 auto; width:auto; } }

.calendar-return { max-width:100%; white-space:normal; overflow-wrap:anywhere; }

.project-history { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
#project-catalogs .project-overview { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.project-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); gap:var(--ui-field-gap); margin:var(--ui-field-gap) 0; }
.project-facts > div { min-width:0; }
.project-facts dd { margin:0; }
.project-heading h2,.project-heading h3 { margin:0; flex:0 0 auto; max-width:100%; }
.project-heading > button { flex:0 0 auto; }

/* Project palette: explicit names share one contrast-tested foreground in both themes. */
.project-color-blue { --project-color:#1554a1; }
.project-color-indigo { --project-color:#4941b5; }
.project-color-teal { --project-color:#07675f; }
.project-color-orange { --project-color:#94400b; }
.project-color-purple { --project-color:#78399a; }
.project-color-gray { --project-color:#455268; }
:root[data-theme=dark] .project-color-blue { --project-color:#9ac7ff; }
:root[data-theme=dark] .project-color-indigo { --project-color:#c1baff; }
:root[data-theme=dark] .project-color-teal { --project-color:#85dacd; }
:root[data-theme=dark] .project-color-orange { --project-color:#ffc18e; }
:root[data-theme=dark] .project-color-purple { --project-color:#e0b1f7; }
:root[data-theme=dark] .project-color-gray { --project-color:#c7d0df; }
.project-calendar .calendar-bar { color:var(--project-color); background:color-mix(in srgb,var(--project-color) 12%,var(--surface)); border-left-style:solid; }
.project-tentative { font-style:italic; }
.project-event { border-left:4px solid var(--project-color); padding-left:8px; }
.project-filters { display:grid; gap:var(--ui-field-gap); }
.project-filters p { margin:0; }
.project-filters label { margin:0; }
.project-status-options { display:flex; flex-wrap:wrap; gap:4px 12px; margin:0; }
.project-status-options .check-field { width:auto; }
.project-filter-chips { display:flex; flex-wrap:wrap; gap:4px; margin-block:var(--ui-field-gap); }
.project-filter-chips .data-action { margin:0; padding:4px 8px; border:1px solid var(--border); border-radius:10px; overflow-wrap:anywhere; }
.project-results { margin-top:var(--ui-section-gap); border-top:1px solid var(--border); }
.project-mobile-day { min-width:0; }
.project-mobile-day .calendar-event { margin:0 0 4px; }
.project-calendar .calendar-date[aria-current=date] { border-color:var(--accent); }
.project-mobile-day .calendar-bar { margin:4px 0; }
.calendar-month-navigation .icon-button { min-width:var(--ui-control-height); min-height:var(--ui-control-height); }
.calendar-mobile .calendar-date { min-height:var(--ui-control-height); }
.project-filters summary { min-height:var(--ui-control-height); display:flex; align-items:center; cursor:pointer; }
.project-filters summary::before { content:'▸'; margin-right:4px; }
.project-filters details[open] > summary::before { content:'▾'; }

/* Shared personal/company menu; headings do not reduce existing action targets. */
.workspace-menu { gap:var(--ui-section-gap); }
.menu-section { min-width:0; }
.menu-heading { font-size:.76rem; line-height:1.35; color:var(--muted); letter-spacing:.04em; margin:4px 0 4px; padding:0 8px; }
.menu-company-label { font-size:.76rem; color:var(--muted); padding:4px 8px 0 32px; overflow-wrap:anywhere; }
.workspace-menu summary { overflow-wrap:anywhere; }

.project-demand-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr); gap:var(--ui-section-gap); align-items:start; }
.project-demand-columns .page-heading, .compact-list-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--ui-field-gap); }
.compact-list-row { padding:8px 0; border-bottom:1px solid var(--border); overflow-wrap:anywhere; }
.compact-list-row > div:first-child { min-width:0; flex:1 1 180px; }
@media(max-width:800px) { .project-demand-columns { grid-template-columns:minmax(0,1fr); } }

.project-demand-page summary { min-height:var(--ui-control-height); padding:8px 0; cursor:pointer; }

/* Comparable role/access lists share the available width. */
.role-management { grid-template-columns:repeat(2,minmax(0,1fr)); }
.role-management .category-row strong { display:block; }
@media(max-width:1100px) { .role-management { grid-template-columns:minmax(0,1fr); } }
.role-management summary,.role-history > summary { min-height:var(--ui-control-height); padding:8px 0; cursor:pointer; }

/* Personal account disclosure keeps secondary actions out of the main workspace. */
.account-menu { position:relative; width:100%; min-width:0; }
.account-menu > summary { padding:6px 0; cursor:pointer; list-style:none; min-height:var(--ui-control-height); }
.account-menu > summary::-webkit-details-marker { display:none; }
.account-menu .account-name { min-width:0; overflow-wrap:anywhere; }
.account-menu .avatar { flex-shrink:0; }
.account-menu .account-chevron { flex:0 0 auto; margin-left:auto; }
.account-dropdown { position:absolute; left:0; bottom:calc(100% + 6px); z-index:40; width:min(300px,calc(100vw - 24px)); max-height:calc(100dvh - 120px); overflow:auto; padding:4px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); }
.account-dropdown .account-action { display:flex; align-items:center; justify-content:flex-start; gap:8px; width:100%; min-height:var(--ui-control-height); padding:8px 10px; text-align:left; white-space:normal; overflow-wrap:anywhere; border:0; border-radius:8px; margin:0; color:var(--text); background:transparent; text-decoration:none; font:inherit; cursor:pointer; }
.account-dropdown .account-action:hover,.account-dropdown .account-action:focus-visible { background:var(--bg); }
.account-dropdown .account-action:disabled { opacity:1; color:var(--muted); cursor:default; }
.account-dropdown form { margin:0; }
.account-company-menu > summary { list-style:none; }
.account-company-menu > summary::-webkit-details-marker { display:none; }
.account-company-menu > summary::after { content:'›'; margin-left:auto; }
.account-company-menu[open] > summary::after { content:'⌄'; }
.account-company-choices { border-left:1px solid var(--border); margin-left:10px; }
.account-company-choices .account-action { flex-wrap:wrap; }
.account-company-choices small { color:var(--muted); margin-left:auto; }
@media(max-width:760px) {
  .account-dropdown { bottom:auto; top:calc(100% + 6px); }
}

.staffing-availability-summary { min-height:var(--ui-control-height); padding:8px 0; cursor:pointer; overflow-wrap:anywhere; }

/* Project planner: a read-only timeline, with an equivalent native disclosure list. */
.project-planner { min-width:0; max-width:100%; }
.planner-filters { display:flex; flex-wrap:wrap; align-items:end; gap:var(--ui-field-gap); }
.planner-filters > div { flex:1 1 140px; min-width:0; }
.planner-filters input,.planner-filters select { width:100%; }
.planner-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; border:1px solid var(--border); border-radius:var(--radius); }
.planner-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.planner-grid { min-width:1000px; }
.planner-axis,.planner-line { display:grid; grid-template-columns:220px minmax(0,1fr); border-bottom:1px solid var(--border); }
.planner-axis { min-height:44px; background:var(--bg); }
.planner-line { min-height:var(--ui-control-height); }
.planner-label { display:flex; flex-direction:column; justify-content:center; padding:4px 8px; overflow-wrap:anywhere; }
.planner-label span { color:var(--muted); font-size:.85em; }
.planner-track { position:relative; min-width:0; border-left:1px solid var(--border); }
.planner-tick { position:absolute; top:4px; font-size:.75em; white-space:nowrap; padding-left:2px; }
.planner-gridline { position:absolute; top:0; bottom:0; border-left:1px solid var(--border); }
.planner-bar { position:absolute; top:8px; bottom:8px; min-width:1px; border:2px solid var(--accent); border-radius:4px; background:var(--surface); overflow:hidden; }
.planner-bar span { display:block; padding:1px 4px; white-space:nowrap; font-size:.8em; }
.planner-bar-demand { border-color:var(--muted); }
.planner-bar-sent { border-style:dashed; }
.planner-bar-draft { border-style:dotted; }
.planner-item { border-bottom:1px solid var(--border); padding:4px 0; }
.planner-item > summary { min-height:var(--ui-control-height); padding:8px 4px; cursor:pointer; overflow-wrap:anywhere; }
.planner-item p { overflow-wrap:anywhere; }
.planner-help > summary { min-height:var(--ui-control-height); padding:8px 0; cursor:pointer; }

.agreement-hash { overflow-wrap: anywhere; white-space: normal; }
.agreement-link { white-space: normal; }

/* Shared readable specifications for material records and their audit snapshots. */
.record-specs { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:var(--ui-field-gap); }
.record-specs > div { min-width:0; overflow-wrap:anywhere; }
.record-specs dt { color:var(--muted); font-size:.9em; }
.record-specs dd { margin:0; }

/* The separate operator surface uses the same compact scale without a customer sidebar. */
.operator main { padding:var(--ui-content-block) var(--ui-content-inline); }
.operator main h1 { font-size:var(--ui-title-size); letter-spacing:-.02em; margin-bottom:var(--ui-section-gap); }
.operator main h2 { font-size:1.15rem; }
.operator main .eyebrow { margin-bottom:var(--ui-field-gap); }
.operator .card > p { margin-bottom:var(--ui-field-gap); }
.operator .operator-toolbar .personnel-tabs { flex-wrap:nowrap; overflow-x:auto; }
.operator .personnel-tabs a { flex-shrink:0; }
.operator .page-heading h2 { margin:0; }
.operator header { padding:var(--ui-content-block) var(--ui-content-inline); flex-wrap:wrap; }

/* Standalone hosting setup reuses application controls and tokens before a DB exists. */
.hosting-setup label:has(>input[type=checkbox]) { display:flex; align-items:flex-start; gap:var(--ui-field-gap); min-height:var(--ui-control-height); }
.hosting-setup input[type=checkbox] { width:24px; min-height:24px; flex:none; padding:0; }
.hosting-setup main { padding:var(--ui-content-block) var(--ui-content-inline); }
.hosting-setup .error, .hosting-setup .hosting-success { margin-bottom:var(--ui-section-gap); }
.hosting-setup .error p, .hosting-setup .hosting-success p { margin:0 0 6px; }
.hosting-setup .hosting-success { background:var(--success-bg); color:var(--success); border:1px solid var(--success); border-radius:12px; padding:20px; }
.hosting-setup fieldset { border:1px solid var(--border); border-radius:12px; padding:var(--ui-field-gap) var(--ui-content-inline); margin:var(--ui-field-gap) 0; }
.hosting-setup legend { font-weight:600; padding:0 6px; }
.hosting-setup details { margin-top:var(--ui-section-gap); }

/* #337 shared button variants and status badges; colors only from semantic tokens. */
button.ghost,.button.ghost { background:transparent; color:var(--accent); border-color:transparent; padding-inline:8px; }
button.ghost:hover,.button.ghost:hover { background:var(--hover-bg); filter:none; text-decoration:underline; text-underline-offset:3px; }
.button svg,button svg { flex:none; }
form[aria-busy=true] [data-loading]:disabled { cursor:progress; opacity:.8; }
form[aria-busy=true] [data-loading]:disabled::before { content:""; width:1em; height:1em; flex:none; border-radius:50%; border:2px solid currentColor; border-right-color:transparent; animation:button-spin .8s linear infinite; }
@keyframes button-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { button,.button { transition:none; } form[aria-busy=true] [data-loading]:disabled::before { animation:none; border-right-color:currentColor; opacity:.6; } }
.status-badge { --badge-fg:var(--neutral); --badge-bg:var(--neutral-bg); display:inline-flex; align-items:center; gap:5px; max-width:100%; padding:1px 8px 1px 6px; border-radius:999px; background:var(--badge-bg); color:var(--badge-fg); font-size:.82rem; font-weight:650; line-height:1.6; vertical-align:middle; overflow-wrap:anywhere; }
.status-badge svg { width:12px; height:12px; flex:none; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.status-badge-success { --badge-fg:var(--success); --badge-bg:var(--success-bg); }
.status-badge-warning { --badge-fg:var(--warning); --badge-bg:var(--warning-bg); }
.status-badge-danger { --badge-fg:var(--error); --badge-bg:var(--error-bg); }
.status-badge-live { --badge-fg:var(--text); --badge-bg:transparent; box-shadow:inset 0 0 0 1.5px var(--action); }

/* #337 shared list header: sortable columns, optional column choice, mobile cards. */
.data-table th[aria-sort] { color:var(--text); }
.sort-link { display:inline-flex; align-items:center; gap:4px; min-height:var(--ui-control-height); color:inherit; text-decoration:none; }
.sort-link:hover { color:var(--accent); text-decoration:underline; }
.sort-indicator { font-size:.75em; opacity:.6; }
th[aria-sort] .sort-indicator { opacity:1; color:var(--accent); }
.column-chooser { margin:0 0 4px; }
.column-chooser > summary { width:max-content; cursor:pointer; }
.column-chooser fieldset { display:flex; flex-wrap:wrap; gap:4px 16px; border:0; margin:0; padding:4px 8px; }
.data-table td.data-actions .data-value { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; }
.data-table td.data-actions button, .data-table td.data-actions .data-action { white-space:nowrap; }
@media(max-width:1000px) {
  .data-table tr { border:1px solid var(--hairline); border-radius:12px; padding:6px 10px; margin-bottom:8px; background:var(--surface); }
  .data-table td:first-child { display:block; font-size:1.02em; }
  .data-table td:first-child .data-label, .data-table td.data-actions .data-label { display:none; }
  .data-table td.data-actions { display:block; border-top:1px solid var(--hairline); margin-top:4px; padding-top:4px; }
  .data-table td.data-actions .data-value { justify-content:flex-start; }
}

/* #337 compact mobile cards: only name, one short line, status and actions; further values stay in the desktop table and detail view. */
.data-sub { display:block; }
.data-table-tools { display:flex; flex-wrap:wrap; gap:4px 8px; align-items:flex-start; }
.list-sort-mobile { display:none; margin:0 0 4px; }
.list-sort-mobile > summary { width:max-content; cursor:pointer; }
.list-sort-mobile ul { list-style:none; margin:0; padding:4px 8px; display:grid; }
.list-sort-mobile [aria-current] { color:var(--text); font-weight:700; }
@media(max-width:1000px) {
  .list-sort-mobile { display:block; }
  .data-table-tools .column-chooser { display:none; }
  .data-table-compact tr { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; align-items:center; padding:6px 4px 6px 10px; }
  .data-table-compact td { display:block; grid-column:1; padding:1px 0; }
  .data-table-compact td[colspan] { grid-column:1 / -1; }
  .data-table-compact .data-label, .data-table-compact .data-mobile-hide { display:none; }
  .data-table-compact td:not(:first-child) { color:var(--muted); font-size:.92em; }
  .data-table-compact td.data-actions { grid-column:2; grid-row:1 / span 4; border:0; margin:0; padding:0; color:inherit; font-size:inherit; }
  .data-table-compact td.data-actions .data-value { flex-direction:column; align-items:flex-end; gap:0; }
}

/* Tags (#398): compact read-only chips and wrapping checkbox options in the shared editor popup. */
.tag-list { display:flex; flex-wrap:wrap; gap:4px; margin:0; padding:0; list-style:none; }
.tag-chip { display:inline-flex; max-width:100%; padding:1px 8px; border:1px solid var(--border); border-radius:999px; font-size:.82rem; line-height:1.6; overflow-wrap:anywhere; }
.tag-options { display:flex; flex-wrap:wrap; gap:4px 12px; }
.tag-option { display:inline-flex; gap:6px; align-items:center; min-height:var(--ui-control-height); }
.tag-option input { width:20px; min-height:20px; margin:0; }
.data-table .tag-list { margin-top:2px; }

/* #349 Dashboard notification overview: compact feed, unread entries highlighted by accent bar and weight (not colour alone, „Neu“ stays as text). */
.dashboard-notifications .notification-overview-heading h2 { margin:0; }
.notification-feed { list-style:none; margin:0; padding:0; }
.notification-entry { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:var(--ui-field-gap); padding:var(--ui-field-gap) 0 var(--ui-field-gap) 10px; border-top:1px solid var(--border); border-left:3px solid transparent; overflow-wrap:anywhere; }
.notification-entry.is-unread { border-left-color:var(--accent); }
.notification-entry.is-unread h3 { font-weight:700; }
.notification-entry h3 { margin:2px 0; font-size:1rem; font-weight:500; }
.notification-entry p { margin:2px 0; }
.notification-entry-main { flex:1 1 260px; min-width:0; }
.notification-entry form { margin:0; flex-shrink:0; }
.notification-meta { font-size:.85rem; color:var(--muted); }
.notification-empty { margin:var(--ui-field-gap) 0; }
.notification-message { white-space:pre-line; overflow-wrap:anywhere; }
