.workboard-page {
  min-width: 1180px;
}

.workboard-page.dialog-open {
  overflow: hidden;
}

.workboard-shell {
  width: calc(100% - 28px);
  max-width: none;
  margin: 0 auto;
  padding: 14px 0 26px;
}

.workboard-topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(215, 225, 228, .96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.workboard-brand { min-width: 0; }
.workboard-brand .eyebrow { margin-bottom: 8px; }

.workboard-user-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wb-icon-button {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.wb-icon-button:hover { border-color: #9bbdb8; background: #f1f8f7; }
.wb-icon-button strong {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #d9483f;
  color: #fff;
  font-size: 11px;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 10px 5px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.profile-button:hover,
.profile-button[aria-expanded="true"] { border-color: var(--line); background: #f7fbfb; }

.user-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--avatar-color, var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background-position: center;
  background-size: cover;
}

.user-avatar.large { width: 76px; height: 76px; font-size: 23px; }

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 176px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(22, 43, 51, .16);
}

.profile-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.profile-menu button:hover { background: #edf6f5; color: var(--accent-strong); }

.password-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border: 1px solid #e9ca89;
  border-radius: 8px;
  background: #fff8e7;
  color: #725020;
  font-size: 14px;
}

.password-notice button,
.text-button {
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 750;
}

.workboard-layout {
  position: relative;
  display: grid;
  grid-template-columns:
    clamp(285px, 19vw, 360px)
    minmax(620px, 1fr)
    clamp(330px, 23vw, 420px);
  align-items: start;
  gap: 14px;
}

.wb-panel {
  border: 1px solid rgba(215, 225, 228, .96);
  border-radius: 10px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
}

.team-panel,
.personal-panel {
  min-height: calc(100vh - 132px);
  padding: 16px;
}

.wb-panel-head,
.calendar-head,
.stack-card-head,
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wb-panel-head h1 { font-size: 23px; }
.wb-panel-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.team-add-button { border-color: #9bc4be; color: var(--accent-strong); font-size: 22px; font-weight: 500; }
.team-switcher-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 15px; }
.team-switcher-head strong { color: #344d52; font-size: 13px; }
.team-switcher-head span { color: var(--muted); font-size: 10px; text-align: right; }
.team-switcher { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.team-switcher button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf9;
  color: #53666c;
  font-size: 11px;
  font-weight: 700;
}
.team-switcher button:hover { border-color: #9bc4be; color: var(--accent-strong); }
.team-switcher button.active { border-color: var(--accent); background: var(--accent); color: #fff; }

.segmented-control,
.filter-chips,
.mini-segmented {
  display: flex;
  align-items: center;
  gap: 7px;
}

.segmented-control { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; }
.segmented-control button,
.filter-chips button,
.mini-segmented button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
  color: #42545b;
  white-space: nowrap;
}

.segmented-control button { min-width: 0; padding: 0 5px; font-size: 12px; }
.segmented-control button strong { margin-left: 3px; }
.segmented-control button.active,
.filter-chips button.active,
.mini-segmented button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.team-task-list {
  display: grid;
  gap: 10px;
  min-height: 180px;
  margin-bottom: 12px;
}

.team-task-card {
  position: relative;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 9px;
  background: #fff;
  transition: transform .14s ease, box-shadow .14s ease;
}

.team-task-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(23, 54, 62, .09); }
.team-task-card[draggable="true"] { cursor: grab; }
.team-task-card.is-dragging { opacity: .55; }
.team-task-card h3 { margin: 7px 0 8px; font-size: 16px; line-height: 1.35; }
.team-card-top,
.team-card-meta,
.team-card-footer,
.task-progress-row,
.compact-task-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.team-card-status { display: inline-flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 7px; }
.team-badge { display: inline-flex; max-width: 150px; padding: 3px 7px; overflow: hidden; border-radius: 999px; background: #eaf5f3; color: var(--accent-strong); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.status-dot { color: var(--accent); font-size: 13px; font-weight: 750; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; }
.status-dot.todo { color: #718087; }
.status-dot.waiting { color: #d38222; }
.status-dot.done { color: #37855c; }

.priority-badge,
.count-badge {
  display: inline-grid;
  min-width: 26px;
  min-height: 24px;
  padding: 0 7px;
  place-items: center;
  border-radius: 7px;
  background: #edf2f3;
  color: #5b6a71;
  font-size: 12px;
  font-weight: 800;
}

.priority-badge.high,
.count-badge.danger { background: #fff0ef; color: #c63f37; }
.priority-badge.medium { background: #fff6df; color: #b26916; }
.priority-badge.low { background: #eaf7f1; color: #27825b; }

.task-labels { display: flex; flex-wrap: wrap; gap: 5px; }
.task-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--label-color, var(--accent)) 36%, white);
  border-radius: 6px;
  background: color-mix(in srgb, var(--label-color, var(--accent)) 13%, white);
  color: color-mix(in srgb, var(--label-color, var(--accent)) 76%, #18292f);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.team-card-meta { margin: 10px 0; color: var(--muted); font-size: 12px; }
.team-card-footer { margin-top: 10px; }
.avatar-name { display: inline-flex; align-items: center; gap: 6px; color: #44555b; font-size: 12px; }
.avatar-name .user-avatar { width: 24px; height: 24px; font-size: 9px; }
.task-progress-row { margin-top: 10px; color: var(--muted); font-size: 11px; }
.progress-bar { flex: 1; height: 5px; overflow: hidden; border-radius: 999px; background: #e4eaec; }
.progress-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.wb-outline-button,
.danger-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #9bc4be;
  border-radius: 8px;
  background: #fff;
  color: var(--accent-strong);
  font-weight: 750;
}
.wb-outline-button:hover { background: #edf7f5; }
.danger-button { border-color: #e5aaa5; color: #b43d36; }
.danger-button:hover { background: #fff1ef; }
.full-width { width: 100%; justify-content: center; }

.personal-heading { margin-bottom: 12px; }
.quick-task-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.quick-task-form input { width: 100%; min-height: 38px; padding: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.personal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; }

.personal-task-table { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.personal-task-list { display: grid; }
.personal-task-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px 14px;
  border-top: 1px solid #e3eaec;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background .14s ease, opacity .14s ease;
}
.personal-task-row:first-child { border-top: 0; }
.personal-task-row:hover { background: #f5fbfa; }
.personal-task-row.is-dragging { opacity: .5; }
.personal-task-row.is-completed { background: #f3f6f6; color: #829096; opacity: .66; }
.personal-task-row.is-completed:hover { background: #edf2f2; opacity: .82; }
.personal-task-main { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.personal-task-check { padding-top: 1px; }
.personal-task-row .task-title-cell {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.personal-task-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.personal-task-badges .status-dot { padding: 4px 8px; border-radius: 6px; background: #edf5f3; white-space: nowrap; }
.personal-task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; min-height: 24px; padding-left: 34px; color: #607177; }
.personal-task-labels { display: inline-flex; }
.personal-task-meta-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px; background: #f2f6f6; font-size: 11px; }
.personal-task-meta-item > span { color: #75858a; font-weight: 700; }
.personal-task-meta-item time { color: #34494f; }
.personal-task-meta-item.is-due { background: #fff7e7; }
.personal-task-row.is-completed .task-title-cell { color: #78888e; text-decoration: line-through; }
.order-links,
.item-links,
.reference-links { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; }
.order-link,
.order-reference { display: inline-flex; max-width: 126px; overflow: hidden; padding: 4px 7px; border-radius: 6px; background: #e8f5f3; color: var(--accent-strong); font-size: 11px; font-weight: 700; text-overflow: ellipsis; text-decoration: none; white-space: nowrap; }
.order-link:hover { background: #d5eeea; text-decoration: underline; }
.order-reference.is-missing { background: #f0f3f4; color: #829096; cursor: default; }
.inventory-item-link { display: inline-flex; max-width: 150px; overflow: hidden; padding: 4px 7px; border: 1px solid #a9c9c4; border-radius: 6px; background: #f1f8f7; color: #145e56; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.inventory-item-link:hover { border-color: var(--accent); background: #dff1ee; text-decoration: underline; }
.team-order-links { margin-top: 8px; }
.task-checkbox { width: 20px; height: 20px; accent-color: var(--accent); }
.empty-board-state { display: grid; min-height: 150px; place-items: center; padding: 20px; color: var(--muted); text-align: center; }

.calendar-rail { display: grid; align-content: start; gap: 12px; }
.calendar-card,
.calendar-stack-card { padding: 14px; }
.calendar-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.calendar-head h2,
.stack-card-head h2 { font-size: 18px; }
.calendar-head h2 { white-space: nowrap; }
.calendar-head-actions { display: flex; align-items: center; gap: 6px; }
.mini-segmented { gap: 4px; }
.mini-segmented button { min-height: 30px; padding: 0 10px; }
.calendar-head-actions .text-button { padding: 4px 2px; white-space: nowrap; }

html[lang="en"] .segmented-control button { font-size: 11px; line-height: 1.1; white-space: normal; }
html[lang="en"] .calendar-head h2 { font-size: 16px; }
html[lang="en"] .mini-segmented button { padding: 0 8px; font-size: 12px; }
html[lang="en"] .calendar-head-actions .text-button { font-size: 12px; }
.calendar-nav { display: grid; grid-template-columns: 36px 1fr 36px auto; align-items: center; gap: 6px; margin: 12px 0 8px; }
.calendar-nav strong { text-align: center; }
.calendar-weekdays,
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays { color: #718087; font-size: 11px; font-weight: 800; text-align: center; }
.calendar-weekdays span { padding: 6px 0; }
.calendar-day {
  position: relative;
  min-height: 48px;
  padding: 5px 3px;
  border: 0;
  border-top: 1px solid #e5ecee;
  background: #fff;
  color: #273a41;
  text-align: center;
}
.calendar-day:nth-child(7n+1), .calendar-day:nth-child(7n) { background: #fbfcfc; }
.calendar-day.outside { color: #b1bdc2; }
.calendar-day:hover { background: #ecf7f5; }
.calendar-day.selected .calendar-day-number,
.calendar-day.today .calendar-day-number { background: var(--accent); color: #fff; }
.calendar-day-number { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-size: 12px; }
.calendar-dots { display: flex; justify-content: center; gap: 3px; min-height: 7px; margin-top: 2px; }
.calendar-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--dot-color, var(--accent)); }
.calendar-day-count { position: absolute; right: 3px; bottom: 2px; color: var(--muted); font-size: 9px; }

.calendar-stack-card { min-height: 150px; }
.due-card { min-height: 190px; }
.compact-task-list { display: grid; gap: 7px; margin-top: 10px; }
.compact-task-item { padding: 9px; border: 1px solid #e2e9eb; border-radius: 8px; background: #fff; }
.compact-task-item.overdue { border-left: 3px solid #cf483f; }
.compact-task-item h3 { margin: 0 0 6px; font-size: 13px; line-height: 1.35; }
.compact-task-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; }
.compact-task-actions { justify-content: flex-start; margin-top: 7px; }
.compact-task-actions button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--accent-strong); font-size: 11px; font-weight: 750; }

.calendar-expand-tab {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 15;
  width: 42px;
  padding: 14px 8px;
  border: 1px solid var(--accent);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  line-height: 1.4;
  writing-mode: vertical-rl;
}
.workboard-layout.calendar-collapsed { grid-template-columns: minmax(280px, .25fr) minmax(720px, .75fr); }
.workboard-layout.calendar-collapsed .calendar-rail { display: none; }

.wb-dialog {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(15, 33, 40, .26);
}
.wb-dialog::backdrop { background: rgba(29, 46, 52, .38); backdrop-filter: blur(2px); }
.wb-dialog > form,
.wb-dialog > div:not(.dialog-head) { padding: 20px; }
.wb-dialog .dialog-head { position: sticky; top: 0; z-index: 3; padding: 18px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.wb-dialog label { display: grid; gap: 6px; color: #4c5e64; font-size: 13px; font-weight: 700; }
.wb-dialog input,
.wb-dialog select,
.wb-dialog textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #ccd9dd;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: 0;
}
.wb-dialog textarea { resize: vertical; }
.field-help { color: var(--muted); font-size: 11px; font-weight: 500; }
.wb-dialog input:focus,
.wb-dialog select:focus,
.wb-dialog textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,117,107,.11); }

.login-dialog { width: 430px; }
.login-card { display: grid; gap: 16px; padding: 28px !important; }
.login-card h2 { font-size: 27px; }
.dialog-help { color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-error { padding: 9px 11px; border-radius: 7px; background: #fff0ef; color: #b43d36; font-size: 13px; }

.task-dialog { width: min(830px, calc(100vw - 40px)); }
.task-dialog form { padding: 0 20px 20px; }
.task-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding-top: 18px; }
.task-form-grid .span-2 { grid-column: 1 / -1; }
.task-form-section { padding: 14px 0; border-top: 1px solid #e4ebed; }
.label-options,
.assignee-options,
.claimant-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.label-option,
.assignee-option,
.claimant-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #34474d; font-size: 12px; }
.label-option input,
.assignee-option input { width: 16px; min-height: auto; accent-color: var(--accent); }
.claimant-chip .user-avatar { width: 24px; height: 24px; font-size: 9px; }
.comment-list { display: grid; gap: 8px; max-height: 180px; overflow: auto; margin: 10px 0; }
.comment-item { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 8px; border-radius: 8px; background: #f5f8f8; }
.comment-item .user-avatar { width: 30px; height: 30px; }
.comment-item p { color: #34474d; font-size: 13px; line-height: 1.45; }
.comment-item small { color: var(--muted); }
.comment-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dialog-actions.split-actions { display: grid; grid-template-columns: auto 1fr auto auto; }

.day-dialog { width: 560px; padding: 0 20px 20px; }
.day-dialog .dialog-head { margin: 0 -20px 14px; }
.day-task-list { display: grid; gap: 8px; margin-bottom: 14px; }
.day-task-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.day-task-item:hover { background: #f0f8f7; }
.day-task-item h3 { margin: 0 0 6px; font-size: 14px; }

.team-dialog { width: 620px; }
.team-dialog form { display: grid; gap: 14px; padding: 0 20px 20px; }
.team-member-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.team-member-options .assignee-option { width: 100%; min-width: 0; }
.team-member-options .assignee-option span:last-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member-options .assignee-option small { margin-left: auto; color: var(--accent-strong); }
.team-member-options .assignee-option.is-current-user { border-color: #a8cbc6; background: #eef8f6; }

.label-dialog { width: 440px; }
.label-dialog form,
.profile-dialog form { display: grid; gap: 14px; padding: 0 20px 20px; }
.label-dialog fieldset { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.label-dialog legend { padding: 0 5px; color: #4d6066; font-size: 13px; font-weight: 700; }
.label-color-options { display: flex; flex-wrap: wrap; gap: 9px; }
.label-color-button { width: 30px; height: 30px; border: 3px solid transparent; border-radius: 50%; background: var(--label-color); }
.label-color-button.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.label-preview-row { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.existing-label-section { display: grid; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #f7faf9; }
.existing-label-section > strong { color: #40545a; font-size: 13px; }
.existing-label-list { display: flex; flex-wrap: wrap; gap: 7px; }
.existing-label-item { display: inline-flex; align-items: center; gap: 3px; padding: 4px 5px 4px 7px; border: 1px solid #d9e4e6; border-radius: 8px; background: #fff; }
.label-delete-button { display: inline-grid; width: 24px; height: 24px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #b14a43; font-size: 17px; line-height: 1; }
.label-delete-button:hover { background: #fff0ef; color: #d13b32; }

.profile-dialog { width: 500px; }
.profile-editor { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
.file-picker { display: inline-flex !important; width: auto !important; align-items: center; cursor: pointer; }
.file-picker input { display: none; }
.profile-dialog hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.profile-dialog h3 { margin: 0; }

.order-preview-dialog { width: min(1050px, calc(100vw - 48px)); }
.order-preview-body { display: grid; gap: 12px; padding: 16px 20px 22px !important; background: #f5f9f9; }
.order-preview-loading,
.order-preview-error { display: grid; min-height: 240px; place-items: center; color: var(--muted); }
.order-preview-error { color: #b43d36; }
.order-preview-summary,
.order-preview-section { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.order-preview-summary { padding: 14px; border-left: 4px solid var(--accent); }
.order-preview-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.order-preview-summary-head > div { display: flex; min-width: 0; align-items: baseline; gap: 12px; }
.order-preview-summary-head strong { color: var(--accent-strong); font-size: 19px; }
.order-preview-summary-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-preview-status { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; background: #e8f5f3; color: var(--accent-strong); font-size: 12px; font-weight: 800; }
.order-preview-meta,
.order-preview-address { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.order-preview-meta > div,
.order-preview-address > div { display: grid; min-width: 0; gap: 3px; padding: 9px 10px; border-radius: 7px; background: #f5f8f8; }
.order-preview-meta span,
.order-preview-address span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.order-preview-meta strong,
.order-preview-address strong { overflow-wrap: anywhere; font-size: 12px; }
.order-preview-section h3 { padding: 10px 13px; border-bottom: 1px solid var(--line); background: #edf6f5; color: var(--accent-strong); font-size: 14px; }
.order-preview-table-wrap { overflow: auto; }
.order-preview-table { width: 100%; min-width: 780px; border-collapse: collapse; }
.order-preview-table th,
.order-preview-table td { padding: 10px 12px; border-bottom: 1px solid #e4ebed; text-align: left; vertical-align: top; font-size: 12px; }
.order-preview-table th { background: #f5f8f8; color: #56666c; font-size: 11px; }
.order-preview-table th:nth-child(1) { width: 145px; }
.order-preview-table th:nth-child(3),
.order-preview-table th:nth-child(4) { width: 75px; text-align: center; }
.order-preview-table th:nth-child(5) { width: 240px; }
.order-preview-table td.is-number { text-align: center; }
.order-preview-serials { display: grid; gap: 4px; }
.order-preview-serials code { padding: 3px 6px; border: 1px solid #b9caef; border-radius: 5px; background: #eff4ff; color: #164e9c; font-size: 11px; }
.order-preview-address { padding: 12px; }
.order-preview-address > div:nth-child(5) { grid-column: span 2; }
.order-preview-packages { display: grid; gap: 5px; padding: 12px 14px; color: #33484f; font-size: 12px; }

.inventory-preview-dialog { width: min(780px, calc(100vw - 48px)); }
.inventory-preview-body { display: grid; gap: 12px; padding: 16px 20px 22px !important; background: #f5f9f9; }
.inventory-preview-summary,
.inventory-preview-orders { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.inventory-preview-summary { padding: 14px; border-left: 4px solid var(--accent); }
.inventory-preview-description { display: grid; gap: 4px; margin-bottom: 12px; }
.inventory-preview-description span,
.inventory-preview-metrics span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.inventory-preview-description strong { color: var(--text); font-size: 15px; line-height: 1.45; }
.inventory-preview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.inventory-preview-metrics > div { display: grid; gap: 4px; padding: 10px; border-radius: 7px; background: #f3f7f7; }
.inventory-preview-metrics strong { font-size: 15px; }
.inventory-preview-status.shortage { color: #c83f36; }
.inventory-preview-status.sufficient { color: #257f48; }
.inventory-preview-orders h3 { padding: 10px 13px; border-bottom: 1px solid var(--line); background: #edf6f5; color: var(--accent-strong); font-size: 14px; }
.inventory-related-list { display: grid; }
.inventory-related-order { display: grid; grid-template-columns: 125px minmax(0, 1fr) 92px 104px 90px; align-items: center; gap: 9px; min-height: 46px; padding: 8px 12px; border-top: 1px solid #e4ebed; font-size: 12px; }
.inventory-related-order:first-child { border-top: 0; }
.inventory-related-order > span { min-width: 0; overflow: hidden; color: #53666c; text-overflow: ellipsis; white-space: nowrap; }
.inventory-related-order b { color: var(--accent-strong); text-align: right; }

.workboard-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translateX(-50%);
  padding: 11px 17px;
  border-radius: 8px;
  background: #163d39;
  color: #fff;
  box-shadow: 0 14px 34px rgba(18,49,46,.24);
  font-weight: 700;
}
.workboard-toast.error { background: #a73b35; }
.drop-active { outline: 2px dashed var(--accent); outline-offset: -6px; background: rgba(226,244,241,.55); }

/* Keep the workspace navigation identical to the other modules. */
.workboard-shell {
  width: calc(100% - 24px);
  max-width: none;
  padding-top: 10px;
}

.workboard-topbar {
  position: sticky;
  top: 10px;
  z-index: 100;
  width: 100%;
  height: 92px;
  min-height: 92px;
  padding: 12px 18px;
  margin-bottom: 14px;
  border-color: rgba(199, 214, 219, .96);
  border-radius: 9px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 28px rgba(24, 45, 54, .08);
  backdrop-filter: blur(12px);
}

.workboard-brand {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 5px;
}

.workboard-brand .eyebrow {
  margin: 0;
  color: #315fba;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .04em;
}

@media (max-width: 1450px) {
  .workboard-layout { grid-template-columns: 285px minmax(620px, 1fr); }
  .calendar-rail { grid-column: 1 / -1; grid-template-columns: 1.1fr 1fr 1fr; }
  .calendar-card, .calendar-stack-card { min-height: 0; }
  .personal-task-row { font-size: 12px; }
  .team-panel, .personal-panel { padding: 13px; }
}

@media (max-width: 1180px) {
  .workboard-page { min-width: 0; }
  .workboard-layout { grid-template-columns: 270px minmax(590px, 1fr); }
}

@media (max-width: 700px) {
  .personal-task-main { grid-template-columns: 24px minmax(0, 1fr); }
  .personal-task-badges { grid-column: 2; justify-content: flex-start; }
  .inventory-preview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-related-order { grid-template-columns: 110px minmax(0, 1fr); }
  .inventory-related-order > span:nth-of-type(n+2),
  .inventory-related-order b { grid-column: 2; text-align: left; }
}
