:root {
  color-scheme: light;
  --brand: #0567a7;
  --brand-dark: #034a78;
  --brand-accent: #008cea;
  --ink: #21262c;
  --muted: #59636f;
  --line: #e2e5e9;
  --surface: #f3f4f6;
  --white: #fff;
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #006db7; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -5rem; left: 1rem; z-index: 3; background: white; padding: .6rem; }
.skip:focus { top: .5rem; }

.topbar {
  height: 74px;
  background: var(--brand);
  color: white;
  padding: 0 34px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand, .top-actions, .external, .nav-item, .button, .icon-label {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.brand { text-decoration: none; gap: 14px; }
.brand img { width: 52px; height: 49px; object-fit: contain; }
.brand strong { display: block; font-size: 1.24rem; line-height: 1.1; }
.brand small { display: block; margin-top: 5px; font-size: .83rem; }
.top-actions { gap: 16px; }
.demo { border: 1px solid #ffffff85; border-radius: 4px; padding: 4px 10px; font-size: .81rem; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--brand-dark); background: white; font-weight: 750; font-size: .8rem; }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100dvh - 74px); }
.sidebar { background: white; border-right: 1px solid var(--line); padding: 29px 14px; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item, .external { min-height: 43px; padding: 9px 12px; border-radius: 5px; text-decoration: none; color: #404b57; font-size: .94rem; font-weight: 600; }
.nav-item:hover, .external:hover { background: var(--surface); }
.nav-item[aria-current="page"] { color: var(--brand-dark); background: #e9f4fc; box-shadow: inset 3px 0 var(--brand-accent); }
.external { margin-top: 22px; border-top: 1px solid var(--line); border-radius: 0; width: 100%; padding-top: 15px; }
svg { flex: 0 0 auto; vertical-align: middle; }
[data-icon] { display: inline-grid; place-items: center; }

main { padding: 35px clamp(22px, 3.2vw, 52px) 55px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 22px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.2vw, 2.8rem); letter-spacing: -.048em; line-height: 1.08; }
h2 { font-size: 1.23rem; letter-spacing: -.018em; line-height: 1.25; }
h3 { font-size: 1rem; }
.page-head p { color: var(--muted); margin-top: 8px; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.54fr) minmax(285px, 1fr); gap: 19px; align-items: stretch; }
.hero {
  position: relative;
  min-height: 268px;
  padding: 24px 28px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 9px;
  color: white;
  background: linear-gradient(110deg, #034a78 4%, #0768a8 68%, #073d67);
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 24px;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.hero-label { display: flex; gap: .55rem; align-items: center; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; font-size: .8rem; }
.hero h2 { font-size: clamp(1.63rem, 2.4vw, 2.4rem); letter-spacing: -.035em; margin-bottom: 7px; }
.hero p { color: #eaf6ff; font-size: .94rem; }
.button {
  gap: .45rem;
  justify-content: center;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: .47rem .76rem;
  min-height: 39px;
  border-radius: 5px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
}
.button:hover { background: #f7f8f9; }
.button.primary { background: var(--brand); color: white; border-color: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.hero .button { color: var(--brand-dark); border-color: white; }
.text-button { border: 0; background: transparent; padding: 0; color: var(--brand-dark); font-weight: 650; text-decoration: none; font-size: .9rem; }
.text-button:hover { text-decoration: underline; }

.panel { background: white; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 17px 19px; gap: 12px; }
.schedule { padding-bottom: 5px; }
.schedule .panel-head { border-bottom: 1px solid var(--line); }
.deadline-list { padding: 0 18px; margin: 0; list-style: none; }
.deadline-list li + li { border-top: 1px solid #edf0f2; }
.deadline { background: none; border: 0; color: inherit; width: 100%; display: flex; text-align: left; align-items: center; gap: 10px; padding: 10px 0; }
.deadline:hover strong, .row-link:hover { color: var(--brand-dark); text-decoration: underline; }
.date-chip { flex: 0 0 44px; display: grid; place-items: center; align-content: center; background: #f4f5f7; border-radius: 5px; height: 43px; }
.date-chip b { line-height: 1.05; font-size: 1.05rem; }
.date-chip span { font-size: .69rem; text-transform: uppercase; color: var(--muted); }
.deadline strong { display: block; font-size: .89rem; line-height: 1.2; }
.deadline .sub { margin-top: 3px; }
.sub { display: block; color: var(--muted); font-size: .82rem; }
.dashboard-register { margin-top: 19px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 17px; vertical-align: middle; }
th { background: #f7f8f9; border-block: 1px solid #edf0f2; color: #535e6a; font-size: .79rem; white-space: nowrap; }
td { font-size: .89rem; border-bottom: 1px solid #edf0f2; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fcfcfd; }
.reference { color: var(--muted); white-space: nowrap; font-size: .84rem; }
.row-link { text-align: left; color: var(--ink); background: none; border: 0; padding: 0; font-weight: 660; }
.status { display: inline-block; font-size: .79rem; white-space: nowrap; color: #284a6c; background: #eaf2fb; padding: 3px 8px; border-radius: 4px; font-weight: 650; }
.status.erledigt, .status.freigegeben { color: #215940; background: #e7f5eb; }
.status.offen { color: #794917; background: #fff1dc; }
.status.geplant { color: #4a5360; background: #eef0f3; }
.empty { padding: 24px 19px; color: var(--muted); }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 19px; }
.metric { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 12px 15px; }
.metric:hover { border-color: #7bbcec; }
.metric-icon { display: grid; place-items: center; color: var(--brand-dark); background: #e9f4fc; width: 37px; height: 37px; border-radius: 5px; }
.metric strong, .metric small { display: block; }
.metric strong { line-height: 1.1; font-size: 1.15rem; }
.metric small { color: var(--muted); font-size: .79rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 14px 17px; }
.search { flex: 1 1 220px; }
input, select, textarea { color: var(--ink); background: white; border: 1px solid #c9cfd6; border-radius: 5px; min-height: 39px; padding: .43rem .62rem; }
input::placeholder { color: #697480; }
select { appearance: none; padding-right: 2rem; background: white no-repeat right .65rem center / .65rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2359636f' stroke-width='1.5'/%3E%3C/svg%3E"); }
.card-list { display: grid; gap: 12px; }
.entry { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 19px; }
.entry p { margin-top: 3px; }
.notice { padding: 19px; margin-bottom: 17px; }
.notice p { margin: 6px 0 12px; color: var(--muted); }
.adl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.adl-list li { border-top: 1px solid var(--line); padding: 11px 17px; display: flex; align-items: baseline; gap: .65rem; }
.adl-list strong { white-space: nowrap; font-size: .82rem; color: var(--muted); }
dialog { width: min(94vw, 570px); max-height: 88dvh; border: 1px solid var(--line); border-radius: 9px; padding: 0; color: var(--ink); box-shadow: 0 22px 65px #242b3440; }
dialog::backdrop { background: #17212c76; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 19px 22px 22px; }
.file-preview-dialog { width: min(94vw, 1040px); }
.file-preview {
  min-width: 0;
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fb;
  overflow-wrap: anywhere;
}
.file-preview h3, .file-preview p { margin: 0; }
.file-preview iframe { display: block; width: 100%; height: 62dvh; border: 0; }
.file-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 65dvh;
  margin: 0 auto;
  object-fit: contain;
}
.file-preview pre, .office-page, .office-table {
  max-height: 56dvh;
  overflow: auto;
  padding: 12px;
  margin: 0;
  background: var(--white);
}
.file-preview pre, .office-page p { white-space: pre-wrap; overflow-wrap: anywhere; }
.office-page p + p { margin-top: .6rem; }
.file-preview table { border-collapse: collapse; }
.file-preview td, .file-preview th { border: 1px solid var(--line); padding: .3rem .6rem; }
.file-preview details { margin-top: 8px; }
.close { background: none; border: 0; padding: 3px; color: var(--muted); }
.stack { display: grid; gap: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 630; font-size: .9rem; }
label input, label textarea, label select { width: 100%; font-weight: 400; }
textarea { min-height: 88px; resize: vertical; }
.form-actions { display: flex; justify-content: end; gap: 8px; }
dl { margin: 0; }
dt { color: var(--muted); font-size: .84rem; }
dd { margin: 0 0 8px; font-weight: 600; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #27323b; color: white; padding: 10px 15px; border-radius: 5px; max-width: calc(100% - 44px); z-index: 5; }

@media (max-width: 1000px) {
  .layout { grid-template-columns: 178px minmax(0, 1fr); }
  .sidebar { padding-inline: 9px; }
  .dashboard { grid-template-columns: minmax(0, 1.2fr) minmax(235px, 1fr); }
  .hero { padding-inline: 21px; }
}

@media (max-width: 760px) {
  .topbar { padding-inline: 13px; height: 61px; }
  .brand { gap: 8px; }
  .brand img { width: 39px; height: 40px; }
  .brand strong { font-size: 1.04rem; }
  .top-actions { gap: 8px; }
  .avatar { display: none; }
  .demo { font-size: .71rem; padding-inline: 6px; text-align: center; }
  .layout { display: block; }
  .sidebar { padding: 6px 9px; border-right: none; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; overflow-x: auto; padding: 3px; }
  .sidebar .external { display: none; }
  .nav-item { white-space: nowrap; min-height: 37px; padding: 6px 9px; font-size: .87rem; }
  main { padding: 23px 13px 35px; }
  .page-head { align-items: start; }
  .dashboard { grid-template-columns: 1fr; gap: 12px; }
  .hero { min-height: 220px; }
  .dashboard-register, .metrics { margin-top: 12px; }
  .metrics { gap: 7px; }
  .metric { padding: 9px; gap: 5px; }
  .metric-icon { display: none; }
  th, td { padding: 9px 12px; }
}

@media (max-width: 420px) {
  .page-head, .entry { flex-wrap: wrap; }
  .fields { grid-template-columns: 1fr; }
}

.message-tools, .message-labels, .message-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.message-tools { justify-content: space-between; gap: 12px; }
.message-tabs { padding-top: 13px; }
.message-tabs [aria-pressed="true"] { border-color: var(--brand); color: var(--brand-dark); }
.dashboard-calendar { margin-bottom: 19px; }
.dashboard-calendar-tabs {
  display: flex;
  align-items: stretch;
  margin-top: 14px;
  border-bottom: 1px solid var(--line);
}
.dashboard-calendar-tabs [role="tab"] {
  min-width: 0;
  min-height: 44px;
  padding: .5rem clamp(.35rem, 2vw, 1rem);
  margin-bottom: -1px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.25;
}
.dashboard-calendar-tabs [role="tab"]:hover { color: var(--brand-dark); background: #f1f7fc; }
.dashboard-calendar-tabs [role="tab"][aria-selected="true"] {
  border-bottom-color: var(--brand);
  color: var(--brand-dark);
}
.dashboard-calendar-tabs [role="tab"]:focus-visible { outline-offset: -3px; }
@media (max-width: 480px) {
  .dashboard-calendar-tabs [role="tab"] { flex: 1; }
}
.message-list { list-style: none; padding: 0; margin: 14px 0; }
.message-list li {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.dashboard-calendar [role="tabpanel"] > p {
  margin: 0;
  padding: 16px;
  color: var(--muted);
}
.dashboard-calendar .dashboard-event-list { display: grid; gap: 8px; }
.dashboard-event-list > li {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 16px;
}
.dashboard-event-list li > div { display: grid; gap: 4px; min-width: 0; }
.dashboard-event-list .row-link { text-align: left; overflow-wrap: anywhere; }
.inline-check { display: flex; align-items: center; gap: 8px; }
.inline-check input { width: auto; min-height: 0; accent-color: var(--brand-dark); }
.form-error { color: #96262e; }
button:disabled { cursor: wait; opacity: .65; }

.top-actions .avatar { display: grid; border: 0; padding: 0; overflow: hidden; }
.topbar :focus-visible { outline-color: white; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-heading { display: flex; align-items: center; gap: 12px; }
.profile-avatar { width: 52px; height: 52px; overflow: hidden; background: #e9f4fc; font-size: 1rem; }
#factor-key { overflow-wrap: anywhere; user-select: all; }

.header-login {
  border-radius: 5px;
  padding: .38rem .66rem;
  color: var(--brand-dark);
  background: white;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}
.header-login:hover { background: #e9f4fc; }

@media (max-width: 480px) {
  .top-actions .demo { display: none; }
}

.authenticator-qr {
  display: block;
  width: min(100%, 248px);
  height: auto;
  image-rendering: pixelated;
  margin-inline: auto;
  border: 1px solid var(--line);
}

#factor-manual p { margin-top: .5rem; }

.board-list { list-style: none; margin: 0; padding: 0; }
.board-list li { border-top: 1px solid var(--line); }
.board-list h2 { font-size: 1rem; }
.board-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.calendar-toolbar, .project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .85rem 1rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  overflow-x: auto;
  min-height: 8rem;
}
.calendar-day { padding: .65rem; min-width: 0; border-right: 1px solid var(--line); }
.calendar-day:last-child { border-right: 0; }
.calendar-day-head { display: flex; justify-content: space-between; gap: .3rem; padding-bottom: .5rem; }
.calendar-day-head h3 span { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; }
.calendar-today { background: #f3f9ff; }
.calendar-today h3 { color: var(--brand-dark); }
.calendar-add { background: transparent; border: 0; color: var(--brand); padding: 3px; align-self: flex-start; }
.calendar-event, .project-task {
  display: grid;
  width: 100%;
  gap: .22rem;
  margin-bottom: .45rem;
  padding: .5rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.calendar-event { background: #e9f4fc; border-left: 3px solid var(--brand-accent); }
.calendar-pending { border-left-color: #9a5a10; background: #fff1dc; }
.calendar-accepted { border-left-color: #2b7950; background: #eaf5ee; }
.calendar-declined, .calendar-cancelled { border-left-color: var(--muted); background: #eef0f3; }
.calendar-event:hover, .project-task:hover { border-color: var(--brand-accent); }
.calendar-time { font-size: .8rem; color: var(--muted); }
.calendar-invitations, .project-overview, .project-card, .project-column { padding: .9rem 1rem; }
.calendar-invitations ul, .calendar-roster, .project-comments { list-style: none; margin: .45rem 0 0; padding: 0; }
.calendar-invitations li, .calendar-roster li { padding: .4rem 0; border-top: 1px solid var(--line); }
.calendar-roster li { display: flex; justify-content: space-between; gap: .7rem; }
.collaboration-people {
  min-width: 0;
  display: grid;
  gap: .4rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .6rem .8rem;
  max-height: 13rem;
  overflow-y: auto;
}
.collaboration-people legend { font-weight: 650; }
.project-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.project-card { display: grid; justify-items: start; align-content: start; gap: .5rem; }
.project-description { overflow-wrap: anywhere; }
.project-heading { padding: 0; margin-bottom: .55rem; }
.project-members { margin-top: .5rem; }
.project-board { display: grid; grid-template-columns: repeat(5, minmax(156px, 1fr)); overflow-x: auto; gap: .55rem; }
.project-column { display: grid; align-content: start; gap: .4rem; overflow: visible; }
.project-column-head { display: grid; justify-items: start; gap: .25rem; padding-bottom: .45rem; }
.project-column-head h3 .sub { display: inline; }
.project-task { background: #f7fafc; }
.project-comments li { border-top: 1px solid var(--line); padding: .55rem 0; }
.project-comments .sub { display: inline; margin-left: .3rem; }
.project-comments p { margin-top: .2rem; }

@media (max-width: 720px) {
  .calendar-grid, .project-board { grid-template-columns: minmax(0, 1fr); overflow-x: visible; }
  .calendar-day { border-right: 0; border-bottom: 1px solid var(--line); }
  .calendar-day-head h3 span { display: inline; margin-left: .2rem; }
}

.calendar-person-picker [data-calendar-collection] { flex: 1 1 180px; }
.calendar-person-picker input[type="search"] { width: 100%; }
#access-form select[multiple] { background-image: none; padding-right: .65rem; }
