@charset "UTF-8";
/* Shared tokens: both themes use the same components and semantic colors. */
:root {
  color-scheme: light;
  --bg: #f2f5f8;
  --panel: #fff;
  --raised: #f8fafc;
  --ink: #172637;
  --muted: #596b7f;
  --line: #dce4ed;
  --accent: #126b91;
  --accent-hover: #0b5272;
  --soft: #e8f4f9;
  --danger: #b52d40;
  --danger-soft: #fceef1;
  --warning: #865814;
  --warning-soft: #fff3dc;
  --success: #207251;
  --success-soft: #e6f5ec;
  --radius: 16px;
  --sidebar: 224px;
  --shadow: 0 6px 24px #183c6210;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1723;
  --panel: #152230;
  --raised: #1b2a3a;
  --ink: #e8f0f8;
  --muted: #a4b5c7;
  --line: #2c3e50;
  --accent: #6bc9ed;
  --accent-hover: #91dcf5;
  --soft: #183d50;
  --danger: #ff8899;
  --danger-soft: #3e2330;
  --warning: #f3c47c;
  --warning-soft: #3d3324;
  --success: #7cdbac;
  --success-soft: #1b3b32;
  --shadow: 0 6px 24px #0002;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.4;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
button:hover,
.button:hover {
  border-color: var(--accent);
  background: var(--soft);
}
button:active,
.button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button.primary,
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--panel);
}
button.primary:hover,
.button.primary:hover {
  background: var(--accent-hover);
}
.icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-button {
  padding: 10px;
  width: 44px;
  flex-shrink: 0;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
}
.text-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.text-link:hover {
  text-decoration: underline;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  min-height: 44px;
  padding: 10px 12px;
  margin: 6px 0 16px;
}
textarea {
  resize: vertical;
}
select[multiple] {
  height: auto;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  display: inline-block;
  margin: 0;
  accent-color: var(--accent);
}
input[type="file"] {
  font-size: 12px;
  padding: 9px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 13px;
}
fieldset {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 10px;
  margin: 20px 0;
}
legend {
  font-weight: 700;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.3;
  font-weight: 700;
  margin: 8px 0 12px;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 14px;
}
h3 {
  font-size: 15px;
  margin: 14px 0 8px;
}
p {
  margin-bottom: 12px;
}
small {
  font-size: 12px;
}
.muted,
.hint {
  color: var(--muted);
  font-size: 13px;
}
.hint {
  display: block;
  margin: 8px 0 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.skip {
  position: fixed;
  top: -80px;
  z-index: 100;
  background: var(--accent);
  color: var(--panel);
  padding: 14px;
}
.skip:focus {
  top: 0;
}
[hidden] {
  display: none !important;
}
/* Shell and navigation. Logical properties keep Arabic layout native. */
.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar);
  background: var(--panel);
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 26px 16px;
  z-index: 20;
  overflow: auto;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 25px;
  font-weight: 750;
  padding: 0 8px 24px;
  color: var(--ink);
}
.brand-icon {
  background: var(--soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 10px;
  display: flex;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
  line-height: 1.4;
}
.workspace-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 8px;
  margin-bottom: 20px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
}
.nav-link.active {
  background: var(--soft);
  color: var(--accent);
  font-weight: 650;
}
.nav-link:hover {
  background: var(--raised);
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 22px 12px 10px;
}
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--danger);
  color: var(--panel);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.nav-link .count {
  margin-inline-start: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 18px 4px 8px;
  font-size: 13px;
  font-weight: 600;
}
.account small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
.avatar,
.assignee-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 650;
}
.app-shell {
  margin-inline-start: var(--sidebar);
  min-height: 100vh;
}
.topbar {
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 12px 32px;
  gap: 16px;
  background: var(--panel);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb span {
  padding: 0 10px;
}
.global-search {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  width: 100%;
  color: var(--muted);
}
.global-search input {
  font-size: 12px;
  border: 0;
  background: transparent;
  margin: 0;
}
.language button {
  font-size: 12px;
  padding: 8px 10px;
}
.notification-bell {
  position: relative;
}
.notification-bell .count {
  position: absolute;
  inset-inline-end: -5px;
  top: -4px;
}
.bottom-nav {
  display: none;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 32px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 20px 32px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
/* General pages and operational indicators. */
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}
.eyebrow {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 600;
}
.date-label {
  border-inline-start: 1px solid var(--line);
  margin-inline-start: 12px;
  padding-inline-start: 12px;
  letter-spacing: 0;
}
.heading-dot {
  color: var(--accent);
}
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-heading h2 {
  margin-bottom: 4px;
}
.mini-label {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 26px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.metric {
  padding: 20px 24px;
  border-inline-end: 1px solid var(--line);
}
.metric:last-child {
  border: 0;
}
.metric:hover {
  background: var(--raised);
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  gap: 8px;
}
.metric strong {
  display: block;
  font-size: 34px;
  font-weight: 650;
  line-height: 1.3;
  margin: 8px 0;
}
.metric small {
  font-size: 12px;
  color: var(--muted);
}
.metric.red strong,
.danger-text,
.overdue {
  color: var(--danger);
}
.metric.amber strong {
  color: var(--warning);
}
.metric.green strong,
.success-text {
  color: var(--success);
}
.dashboard-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 24px;
}
.lower-grid {
  grid-template-columns: 1fr 1fr;
}
.tab-links {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.tab-links a {
  padding: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.tab-links a.current {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}
.tab-links span {
  background: var(--soft);
  border-radius: 5px;
  padding: 1px 6px;
  margin-inline-start: 4px;
}
.task-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.task-row:last-child {
  border: 0;
}
.task-row:hover {
  background: var(--raised);
}
.task-row-main {
  flex: 1;
  min-width: 0;
}
.task-row-main strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.task-ref {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}
.status-mark {
  color: var(--muted);
}
.status-mark.done {
  color: var(--success);
}
.status-mark.blocked {
  color: var(--danger);
}
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11px;
  padding: 4px 8px;
  white-space: nowrap;
  font-weight: 600;
}
.priority-P0,
.status-blocked {
  background: var(--danger-soft);
  color: var(--danger);
}
.priority-P1,
.status-waiting {
  background: var(--warning-soft);
  color: var(--warning);
}
.priority-P2,
.status-progress {
  background: var(--soft);
  color: var(--accent);
}
.status-done {
  background: var(--success-soft);
  color: var(--success);
}
.due {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  text-align: center;
}
.due.overdue {
  color: var(--danger);
}
.assignee-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.task-mobile-meta {
  display: none;
}
.private-marker {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.stream-item {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.stream-item:last-child {
  border: 0;
}
.stream-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.stream-item strong {
  font-size: 13px;
  font-weight: 600;
}
.stream-item span {
  font-size: 11px;
  color: var(--muted);
}
.completion-label {
  display: block;
  color: var(--accent);
  margin-bottom: 8px;
}
.segmented-bar {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--raised);
  overflow: hidden;
}
.segment-done {
  fill: var(--success);
}
.segment-progress {
  fill: var(--accent);
}
.segment-waiting,
.segment-pending {
  fill: var(--warning);
}
.segment-blocked {
  fill: var(--danger);
}
.segment-todo {
  fill: var(--muted);
}
.segment-pending {
  opacity: 0.55;
}
.stream-legend {
  display: flex;
  gap: 6px 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.stream-item .legend-blocked {
  color: var(--danger);
}
.stream-item .legend-pending {
  color: var(--warning);
}
progress {
  display: block;
  appearance: none;
  height: 8px;
  width: 100%;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: var(--raised);
}
progress::-webkit-progress-bar {
  background: var(--raised);
}
progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 5px;
  transition: width 0.2s;
}
progress::-moz-progress-bar {
  background: var(--accent);
}
.activity-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.activity-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.activity-row:last-child {
  border: 0;
}
.activity-dot {
  background: var(--accent);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}
.activity-row pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  background: var(--raised);
  padding: 12px;
}
.simple-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 13px;
}
.empty-state {
  text-align: center;
  padding: 36px 18px;
  color: var(--muted);
}
.empty-state h3,
.empty-state h2 {
  color: var(--ink);
  margin: 12px 0 8px;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 18px;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
}
.filter-bar > div {
  min-width: 130px;
  flex: 1;
}
.filter-bar input,
.filter-bar select {
  margin-bottom: 0;
}
.list-panel {
  padding-block: 6px;
}
.form-panel {
  max-width: 850px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.check-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 400;
  padding: 8px 0;
  font-size: 13px;
}
.narrow {
  max-width: 610px;
}
.full {
  width: 100%;
  margin-top: 8px;
}
.flash,
.notice {
  border-inline-start: 3px solid var(--success);
  background: var(--success-soft);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--success);
  font-size: 13px;
  margin-bottom: 20px;
  animation: appear 0.2s ease;
}
.notice {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}
.approval-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.prose {
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.metadata {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}
/* A task is one continuous vertical workspace, with quiet section dividers. */
.task-workspace {
  max-width: 960px;
  margin-inline: auto;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.task-header,
.task-section,
.task-progress {
  padding: 28px 32px;
}
.task-header {
  background: linear-gradient(135deg, var(--soft), var(--panel) 65%);
}
.task-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
}
.task-heading > div:first-child {
  flex: 1;
  min-width: 0;
}
.task-heading .actions {
  flex-shrink: 0;
}
.task-state {
  margin: 4px 0 20px;
}
.task-description {
  margin-bottom: 20px;
}
.task-metadata {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.task-metadata dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.task-metadata dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.task-metadata dd .text-link {
  font-size: 13px;
}
.task-section {
  border-top: 1px solid var(--line);
}
.task-progress {
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.task-progress .panel-heading {
  margin-bottom: 10px;
}
.task-progress .hint {
  margin-bottom: 0;
}
.status-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.status-form select {
  width: auto;
  min-width: 180px;
  margin: 0;
}
.blocker-summary {
  display: flex;
  gap: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 14px 16px;
  border-radius: 10px;
  margin-top: 18px;
  font-size: 13px;
}
.blocker-summary a {
  text-decoration: underline;
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.step-row:last-child {
  border: 0;
}
.step-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.step-number {
  font-size: 11px;
  color: var(--muted);
}
.check-toggle {
  border: 0;
  background: var(--raised);
  color: var(--muted);
}
.check-toggle.checked {
  background: var(--success-soft);
  color: var(--success);
}
.struck {
  text-decoration: line-through;
  color: var(--muted);
}
.step-actions {
  display: flex;
  gap: 2px;
}
.step-actions button {
  background: transparent;
  border: 0;
}
.step-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}
.step-add input,
.step-add select {
  margin-bottom: 0;
}
.step-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.step-tabs a {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.step-tabs a.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.step-tab-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.step-tabs[data-enhanced] ~ .step-panel .steps-panel-heading {
  display: none;
}
.step-panel {
  scroll-margin-top: 20px;
}

.deleted-step {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.deleted-step small {
  display: block;
  color: var(--muted);
}
summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  padding-block: 10px;
  color: var(--muted);
}
details[open] > summary {
  margin-bottom: 12px;
  color: var(--ink);
}
.comment {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.comment-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.comment-heading time {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 12px;
}
.comment .prose {
  padding-inline-start: 44px;
}
.mention {
  display: inline-block;
  color: var(--accent);
  background: var(--soft);
  padding: 3px 7px;
  border-radius: 6px;
  margin: 6px 4px 0;
  font-size: 12px;
}
.comment-composer {
  margin-top: 24px;
}
.comment-composer details {
  margin-bottom: 16px;
}
.file-link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  overflow-wrap: anywhere;
}
.file-link > span:first-of-type {
  flex: 1;
  min-width: 0;
}
.file-link small {
  display: block;
  color: var(--muted);
}
.upload-form {
  margin-top: 18px;
}
.dependency {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dependency > a {
  flex: 1;
  min-width: 130px;
  overflow-wrap: anywhere;
}
.task-history summary {
  font-size: 15px;
}
.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
}
.inline-form input {
  margin: 0;
}
.records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.record-card .prose {
  margin-top: 15px;
}
.workstream-form {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.workstream-form input {
  margin: 0;
}
.permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-shell {
  margin: 0;
}
.auth-shell .topbar {
  justify-content: space-between;
}
.auth-shell .topbar .brand {
  padding: 0;
}
.auth-shell main {
  max-width: 520px;
  padding-block: 54px;
}
.auth-card {
  background: var(--panel);
  padding: 36px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 28px;
}
.auth-mark {
  font-size: 18px;
  color: var(--accent);
}
.error-code {
  font-size: 60px;
  color: var(--accent);
}
.task-meta {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
  margin: 16px 0;
}
.task-meta dd {
  margin: 0;
}
.unread-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
}
/* Notification badges remain visible after the nonmodal prompt is dismissed. */
.notification-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px 12px;
  border-bottom: 1px solid var(--line);
}
.notification-row > a {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.notification-row a span,
.notification-row a small {
  display: block;
  color: var(--muted);
}
.notification-row.unread {
  background: var(--danger-soft);
  border-inline-start: 3px solid var(--danger);
}
.notification-row.unread .activity-dot {
  background: var(--danger);
}
.notification-row:not(.unread) .activity-dot {
  background: var(--muted);
}
.notification-prompt {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 50px #0003;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: appear 0.2s ease;
}
.notification-prompt p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0;
}
.notification-prompt .icon-button {
  border: 0;
  width: 36px;
  padding: 8px;
  min-height: 36px;
}
.prompt-icon {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 10px;
  padding: 10px;
  display: flex;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1150px) {
  .dashboard-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
  .breadcrumb {
    display: none;
  }
  .task-row .assignee-avatar {
    display: none;
  }
  .task-metadata {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .task-heading {
    flex-wrap: wrap;
  }
  .task-row .due {
    display: none;
  }
  .task-mobile-meta {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
  }
  .metric {
    padding: 18px;
  }
}
@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }
  .app-shell {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .sidebar {
    display: none;
    inset-block-start: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
    inset-inline: 12px;
    width: auto;
    max-height: 70vh;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 0 0 100vmax #0005;
    overflow: auto;
    padding: 20px;
  }
  .nav-open .sidebar {
    display: flex;
  }
  .sidebar .brand,
  .workspace-label {
    display: none;
  }
  .sidebar-bottom {
    padding-top: 0;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .nav-caption {
    grid-column: 1 / -1;
    padding-top: 8px;
  }
  .nav-link {
    font-size: 12px;
    padding: 10px 8px;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px #0001;
  }
  .bottom-nav > a,
  .bottom-nav > button {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 4px 2px;
    font-size: 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 10px;
  }
  .bottom-nav [aria-current],
  .bottom-nav .quick-create {
    color: var(--accent);
    background: var(--soft);
  }
  .bottom-nav .count {
    position: absolute;
    top: 1px;
    inset-inline-end: 10px;
    font-size: 10px;
    height: 18px;
    min-width: 18px;
  }
  .topbar {
    min-height: 64px;
    padding: 10px 16px;
    gap: 10px;
  }
  .global-search {
    margin: 0;
    flex: 1;
    min-width: 0;
  }
  .global-search input {
    font-size: 11px;
    padding-inline: 0;
  }
  .global-search .icon {
    display: none;
  }
  .topbar .theme-toggle {
    width: 38px;
    min-height: 40px;
    padding: 8px;
  }
  .language button {
    font-size: 11px;
    padding: 8px;
  }
  main {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }
  .eyebrow {
    font-size: 10px;
  }
  .date-label {
    margin-inline-start: 8px;
    padding-inline-start: 8px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 16px;
  }
  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metric:nth-child(2) {
    border-inline-end: 0;
  }
  .metric strong {
    font-size: 30px;
  }
  .metric-top {
    font-size: 12px;
  }
  .panel {
    padding: 20px;
    margin-bottom: 20px;
  }
  .dashboard-grid,
  .records-grid {
    display: block;
  }
  .task-row {
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0;
  }
  .task-row-main {
    min-width: 170px;
  }
  .task-row .status-mark {
    display: none;
  }
  .task-row .pill {
    font-size: 10px;
  }
  .task-row-main strong {
    font-size: 14px;
  }
  .filter-bar {
    gap: 10px;
  }
  .filter-bar > div {
    min-width: calc(50% - 10px);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-footer {
    flex-wrap: wrap;
  }
  .task-header,
  .task-section,
  .task-progress {
    padding: 22px 18px;
  }
  .task-metadata {
    gap: 16px;
  }
  .task-heading {
    gap: 10px;
  }
  .task-heading > div:first-child {
    flex-basis: 100%;
  }
  .task-heading .actions {
    flex-shrink: 1;
  }
  .task-heading .actions button,
  .task-heading .actions .button {
    font-size: 12px;
  }
  .task-state {
    gap: 8px;
  }
  .step-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .step-text {
    min-width: 150px;
  }
  .step-actions {
    margin-inline-start: auto;
  }
  .step-actions .icon-button {
    width: 44px;
  }
  .step-add {
    grid-template-columns: 1fr 110px;
  }
  .step-add > div:first-of-type {
    grid-column: 1/-1;
  }
  .step-add > button {
    width: 100%;
  }
  .comment-heading {
    flex-wrap: wrap;
  }
  .comment-heading time {
    font-size: 11px;
  }
  .comment .prose {
    padding-inline-start: 0;
  }
  .status-form select {
    flex: 1;
    min-width: 140px;
  }
  .status-form label {
    width: 100%;
  }
  .notification-row {
    flex-wrap: wrap;
  }
  .notification-row form {
    margin-inline-start: 20px;
  }
  .workstream-form {
    flex-wrap: wrap;
    gap: 10px;
  }
  .workstream-form label:first-of-type {
    min-width: 100%;
  }
  .auth-card {
    padding: 28px;
  }
  .auth-shell main {
    padding: 30px 16px;
  }
  .auth-shell {
    padding-bottom: 0;
  }
  footer {
    padding: 16px;
    font-size: 10px;
    flex-direction: column;
    gap: 6px;
  }
  .inline-form,
  .approval-banner {
    flex-wrap: wrap;
  }
  .notification-prompt {
    inset-inline: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    max-width: none;
    padding: 16px;
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

[dir="rtl"] .segmented-bar {
  transform: scaleX(-1);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.user-row > div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.user-row small {
  display: block;
  color: var(--muted);
}
