:root {
  --purple: #7429d6;
  --purple-dark: #5b1aa8;
  --purple-soft: #f3f1f8;
  --ink: #111111;
  --muted: #625d6a;
  --line: #d8d4e0;
  --line-soft: #e9e6ee;
  --surface: #ffffff;
  --surface-soft: #f8f7fa;
  --success: #246b45;
  --warning: #9a5b0b;
  --danger: #9d2c36;
  --sidebar: #17141b;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(116, 41, 214, 0.24);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(420px, 1.08fr);
  background: var(--surface);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 42px clamp(28px, 5vw, 76px);
  overflow: hidden;
  color: white;
  background: var(--sidebar);
}

.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 42px;
  right: -70px;
  background: var(--purple);
  transform: rotate(-42deg);
}

.login-brand::before {
  top: 18%;
}

.login-brand::after {
  bottom: 16%;
  width: 180px;
  opacity: 0.56;
}

.brand-home,
.brand-lockup {
  position: relative;
  z-index: 1;
  display: block;
  width: 176px;
  height: 46px;
}

.brand-lockup {
  overflow: hidden;
}

.brand-mark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: transparent;
}

.brand-mark-light {
  filter: brightness(0) invert(1);
}

.brand-mark-color {
  clip-path: inset(0 72% 0 0);
  filter: brightness(0) saturate(100%) invert(24%) sepia(94%) saturate(4615%) hue-rotate(261deg) brightness(86%) contrast(96%);
}

.brand-message {
  position: relative;
  z-index: 1;
  max-width: 470px;
  padding: 70px 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.login-brand .eyebrow {
  color: #b996ed;
}

.brand-message h1 {
  max-width: 430px;
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.brand-message p:last-child {
  max-width: 420px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.7;
}

.login-brand small {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.46);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 28px;
}

.login-form {
  width: min(430px, 100%);
}

.login-stack {
  width: min(430px, 100%);
}

.login-stack .login-form {
  width: 100%;
}

.login-form-secondary {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.login-method-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-pin-form input {
  font-size: 1.25rem;
}

.login-form h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.login-copy {
  margin: 0 0 34px;
  color: var(--muted);
  line-height: 1.65;
}

.field {
  display: grid;
  gap: 9px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
}

.field input,
.field select {
  min-height: 48px;
  padding: 0 14px;
}

.field textarea {
  min-height: 120px;
  padding: 13px 14px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--purple);
  outline: none;
}

.primary-button,
.secondary-button,
.quiet-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  padding: 0 18px;
  background: var(--purple);
  color: white;
}

.primary-button:hover {
  background: var(--purple-dark);
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.secondary-button:hover {
  border-color: var(--purple);
  color: var(--purple-dark);
}

.quiet-button {
  min-height: 38px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
}

.quiet-button:hover {
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.icon-button {
  width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.icon-button:hover {
  border-color: var(--purple);
  color: var(--purple);
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.login-form .primary-button {
  width: 100%;
  margin-top: 18px;
}

.form-note {
  display: flex;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.demo-button {
  width: 100%;
  margin-top: 12px;
}

.message-band {
  margin-top: 20px;
  padding: 14px 15px;
  border-left: 3px solid var(--purple);
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.86rem;
  line-height: 1.5;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--surface-soft);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 20px 22px;
  color: white;
  background: var(--sidebar);
}

.sidebar-overlay {
  display: none;
}

.sidebar .brand-home,
.sidebar .brand-lockup {
  width: 156px;
  height: 41px;
  margin-left: 2px;
}

.nav-label {
  margin: 52px 12px 10px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  text-align: left;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-button.active {
  box-shadow: inset 3px 0 var(--purple);
}

.sidebar-profile {
  margin-top: auto;
  padding: 18px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-profile strong,
.sidebar-profile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile strong {
  font-size: 0.86rem;
}

.sidebar-profile span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
}

.sidebar-profile .quiet-button {
  margin: 12px 0 0 -12px;
  color: rgba(255, 255, 255, 0.55);
}

.sidebar-profile .admin-push-button {
  width: calc(100% + 12px);
  justify-content: flex-start;
  margin-bottom: -6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-profile .admin-push-button:hover {
  border-color: var(--purple);
  background: var(--purple);
  color: white;
}

.sidebar-profile .admin-push-button.push-enabled {
  color: #b9f6cc;
}

.sidebar-profile .admin-push-button:disabled {
  cursor: default;
  opacity: 0.6;
}

.portal-main {
  min-width: 0;
  overflow: hidden;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(20px, 4vw, 52px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
}

.breadcrumbs {
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs strong {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.menu-button {
  display: none;
}

.content {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px clamp(20px, 4vw, 52px) 72px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.page-heading p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.admin-customer-view-link {
  flex: 0 0 auto;
  gap: 8px;
  text-decoration: none;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 28px;
  border: 1px solid var(--line-soft);
  background: white;
}

.summary-item {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line-soft);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.summary-item strong {
  display: block;
  margin-top: 7px;
  font-size: 1.45rem;
}

.service-budget {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line-soft);
  background: white;
}

.service-budget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.service-budget-header .eyebrow {
  margin-bottom: 7px;
}

.service-budget-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.service-budget-header p:last-child {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.service-budget-package {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #d8c6f1;
  border-radius: 4px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.service-budget-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid var(--line-soft);
}

.service-budget-stats > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line-soft);
}

.service-budget-stats > div:last-child {
  border-right: 0;
}

.service-budget-stats span,
.service-budget-stats strong {
  display: block;
}

.service-budget-stats span {
  color: var(--muted);
  font-size: 0.69rem;
}

.service-budget-stats strong {
  margin-top: 5px;
  font-size: 1rem;
}

.service-budget-progress {
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 3px;
  background: #ece9f0;
}

.service-budget-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--purple);
  transition: width 280ms ease;
}

.service-budget-client .service-budget-progress {
  height: 14px;
  margin-top: 24px;
}

.service-budget-client .service-budget-footer {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
}

.service-budget-over .service-budget-progress span {
  background: var(--danger);
}

.service-budget-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.7rem;
}

.service-budget-footer strong {
  color: var(--danger);
}

.service-budget-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: white;
}

.latest-update-banner {
  width: 100%;
  border: 1px solid rgba(102, 70, 255, 0.2);
  border-radius: 18px;
  background: linear-gradient(115deg, rgba(102, 70, 255, 0.12), rgba(255, 255, 255, 0.96));
  color: inherit;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.latest-update-banner strong,
.latest-update-banner small {
  display: block;
}

.latest-update-banner small {
  margin-top: 4px;
  color: var(--muted);
}

.latest-update-icon,
.product-update-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: #6847ff;
}

.product-update-card {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(102, 70, 255, 0.2);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(102, 70, 255, 0.1), #fff 54%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
}

.product-update-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.product-update-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #6847ff;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-update-card h3 {
  margin: 4px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.product-update-list {
  margin: 18px 0 22px;
  padding-left: 20px;
  color: var(--muted);
}

.product-update-list li + li {
  margin-top: 8px;
}

.product-update-availability {
  margin-top: 18px;
  font-weight: 600;
}

.product-update-preference-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

@media (max-width: 620px) {
  .latest-update-banner {
    grid-template-columns: auto 1fr;
  }

  .latest-update-banner .product-update-badge {
    grid-column: 2;
    justify-self: start;
  }

  .product-update-card {
    grid-template-columns: 1fr;
  }

  .product-update-meta {
    grid-column: 1;
  }
}

.customer-dashboard-stack,
.admin-task-stack {
  display: grid;
  gap: 20px;
}

.project-roadmap {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line-soft);
  background: white;
}

.roadmap-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.roadmap-header .eyebrow {
  margin-bottom: 7px;
}

.roadmap-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.roadmap-phase {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid #d8c6f1;
  border-radius: 3px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.7rem;
  font-weight: 700;
}

.roadmap-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.roadmap-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding-right: 20px;
}

.roadmap-step:not(:last-child)::after {
  position: absolute;
  top: 8px;
  right: 0;
  left: 18px;
  height: 1px;
  background: var(--line);
  content: "";
}

.roadmap-marker {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 4px solid white;
  border-radius: 50%;
  background: #bbb6c2;
  box-shadow: 0 0 0 1px var(--line);
}

.roadmap-step-active .roadmap-marker {
  background: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

.roadmap-step-ongoing .roadmap-marker {
  background: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

.roadmap-step-complete .roadmap-marker {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.roadmap-step > div {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-right: 6px;
  background: white;
}

.roadmap-step span,
.roadmap-step strong,
.roadmap-step small {
  display: block;
}

.roadmap-step > div > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.roadmap-step strong {
  margin-top: 5px;
  font-size: 0.8rem;
  line-height: 1.35;
}

.roadmap-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.workspace-context {
  margin: 0 0 7px;
  color: var(--purple-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
}

.filter-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.filter-button.active {
  border-color: var(--line);
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.document-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.document-table .col-document {
  width: 43%;
}

.document-table .col-status {
  width: 22%;
}

.document-table .col-category {
  width: 12%;
}

.document-table .col-date {
  width: 16%;
}

.document-table .col-actions {
  width: 7%;
}

.document-table th {
  padding: 12px 18px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
}

.document-table td {
  padding: 17px 18px;
  border-top: 1px solid var(--line-soft);
  vertical-align: middle;
}

.document-table tbody tr {
  transition: background 120ms ease;
}

.document-table tbody tr:hover {
  background: #fbfaff;
}

.document-name {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.document-name > span:last-child {
  min-width: 0;
}

.file-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 42px;
  border: 1px solid #d9d2e5;
  border-radius: 3px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.65rem;
  font-weight: 800;
}

.document-name strong,
.document-name small {
  display: block;
}

.document-name strong {
  font-size: 0.85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-name small {
  max-width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.71rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-muted {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.69rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-wartet {
  color: var(--warning);
  background: #fff8e8;
}

.status-aenderung {
  color: var(--danger);
  background: #fff1f2;
}

.status-info {
  color: #315b77;
  background: #eef7fb;
}

.status-arbeitsstand {
  color: #62517a;
  background: #f4effa;
}

.status-freigegeben {
  color: var(--success);
  background: #edf8f1;
}

.status-archiv {
  color: #555b63;
  background: #f1f3f5;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.section-header .eyebrow {
  margin-bottom: 7px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-header p:last-child {
  max-width: 660px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.task-list,
.compact-task-list {
  display: grid;
}

.grouped-task-list {
  display: grid;
}

.task-group {
  border-top: 1px solid var(--line-soft);
}

.task-group:first-child {
  border-top: 0;
}

.task-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  list-style: none;
  padding: 22px 22px 14px;
  background: var(--surface-soft);
  cursor: pointer;
}

.task-group-header::-webkit-details-marker {
  display: none;
}

.task-group-heading {
  display: grid;
  min-width: 0;
}

.task-group-heading .eyebrow {
  margin-bottom: 7px;
  font-size: 0.66rem;
}

.task-group-heading strong {
  font-size: 1rem;
}

.task-group-heading > span:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.task-group-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.task-group-count {
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.task-group-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.task-group-toggle::before,
.task-group-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.task-group-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 160ms ease;
}

.task-group[open] .task-group-toggle::after {
  transform: translate(-50%, -50%) rotate(0);
}

.dashboard-secondary {
  border: 1px solid var(--line-soft);
  background: white;
}

.dashboard-secondary-content {
  display: grid;
  gap: 20px;
  padding: 0 22px 22px;
}

.project-document-intro {
  background: var(--surface-soft);
}

.project-document-groups {
  display: grid;
}

.document-phase {
  border-top: 1px solid var(--line-soft);
}

.document-phase:first-child {
  border-top: 0;
}

.document-phase-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 18px 22px;
  list-style: none;
  cursor: pointer;
}

.document-phase-header::-webkit-details-marker {
  display: none;
}

.document-phase-header:hover {
  background: #fbfaff;
}

.document-phase-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbb8ec;
  border-radius: 3px;
  background: var(--purple-soft);
  color: var(--purple-dark);
  font-size: 0.68rem;
  font-weight: 800;
}

.document-phase-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.document-phase-copy strong {
  font-size: 0.94rem;
}

.document-phase-copy small {
  max-width: 680px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.document-phase-status {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
}

.document-phase[open] > .document-phase-header {
  background: #fbfaff;
}

.document-phase[open] .task-group-toggle::after {
  transform: translate(-50%, -50%) rotate(0);
}

.document-phase-body {
  border-top: 1px solid var(--line-soft);
}

.compact-empty-state {
  min-height: 130px;
  padding: 34px 22px;
}

.evidence-link-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.evidence-link {
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.document-check-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.document-check-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.document-check-list li::before {
  position: absolute;
  top: 0.22em;
  left: 0;
  color: var(--success);
  content: "✓";
  font-weight: 800;
}

.drawer-status-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.task-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row[hidden] {
  display: none !important;
}

.task-copy {
  min-width: 0;
}

.task-copy h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.task-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
}

.task-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
}

.task-meta-item svg {
  width: 13px;
  height: 13px;
}

.task-owner-njume {
  color: var(--purple-dark);
}

.task-owner-client {
  color: #315b77;
}

.task-priority-hoch {
  color: var(--danger);
}

.task-time {
  color: var(--purple-dark);
}

.task-admin-actions,
.section-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

#admin-create-task,
#admin-create-document {
  flex: 0 0 auto;
  white-space: nowrap;
}

.task-admin-actions .secondary-button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.72rem;
}

.task-state {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.69rem;
  font-weight: 700;
}

.task-offen {
  color: var(--warning);
  background: #fff8e8;
}

.task-vorbereitung {
  color: #625d6a;
  background: #f3f2f4;
}

.task-laufend {
  color: var(--purple-dark);
  background: var(--purple-soft);
}

.task-erledigt {
  color: var(--success);
  background: #edf8f1;
}

.task-question p,
.task-answer {
  margin: 0;
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.task-answer {
  padding: 14px 15px;
  border-left: 3px solid var(--purple);
  background: var(--purple-soft);
}

.task-file-field {
  margin-top: 14px;
}

.admin-support-list {
  max-height: 420px;
  overflow-y: auto;
}

.admin-support-message {
  border-bottom: 1px solid var(--line-soft);
}

.admin-support-message:last-child {
  border-bottom: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
  gap: 28px;
}

.support-messages {
  display: grid;
  min-height: 260px;
}

.support-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  min-height: 260px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.support-empty svg {
  width: 26px;
  height: 26px;
  color: var(--purple);
}

.support-empty p {
  max-width: 390px;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
}

.support-message {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.support-conversation {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.support-conversation:last-child {
  border-bottom: 0;
}

.conversation-head > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.support-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(129, 92, 246, 0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
}

.conversation-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 0.64rem;
  font-weight: 700;
}

.status-open {
  color: var(--warning);
  background: #fff8e8;
}

.status-answered {
  color: var(--success);
  background: #edf8f1;
}

.status-unread {
  color: var(--purple-dark);
  background: var(--purple-soft);
}

.status-read {
  color: var(--success);
  background: #edf8f1;
}

.status-sent {
  color: var(--muted);
  background: #f3f2f4;
}

.chat-thread {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.chat-message {
  width: min(88%, 620px);
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}

.chat-message-client {
  justify-self: start;
  background: #eef0f4;
  border-color: #d7dce3;
  border-left: 4px solid #8a94a3;
}

.chat-message-admin {
  justify-self: end;
  border-color: #d8c6f1;
  border-right: 4px solid var(--purple);
  background: #ece1f9;
}

.chat-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 0.68rem;
}

.chat-message-meta time {
  color: var(--muted);
}

.chat-message-admin .chat-message-meta strong {
  color: var(--purple-dark);
}

.chat-message p {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.reply-support {
  width: 100%;
}

.admin-support-reply {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.admin-support-reply textarea {
  min-height: 86px;
}

.admin-support-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.admin-support-actions .primary-button,
.admin-support-actions .secondary-button {
  width: 100%;
}

@media (max-width: 640px) {
  .admin-support-actions {
    grid-template-columns: 1fr;
  }
}

.support-message:last-child {
  border-bottom: 0;
}

.support-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.support-type {
  color: var(--purple-dark);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.support-message time,
.support-message small {
  color: var(--muted);
  font-size: 0.7rem;
}

.support-message h3 {
  margin: 10px 0 5px;
  font-size: 0.9rem;
}

.support-message p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.support-message small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.support-message .quiet-button {
  min-height: 32px;
  margin-top: 10px;
  padding: 0;
}

.support-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.support-form .primary-button {
  width: 100%;
}

.support-image-field {
  min-height: 52px;
}

.support-image-field span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-helper {
  margin: -9px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.support-task-links {
  display: grid;
  gap: 3px;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line-soft);
}

.support-task-links > p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.support-task-links .quiet-button {
  justify-content: flex-start;
  min-height: 36px;
  padding: 0;
  text-align: left;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
  border: 1px solid var(--line-soft);
  background: white;
}

.admin-metrics > div {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line-soft);
}

.admin-metrics > div:last-child {
  border-right: 0;
}

.admin-metrics span,
.admin-metrics strong {
  display: block;
}

.admin-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.admin-metrics strong {
  margin-top: 8px;
  font-size: 1.5rem;
}

.admin-section-nav {
  position: sticky;
  z-index: 4;
  top: 84px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 20px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.97);
}

.admin-section-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-section-tab:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.admin-section-tab.active {
  border-color: #d8c6f1;
  background: var(--purple-soft);
  color: var(--purple-dark);
}

.admin-section-tab svg {
  flex: 0 0 auto;
}

.admin-section-tab > span:not(.admin-tab-count) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tab-label-mobile {
  display: none;
}

.admin-tab-count {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: white;
  color: var(--muted);
  font-size: 0.66rem;
}

.admin-section-tab.active .admin-tab-count {
  background: var(--purple);
  color: white;
}

.admin-view-panel {
  margin-bottom: 0;
}

.admin-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.admin-search-field {
  width: min(420px, 100%);
}

.admin-search-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
}

.admin-search-field input:focus {
  border-color: var(--purple);
  outline: none;
}

.admin-view-panel .compact-task-list {
  max-height: min(64vh, 760px);
  overflow-y: auto;
}

.admin-chat-panel .admin-support-list {
  min-height: 220px;
  max-height: min(64vh, 760px);
}

.admin-feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-feedback-grid .workspace {
  min-width: 0;
}

.admin-client-button {
  align-items: flex-start;
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.admin-client-button > span {
  min-width: 0;
}

.admin-client-button > .nav-count {
  flex: 0 0 22px;
  align-self: center;
  min-width: 22px;
  margin-left: auto;
}

.admin-client-button strong,
.admin-client-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-client-button strong {
  color: inherit;
  font-size: 0.8rem;
}

.admin-client-button small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.68rem;
}

.admin-todos,
.admin-communication-grid {
  margin-bottom: 28px;
}

.admin-communication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.admin-communication-grid .workspace {
  min-width: 0;
}

.admin-support-workspace {
  grid-column: 1 / -1;
}

.admin-empty {
  min-height: 132px;
  display: grid;
  align-content: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.admin-documents {
  margin-top: 0;
}

.admin-clients {
  margin-bottom: 28px;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.78rem;
  text-align: left;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.client-name strong,
.client-name small {
  display: block;
}

.client-name small {
  max-width: 280px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
}

.compact-task-list .task-row {
  grid-template-columns: 112px minmax(0, 1fr);
}

.compact-task-list .task-row .secondary-button {
  grid-column: 2;
  justify-self: start;
}

.compact-task-list .task-admin-actions {
  grid-column: 2;
}

.activity-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row > span {
  color: var(--muted);
  font-size: 0.7rem;
}

.activity-row strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
}

.activity-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.admin-inbox-list {
  display: grid;
}

.deadline-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.deadline-form input:not([type="checkbox"]),
.deadline-form select {
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
}

.admin-termine .deadline-form {
  grid-template-columns: minmax(0, 1.4fr) auto auto auto minmax(0, 1fr) auto auto;
}

.deadline-visibility {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.deadline-visibility input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.deadline-list {
  display: grid;
}

.deadline-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.deadline-row:last-child {
  border-bottom: 0;
}

.deadline-date {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.deadline-row strong {
  display: block;
  font-size: 0.85rem;
}

.deadline-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.deadline-desc {
  font-style: italic;
}

@media (max-width: 720px) {
  .deadline-form {
    grid-template-columns: 1fr;
  }
  .deadline-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.activity-entry {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  min-width: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.activity-entry:last-child {
  border-bottom: 0;
}

.activity-entry-new {
  background: #fbf8ff;
  box-shadow: inset 3px 0 0 var(--purple);
}

.activity-symbol {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
}

.activity-symbol svg {
  width: 17px;
  height: 17px;
}

.activity-symbol-support {
  color: var(--purple-dark);
  background: var(--purple-soft);
}

.activity-entry-copy {
  min-width: 0;
}

.activity-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-entry-head span,
.activity-entry-head time,
.activity-entry-copy small {
  color: var(--muted);
  font-size: 0.66rem;
}

.activity-entry-head span {
  color: var(--purple-dark);
  font-weight: 700;
  text-transform: uppercase;
}

.activity-entry-copy > strong {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.activity-entry-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.activity-entry-copy small {
  display: block;
  margin-top: 7px;
}

.activity-entry-actions {
  align-self: center;
  display: flex;
  gap: 8px;
}

.activity-entry-actions .quiet-button {
  align-self: center;
  min-height: 34px;
}

.empty-state {
  padding: 62px 24px;
  color: var(--muted);
  text-align: center;
}

.mobile-documents {
  display: none;
}

.drawer-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 17, 17, 0.38);
}

.drawer {
  width: min(520px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 28px;
  background: white;
  box-shadow: -12px 0 38px rgba(0, 0, 0, 0.16);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-header h2 {
  margin: 5px 0 0;
  font-size: 1.4rem;
  line-height: 1.25;
}

.drawer-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-section h3 {
  margin: 0 0 15px;
  font-size: 0.85rem;
}

.meta-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 18px;
  margin: 0;
  font-size: 0.82rem;
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
  font-weight: 600;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.drawer-actions .primary-button,
.drawer-actions .secondary-button {
  width: 100%;
}

.approve-button {
  min-height: 56px;
  border-color: var(--success);
  background: #f7fcf9;
  color: var(--success);
  font-size: 0.92rem;
  font-weight: 700;
}

.approve-button:hover {
  border-color: #174a2f;
  background: #edf8f1;
  color: #174a2f;
}

.drawer-download {
  width: 100%;
}

.drawer-form {
  display: grid;
  gap: 16px;
  padding: 24px 0;
}

.drawer-form > .primary-button {
  width: 100%;
  min-height: 50px;
}

.document-admin-status {
  display: grid;
  gap: 14px;
}

.document-admin-status .primary-button {
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  font-size: 0.8rem;
  font-weight: 600;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.comment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.comment {
  padding: 13px 14px;
  border-left: 3px solid var(--purple);
  background: var(--surface-soft);
}

.comment strong,
.comment time {
  font-size: 0.72rem;
}

.comment time {
  margin-left: 8px;
  color: var(--muted);
}

.comment p {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.comment-attachment {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}

#comment-form {
  display: grid;
  gap: 14px;
}

#comment-form .primary-button {
  width: 100%;
}

.comment-image-field {
  min-height: 50px;
}

.comment-image-field span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
}

.file-field:hover {
  border-color: var(--purple);
  color: var(--purple-dark);
}

.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100vw - 44px));
  padding: 13px 16px;
  border-left: 4px solid var(--purple);
  background: #17141b;
  color: white;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.contract-overview {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(170px, 0.75fr) minmax(300px, 1.6fr);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.contract-overview-cancellable {
  grid-template-columns:
    repeat(3, minmax(140px, 0.55fr))
    minmax(300px, 1.6fr);
}

.contract-fact,
.contract-action {
  min-width: 0;
  padding: 20px 22px;
}

.contract-fact {
  border-right: 1px solid var(--line-soft);
}

.contract-fact span,
.contract-fact strong {
  display: block;
}

.contract-fact span {
  color: var(--muted);
  font-size: 0.7rem;
}

.contract-fact strong {
  margin-top: 6px;
  font-size: 0.95rem;
}

.contract-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contract-action p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.cancellation-button {
  flex: 0 0 auto;
  border-color: rgba(157, 44, 54, 0.45);
  color: var(--danger);
}

.cancellation-button:hover {
  border-color: var(--danger);
  background: #fff7f7;
  color: #771d27;
}

.cancellation-confirm {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.cancellation-submit {
  min-height: 52px;
  border: 1px solid var(--danger);
  border-radius: 4px;
  background: var(--danger);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.cancellation-submit:hover {
  border-color: #771d27;
  background: #771d27;
}

.cancellation-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* Customer portal: one entry point, four destinations. */
.customer-orders {
  display: grid;
  gap: 22px;
}

.customer-command {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.55fr);
  gap: clamp(22px, 4vw, 54px);
  padding: clamp(24px, 4vw, 42px);
  border: 0;
  background: var(--sidebar);
  color: white;
  box-shadow: 0 18px 45px rgba(23, 20, 27, 0.14);
}

.customer-command-copy h2 {
  max-width: 420px;
  margin: 0;
  font-size: clamp(1.5rem, 2.7vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.customer-command-copy p {
  max-width: 420px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  line-height: 1.6;
}

.customer-command-form {
  display: grid;
  gap: 12px;
  padding: 0;
}

.customer-command-mode {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.customer-command-mode button {
  padding: 9px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.customer-command-mode button:hover,
.customer-command-mode button:focus-visible {
  color: white;
}

.customer-command-mode button.is-active {
  background: #b996ed;
  color: #24182d;
}

.customer-command-mode button:disabled {
  cursor: default;
  opacity: 1;
}

.customer-command-form textarea {
  min-height: 142px;
  resize: vertical;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  caret-color: #b996ed;
}

.customer-command-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.customer-command-form textarea:focus {
  border-color: #b996ed;
  background: rgba(255, 255, 255, 0.11);
}

.customer-command-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-command-actions .file-field {
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.22);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
}

.customer-command-actions .file-field:hover {
  border-color: #b996ed;
  color: white;
}

.customer-command-form .form-helper {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
}

.order-card .reply-support {
  margin: 0 22px 22px;
}

.order-card-title {
  margin: 0;
  padding: 0 22px 14px;
  font-size: 1rem;
}

.more-link-list {
  display: grid;
}

.more-link-list > button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 15px 22px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.more-link-list > button:last-child {
  border-bottom: 0;
}

.more-link-list > button:hover {
  background: var(--surface-soft);
}

.more-link-list > button > svg {
  color: var(--purple);
}

.more-link-list span,
.more-link-list strong,
.more-link-list small {
  display: block;
}

.more-link-list small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.more-settings-stack {
  display: grid;
  gap: 18px;
}

.settings-disclosure {
  padding: 0;
  overflow: hidden;
}

.settings-disclosure:not([open]) {
  display: none !important;
}

.settings-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 15px 22px;
  cursor: pointer;
  list-style: none;
}

.settings-disclosure-summary::-webkit-details-marker {
  display: none;
}

.settings-disclosure-summary > span {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-disclosure-summary svg {
  width: 22px;
  color: var(--purple);
}

.settings-disclosure-summary strong,
.settings-disclosure-summary small {
  display: block;
}

.settings-disclosure-summary small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.settings-disclosure-summary > i {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.settings-disclosure[open] > .settings-disclosure-summary {
  border-bottom: 1px solid var(--line-soft);
}

.settings-disclosure[open] > .settings-disclosure-summary > i {
  transform: rotate(225deg);
}

.care-status-card.settings-disclosure {
  display: block;
  border-color: rgba(116, 41, 214, 0.16);
  background: linear-gradient(135deg, rgba(116, 41, 214, 0.055), var(--surface) 58%);
}

.care-status-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  align-items: center;
  gap: 28px;
  padding: 20px 22px 22px;
}

.care-status-copy {
  display: grid;
  gap: 5px;
}

.care-status-main {
  display: grid;
  gap: 16px;
}

.care-status-copy strong {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.care-status-card p,
.care-status-body > small {
  margin: 0;
  color: var(--muted);
}

.care-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(116, 41, 214, 0.12);
}

.care-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6e22d5, #934be9);
}

.care-availability {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.care-availability strong {
  color: var(--purple-dark);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.care-availability span {
  max-width: 260px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.care-renewal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  font-size: 0.78rem;
}

.care-renewal span {
  color: var(--muted);
}

.care-renewal strong {
  font-size: 0.82rem;
}

.care-status-body > small {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  font-size: 0.74rem;
  line-height: 1.55;
}

.care-status-card.is-low,
.care-status-card.is-exhausted {
  border-color: rgba(191, 108, 16, 0.25);
  background: linear-gradient(135deg, rgba(191, 108, 16, 0.07), var(--surface) 58%);
}

.notification-preferences {
  display: grid;
  gap: 10px;
  max-width: 960px;
  padding: 20px 22px 22px;
}

.notification-settings-intro {
  margin-bottom: 4px;
}

.notification-settings-intro p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.preference-row,
.notification-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface);
}

.preference-row > span,
.notification-device-row > span {
  display: grid;
  gap: 4px;
}

.preference-row small,
.notification-device-row small,
.notification-settings-footer small {
  color: var(--muted);
}

.preference-row {
  position: relative;
  cursor: pointer;
}

.preference-row input {
  position: absolute;
  right: 0;
  width: 44px;
  height: 26px;
  opacity: 0;
  cursor: pointer;
}

.preference-row i {
  position: relative;
  width: 44px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  transition: background 0.18s ease, border-color 0.18s ease;
  pointer-events: none;
}

.preference-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(25, 20, 35, 0.2);
  transition: transform 0.18s ease;
}

.preference-row input:checked + i {
  border-color: #7429d6;
  background: #7429d6;
}

.preference-row input:checked + i::after {
  transform: translateX(18px);
}

.preference-row input:focus-visible + i {
  outline: 2px solid #7429d6;
  outline-offset: 3px;
}

.notification-device-row .secondary-button {
  width: auto;
  white-space: nowrap;
}

.notification-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 4px;
  padding-top: 16px;
}

.notification-settings-footer .primary-button {
  width: auto;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .care-status-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .care-availability {
    align-items: flex-start;
    flex-direction: column;
  }

  .preference-row,
  .notification-device-row {
    gap: 14px;
  }

  .notification-device-row {
    grid-template-columns: 1fr;
  }

  .notification-device-row .secondary-button,
  .notification-settings-footer .primary-button {
    width: 100%;
  }

  .notification-settings-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.task-archive-months {
  display: grid;
}

.task-archive-month + .task-archive-month {
  border-top: 1px solid var(--line-soft);
}

.task-archive-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px;
  background: var(--surface-soft);
}

.task-archive-month-head strong {
  font-size: 0.82rem;
}

.task-archive-month-head span {
  color: var(--muted);
  font-size: 0.7rem;
}

.live-workspace .intelligence-client-card {
  display: block;
}

.intelligence-coverage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.intelligence-coverage > span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface);
}

.intelligence-coverage strong {
  color: var(--purple-dark);
  font-size: 0.86rem;
}

.intelligence-coverage small {
  color: var(--muted);
  font-size: 0.66rem;
}

@media (max-width: 540px) {
  .intelligence-coverage {
    grid-template-columns: 1fr;
  }
}

.website-all-orders {
  margin: 0 22px 22px;
}

::selection {
  background: rgba(116, 41, 214, 0.22);
  color: var(--ink);
}

@media (max-width: 820px) {
  .customer-command {
    grid-template-columns: 1fr;
  }

  .customer-command-copy p {
    margin-top: 10px;
  }
}

@media (max-width: 620px) {
  .customer-command {
    margin-inline: -2px;
    padding: 24px 18px;
  }

  .customer-command-form textarea {
    min-height: 132px;
  }

  .customer-command-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-command-actions .file-field,
  .customer-command-actions .primary-button {
    width: 100%;
    justify-content: center;
  }

  .customer-home-status {
    grid-template-columns: 1fr;
  }

  .customer-home-status button {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .customer-home-status button:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 1320px) {
  .document-table th:nth-child(3),
  .document-table td:nth-child(3),
  .document-table .col-category {
    display: none;
  }

  .document-table .col-document {
    width: 51%;
  }

  .document-table .col-status {
    width: 24%;
  }

  .document-table .col-date {
    width: 17%;
  }

  .document-table .col-actions {
    width: 8%;
  }
}

@media (max-width: 1120px) {
  .contract-overview-cancellable {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .contract-overview-cancellable .contract-action {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
  }

  .document-table th:nth-child(4),
  .document-table td:nth-child(4),
  .document-table .col-date {
    display: none;
  }

  .document-table .col-document {
    width: 62%;
  }

  .document-table .col-status {
    width: 28%;
  }

  .document-table .col-actions {
    width: 10%;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .task-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .task-row .secondary-button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 1020px) {
  .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-item:nth-child(3) {
    border-right: 0;
  }

  .summary-item:nth-child(n + 4) {
    border-top: 1px solid var(--line-soft);
  }

  .document-table th:nth-child(3),
  .document-table td:nth-child(3) {
    display: none;
  }

  .admin-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .admin-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .admin-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .admin-communication-grid {
    grid-template-columns: 1fr;
  }

  .admin-feedback-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .contract-overview {
    grid-template-columns: 1fr 1fr;
  }

  .contract-fact:nth-child(2) {
    border-right: 0;
  }

  .contract-fact:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .contract-action {
    grid-column: 1 / -1;
    align-items: stretch;
    flex-direction: column;
    border-top: 1px solid var(--line-soft);
  }

  .contract-action .secondary-button {
    width: 100%;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 330px;
    padding: 28px 24px;
  }

  .brand-message {
    padding: 58px 0 18px;
  }

  .brand-message h1 {
    max-width: 360px;
    font-size: 2.7rem;
  }

  .brand-message p:last-child,
  .login-brand small {
    display: none;
  }

  .login-panel {
    min-height: auto;
    padding: 48px 24px 68px;
  }

  .portal-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: min(286px, calc(100vw - 44px));
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 29;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(17, 17, 17, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-button {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .topbar {
    min-height: 64px;
    padding: 0 16px;
  }

  .topbar-actions {
    min-width: 0;
    align-items: center;
  }

  .breadcrumbs {
    font-size: 0.76rem;
  }

  .content {
    padding: 28px 16px 52px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
  }

  .page-heading h1 {
    font-size: 2rem;
  }

  .page-heading p:last-child {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .admin-customer-view-link {
    width: 100%;
    justify-content: center;
  }

  .summary-strip,
  .admin-metrics,
  .admin-todos,
  .admin-communication-grid {
    margin-bottom: 20px;
  }

  .admin-section-nav {
    top: 72px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    margin-bottom: 16px;
    overflow: visible;
  }

  .admin-section-tab {
    min-width: 0;
    padding: 0 8px;
  }

  .admin-tab-label-desktop {
    display: none;
  }

  .admin-tab-label-mobile {
    display: inline;
  }

  .admin-panel-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .admin-search-field {
    width: 100%;
  }

  .admin-panel-toolbar .table-muted {
    white-space: normal;
  }

  .admin-view-panel .compact-task-list,
  .admin-chat-panel .admin-support-list {
    max-height: none;
  }

  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .summary-item,
  .summary-item:nth-child(3) {
    border-right: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
  }

  .summary-item:nth-child(-n + 2) {
    border-top: 0;
  }

  .summary-item:nth-child(2n) {
    border-right: 0;
  }

  .summary-item,
  .admin-metrics > div {
    padding: 15px 16px;
  }

  .service-budget {
    padding: 18px;
  }

  .service-budget-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .service-budget-package {
    width: 100%;
    white-space: normal;
  }

  .service-budget-stats {
    grid-template-columns: 1fr;
  }

  .service-budget-stats > div {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .service-budget-stats > div:last-child {
    border-bottom: 0;
  }

  .service-budget-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .section-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  .section-header > .secondary-button,
  .section-header > .primary-button {
    width: 100%;
  }

  .project-roadmap {
    padding: 18px;
  }

  .roadmap-header {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .roadmap-steps {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .roadmap-step {
    padding: 0 0 0 2px;
  }

  .roadmap-step:not(:last-child)::after {
    top: 16px;
    right: auto;
    bottom: -16px;
    left: 10px;
    width: 1px;
    height: auto;
  }

  .roadmap-step > div {
    padding: 0 0 2px;
  }

  .workspace-toolbar {
    padding: 14px 16px;
  }

  .document-table {
    display: none;
  }

  .mobile-documents {
    display: grid;
  }

  .mobile-document {
    padding: 16px;
    border-bottom: 1px solid var(--line-soft);
  }

  .mobile-document:last-child {
    border-bottom: 0;
  }

  .mobile-document-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .mobile-document h3 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .mobile-document p {
    margin: 8px 0 15px;
    color: var(--muted);
    font-size: 0.74rem;
  }

  .mobile-document .secondary-button {
    width: 100%;
  }

  .mobile-document-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .task-row,
  .compact-task-list .task-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 18px;
  }

  .task-row .secondary-button,
  .compact-task-list .task-row .secondary-button {
    grid-column: auto;
    width: 100%;
  }

  .task-admin-actions,
  .section-actions {
    width: 100%;
  }

  .task-admin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-admin-actions .secondary-button:only-child {
    grid-column: 1 / -1;
  }

  .section-actions .secondary-button {
    width: 100%;
  }

  .task-group-header {
    padding: 19px 18px 14px;
  }

  .task-group-controls {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .document-phase-header {
    grid-template-columns: auto minmax(0, 1fr) 28px;
    gap: 12px;
    min-height: 0;
    padding: 17px 16px;
  }

  .document-phase-index {
    min-width: 66px;
  }

  .document-phase-copy small {
    display: none;
  }

  .document-phase-status {
    grid-column: 2;
    white-space: normal;
  }

  .document-phase-header > .task-group-toggle {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .support-form {
    padding: 18px;
  }

  .support-empty {
    min-height: 210px;
    padding: 28px 18px;
  }

  .support-conversation {
    padding: 16px;
  }

  .support-message-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .chat-message {
    width: 100%;
  }

  .chat-message-meta {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-support-list {
    max-height: none;
  }

  .activity-row {
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 15px 16px;
  }

  .activity-entry {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 16px;
  }

  .activity-entry-actions {
    grid-column: 2;
    justify-self: start;
    flex-wrap: wrap;
  }

  .empty-state {
    padding: 42px 18px;
  }

  .drawer {
    width: 100%;
    height: 100dvh;
    padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
  }

  .drawer-header {
    gap: 14px;
  }

  .drawer-header > div {
    min-width: 0;
  }

  .drawer-header h2 {
    font-size: 1.18rem;
    overflow-wrap: anywhere;
  }

  .drawer-header .icon-button {
    flex: 0 0 auto;
  }

  .drawer-section,
  .drawer-form {
    padding: 20px 0;
  }

  .meta-list dd,
  .comment p,
  .comment-attachment {
    overflow-wrap: anywhere;
  }

  .toast {
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 14px;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .contract-overview {
    grid-template-columns: 1fr;
  }

  .contract-fact {
    border-right: 0;
  }

  .contract-fact:nth-child(2),
  .contract-action {
    grid-column: auto;
    border-top: 1px solid var(--line-soft);
  }

  .topbar .secondary-button {
    display: none;
  }

  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .summary-item,
  .summary-item:nth-child(3) {
    border-right: 1px solid var(--line-soft);
    border-top: 1px solid var(--line-soft);
  }

  .summary-item:nth-child(-n + 2) {
    border-top: 0;
  }

  .summary-item:nth-child(2n) {
    border-right: 0;
  }

  .workspace-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .filter-button {
    width: 100%;
    min-width: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .drawer {
    padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
  }

  .drawer-actions {
    grid-template-columns: 1fr;
  }

  .mobile-document-actions {
    grid-template-columns: 1fr;
  }

  .meta-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .meta-list dd {
    margin-bottom: 8px;
  }

  .activity-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .roadmap-header,
  .activity-entry-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .activity-entry {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .activity-symbol {
    width: 32px;
    height: 32px;
  }

  .activity-entry-actions {
    grid-column: 1;
  }

  .comment strong,
  .comment time {
    display: block;
  }

  .comment time {
    margin: 4px 0 0;
  }

  .file-field {
    min-height: 54px;
    padding: 10px 12px;
  }

  .file-field span {
    white-space: normal;
  }
}

@media (max-width: 390px) {
  .login-brand {
    min-height: 280px;
    padding: 24px 18px;
  }

  .brand-message {
    padding: 42px 0 12px;
  }

  .brand-message h1 {
    font-size: 2.25rem;
  }

  .login-panel {
    padding: 36px 18px 52px;
  }

  .summary-item span,
  .admin-metrics span {
    font-size: 0.68rem;
  }

  .mobile-document-head {
    grid-template-columns: 1fr;
  }

  .mobile-document-head .status {
    justify-self: start;
  }

  .task-admin-actions {
    grid-template-columns: 1fr;
  }

  .task-admin-actions .secondary-button {
    width: 100%;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
.live-usage-card{display:grid;gap:9px;margin:0 0 20px;padding:17px 18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.live-usage-card>div:first-child{display:flex;justify-content:space-between;gap:16px;align-items:center}.live-usage-card strong{font-size:14px}.live-usage-card span,.live-usage-card small{color:var(--muted);font-size:12px}.live-usage-track{height:6px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--line) 70%,transparent)}.live-usage-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5030d7,#9a49cb)}.live-usage-rules{display:flex;flex-wrap:wrap;gap:7px}.live-usage-rules span{padding:6px 9px;border:1px solid var(--line-soft);border-radius:999px;background:var(--surface-soft);font-size:10px;font-weight:750}
.live-widget-launch{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 20px;padding:17px 18px;border:1px solid rgba(116,41,214,.18);border-radius:16px;background:rgba(116,41,214,.055)}.live-widget-launch>div{display:grid;gap:4px}.live-widget-launch small{color:var(--muted)}.live-widget-launch .primary-button{flex:0 0 auto;text-decoration:none}
.live-widget-actions{display:flex!important;align-items:center;gap:8px!important;flex:0 0 auto}.live-widget-actions .primary-button,.live-widget-actions .secondary-button{width:auto;min-height:42px;white-space:nowrap}.live-widget-actions .secondary-button:disabled{cursor:wait;opacity:.62}
.live-schedule{display:grid;gap:8px;margin:0 0 20px;padding:15px 17px;border:1px solid rgba(116,41,214,.18);border-radius:14px;background:rgba(116,41,214,.05)}.live-schedule>div{display:flex;justify-content:space-between;gap:12px;padding-top:8px;border-top:1px solid var(--line-soft);font-size:12px}.live-schedule time{color:var(--muted);white-space:nowrap}

/* NJUME Operating System */
.os-command-layout{display:grid;gap:18px}.os-control-bar{display:grid;gap:14px;padding-bottom:14px}.os-control-row{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.os-client-selector{width:min(360px,100%)}.os-section-nav{display:flex;gap:22px;overflow-x:auto;border-bottom:1px solid var(--line-soft);scrollbar-width:thin}.os-section-nav button{flex:0 0 auto;padding:10px 2px 11px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:750;cursor:pointer;box-shadow:inset 0 0 0 transparent;transition:color .18s ease,box-shadow .18s ease}.os-section-nav button:hover{color:var(--text)}.os-section-nav button.active{color:#6421bd;box-shadow:inset 0 -2px 0 #7429d6}.os-section-nav button:focus-visible{outline:2px solid #7429d6;outline-offset:3px}.os-command-hero{overflow:hidden;background:var(--surface)}.os-worker-state{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid rgba(30,160,90,.2);border-radius:999px;background:rgba(30,160,90,.08);color:#157545;font-size:12px;font-weight:700;white-space:nowrap}.os-worker-state i{width:8px;height:8px;border-radius:50%;background:#22ad68;box-shadow:0 0 0 5px rgba(34,173,104,.12)}.os-command-form{display:grid;gap:15px;margin-top:18px}.os-command-prompt textarea{min-height:180px;font-size:1rem;line-height:1.55;background:color-mix(in srgb,var(--surface) 88%,#f4edff)}.os-command-quick{display:flex;gap:8px;overflow-x:auto;padding-bottom:3px}.os-command-quick button{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text);padding:8px 12px;font:inherit;font-size:12px;cursor:pointer}.os-command-quick button:hover{border-color:#7429d6;color:#7429d6}.os-command-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.os-command-actions .file-field{flex:1;margin:0}.os-command-actions .primary-button{min-height:54px}.os-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.os-grid:empty{display:none}.os-card{min-width:0}.os-card-wide,.os-grid.is-single .os-card{grid-column:1/-1}.os-stack-form{display:grid;gap:15px;margin-top:18px}.os-stack-form textarea{resize:vertical}.os-platforms{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;border:0}.os-platforms legend{width:100%;margin-bottom:3px;font-size:12px;font-weight:700;color:var(--muted)}.os-platforms label{position:relative}.os-platforms input{position:absolute;opacity:0}.os-platforms span{display:block;padding:7px 10px;border:1px solid var(--line);border-radius:999px;font-size:12px;text-transform:capitalize;cursor:pointer}.os-platforms input:checked+span{border-color:#7429d6;background:rgba(116,41,214,.09);color:#6421bd}.os-last-run{padding:13px;border-radius:12px;background:var(--surface-soft);font-size:12px}.os-last-run p{margin:5px 0 0;white-space:pre-line;color:var(--muted)}.os-experiment-list,.os-history-list{display:grid;gap:10px;margin-top:18px}.os-experiment-list article{display:grid;gap:4px;padding:13px;border:1px solid var(--line-soft);border-radius:12px}.os-experiment-list article span{font-size:10px;font-weight:800;text-transform:uppercase;color:#7429d6}.os-experiment-list small{color:var(--muted)}.os-history-list article{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;padding:14px 0;border-top:1px solid var(--line-soft)}.os-history-list article:first-child{border-top:0}.os-history-list p{margin:5px 0;color:var(--muted);white-space:pre-line}.os-history-list small{color:var(--muted)}
.os-worker-state.is-offline{border-color:rgba(190,49,49,.2);background:rgba(190,49,49,.08);color:#9b2727}.os-worker-state.is-offline i{background:#cc4444;box-shadow:0 0 0 5px rgba(204,68,68,.12)}.chat-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.execution-proof{display:grid;gap:13px;margin:14px 0;padding:15px;border:1px solid var(--line);border-radius:15px;background:color-mix(in srgb,var(--surface) 94%,#f1e9ff)}.execution-proof-head,.execution-proof-head>div,.execution-actions,.os-run-top,.os-run-meta{display:flex;align-items:center}.execution-proof-head{justify-content:space-between;gap:12px}.execution-proof-head>div{gap:8px}.execution-proof-head small,.os-run-top time,.os-run-meta{color:var(--muted);font-size:11px}.execution-state-dot{width:8px;height:8px;border-radius:50%;background:#24a867}.execution-proof.is-running .execution-state-dot{background:#7429d6;box-shadow:0 0 0 5px rgba(116,41,214,.12);animation:osPulse 1.4s ease-in-out infinite}.execution-progress{height:5px;overflow:hidden;border-radius:999px;background:var(--line-soft)}.execution-progress span{display:block;width:42%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7429d6,#b76ee4);animation:osProgress 1.5s ease-in-out infinite}.execution-checks{display:flex;flex-wrap:wrap;gap:7px}.execution-checks span{padding:6px 8px;border-radius:999px;background:var(--surface);font-size:11px}.execution-checks .proof-passed{color:#157545}.execution-checks .proof-warning{color:#956400}.execution-checks .proof-failed{color:#a22b2b}.execution-proof details{font-size:12px}.execution-proof summary{cursor:pointer;font-weight:700}.execution-proof ul{display:grid;gap:6px;margin:10px 0 0;padding-left:18px}.execution-proof li span{color:var(--muted)}.execution-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.execution-metrics>div{display:grid;gap:3px;padding:10px;border-radius:10px;background:var(--surface-soft)}.execution-metrics span{color:var(--muted);font-size:10px}.execution-metrics strong{font-size:12px}.execution-actions{flex-wrap:wrap;gap:8px}.execution-actions .secondary-button,.execution-actions .quiet-button{width:auto;min-height:36px}.os-health-grid{display:grid;gap:8px;margin:16px 0}.os-health-grid>div{display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;padding:10px;border-radius:10px;background:var(--surface-soft)}.os-health-grid>div>span{font-weight:900}.os-health-grid strong,.os-health-grid small{display:block}.os-health-grid small{margin-top:2px;color:var(--muted)}.os-health-grid .health-passed>span{color:#15804a}.os-health-grid .health-warning>span{color:#956400}.os-health-grid .health-failed>span{color:#a22b2b}.os-run-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.os-run-card{display:grid;gap:10px;padding:15px;border:1px solid var(--line-soft);border-radius:14px;background:var(--surface)}.os-run-card>p{display:-webkit-box;overflow:hidden;margin:0;color:var(--muted);font-size:12px;white-space:pre-line;-webkit-line-clamp:3;-webkit-box-orient:vertical}.os-run-top{justify-content:space-between;gap:10px}.os-run-meta{flex-wrap:wrap;gap:7px}.os-run-meta span{padding:4px 7px;border-radius:999px;background:var(--surface-soft)}.os-ticket-history{margin-top:16px}.os-ticket-history>summary{cursor:pointer;font-weight:700}@keyframes osPulse{50%{opacity:.45;transform:scale(.85)}}@keyframes osProgress{0%{transform:translateX(-110%)}100%{transform:translateX(260%)}}

.intelligence-workspace{display:grid;gap:20px;background:radial-gradient(circle at 100% 0,rgba(116,41,214,.13),transparent 42%),var(--surface)}.intelligence-overview{display:grid;grid-template-columns:150px minmax(0,1fr);gap:18px}.intelligence-score{display:grid;place-content:center;min-height:130px;padding:18px;border:1px solid rgba(116,41,214,.2);border-radius:18px;background:rgba(116,41,214,.06);text-align:center}.intelligence-score strong{font-size:2.5rem;line-height:1;color:#6421bd}.intelligence-score span{margin-top:7px;color:var(--muted);font-size:11px}.intelligence-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.intelligence-source{display:grid;grid-template-columns:24px minmax(0,1fr);gap:8px;padding:11px;border-radius:12px;background:var(--surface-soft)}.intelligence-source>span{font-weight:900}.intelligence-source strong,.intelligence-source small{display:block}.intelligence-source small{margin-top:3px;color:var(--muted);font-size:10px}.intelligence-source.is-passed>span{color:#16804a}.intelligence-source.is-warning>span,.intelligence-source.is-unavailable>span{color:#956400}.intelligence-source.is-failed>span{color:#a22b2b}.intelligence-insights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.intelligence-insights article{display:grid;align-content:start;gap:10px;padding:16px;border:1px solid var(--line-soft);border-radius:14px;background:var(--surface)}.intelligence-insights article>p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}.intelligence-insights details{font-size:11px}.intelligence-insights summary{cursor:pointer;font-weight:700}.intelligence-insight-top,.intelligence-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.intelligence-insight-top small,.intelligence-card-head small{color:var(--muted);font-size:10px}.intelligence-kind{padding:5px 8px;border-radius:999px;background:rgba(116,41,214,.09);color:#6421bd;font-size:9px;font-weight:800;text-transform:uppercase}.intelligence-kind.kind-risk{background:rgba(190,49,49,.08);color:#9b2727}.intelligence-kind.kind-data_gap{background:rgba(190,130,20,.1);color:#84600d}.intelligence-client-card{display:grid;grid-template-columns:110px minmax(0,1fr);gap:16px;margin:0 0 20px;padding:16px;border:1px solid rgba(116,41,214,.18);border-radius:16px;background:rgba(116,41,214,.04)}.intelligence-client-card .intelligence-score{min-height:100px;padding:12px}.intelligence-client-card .intelligence-score strong{font-size:2rem}.intelligence-client-card p{margin:8px 0;color:var(--muted);font-size:12px}.intelligence-mini-list{display:flex;flex-wrap:wrap;gap:7px}.intelligence-mini-list>span{display:grid;gap:2px;padding:7px 9px;border-radius:10px;background:var(--surface)}.intelligence-mini-list b{font-size:11px}.intelligence-mini-list small{color:var(--muted);font-size:9px}

@media (max-width:900px){.os-grid{grid-template-columns:1fr}.os-command-hero .section-header{align-items:flex-start}.os-command-actions{align-items:stretch;flex-direction:column}.os-command-actions .primary-button{width:100%}}
@media (max-width:560px){.os-command-layout{gap:14px}.os-grid{gap:14px}.os-control-bar,.os-command-hero,.os-card,.os-command-history{padding:18px 16px}.os-control-row{align-items:stretch;flex-direction:column}.os-client-selector{width:100%}.os-section-nav{gap:12px}.os-section-nav button{font-size:11px}.os-command-hero .section-header{gap:14px}.os-command-prompt textarea{min-height:190px}.os-command-actions .file-field{width:100%}.os-history-list article{grid-template-columns:1fr}.os-worker-state{align-self:flex-start}}
@media (max-width:700px){.os-run-list,.execution-metrics,.intelligence-source-grid,.intelligence-insights{grid-template-columns:1fr}.intelligence-overview,.intelligence-client-card{grid-template-columns:1fr}.intelligence-score{min-height:100px}.execution-proof-head{align-items:flex-start;flex-direction:column}.execution-actions>*{width:100%!important}.live-widget-launch{align-items:stretch;flex-direction:column}.live-widget-actions{flex-direction:column}.live-widget-actions .primary-button,.live-widget-actions .secondary-button{width:100%;text-align:center}}
