#project-workspace-view { min-width: 0; }

.pw-header {
  padding: 16px clamp(14px, 2.5vw, 28px) 20px;
  border-left: 4px solid var(--brand-orange);
  background: var(--navy);
  color: #f6f8fc;
}
.pw-back {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 7px;
  color: #c6d9ed;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.pw-back:hover { color: #fff; text-decoration: underline; }
.pw-back:focus-visible { outline-color: #8fc1f5; }
.pw-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.pw-title-row h1 {
  min-width: 0;
  font-size: clamp(25px, 4vw, 42px);
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -.038em;
  overflow-wrap: anywhere;
}
.pw-header .pw-header-edit {
  flex: 0 0 auto;
  min-height: 44px;
  margin-inline-start: auto;
  border-color: #ffb773;
  background: var(--brand-orange);
  color: var(--navy);
}
.pw-header .pw-header-edit:hover:not(:disabled) { background: #ffb773; }
.pw-header .pw-header-edit:focus-visible { outline-color: #b4d6fa; }
.pw-project-status, .pw-job-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #d5e0eb;
  background: #edf3f9;
  color: #355470;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.pw-project-status.status-active, .pw-job-status.status-confirmed {
  border-color: #c6dfd1;
  background: #eaf5ef;
  color: #255542;
}
.pw-project-status.status-planning, .pw-job-status.status-planning {
  border-color: #e7c9a9;
  background: #fff1de;
  color: #744521;
}
.pw-project-status.status-completed, .pw-job-status.status-completed {
  border-color: #cad8e8;
  background: #edf3f9;
  color: #355470;
}
.pw-project-status.status-on_hold, .pw-job-status.status-cancelled {
  border-color: #decdd4;
  background: #f7eef2;
  color: #774557;
}

.pw-load-state, .pw-events-progress { display: flex; align-items: center; flex-wrap: wrap; }
.pw-load-state:not(:has(:not([hidden]))), .pw-events-progress:not(:has(:not([hidden]))) { display: none; }
.pw-load-state, .pw-events-progress { gap: 8px 12px; margin-block: 10px; }
.pw-notice { padding: 7px 10px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pw-load-state .pw-notice, .pw-events-progress .pw-notice { padding-inline: 0; }

.pw-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-width: 0;
  border: 1px solid var(--line);
  border-top: none;
  background: var(--paper);
}
.pw-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
  padding: 0 8px;
}
.pw-create-menu { position: relative; margin: 4px 8px 4px auto; }
.pw-create-menu summary { min-height: 37px; padding: 6px 10px; list-style: none; cursor: pointer; }
.pw-create-menu summary::-webkit-details-marker { display: none; }
.pw-create-options { position: absolute; z-index: 3; inset-inline-end: 0; inset-block-start: calc(100% + 4px); min-width: 160px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 5px 16px #13294322; }
.pw-create-options button { display: block; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; background: transparent; color: var(--navy); text-align: start; font-size: 14px; font-weight: 700; }
.pw-create-options button:hover { background: #edf4fa; }
.pw-create-options button:focus-visible { outline-offset: -3px; }
.pw-meeting-link { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--navy); text-align: start; font: inherit; font-weight: 750; overflow-wrap: anywhere; }
.pw-meeting-link:hover { text-decoration: underline; }
.pw-tabs :is(button, a) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-width: 0;
  min-height: 45px;
  padding: 7px clamp(8px, 2vw, 18px);
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.pw-tabs :is(button, a):hover, .pw-tabs [aria-selected="true"] { color: var(--ink); background: #f2f7fc; }
.pw-tabs [aria-selected="true"] { border-bottom-color: var(--steel); }
.pw-tabs :is(button, a):focus-visible { outline-offset: -3px; }

.pw-panel { margin-top: 13px; min-width: 0; }
.pw-document-sections { display: grid; gap: 16px; }
.pw-message-windows {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: start;
  gap: 13px;
}
#pw-private-chat { min-width: 0; }
@media (max-width: 800px) {
  .pw-message-windows { grid-template-columns: minmax(0, 1fr); }
}
.pw-overview { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 13px; align-items: start; }
.pw-card { min-width: 0; border: 1px solid var(--line); background: var(--paper); }
.pw-organization .project-organization-inline { margin: 0; border: 0; }
.pw-organization .project-org-chart { border-top: 0; }
.pw-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  min-height: 49px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}
.pw-card-head h2 { min-width: 0; font-size: 17px; font-weight: 740; line-height: 1.25; overflow-wrap: anywhere; }
.pw-card-head .button { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.pw-card-body { display: grid; gap: 10px; padding: 12px 14px; }
.pw-details { margin: 0; }
.pw-details dt { color: var(--muted); font-size: 12px; font-weight: 650; }
.pw-details dd { margin: 0; font-size: 14px; font-weight: 700; }
.pw-source-link { width: fit-content; max-width: 100%; color: #294d70; font-size: 14px; font-weight: 750; text-underline-offset: .2em; overflow-wrap: anywhere; }
#pw-description { color: #2f4760; font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }

.pw-job-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.pw-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 9px 14px;
}
.pw-job + .pw-job { border-top: 1px solid #e8edf3; }
.pw-job-info { display: grid; min-width: 0; gap: 2px; font-size: 14px; overflow-wrap: anywhere; }
.pw-job-name { line-height: 1.32; }
.pw-muted, .pw-empty { color: var(--muted); font-size: 13px; }
.pw-empty { padding: 12px 14px; }

.pw-chat { min-width: 0; }
.pw-messages-scroll {
  min-height: 230px;
  max-height: min(51vh, 540px);
  overflow-y: auto;
  padding: 12px 14px;
  background: #f7faff;
}
.pw-messages-scroll:focus-visible { outline-offset: -3px; }
.pw-messages-scroll .pw-empty { padding: 0; }
.pw-messages-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pw-message {
  justify-self: start;
  min-width: 0;
  max-width: min(82%, 620px);
  padding: 7px 9px;
  border: 1px solid #d8e4f1;
  background: var(--paper);
}
.pw-own-message { justify-self: end; border-color: #cfdded; background: #eaf2fb; }
.pw-message-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; overflow-wrap: anywhere; }
.pw-message-info strong { font-size: 12px; }
.pw-message-info time { color: var(--muted); font-size: 11px; }
.pw-message-text { margin: 3px 0 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pw-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.pw-compose-field { display: grid; gap: 4px; min-width: 0; }
.pw-compose-field label { font-size: 13px; font-weight: 700; }
.pw-compose textarea {
  width: 100%; min-width: 0; min-height: 50px; padding: 7px 8px;
  border: 1px solid #bac9da; background: var(--paper); color: var(--ink); font: inherit; resize: vertical;
}
.pw-compose .inline-error { grid-column: 1 / -1; margin: 0; }

/* Project day and month calendar */
.pw-overview-timeline, .pw-assignment-timeline, .pw-about { grid-column: 1 / -1; }
.pw-daily-date { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pw-daily-date::first-letter { text-transform: uppercase; }
#project-workspace-view[data-pw-section="kalender"] #pw-milestones > .pm-panel { display: none; }
.pw-schedule-project {
  margin-bottom: 10px;
  padding: 7px 14px;
  border-left: 3px solid var(--brand-orange);
  border-bottom: 1px solid var(--line);
  background: #fff7eb;
  color: #744521;
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .pw-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  .pw-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .pw-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 0;
    padding-inline: 2px;
  }
  .pw-tabs :is(button, a) {
    flex: 0 0 auto;
    min-height: 44px;
    padding-inline: 10px;
    white-space: nowrap;
  }
  .pw-create-menu { margin: 2px; }
  .pw-create-menu summary, .pw-create-options button { min-height: 44px; }
}
@media (max-width: 430px) {
  .pw-header { padding: 10px 11px 15px; }
  .pw-header .pw-header-edit { margin-inline-start: 0; }
  .pw-back, .pw-card-head .button { min-height: 44px; }
  .pw-card-head, .pw-card-body, .pw-job, .pw-compose { padding-inline: 9px; }
  .pw-job { flex-wrap: wrap; }
  .pw-messages-scroll { min-height: 200px; padding-inline: 8px; }
  .pw-compose { grid-template-columns: minmax(0, 1fr); }
  .pw-compose button { justify-self: start; }
}
