:root {
  color-scheme: light;
  --bg: #f4f8fa;
  --surface: #ffffff;
  --line: #d7e4e8;
  --text: #17313d;
  --muted: #58707a;
  --accent: #0a8197;
  --accent-dark: #065f73;
  --accent-soft: #eaf7fa;
  --brand-navy: #1d252b;
  --brand-teal: #0a8197;
  --brand-teal-dark: #065f73;
  --brand-cyan: #2a9cae;
  --brand-orange: #f58220;
  --brand-orange-dark: #d96400;
  --danger: #b42318;
}

.expiring-service-list {
  min-width: 0;
}

.expiring-service-rows {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.expiring-service-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 190px) 40px;
  min-width: 0;
}

.expiring-service-row label {
  margin: 0;
  min-width: 0;
}

.expiring-service-row input {
  width: 100%;
}

.expiring-service-remove {
  align-items: center;
  background: #fff4f2;
  border: 1px solid #e27b70;
  border-radius: 6px;
  color: #a92418;
  display: inline-flex;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 40px;
}

.expiring-service-remove:hover,
.expiring-service-remove:focus-visible {
  background: #c92318;
  border-color: #c92318;
  color: #fff;
}

.expiring-service-add.button {
  display: inline-flex;
  min-height: 38px;
  padding: 8px 14px;
  width: auto;
}

@media (max-width: 720px) {
  .expiring-service-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  .expiring-service-row label:first-child {
    grid-column: 1 / -1;
  }
}

/* SoftwareHouse */
.softwarehouse-shell,
.softwarehouse-task-shell {
  margin: 0 auto;
  max-width: 1760px;
  min-width: 0;
  padding: 24px clamp(16px, 2.5vw, 42px) 42px;
}

.softwarehouse-customer-wrap .softwarehouse-shell,
.softwarehouse-customer-wrap .softwarehouse-task-shell {
  padding-left: 0;
  padding-right: 0;
}

.softwarehouse-heading,
.softwarehouse-task-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.softwarehouse-heading h1,
.softwarehouse-task-heading h1 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.08;
  margin: 3px 0 7px;
}

.softwarehouse-heading > div:first-child > p:last-child {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.softwarehouse-project-summary {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-orange);
  border-radius: 7px;
  display: grid;
  gap: 2px;
  min-width: 250px;
  padding: 12px 15px;
}

.softwarehouse-project-summary strong {
  color: var(--brand-navy);
  font-size: 15px;
}

.softwarehouse-project-summary span,
.softwarehouse-project-summary small {
  color: var(--muted);
  font-size: 12px;
}

.softwarehouse-notice {
  margin-bottom: 12px;
}

.softwarehouse-projectbar,
.softwarehouse-toolbar,
.softwarehouse-actionbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 12px;
}

.softwarehouse-projectbar {
  border-radius: 8px 8px 0 0;
}

.softwarehouse-toolbar,
.softwarehouse-actionbar {
  border-top: 0;
}

.softwarehouse-actionbar {
  border-radius: 0 0 8px 8px;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.softwarehouse-projectbar > form {
  flex: 1 1 500px;
  max-width: 720px;
}

.softwarehouse-projectbar label,
.softwarehouse-dialog-form label,
.softwarehouse-popover-form label,
.softwarehouse-side-panel label {
  color: #49616c;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.softwarehouse-projectbar label {
  align-items: center;
  gap: 10px;
  grid-template-columns: auto minmax(220px, 1fr);
}

.softwarehouse-projectbar select,
.softwarehouse-filters input,
.softwarehouse-filters select,
.softwarehouse-dialog-form input,
.softwarehouse-dialog-form select,
.softwarehouse-dialog-form textarea,
.softwarehouse-popover-form input,
.softwarehouse-popover-form select,
.softwarehouse-popover-form textarea,
.softwarehouse-side-panel input,
.softwarehouse-side-panel select,
.softwarehouse-side-panel textarea,
.softwarehouse-inline-form input,
.softwarehouse-comment-form textarea {
  background: #ffffff;
  border: 1px solid #c8d8df;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.softwarehouse-projectbar select:focus,
.softwarehouse-filters input:focus,
.softwarehouse-filters select:focus,
.softwarehouse-dialog-form input:focus,
.softwarehouse-dialog-form select:focus,
.softwarehouse-dialog-form textarea:focus,
.softwarehouse-popover-form input:focus,
.softwarehouse-popover-form select:focus,
.softwarehouse-popover-form textarea:focus,
.softwarehouse-side-panel input:focus,
.softwarehouse-side-panel select:focus,
.softwarehouse-side-panel textarea:focus,
.softwarehouse-inline-form input:focus,
.softwarehouse-comment-form textarea:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(10, 129, 151, 0.12);
  outline: 0;
}

.softwarehouse-popover,
.softwarehouse-action-panel {
  position: relative;
}

.softwarehouse-popover > summary,
.softwarehouse-action-panel > summary,
.softwarehouse-inline-details > summary,
.softwarehouse-side-panel > details > summary {
  cursor: pointer;
  list-style: none;
}

.softwarehouse-popover > summary::-webkit-details-marker,
.softwarehouse-action-panel > summary::-webkit-details-marker,
.softwarehouse-inline-details > summary::-webkit-details-marker,
.softwarehouse-side-panel > details > summary::-webkit-details-marker {
  display: none;
}

.softwarehouse-popover-form {
  background: #ffffff;
  border: 1px solid #cddce2;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(20, 45, 58, 0.18);
  display: grid;
  gap: 12px;
  min-width: 340px;
  padding: 16px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.softwarehouse-popover-form h2,
.softwarehouse-management-panel h2,
.softwarehouse-dialog-form h2 {
  font-size: 17px;
  margin: 0;
}

.softwarehouse-check {
  align-items: start;
  display: flex !important;
  gap: 8px !important;
}

.softwarehouse-check input {
  min-height: auto;
  width: auto;
}

.softwarehouse-filters {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  grid-template-columns: minmax(210px, 1.7fr) repeat(3, minmax(145px, 0.7fr)) auto;
  min-width: 0;
}

.softwarehouse-filters label,
.softwarehouse-search {
  min-width: 0;
}

.softwarehouse-filters button,
.softwarehouse-view-switch button,
.softwarehouse-dialog-form button,
.softwarehouse-popover-form button,
.softwarehouse-management-panel button,
.softwarehouse-inline-form button,
.softwarehouse-comment-form button,
.softwarehouse-side-panel button {
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
  border: 1px solid var(--brand-teal-dark);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 13px;
}

.softwarehouse-filters button.secondary,
.softwarehouse-view-switch button,
.softwarehouse-actionbar .button.secondary {
  background: #edf4f7;
  border-color: #cad9e0;
  color: #294651;
}

.softwarehouse-view-switch {
  background: #edf4f7;
  border: 1px solid #cad9e0;
  border-radius: 7px;
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
}

.softwarehouse-view-switch button {
  border: 0;
  min-height: 32px;
  padding: 6px 12px;
}

.softwarehouse-view-switch button.active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(18, 45, 58, 0.14);
  color: var(--brand-teal-dark);
}

.softwarehouse-actionbar .button {
  display: inline-flex;
  min-height: 38px;
  padding: 9px 14px;
}

.softwarehouse-action-panel[open] {
  width: min(100%, 920px);
}

.softwarehouse-action-panel[open] > summary {
  margin-bottom: 10px;
}

.softwarehouse-dialog-form,
.softwarehouse-management-panel {
  background: #f7fafb;
  border: 1px solid #d6e2e7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
  width: min(100%, 920px);
}

.softwarehouse-dialog-form.compact {
  margin-top: 10px;
}

.softwarehouse-dialog-form .wide,
.softwarehouse-dialog-heading,
.softwarehouse-dialog-actions {
  grid-column: 1 / -1;
}

.softwarehouse-dialog-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.softwarehouse-dialog-heading span {
  background: #fff3e8;
  border: 1px solid #fed4ae;
  border-radius: 999px;
  color: #a64c00;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 9px;
}

.softwarehouse-dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.softwarehouse-management-panel {
  align-items: start;
}

.softwarehouse-management-panel > form {
  display: grid;
  gap: 10px;
}

.softwarehouse-member-list {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.softwarehouse-member-list li {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce7eb;
  border-radius: 5px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px;
}

.softwarehouse-member-list small {
  color: var(--muted);
}

.softwarehouse-board {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 7px;
}

.softwarehouse-board[hidden],
.softwarehouse-list[hidden] {
  display: none;
}

.softwarehouse-column {
  background: #eaf1f4;
  border: 1px solid #d4e1e6;
  border-radius: 7px;
  min-height: 480px;
  min-width: 230px;
  overflow: hidden;
}

.softwarehouse-column > header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #d4e1e6;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px 1fr auto;
  min-height: 46px;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.softwarehouse-column > header h2 {
  font-size: 14px;
  margin: 0;
}

.softwarehouse-column > header b {
  align-items: center;
  background: #eaf2f5;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 7px;
}

.softwarehouse-status-dot,
.status-dot {
  background: #8798a1;
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.status-estimate {
  background: #f59e0b;
}

.status-todo {
  background: #6b8afd;
}

.status-in_progress {
  background: #0a8197;
}

.status-client_testing {
  background: #8b5cf6;
}

.status-done {
  background: #22a06b;
}

.softwarehouse-column-body {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 300px);
  min-height: 430px;
  overflow-y: auto;
  padding: 9px;
}

.softwarehouse-column.drag-over {
  background: #d8edf2;
  border-color: var(--brand-teal);
}

.softwarehouse-task-card {
  background: #ffffff;
  border: 1px solid #d4e0e5;
  border-left: 3px solid #8ea1aa;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(29, 49, 60, 0.06);
  min-width: 0;
}

.softwarehouse-task-card.priority-high {
  border-left-color: var(--brand-orange);
}

.softwarehouse-task-card.dragging {
  opacity: 0.55;
}

.softwarehouse-task-card > a {
  color: inherit;
  display: block;
  padding: 11px;
}

.softwarehouse-task-card-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.softwarehouse-task-card-top small {
  color: var(--brand-teal-dark);
  font-weight: 850;
}

.priority-pill,
.status-pill,
.ticket-type-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 5px 8px;
}

.priority-pill.low {
  background: #e7f7ee;
  color: #14794e;
}

.priority-pill.high {
  background: #fff0e5;
  color: #a94700;
}

.ticket-type-pill {
  background: #eaf4f7;
  border: 1px solid #cbe0e7;
  color: #136175;
}

.ticket-type-mit-dev {
  background: #e8f5ff;
  border-color: #bddcf7;
  color: #175d91;
}

.ticket-type-mitsecurity {
  background: #fff0eb;
  border-color: #f5cbbb;
  color: #a2401e;
}

.ticket-type-mitcloud {
  background: #eef0ff;
  border-color: #cfd4fb;
  color: #4c51a8;
}

.softwarehouse-task-card h3 {
  display: -webkit-box;
  font-size: 14px;
  line-height: 1.35;
  margin: 9px 0 4px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.softwarehouse-task-card p {
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 9px;
}

.softwarehouse-task-card dl {
  border-top: 1px solid #e4ecef;
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding-top: 8px;
}

.softwarehouse-task-card dl > div {
  align-items: start;
  display: grid;
  gap: 5px;
  grid-template-columns: 70px minmax(0, 1fr);
}

.softwarehouse-task-card dt {
  color: #71848d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.softwarehouse-task-card dd {
  font-size: 11px;
  font-weight: 750;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.softwarehouse-progress {
  background: #dce7eb;
  border-radius: 999px;
  height: 5px;
  margin: 8px 0 5px;
  overflow: hidden;
}

.softwarehouse-progress span {
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-orange));
  display: block;
  height: 100%;
}

.softwarehouse-progress.large {
  height: 8px;
}

.softwarehouse-column-empty,
.softwarehouse-list-empty,
.softwarehouse-empty {
  color: var(--muted);
  padding: 24px 12px;
  text-align: center;
}

.softwarehouse-list {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
}

.softwarehouse-list-head,
.softwarehouse-list-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(300px, 2fr) minmax(130px, 0.7fr) minmax(170px, 1fr) 110px minmax(145px, 0.8fr);
  min-width: 900px;
  padding: 10px 14px;
}

.softwarehouse-list-head {
  background: #eaf2f5;
  color: #415965;
  font-size: 11px;
  font-weight: 850;
  position: sticky;
  top: 0;
  text-transform: uppercase;
}

.softwarehouse-list-row {
  border-top: 1px solid #e0e9ed;
  color: var(--text);
  min-height: 54px;
}

.softwarehouse-list-row:hover {
  background: #f4fafb;
}

.softwarehouse-list-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.softwarehouse-list-row > span:first-child {
  display: grid;
}

.softwarehouse-list-row small {
  color: var(--muted);
}

.softwarehouse-back {
  display: inline-flex;
  font-weight: 800;
  margin-bottom: 12px;
}

.softwarehouse-task-heading {
  align-items: flex-end;
}

.softwarehouse-task-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-pill {
  background: #eaf2f5;
  color: #37525e;
}

.status-pill.status-estimate {
  background: #fff2dd;
  color: #965700;
}

.status-pill.status-todo {
  background: #eaf0ff;
  color: #3558a8;
}

.status-pill.status-in_progress {
  background: #e3f6f8;
  color: #056579;
}

.status-pill.status-client_testing {
  background: #f1eaff;
  color: #6941a5;
}

.status-pill.status-done {
  background: #e4f7ec;
  color: #16794e;
}

.softwarehouse-task-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.softwarehouse-task-main,
.softwarehouse-task-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.softwarehouse-section,
.softwarehouse-side-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(22, 49, 61, 0.05);
  min-width: 0;
  padding: 16px;
}

.softwarehouse-section > header,
.softwarehouse-section-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.softwarehouse-section h2,
.softwarehouse-side-panel h2 {
  font-size: 17px;
  margin: 0;
}

.softwarehouse-section-heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 2px 0 0;
}

.softwarehouse-description {
  color: #29434f;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.softwarehouse-description img {
  height: auto;
  max-width: 100%;
}

.softwarehouse-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.softwarehouse-attachments a,
.softwarehouse-comment-attachment {
  background: #edf5f7;
  border: 1px solid #d0e0e6;
  border-radius: 5px;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  padding: 7px 9px;
}

.softwarehouse-checklist {
  display: grid;
  gap: 6px;
}

.softwarehouse-checklist form {
  align-items: center;
  display: flex;
  gap: 9px;
  margin: 0;
}

.softwarehouse-checklist form.completed > span:last-child {
  color: #71838b;
  text-decoration: line-through;
}

.check-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid #aec4cd;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 22px;
  font-size: 13px;
  height: 22px;
  justify-content: center;
  padding: 0;
  width: 22px;
}

.completed .check-button {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
}

.check-button.static {
  cursor: default;
}

.softwarehouse-inline-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
}

.softwarehouse-inline-details {
  margin-top: 12px;
}

.softwarehouse-inline-details > summary,
.softwarehouse-side-panel > details > summary {
  color: var(--brand-teal-dark);
  font-weight: 850;
  padding: 6px 0;
}

.softwarehouse-subtasks {
  border: 1px solid #dce7eb;
  border-radius: 6px;
  overflow: hidden;
}

.softwarehouse-subtasks > a {
  align-items: center;
  border-top: 1px solid #e2eaee;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 10px minmax(0, 1.5fr) minmax(130px, 0.8fr) 90px;
  min-height: 42px;
  padding: 8px 10px;
}

.softwarehouse-subtasks > a:first-child {
  border-top: 0;
}

.softwarehouse-subtasks small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.softwarehouse-comments {
  display: grid;
  gap: 9px;
}

.softwarehouse-comments article {
  background: #eef6fb;
  border: 1px solid #d2e3ed;
  border-left: 3px solid #4a8fbd;
  border-radius: 6px;
  padding: 11px 12px;
}

.softwarehouse-comments article.client {
  background: #edf9f3;
  border-color: #cfeada;
  border-left-color: #22a06b;
}

.softwarehouse-comments article.internal {
  background: #fff8df;
  border-color: #f1df9f;
  border-left-color: #d89a00;
}

.softwarehouse-comments article > header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 7px;
}

.softwarehouse-comments article > header span,
.softwarehouse-comments article > header time {
  color: var(--muted);
  font-size: 11px;
}

.softwarehouse-comments article img {
  height: auto;
  max-width: 100%;
}

.softwarehouse-comment-form {
  border-top: 1px solid #dfe8ec;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
}

.softwarehouse-comment-tabs {
  display: flex;
  gap: 8px;
}

.softwarehouse-comment-tabs label {
  align-items: center;
  background: #f1f6f8;
  border: 1px solid #d5e2e7;
  border-radius: 5px;
  display: inline-flex;
  font-weight: 750;
  gap: 6px;
  padding: 7px 9px;
}

.softwarehouse-comment-form textarea {
  min-height: 130px;
  resize: vertical;
}

.softwarehouse-comment-form > div:last-child {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.softwarehouse-side-panel {
  display: grid;
  gap: 12px;
}

.softwarehouse-side-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.softwarehouse-side-panel dl > div {
  border-top: 1px solid #e2eaee;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1fr);
  padding-top: 8px;
}

.softwarehouse-side-panel dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.softwarehouse-side-panel dd {
  font-weight: 750;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.softwarehouse-side-panel form {
  display: grid;
  gap: 9px;
}

.softwarehouse-estimate-actions {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.softwarehouse-estimate-actions button,
.softwarehouse-side-panel button {
  width: 100%;
}

.softwarehouse-side-panel button.danger {
  background: #b42318;
  border-color: #8e1e15;
}

.softwarehouse-time-total {
  color: var(--brand-teal-dark);
  font-size: 26px;
}

.softwarehouse-time-inputs {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.softwarehouse-worklogs {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 2px 0 0;
  max-height: 240px;
  overflow-y: auto;
  padding: 0;
}

.softwarehouse-worklogs li {
  background: #f4f8fa;
  border-radius: 5px;
  display: grid;
  gap: 2px;
  grid-template-columns: 1fr auto;
  padding: 8px;
}

.softwarehouse-worklogs small {
  color: var(--muted);
  grid-column: 1 / -1;
}

.softwarehouse-muted {
  color: var(--muted);
  margin: 8px 0;
}

.softwarehouse-empty {
  background: #ffffff;
  border: 1px dashed #bdd0d8;
  border-radius: 8px;
  margin-top: 14px;
}

@media (max-width: 1050px) {
  .softwarehouse-toolbar,
  .softwarehouse-projectbar {
    align-items: stretch;
    flex-direction: column;
  }

  .softwarehouse-projectbar > form {
    flex-basis: auto;
    max-width: none;
  }

  .softwarehouse-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .softwarehouse-task-layout {
    grid-template-columns: 1fr;
  }

  .softwarehouse-task-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .softwarehouse-shell,
  .softwarehouse-task-shell {
    padding: 16px 10px 30px;
  }

  .softwarehouse-heading,
  .softwarehouse-task-heading,
  .softwarehouse-dialog-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .softwarehouse-project-summary {
    min-width: 0;
    width: 100%;
  }

  .softwarehouse-projectbar label {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .softwarehouse-filters,
  .softwarehouse-dialog-form,
  .softwarehouse-management-panel,
  .softwarehouse-task-side {
    grid-template-columns: 1fr;
  }

  .softwarehouse-dialog-form .wide,
  .softwarehouse-dialog-heading,
  .softwarehouse-dialog-actions {
    grid-column: auto;
  }

  .softwarehouse-view-switch {
    width: 100%;
  }

  .softwarehouse-view-switch button {
    flex: 1 1 50%;
  }

  .softwarehouse-actionbar {
    align-items: stretch;
    flex-direction: column;
  }

  .softwarehouse-actionbar .button {
    justify-content: center;
    width: 100%;
  }

  .softwarehouse-popover-form {
    left: 0;
    min-width: min(92vw, 340px);
    right: auto;
  }

  .softwarehouse-subtasks > a {
    grid-template-columns: 10px minmax(0, 1fr) 74px;
  }

  .softwarehouse-subtasks > a small {
    display: none;
  }

  .softwarehouse-comment-form > div:last-child {
    align-items: stretch;
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  margin: 0;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: var(--brand-navy);
  border-bottom: 3px solid var(--brand-orange);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 48px);
}

.brand {
  color: #ffffff;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 800;
  line-height: 1.15;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

nav a {
  color: #d9f6fb;
  font-weight: 700;
}

nav a.active {
  color: #ffffff;
}

.admin-topbar {
  display: grid;
  grid-template-columns: minmax(340px, auto) 1fr auto;
  min-height: 64px;
  padding-block: 0;
  position: relative;
  width: 100%;
}

.admin-brand-block {
  align-items: center;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.admin-topbar .admin-brand {
  align-items: center;
  display: inline-flex;
  font-size: 21px;
  gap: 12px;
  min-width: 0;
}

.admin-brand img {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
  height: 38px;
  object-fit: contain;
  padding: 3px;
  width: 38px;
}

.admin-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar nav {
  align-items: center;
  gap: 18px;
}

.admin-user-menu {
  align-self: center;
  position: relative;
}

.admin-user-menu summary {
  align-items: center;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  list-style: none;
}

.admin-user-menu summary::-webkit-details-marker {
  display: none;
}

.admin-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-orange));
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  letter-spacing: 0;
  width: 34px;
}

.admin-user-dropdown {
  background: #ffffff;
  border: 1px solid #d5e2e7;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(10, 29, 40, 0.22);
  min-width: 230px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 50;
}

.admin-user-dropdown a {
  border-radius: 6px;
  color: var(--brand-navy);
  display: block;
  font-weight: 850;
  padding: 9px 10px;
}

.admin-user-dropdown a:hover,
.admin-user-dropdown a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.admin-user-card {
  border-bottom: 1px solid #e3ecef;
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
  padding: 8px 10px 10px;
}

.admin-user-card strong {
  color: var(--brand-navy);
  font-size: 13px;
}

.admin-user-card span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.shell {
  margin: 0 auto;
  max-width: 1160px;
  padding: clamp(22px, 5vw, 52px) clamp(18px, 4vw, 42px);
}

.shell.wide {
  max-width: 1480px;
}

.narrow {
  max-width: 760px;
}

.intro {
  margin-bottom: 22px;
  max-width: 760px;
}

.intro.compact {
  margin-bottom: 16px;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.device-intro {
  max-width: none;
}

.device-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  max-width: 920px;
}

.device-quick-action {
  gap: 9px;
  min-height: 42px;
  padding: 10px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.device-quick-action.secondary {
  background: #ffffff;
  border: 1px solid #cbd8df;
  color: #2b4652;
}

.device-quick-actions .audit-download-action {
  background: #ffffff;
  border: 1px solid #c7d8df;
  box-shadow: 0 8px 20px rgba(23, 49, 61, 0.08);
  color: var(--brand-navy);
}

.device-quick-actions .audit-download-action:hover,
.device-quick-actions .audit-download-action:focus {
  background: var(--accent-soft);
  border-color: var(--brand-teal);
  color: var(--brand-teal-dark);
}

.device-quick-actions .audit-download-action svg,
.device-quick-actions .audit-download-action span {
  color: currentColor;
}

.device-quick-action svg {
  flex: 0 0 18px;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.device-quick-action span {
  display: inline-block;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-collapsible-section {
  border: 1px solid #d5e4eb;
  border-radius: 8px;
  margin: 18px 0;
  overflow: hidden;
}

.device-collapsible-section summary {
  align-items: center;
  background: #f3f8fa;
  color: var(--brand-navy);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  min-height: 48px;
  padding: 12px 16px;
  user-select: none;
}

.device-collapsible-section summary::-webkit-details-marker {
  display: none;
}

.device-collapsible-section summary::before {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  flex: 0 0 9px;
  height: 9px;
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
  width: 9px;
}

.device-collapsible-section[open] summary::before {
  transform: rotate(45deg);
}

.device-collapsible-section summary span {
  flex: 1 1 auto;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.15;
}

.device-collapsible-section summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.device-collapsible-section table,
.device-collapsible-section .compact-table {
  margin: 0;
}

.device-collapsible-section[open] {
  background: #ffffff;
}

.device-collapsible-section[open] > h3,
.device-collapsible-section[open] > table {
  margin-left: 16px;
  margin-right: 16px;
}

.device-collapsible-section[open] > h3:first-of-type {
  margin-top: 16px;
}

.device-collapsible-section[open] > table:last-child {
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: 0;
  line-height: 1.02;
  margin: 6px 0 12px;
}

h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.intro p,
.result-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.portal-grid,
.ticket-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

.admin-ticket-create-page {
  max-width: 1320px;
}

.admin-ticket-create-hero {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-ticket-create-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 10px;
}

.admin-ticket-create-hero p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.admin-ticket-create-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.admin-ticket-create-card,
.admin-ticket-create-side {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.admin-ticket-create-card {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 3vw, 30px);
}

.admin-ticket-section {
  display: grid;
  gap: 16px;
}

.admin-ticket-section + .admin-ticket-section {
  border-top: 1px solid #e4edf1;
  padding-top: 22px;
}

.admin-ticket-section-heading {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 36px minmax(0, 1fr);
}

.admin-ticket-section-heading > span {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: var(--brand-orange-dark);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.admin-ticket-section-heading h2 {
  font-size: 23px;
  margin: 0 0 4px;
}

.admin-ticket-section-heading p {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.admin-ticket-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-ticket-field {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr;
}

.admin-ticket-field span,
.admin-ticket-field > label {
  color: #344954;
  font-size: 13px;
  font-weight: 850;
  padding-top: 0;
}

.admin-ticket-field input,
.admin-ticket-field select {
  min-height: 46px;
}

.admin-ticket-field-wide,
.admin-ticket-description {
  grid-column: 1 / -1;
}

.admin-ticket-description {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.admin-ticket-description > label {
  color: #344954;
  font-size: 13px;
  font-weight: 850;
  padding-top: 0;
}

.admin-ticket-description .rich-text-editor {
  grid-column: 1;
}

.admin-ticket-description .rich-text-surface {
  min-height: 230px;
}

.admin-ticket-attach {
  align-items: start;
  background: #f8fbfc;
  border: 1px dashed #bdd5dc;
  border-radius: 10px;
  color: var(--brand-teal-dark);
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 13px 14px;
}

.admin-ticket-attach span {
  font-weight: 900;
}

.admin-ticket-actions {
  border-top: 1px solid #e4edf1;
  margin-top: 2px;
  padding-top: 18px;
}

.admin-ticket-create-side {
  display: grid;
  gap: 14px;
  padding: 20px;
  position: sticky;
  top: 88px;
}

.admin-ticket-create-side h2 {
  font-size: 20px;
  margin: 0;
}

.admin-ticket-create-side p,
.admin-ticket-create-side span {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.admin-ticket-create-side div {
  background: var(--accent-soft);
  border: 1px solid #cce9ef;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 13px;
}

.admin-ticket-create-side strong {
  color: var(--brand-teal-dark);
}

.form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 4vw, 28px);
}

.inline-form {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-left: 0;
  padding-right: 0;
}

.form label {
  color: #344054;
  display: grid;
  font-weight: 700;
  gap: 7px;
}

.form input,
.form select,
.form textarea,
.filter-panel input,
.filter-panel select {
  border: 1px solid #cbd3df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-width: 0;
  padding: 11px 12px;
  width: 100%;
}

.form textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
}

.checkbox-line {
  align-items: center;
  display: flex !important;
  font-weight: 600 !important;
  gap: 10px !important;
}

.checkbox-line input {
  height: 18px;
  width: 18px;
}

.checkbox-grid {
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.service-details-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-details-grid fieldset {
  background: #f7fbfc;
  border: 1px solid rgba(10, 129, 151, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
}

.service-details-grid legend {
  color: var(--brand-navy);
  font-weight: 850;
  padding: 0 6px;
}

.service-details-grid textarea {
  min-height: 86px;
}

.weekday-grid {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(10, 129, 151, 0.18);
  border-radius: 8px;
  background: #f7fbfc;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px;
}

.weekday-grid legend {
  color: var(--brand-navy);
  font-weight: 850;
  padding: 0 6px;
}

button,
.button {
  align-items: center;
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
}

button:disabled {
  background: #98a2b3;
  cursor: not-allowed;
}

.small-button {
  font-size: 12px;
  min-height: 32px;
  padding: 7px 10px;
}

button.secondary {
  background: #33434b;
}

.device-table .inline-form,
.compact-table .inline-form {
  border-top: 0;
  margin-top: 0;
  padding: 0;
}

.button.secondary {
  background: #33434b;
}

.button.warning-outline,
button.warning-outline {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.button.danger-outline,
button.danger-outline {
  background: #fff1f2;
  border: 1px solid #fda4af;
  color: #be123c;
}

.secondary-button {
  background: #33434b;
}

.danger-button {
  background: var(--danger);
}

.viewer-download {
  margin-top: 14px;
  width: 100%;
}

.ticket-report-presets {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ticket-report-preset {
  align-items: center;
  background: #f4f8fa;
  border: 1px solid #d8e3e8;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.ticket-report-preset span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.ticket-report-preset div,
.ticket-report-actions {
  display: flex;
  gap: 8px;
}

.ticket-report-preset .viewer-download {
  margin-top: 0;
  min-width: 72px;
  padding: 9px 12px;
  width: auto;
}

.ticket-report-form label {
  color: #526b75;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  text-transform: uppercase;
}

.ticket-report-actions button {
  flex: 1;
  padding: 10px 12px;
}

.side-panel,
.result-panel,
.ticket-main,
.table-panel,
.detail-main,
.filter-panel {
  padding: 22px;
}

.side-panel dl,
.result-panel dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.side-panel dl div,
.result-panel dl div {
  border-top: 1px solid #e4e8ef;
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

dt {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
}

.result-panel {
  display: grid;
  gap: 14px;
}

.result-panel .button {
  justify-self: start;
  margin-top: 8px;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - 68px);
  place-items: center;
}

.login-form {
  max-width: 430px;
  width: 100%;
}

.microsoft-login {
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
  text-decoration: none;
  width: 100%;
}

.login-choice-stack {
  display: grid;
  gap: 16px;
}

.login-separator {
  align-items: center;
  color: #667085;
  display: grid;
  font-size: 12px;
  font-weight: 850;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
  text-transform: uppercase;
}

.login-separator::before,
.login-separator::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.login-divider {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.emergency-login {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-top: 14px;
}

.emergency-login summary {
  align-items: center;
  background: #f7fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-teal-dark);
  cursor: pointer;
  display: flex;
  font-weight: 850;
  justify-content: center;
  list-style: none;
  min-height: 42px;
  padding: 10px 14px;
}

.emergency-login summary::-webkit-details-marker {
  display: none;
}

.emergency-login summary::after {
  color: var(--brand-orange);
  content: "Rozwiń";
  font-size: 11px;
  font-weight: 850;
  margin-left: 10px;
  text-transform: uppercase;
}

.emergency-login[open] summary::after {
  content: "Ukryj";
}

.emergency-login-fields {
  display: grid;
  gap: 16px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.notice.danger {
  background: #fff3f0;
  border-color: #f2b8ac;
  color: var(--danger);
}

.notice.success {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
  margin-bottom: 18px;
}

.settings-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
}

.settings-shell {
  max-width: 1280px;
}

.settings-tabs {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
}

.settings-tabs a {
  border-radius: 6px;
  color: #294250;
  font-size: 13px;
  font-weight: 850;
  padding: 9px 12px;
  text-decoration: none;
}

.settings-tabs a:hover,
.settings-tabs a.active {
  background: linear-gradient(135deg, var(--brand-teal-dark), var(--brand-teal));
  color: #ffffff;
}

.settings-heading {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 16px;
}

.settings-heading h2 {
  margin: 4px 0 0;
}

.settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.settings-form .full-span,
.settings-actions {
  grid-column: 1 / -1;
}

.settings-readonly-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 12px;
}

.settings-readonly-row span,
.settings-muted {
  color: var(--muted);
}

.settings-subheading {
  border-bottom: 1px solid var(--line);
  color: var(--brand-teal-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  padding: 12px 0 8px;
  text-transform: uppercase;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-inline-actions {
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
}

.consultant-signature-card {
  background: #f8fcfd;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.consultant-signature-card h3 {
  margin: 3px 0 0;
}

.signature-form textarea {
  min-height: 128px;
  resize: vertical;
}

.signature-rich-editor {
  grid-column: 1 / -1;
}

.signature-rich-editor > span {
  color: var(--brand-navy);
  display: block;
  font-weight: 850;
  padding: 12px 12px 0;
}

.signature-rich-editor .rich-text-surface {
  background: #ffffff;
  min-height: 170px;
}

.signature-help {
  color: var(--muted);
  font-size: 13px;
  margin: -4px 0 0;
}

.settings-team-list {
  display: grid;
  gap: 8px;
}

.settings-team-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dfe9ee;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 34px minmax(220px, 1fr) 110px minmax(260px, 1.2fr);
  padding: 11px 13px;
}

.settings-team-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-team-identity strong {
  color: #1d3542;
  font-size: 14px;
}

.settings-team-identity span,
.settings-team-meta {
  color: #627783;
  font-size: 12px;
}

.settings-team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.settings-checkbox-grid {
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  margin: 0;
  padding: 14px;
}

.settings-checkbox-grid legend {
  color: var(--brand-teal-dark);
  font-size: 13px;
  font-weight: 900;
  padding: 0 6px;
}

.compact-checkbox-grid {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.external-consultant-form,
.external-consultant-edit {
  background: #f8fcfd;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  padding: 16px;
}

.external-consultant-card {
  align-items: start;
  grid-template-columns: 34px minmax(220px, 1fr) minmax(160px, 220px) minmax(260px, 1fr);
}

.external-consultant-edit {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.external-consultant-actions {
  border-top: 1px solid #d8e8ee;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
  padding-top: 12px;
}

.external-consultant-actions form {
  margin: 0;
}

.settings-customer-list {
  display: grid;
  gap: 8px;
}

.settings-customer-search {
  align-items: center;
  background: #f6fafc;
  border: 1px solid #d7e6ed;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 10px;
  padding: 10px 12px;
}

.settings-customer-search input {
  background: #ffffff;
  border: 1px solid #bfd2dc;
  color: #1d3542;
  font-size: 13px;
  min-height: 36px;
  min-width: 0;
  padding: 7px 10px;
  width: 100%;
}

.settings-customer-search .button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
}

.settings-customer-results {
  align-items: center;
  color: #627783;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  justify-content: space-between;
  margin: 0 0 8px;
}

.settings-customer-results-bottom {
  margin: 10px 0 0;
}

.settings-customer-card {
  background: #ffffff;
  border: 1px solid #d7e6ed;
  border-radius: 8px;
  overflow: hidden;
}

.settings-customer-card[open] {
  box-shadow: 0 10px 24px rgba(21, 47, 59, 0.08);
}

.settings-customer-row {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(210px, 1.2fr) minmax(150px, 0.8fr) minmax(160px, 0.8fr) minmax(250px, 1.3fr) auto;
  list-style: none;
  min-height: 58px;
  padding: 10px 12px;
}

.settings-customer-row::-webkit-details-marker {
  display: none;
}

.settings-customer-row:hover {
  background: #f7fbfc;
}

.settings-customer-identity,
.settings-customer-company,
.settings-customer-stats {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-customer-identity strong,
.settings-customer-company strong,
.settings-customer-stats strong {
  color: #1d3542;
  font-size: 13px;
}

.settings-customer-identity span,
.settings-customer-identity small,
.settings-customer-company span,
.settings-customer-stats span {
  color: #627783;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-customer-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.settings-customer-badges .badge {
  font-size: 11px;
  padding: 4px 7px;
}

.settings-customer-toggle {
  background: #eff6f8;
  border: 1px solid #c9dce4;
  border-radius: 7px;
  color: #1d3542;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  text-align: center;
}

.settings-customer-card[open] .settings-customer-toggle,
.settings-customer-row:hover .settings-customer-toggle {
  background: linear-gradient(135deg, var(--brand-teal-dark), var(--brand-teal));
  border-color: transparent;
  color: #ffffff;
}

.settings-customer-details-body {
  background: #f8fcfd;
  border-top: 1px solid #d7e6ed;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.settings-customer-edit {
  background: #ffffff;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.settings-customer-aliases {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr);
  padding: 12px;
}

.settings-customer-aliases > div {
  display: grid;
  gap: 8px;
}

.settings-customer-alias-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-customer-email-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
}

.settings-customer-actions {
  background: #ffffff;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  padding: 10px;
}

.customer-editor-shell {
  display: grid;
  gap: 14px;
  max-width: 980px;
  padding-bottom: 48px;
}

.customer-editor-header {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding-top: 28px;
}

.customer-editor-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  margin: 2px 0 4px;
}

.customer-editor-header p:last-child {
  color: #627783;
  margin: 0;
}

.customer-editor-summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7e6ed;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 42px repeat(4, minmax(0, 1fr));
  padding: 14px 16px;
}

.customer-editor-summary > div:not(.client-avatar) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-editor-summary span,
.customer-editor-primary-email span {
  color: #627783;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.customer-editor-summary strong {
  color: #1d3542;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-editor-section {
  background: #ffffff;
  border: 1px solid #d7e6ed;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.customer-editor-section-heading {
  align-items: center;
  border-bottom: 1px solid #e1ebef;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.customer-editor-section-heading h2 {
  font-size: 20px;
  margin: 2px 0 0;
}

.customer-editor-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.customer-editor-primary-email {
  background: #f5fafc;
  border: 1px solid #d8e8ee;
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.customer-editor-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-editor-alias {
  align-items: center;
  background: #f8fcfd;
  border: 1px solid #d7e6ed;
  border-radius: 7px;
  display: flex;
  gap: 10px;
  padding: 6px 7px 6px 11px;
}

.customer-editor-email-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 680px;
  padding: 0;
}

.customer-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.customer-editor-actions form {
  margin: 0;
}

.external-totp-secret code {
  word-break: break-all;
}

.external-setup-shell {
  min-height: 100vh;
  max-width: 720px;
  padding: 40px 18px;
}

.customer-auth-shell.external-setup-shell {
  max-width: 720px;
}

.external-setup-card {
  display: grid;
  gap: 22px;
  max-width: 720px;
}

.external-setup-intro h1 {
  color: #152f3b;
  font-size: 34px;
  margin: 4px 0 8px;
}

.external-setup-intro p {
  color: #536b77;
  margin: 0;
}

.external-setup-totp {
  background: #f8fcfd;
  border: 1px solid #d8e8ee;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.external-setup-totp h2 {
  color: #152f3b;
  font-size: 18px;
  margin: 0;
}

.external-setup-totp p {
  color: #536b77;
  margin: 0;
}

.external-setup-totp code {
  background: #ffffff;
  border: 1px solid #cfe1e8;
  border-radius: 8px;
  color: #0b7285;
  display: block;
  overflow-wrap: anywhere;
  padding: 10px;
}

.external-setup-form {
  display: grid;
  gap: 14px;
}

.settings-empty-state {
  background: #f7fbfc;
  border: 1px dashed #c9dbe3;
  border-radius: 8px;
  color: #526a76;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 34px;
  text-align: center;
}

.settings-empty-state.aligned-left {
  justify-items: start;
  text-align: left;
}

.settings-empty-state h3 {
  color: #1d3542;
  margin: 0;
}

.settings-empty-state p {
  margin: 0;
}

@media (max-width: 860px) {
  .settings-team-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .settings-team-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.badge.success {
  background: #dcfae6;
  color: #067647;
}

.badge.warning {
  background: #fef0c7;
  color: #93370d;
}

.toolbar {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
}

.toolbar .filter-panel {
  margin-bottom: 0;
}

.toolbar > .button {
  align-self: stretch;
}

.metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.equipment-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.metric span,
.muted,
small {
  color: var(--muted);
}

.metric strong {
  font-size: 30px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef3f8;
  color: #344054;
  font-size: 12px;
  text-transform: uppercase;
}

.badge {
  background: #e6f4f1;
  border-radius: 999px;
  color: #134e48;
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
}

.badge.neutral {
  background: #eef3f8;
  color: #425466;
}

.badge.status.online,
.badge.health.healthy {
  background: #dcfae6;
  color: #067647;
}

.badge.status.stale,
.badge.health.warning {
  background: #fef0c7;
  color: #93370d;
}

.badge.status.offline,
.badge.health.critical {
  background: #fee4e2;
  color: #b42318;
}

.badge.status.maintenance,
.badge.health.unknown {
  background: #e4e7ec;
  color: #344054;
}

.badge.status.requested,
.badge.status.agent_ready,
.badge.status.connecting,
.badge.status.connected,
.badge.status.queued,
.badge.status.picked_up {
  background: #d1e9ff;
  color: #175cd3;
}

.badge.status.completed {
  background: #dcfae6;
  color: #067647;
}

.badge.status.failed {
  background: #fee4e2;
  color: #b42318;
}

.badge.vulnerability.ok {
  background: #dcfae6;
  color: #067647;
}

.badge.vulnerability.low,
.badge.vulnerability.medium,
.badge.vulnerability.warning {
  background: #fef0c7;
  color: #93370d;
}

.badge.vulnerability.high,
.badge.vulnerability.critical {
  background: #fee4e2;
  color: #b42318;
}

.vulnerability-table td:last-child {
  max-width: 460px;
}

.filter-panel {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 180px) minmax(180px, 240px) auto;
  margin-bottom: 18px;
}

.filter-panel label {
  color: #344054;
  display: grid;
  font-weight: 700;
  gap: 7px;
}

.ticket-board-shell {
  margin: 0 auto;
  max-width: 1680px;
  padding: 12px 14px 28px;
}

.ticket-board {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 230px;
  min-height: 0;
}

.ticket-board-main {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

.ticket-board-title {
  align-items: end;
  background: linear-gradient(180deg, #ffffff, #f6fbfc);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px clamp(14px, 2vw, 22px);
}

.ticket-board-title h1 {
  font-size: 25px;
  margin: 4px 0 0;
}

.ticket-board-counts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ticket-board-counts span {
  background: #ffffff;
  border: 1px solid #dbe6eb;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  font-size: 12px;
  min-height: 28px;
  padding: 5px 8px;
}

.ticket-board-counts strong {
  color: var(--brand-teal-dark);
}

.ticket-board-toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 5px clamp(10px, 1.6vw, 16px);
}

.ticket-select-all {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  white-space: nowrap;
}

.ticket-select-all input,
.ticket-row-check {
  height: 14px;
  margin: 0;
  width: 14px;
}

.ticket-board-toolbar select,
.ticket-search-row input,
.ticket-filter-sidebar input,
.ticket-filter-sidebar select {
  background: #ffffff;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  min-height: 30px;
  min-width: 0;
  padding: 5px 8px;
  width: 100%;
}

.ticket-board-toolbar select {
  color: #314956;
  font-size: 12px;
  font-weight: 750;
  max-width: 188px;
}

.ticket-bulk-toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 16px;
}

.ticket-bulk-toolbar[hidden] {
  display: none;
}

.ticket-bulk-toolbar > span {
  color: #314956;
  font-size: 12px;
  font-weight: 850;
  margin-right: 4px;
}

.ticket-bulk-toolbar .ghost-button {
  min-height: 32px;
}

.ticket-bulk-toolbar .warning-action {
  border-color: #f6d49d;
  color: #a04b00;
}

.ticket-bulk-toolbar .danger-action {
  border-color: #f3b4aa;
  color: #b42318;
}

.ticket-bulk-dialog {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 37, 48, 0.28);
  color: var(--text);
  max-width: 460px;
  padding: 0;
  width: min(460px, calc(100vw - 28px));
}

.ticket-bulk-dialog::backdrop {
  background: rgba(15, 30, 38, 0.35);
}

.ticket-bulk-dialog form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.ticket-bulk-dialog header,
.ticket-bulk-dialog footer {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.ticket-bulk-dialog h2 {
  color: #263f4c;
  font-size: 18px;
  margin: 0;
}

.ticket-bulk-dialog p {
  color: #5d7380;
  line-height: 1.5;
  margin: 0;
}

.ticket-bulk-dialog label {
  color: #405966;
  display: grid;
  font-weight: 800;
  gap: 7px;
}

.ticket-bulk-dialog input,
.ticket-bulk-dialog select {
  background: #ffffff;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.ticket-bulk-dialog [data-close-dialog][aria-label] {
  background: #eef4f6;
  border: 1px solid #d3e0e6;
  color: #405966;
  font-size: 20px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.ticket-bulk-dialog footer {
  border-top: 1px solid #e3edf2;
  padding-top: 14px;
}

.ticket-bulk-dialog footer .warning-action {
  background: linear-gradient(180deg, #fff3dc, #ffe2ad);
  border: 1px solid #f6c16e;
  color: #8d4100;
}

.ticket-bulk-dialog footer .danger-action {
  background: linear-gradient(180deg, #fff1f0, #ffd9d4);
  border: 1px solid #f3a29a;
  color: #a61b12;
}

.ticket-toolbar-spacer {
  flex: 1;
}

.ticket-result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ticket-pagination {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

.ticket-pagination a,
.ticket-pagination span {
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd8df;
  color: #2b4652;
  display: inline-flex;
  font-size: 18px;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 30px;
}

.ticket-pagination a:hover {
  border-color: var(--brand-teal);
  color: var(--brand-teal-dark);
}

.ticket-pagination span {
  color: #a5b3ba;
}

.ticket-pagination strong {
  color: #405966;
  font-size: 11px;
  min-width: 42px;
  text-align: center;
}

.ghost-button {
  background: #ffffff;
  border: 1px solid #cbd8df;
  color: #2b4652;
  font-size: 12px;
  min-height: 30px;
  padding: 5px 9px;
}

.ghost-button:hover {
  border-color: var(--brand-teal);
  color: var(--brand-teal-dark);
}

.ticket-search-row {
  align-items: center;
  background: #f8fbfc;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 130px minmax(0, 1fr);
  padding: 8px clamp(10px, 1.6vw, 16px);
}

.ticket-search-row span {
  color: #405966;
  font-size: 13px;
  font-weight: 850;
}

.ticket-card-list {
  background: #f1f6f8;
  display: grid;
  gap: 6px;
  padding: 6px;
}

.ticket-list-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde8ed;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 16px 40px minmax(0, 1fr) minmax(210px, 320px);
  min-height: 78px;
  padding: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.ticket-list-card[data-href] {
  cursor: pointer;
}

.ticket-list-card:hover {
  border-color: #a9cfd8;
  box-shadow: 0 8px 28px rgba(20, 55, 68, 0.08);
  transform: translateY(-1px);
}

.ticket-list-card:focus-visible {
  border-color: #00869a;
  box-shadow: 0 0 0 3px rgba(0, 134, 154, 0.18);
  outline: none;
}

.ticket-list-card.ticket-state-resolved,
.ticket-list-card.ticket-state-closed {
  background: #f2f5f7;
  border-color: #d8e1e6;
}

.ticket-list-card.ticket-state-resolved .ticket-avatar,
.ticket-list-card.ticket-state-closed .ticket-avatar {
  background: #e1e7eb;
  border-color: #d0dbe1;
  color: #6b7d87;
}

.ticket-list-card.ticket-state-resolved .ticket-list-title,
.ticket-list-card.ticket-state-closed .ticket-list-title,
.ticket-list-card.ticket-state-resolved .ticket-list-content p,
.ticket-list-card.ticket-state-closed .ticket-list-content p,
.ticket-list-card.ticket-state-resolved .ticket-list-content small,
.ticket-list-card.ticket-state-closed .ticket-list-content small,
.ticket-list-card.ticket-state-resolved .ticket-list-meta,
.ticket-list-card.ticket-state-closed .ticket-list-meta {
  color: #7a8991;
}

.ticket-avatar {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.avatar-tone-0 {
  background: #e2f5f8;
  color: #087487;
}

.avatar-tone-1 {
  background: #fff0df;
  color: #b54708;
}

.avatar-tone-2 {
  background: #e9e5ff;
  color: #53389e;
}

.avatar-tone-3 {
  background: #dcfae6;
  color: #067647;
}

.avatar-tone-4 {
  background: #ffe4e8;
  color: #c01048;
}

.ticket-list-content {
  min-width: 0;
}

.ticket-list-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.ticket-response-badge {
  background: #0b46c4;
  border-radius: 5px;
  color: #ffffff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  padding: 4px 7px;
  white-space: nowrap;
}

.ticket-list-title {
  color: #263f4c;
  display: inline-block;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  max-width: 100%;
}

.ticket-list-title span {
  color: #6b7d87;
  font-weight: 750;
}

.ticket-list-content p {
  color: #5d7380;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  margin: 4px 0 0;
}

.ticket-list-content small {
  color: #788a94;
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.ticket-list-meta {
  align-content: center;
  color: #445f6c;
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  justify-items: start;
  min-width: 0;
}

.ticket-list-meta span {
  max-width: 100%;
}

.ticket-priority {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.ticket-priority::before {
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.ticket-priority.priority-low::before {
  background: #8ddb66;
}

.ticket-priority.priority-normal::before {
  background: var(--brand-teal);
}

.ticket-priority.priority-high::before {
  background: var(--brand-orange);
}

.ticket-priority.priority-critical::before {
  background: #d92d20;
}

.badge.status.open {
  background: #e4f4ff;
  color: #0b5cab;
}

.badge.status.in_progress {
  background: #fff2d7;
  color: #8f4e00;
}

.badge.status.resolved {
  background: #dcfae6;
  color: #067647;
}

.badge.status.closed {
  background: #edf1f5;
  color: #425466;
}

.ticket-empty-list {
  background: #ffffff;
  border: 1px dashed #bbccd4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  justify-items: start;
  margin: 10px;
  padding: 28px;
}

.ticket-empty-list h2,
.ticket-empty-list p {
  margin: 0;
}

.ticket-filter-sidebar {
  background: #ffffff;
  border: 1px solid #d6e3e8;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 9px;
  position: sticky;
  top: 66px;
  width: 230px;
}

.ticket-filter-header {
  align-items: flex-start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.ticket-filter-header div {
  display: grid;
  gap: 1px;
}

.ticket-filter-header span,
.ticket-filter-sidebar label span {
  color: #526b78;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ticket-filter-header strong {
  color: var(--brand-teal-dark);
  font-size: 11px;
}

.ticket-filter-header a {
  color: var(--brand-teal);
  font-size: 10px;
  font-weight: 850;
}

.ticket-filter-sidebar label {
  display: grid;
  gap: 4px;
}

.ticket-filter-sidebar .full-width {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 9px;
  width: 100%;
}

.client-board-shell {
  margin: 0 auto;
  max-width: 1680px;
  padding: 12px 14px 28px;
}

.client-board {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 240px;
  min-height: 0;
}

.client-board-main {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.client-board-title {
  align-items: end;
  background: linear-gradient(180deg, #ffffff, #f6fbfc);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px clamp(14px, 2vw, 22px);
}

.client-board-title h1 {
  font-size: 25px;
  margin: 4px 0 0;
}

.client-board-counts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.client-board-counts span {
  background: #ffffff;
  border: 1px solid #dbe6eb;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
}

.client-board-counts strong {
  color: var(--brand-teal-dark);
}

.client-board-toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 5px clamp(10px, 1.6vw, 16px);
}

.client-board-toolbar > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.client-board-toolbar select,
.client-search-row input,
.client-filter-sidebar select {
  background: #ffffff;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  min-height: 30px;
  min-width: 0;
  padding: 5px 8px;
  width: 100%;
}

.client-board-toolbar select {
  color: #314956;
  font-weight: 750;
  max-width: 188px;
}

.client-toolbar-spacer {
  flex: 1;
}

.client-result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.compact-button {
  font-size: 12px;
  min-height: 30px;
  padding: 6px 10px;
  white-space: nowrap;
}

.client-search-row {
  align-items: center;
  background: #f8fbfc;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 130px minmax(0, 1fr);
  padding: 8px clamp(10px, 1.6vw, 16px);
}

.client-search-row span {
  color: #405966;
  font-size: 13px;
  font-weight: 850;
}

.client-card-list {
  background: #f1f6f8;
  display: grid;
  gap: 5px;
  padding: 5px;
}

.client-list-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde8ed;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(210px, 1.15fr) minmax(175px, 0.9fr) minmax(230px, 1fr) minmax(130px, 0.48fr);
  min-height: 62px;
  padding: 8px 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.client-list-card:hover {
  border-color: #a9cfd8;
  box-shadow: 0 8px 28px rgba(20, 55, 68, 0.08);
  transform: translateY(-1px);
}

.client-list-card.client-state-archived {
  background: #f2f5f7;
  border-color: #d8e1e6;
}

.client-list-card.client-state-paused {
  background: #fffaf2;
  border-color: #f4ddba;
}

.client-avatar {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.client-list-identity,
.client-list-contact,
.client-list-scope,
.client-list-status {
  min-width: 0;
}

.client-list-title {
  color: #263f4c;
  display: inline-block;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-identity p,
.client-list-scope p {
  color: #5d7380;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-identity small,
.client-list-scope small,
.client-list-contact span,
.client-list-status span {
  color: #788a94;
  display: block;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-contact {
  display: grid;
  gap: 2px;
}

.client-list-contact strong {
  color: #365260;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.client-service-pills span {
  background: var(--accent-soft);
  border: 1px solid #cae6ed;
  border-radius: 999px;
  color: var(--brand-teal-dark);
  font-size: 10px;
  font-weight: 800;
  max-width: 130px;
  overflow: hidden;
  padding: 2px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-list-status {
  align-content: center;
  display: grid;
  gap: 3px;
  justify-items: start;
}

.badge.status.active {
  background: #dcfae6;
  color: #067647;
}

.badge.status.paused {
  background: #fff2d7;
  color: #8f4e00;
}

.badge.status.archived {
  background: #edf1f5;
  color: #425466;
}

.client-empty-list {
  background: #ffffff;
  border: 1px dashed #bbccd4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  justify-items: start;
  margin: 10px;
  padding: 28px;
}

.client-empty-list h2,
.client-empty-list p {
  margin: 0;
}

.client-filter-sidebar {
  background: #ffffff;
  border: 1px solid #d6e3e8;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 9px;
  position: sticky;
  top: 66px;
  width: 240px;
}

.client-filter-header {
  align-items: flex-start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.client-filter-header div {
  display: grid;
  gap: 1px;
}

.client-filter-header span,
.client-filter-sidebar label span {
  color: #526b78;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-filter-header strong {
  color: var(--brand-teal-dark);
  font-size: 11px;
}

.client-filter-header a {
  color: var(--brand-teal);
  font-size: 10px;
  font-weight: 850;
}

.client-filter-sidebar label {
  display: grid;
  gap: 4px;
}

.client-filter-sidebar .full-width {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 9px;
  width: 100%;
}

.device-board-shell {
  margin: 0 auto;
  max-width: 1680px;
  padding: 12px 14px 28px;
}

.device-board {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 240px;
  min-height: 0;
}

.device-board-main {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.device-board-title {
  align-items: end;
  background: linear-gradient(180deg, #ffffff, #f6fbfc);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px clamp(14px, 2vw, 22px);
}

.device-board-title h1 {
  font-size: 25px;
  margin: 4px 0 0;
}

.device-board-counts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.device-board-counts span {
  background: #ffffff;
  border: 1px solid #dbe6eb;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
}

.device-board-counts strong {
  color: var(--brand-teal-dark);
}

.device-board-toolbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 5px clamp(10px, 1.6vw, 16px);
}

.device-board-toolbar > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.device-board-toolbar select,
.device-search-row input,
.device-filter-sidebar input,
.device-filter-sidebar select {
  background: #ffffff;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  min-height: 30px;
  min-width: 0;
  padding: 5px 8px;
  width: 100%;
}

.device-board-toolbar select {
  color: #314956;
  font-weight: 750;
  max-width: 188px;
}

.device-toolbar-spacer {
  flex: 1;
}

.device-result-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.device-search-row {
  align-items: center;
  background: #f8fbfc;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 130px minmax(0, 1fr);
  padding: 8px clamp(10px, 1.6vw, 16px);
}

.device-search-row span {
  color: #405966;
  font-size: 13px;
  font-weight: 850;
}

.device-card-list {
  background: #f1f6f8;
  display: grid;
  gap: 6px;
  padding: 6px;
}

.device-list-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde8ed;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(220px, 1.1fr) minmax(185px, 0.82fr) minmax(240px, 1fr) minmax(190px, 0.82fr) minmax(185px, 0.72fr);
  min-height: 78px;
  padding: 11px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.device-list-card[data-href] {
  cursor: pointer;
}

.device-list-card:hover {
  border-color: #a9cfd8;
  box-shadow: 0 8px 28px rgba(20, 55, 68, 0.08);
  transform: translateY(-1px);
}

.device-list-card:focus-visible {
  border-color: #00869a;
  box-shadow: 0 0 0 3px rgba(0, 134, 154, 0.18);
  outline: none;
}

.device-list-card.device-state-offline {
  background: #f5f7f8;
  border-color: #d8e1e6;
}

.device-list-card.device-state-stale {
  background: #fffaf2;
  border-color: #f4ddba;
}

.device-avatar {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.device-list-identity,
.device-list-owner,
.device-list-system,
.device-list-remote,
.device-list-status {
  min-width: 0;
}

.device-list-title {
  color: #263f4c;
  display: inline-block;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-list-identity p {
  color: #5d7380;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-list-identity small,
.device-list-owner span,
.device-list-system span,
.device-list-remote span,
.device-list-status span {
  color: #788a94;
  display: block;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-list-owner,
.device-list-system,
.device-list-remote {
  display: grid;
  gap: 4px;
}

.device-list-owner strong,
.device-list-system strong,
.device-list-remote strong {
  color: #365260;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-list-status {
  align-content: center;
  display: grid;
  gap: 6px;
  justify-items: start;
}

.device-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.device-list-actions .ghost-button,
.device-list-actions .compact-button {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  min-height: 28px;
  padding: 5px 9px;
}

.device-empty-list {
  background: #ffffff;
  border: 1px dashed #bbccd4;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  justify-items: start;
  margin: 10px;
  padding: 28px;
}

.device-empty-list h2,
.device-empty-list p {
  margin: 0;
}

.device-filter-sidebar {
  background: #ffffff;
  border: 1px solid #d6e3e8;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 9px;
  position: sticky;
  top: 66px;
  width: 240px;
}

.device-filter-header {
  align-items: flex-start;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.device-filter-header div {
  display: grid;
  gap: 1px;
}

.device-filter-header span,
.device-filter-sidebar label span {
  color: #526b78;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.device-filter-header strong {
  color: var(--brand-teal-dark);
  font-size: 11px;
}

.device-filter-header a {
  color: var(--brand-teal);
  font-size: 10px;
  font-weight: 850;
}

.device-filter-sidebar label {
  display: grid;
  gap: 4px;
}

.device-filter-sidebar .full-width {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 9px;
  width: 100%;
}

.ticket-detail-shell {
  margin: 0 auto;
  max-width: 1840px;
  padding: 0 0 24px;
}

.ticket-detail-layout {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(235px, 255px) minmax(255px, 285px);
  min-height: calc(100vh - 54px);
}

.ticket-conversation {
  background: #ffffff;
  border-right: 1px solid #d9e5eb;
  min-height: calc(100vh - 54px);
  min-width: 0;
  padding: 18px 28px 42px;
}

.ticket-detail-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
}

.ticket-detail-heading > div {
  min-width: 0;
}

.ticket-export-button {
  align-items: center;
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 124, 137, 0.16);
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  justify-content: center;
  margin-left: auto;
  min-height: 34px;
  padding: 8px 12px;
  white-space: nowrap;
}

.ticket-export-button:hover,
.ticket-export-button:focus {
  color: #ffffff;
  filter: brightness(1.05);
  outline: 2px solid rgba(244, 123, 32, 0.32);
  outline-offset: 2px;
}

.ticket-back-link {
  align-items: center;
  background: #f1f6f8;
  border: 1px solid #d6e3e8;
  border-radius: 8px;
  color: #344b57;
  display: inline-flex;
  font-size: 22px;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.ticket-detail-heading h1 {
  color: #234251;
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 12px;
}

.ticket-heading-meta {
  align-items: center;
  color: #657985;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 750;
  gap: 8px;
}

.ticket-source-pill {
  background: #d8f5ea;
  border-radius: 4px;
  color: #087d63;
  display: inline-flex;
  font-size: 11px;
  padding: 3px 8px;
}

.ticket-source-icon {
  align-items: center;
  background: #eef6f8;
  border: 1px solid #cfe3ea;
  border-radius: 999px;
  color: #315463;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 850;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  white-space: nowrap;
}

.ticket-source-icon svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 15px;
}

.ticket-source-icon.compact {
  border-radius: 8px;
  min-height: 24px;
  padding: 3px 7px;
}

.ticket-source-icon.compact span {
  display: none;
}

.ticket-source-icon.source-mail {
  background: #eef4ff;
  border-color: #c8d7ff;
  color: #3158d4;
}

.ticket-source-icon.source-web {
  background: #e9f8fb;
  border-color: #bae3eb;
  color: var(--brand-teal-dark);
}

.ticket-source-icon.source-agent {
  background: #fff0df;
  border-color: #ffd2a3;
  color: #b54708;
}

.ticket-source-icon.source-unknown {
  background: #f2f5f7;
  border-color: #d5dfe5;
  color: #526b78;
}

.ticket-message-card {
  align-items: flex-start;
  border: 1px solid #dbe8ee;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(20, 55, 68, 0.05);
  display: grid;
  gap: 14px;
  grid-template-columns: 34px minmax(0, 1fr);
  margin-bottom: 18px;
  max-width: 880px;
  overflow: hidden;
  padding: 14px 16px;
  position: relative;
  width: 100%;
}

.ticket-message-card::before {
  border-radius: 12px 0 0 12px;
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.ticket-message-card.customer-message {
  background: #ffffff;
  border-color: #d8e6ec;
}

.ticket-message-card.customer-message::before {
  background: var(--brand-orange);
}

.ticket-message-card.consultant-message {
  background: #eef9fb;
  border-color: #bfe3eb;
}

.ticket-message-card.consultant-message::before {
  background: var(--brand-teal);
}

.ticket-message-card.private-message {
  background: #fff8e8;
  border-color: #f4ca7e;
}

.ticket-message-card.private-message::before {
  background: #e5a100;
}

.ticket-message-card.private-message .ticket-message-body {
  background: transparent;
  border-color: transparent;
}

.ticket-message-card.forward-message {
  background: #f5f8ff;
  border-color: #cbd8ff;
}

.ticket-message-card.forward-message::before {
  background: #3158d4;
}

.ticket-message-card.forward-message .ticket-message-avatar {
  background: #dfe8ff;
  border-color: #b9c9ff;
  color: #2649b9;
}

.ticket-message-card.forward-message .ticket-message-meta strong {
  color: #2649b9;
}

.ticket-message-card.system-message {
  background: #fff5f1;
  border-color: #f4b399;
}

.ticket-message-card.system-message::before {
  background: #f26a21;
}

.ticket-message-card.system-message .ticket-message-avatar {
  background: #ffe0d2;
  border-color: #f4a37e;
  color: #9b2f00;
}

.ticket-message-card.system-message .ticket-message-meta strong {
  color: #9b2f00;
}

.ticket-message-card.system-message pre {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #f2c8b8;
  border-radius: 6px;
  color: #263f4c;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  max-width: 100%;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.ticket-message-avatar {
  align-items: center;
  background: #ffe4c4;
  border: 1px solid #f4c790;
  border-radius: 999px;
  color: #9a4a00;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.ticket-message-card.customer-message .ticket-message-avatar {
  background: #ffe4c4;
  border-color: #f4c790;
  color: #9a4a00;
}

.ticket-message-card.consultant-message .ticket-message-avatar {
  background: #d8f5fb;
  border-color: #9ed9e5;
  color: var(--brand-teal-dark);
}

.ticket-message-card.private-message .ticket-message-avatar {
  background: #fff0c7;
  border-color: #efbd55;
  color: #8a4b00;
}

.ticket-message-body {
  max-width: 100%;
  min-width: 0;
}

.ticket-message-meta {
  align-items: center;
  color: #6b7f8a;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 7px;
  margin-bottom: 10px;
}

.ticket-message-meta strong {
  color: #3158d4;
}

.ticket-message-card.customer-message .ticket-message-meta strong {
  color: #3158d4;
}

.ticket-message-card.consultant-message .ticket-message-meta strong {
  color: var(--brand-teal-dark);
}

.ticket-message-card.private-message .ticket-message-meta strong {
  color: #8a4b00;
}

.ticket-message-to {
  color: #5e7280;
  font-size: 12px;
  font-weight: 750;
  margin: 0 0 18px;
}

.ticket-mail-content {
  background: transparent;
  border-radius: 4px;
  color: #263f4c;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.ticket-mail-content img,
.ticket-message-body img {
  height: auto;
  max-width: 100%;
}

.ticket-mail-content *,
.ticket-description * {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0 !important;
}

.ticket-mail-content table,
.ticket-description table {
  border-collapse: collapse;
  table-layout: auto;
  width: auto !important;
}

.ticket-mail-content table[width="100%"],
.ticket-description table[width="100%"] {
  width: 100% !important;
}

.ticket-mail-content td,
.ticket-mail-content th,
.ticket-description td,
.ticket-description th {
  overflow-wrap: anywhere;
  vertical-align: top;
  word-break: break-word;
}

.ticket-quoted-details {
  border-left: 2px solid #cfe3ea;
  margin-top: 8px;
  padding-left: 10px;
}

.ticket-quoted-toggle {
  align-items: center;
  background: #eef6f8;
  border: 1px solid #cfe3ea;
  border-radius: 999px;
  color: #536b77;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  letter-spacing: 1px;
  line-height: 1;
  list-style: none;
  margin: 2px 0 8px;
  padding: 0 10px 2px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  width: max-content;
}

.ticket-quoted-toggle::-webkit-details-marker {
  display: none;
}

.ticket-quoted-toggle::marker {
  content: "";
}

.ticket-quoted-toggle:hover,
.ticket-quoted-details[open] > .ticket-quoted-toggle {
  background: #dff0f5;
  border-color: #9bc8d6;
  color: var(--brand-teal-dark);
}

.ticket-quoted-content {
  background: #f6fafb;
  border: 1px solid #dce7ec;
  border-radius: 8px;
  color: #526a76;
  margin: 4px 0 0;
  padding: 12px;
}

.ticket-reply-panel {
  border-top: 1px solid #dce7ec;
  display: grid;
  gap: 12px;
  margin-top: 26px;
  max-width: 880px;
  padding-top: 18px;
}

.ticket-reply-panel h2 {
  color: #263f4c;
  font-size: 16px;
  margin: 0;
}

.ticket-reply-panel form {
  display: grid;
  gap: 10px;
}

.ticket-reply-panel textarea {
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.ticket-reply-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.ticket-reply-actions select {
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

.ticket-composer {
  margin-top: 28px;
  max-width: 1180px;
}

.composer-shell {
  background: #ffffff;
  border: 1px solid #bfe0ff;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(30, 97, 161, 0.06);
  display: grid;
  gap: 12px;
  padding: 14px 14px 12px;
  position: relative;
}

.composer-shell:focus-within {
  border-color: #8fc6ff;
  box-shadow: 0 0 0 3px rgba(43, 128, 255, 0.12);
}

.composer-mode-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-right: 76px;
}

.composer-mode {
  align-items: center;
  background: #f8fafc;
  border: 0;
  border-radius: 8px;
  color: #526273;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
}

.composer-mode svg,
.composer-send svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.composer-mode svg {
  height: 20px;
  width: 20px;
}

.composer-mode:hover,
.composer-mode.is-active {
  background: #e7f3ff;
  color: #2c6ee8;
  box-shadow: inset 0 0 0 1px #b9ddff;
}

.composer-forward-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 120px minmax(240px, 1fr);
  padding-right: 76px;
}

.composer-forward-row[hidden],
.composer-copy-fields[hidden] {
  display: none !important;
}

.composer-forward-row span {
  color: #526273;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.composer-forward-row input {
  border: 1px solid #cbd8df;
  border-radius: 8px;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

.composer-copy-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  padding-right: 76px;
}

.composer-copy-fields label {
  display: grid;
  gap: 6px;
}

.composer-copy-fields span {
  color: #526273;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.composer-copy-fields input {
  border: 1px solid #cbd8df;
  border-radius: 8px;
  font: inherit;
  min-height: 38px;
  padding: 8px 10px;
}

.composer-toolbar {
  align-items: center;
  background: #f7fbfd;
  border: 1px solid #d9e8ef;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-right: 76px;
  padding: 5px 7px;
}

.composer-toolbar button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--brand-navy);
  cursor: pointer;
  font-weight: 800;
  min-height: 28px;
  padding: 2px 8px;
}

.composer-toolbar button:hover,
.composer-toolbar button:focus {
  background: rgba(10, 129, 151, 0.1);
  color: var(--brand-teal-dark);
  outline: none;
}

.composer-editor.rich-text-surface {
  color: #263f4c;
  min-height: 360px;
  padding: 4px 76px 4px 10px;
}

.composer-shell.is-idle .composer-editor.rich-text-surface {
  min-height: 170px;
}

.composer-send {
  align-items: center;
  background: #aeb9c6;
  border: 0;
  border-radius: 10px;
  bottom: 14px;
  box-shadow: none;
  color: #edf2f5;
  cursor: not-allowed;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  opacity: 0.72;
  position: absolute;
  right: 14px;
  transition: background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
  width: 46px;
}

.composer-send:not(:disabled) {
  background: linear-gradient(180deg, #0f99b1, var(--brand-teal-dark));
  box-shadow: 0 7px 16px rgba(6, 95, 115, 0.3);
  color: #ffffff;
  cursor: pointer;
  opacity: 1;
}

.composer-send:not(:disabled):hover,
.composer-send:not(:disabled):focus-visible {
  background: linear-gradient(180deg, #18abc4, #08748a);
  box-shadow: 0 9px 20px rgba(6, 95, 115, 0.38);
  outline: none;
  transform: translateY(-1px);
}

.composer-send:disabled:hover,
.composer-send:disabled:focus {
  background: #aeb9c6;
  box-shadow: none;
  outline: none;
  transform: none;
}

.composer-send svg {
  height: 24px;
  width: 24px;
}

.ticket-properties-panel,
.ticket-context-panel {
  background: #ffffff;
  border-right: 1px solid #d9e5eb;
  min-height: calc(100vh - 54px);
  min-width: 0;
  overflow: hidden;
  padding: 16px 14px;
}

.ticket-context-panel {
  border-right: 0;
}

.ticket-status-card,
.ticket-side-section {
  border-bottom: 1px solid #e3edf2;
  padding: 0 0 18px;
}

.ticket-side-section + .ticket-side-section,
.ticket-status-card + .ticket-side-section {
  margin-top: 18px;
}

.ticket-status-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ticket-status-title strong {
  color: #263f4c;
  font-size: 16px;
}

.ticket-status-card dl,
.ticket-side-section dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.ticket-status-card dl div,
.ticket-side-section dl div {
  display: grid;
  gap: 4px;
}

.ticket-status-card dd,
.ticket-side-section dd {
  color: #405966;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.ticket-side-section h2,
.ticket-side-heading h2 {
  color: #5c7280;
  font-size: 13px;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.ticket-side-section label {
  color: #5c7280;
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
  margin-bottom: 12px;
}

.ticket-side-section input,
.ticket-side-section select {
  background: #ffffff;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 36px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.ticket-side-section input[readonly] {
  background: #f6fafb;
  color: #667985;
}

.ticket-side-section .full-width {
  width: 100%;
}

.ticket-side-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.ticket-side-heading a,
.ticket-muted-link {
  color: #3158d4;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ticket-side-hint {
  color: #728592;
  font-size: 11px;
  font-weight: 700;
  margin: -8px 0 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr);
  margin-bottom: 18px;
}

.contact-card strong,
.contact-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card strong {
  color: #3158d4;
}

.contact-card span {
  color: #667985;
  font-size: 12px;
}

.ticket-source-details {
  border-top: 1px solid #e2edf2;
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
}

.ticket-source-details div {
  min-width: 0;
}

.ticket-source-details dt {
  color: #6a7e89;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.ticket-source-details dd {
  color: #314b58;
  font-size: 12px;
  font-weight: 750;
  margin: 0;
  overflow-wrap: anywhere;
}

.ticket-device-list {
  display: grid;
  gap: 10px;
}

.ticket-device-card {
  background: #f6fafb;
  border: 1px solid #d7e5eb;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.ticket-device-card a {
  color: #0b7484;
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin: 2px 0 4px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.ticket-device-card small {
  color: #647985;
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ticket-device-relation {
  color: #6a7e89;
  display: block;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-device-card-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.sensitive-section {
  border: 1px solid #d6e5ec;
  border-radius: 8px;
  margin-top: 18px;
  overflow: hidden;
}

.sensitive-section summary {
  align-items: center;
  background: #eef7f9;
  color: var(--brand-navy);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 12px 14px;
}

.sensitive-section summary::-webkit-details-marker {
  display: none;
}

.sensitive-section summary::after {
  color: var(--brand-teal-dark);
  content: "Pokaż";
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sensitive-section[open] summary::after {
  content: "Ukryj";
}

.sensitive-section summary span {
  font-size: 18px;
  font-weight: 900;
}

.sensitive-section summary small {
  color: #607784;
  font-size: 12px;
  font-weight: 750;
  margin-left: auto;
}

.table-scroll {
  overflow-x: auto;
  scrollbar-color: #8fc6d1 #ffffff;
  scrollbar-gutter: stable;
}

.table-scroll table {
  min-width: 760px;
}

.sensitive-value {
  word-break: break-all;
}

.manual-license-panel,
.auto-license-panel {
  padding: 16px;
}

.manual-license-panel {
  background: #f9fcfd;
  border-bottom: 1px solid #d6e5ec;
}

.manual-license-panel h3,
.auto-license-panel h3 {
  color: var(--brand-navy);
  font-size: 15px;
  margin: 0 0 12px;
}

.manual-license-create,
.manual-license-edit {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.5fr) minmax(145px, 0.55fr) auto;
}

.manual-license-create label,
.manual-license-edit label {
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  min-width: 0;
}

.manual-license-create input,
.manual-license-edit input {
  min-width: 0;
  width: 100%;
}

.manual-license-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.manual-license-item {
  background: #fff;
  border: 1px solid #d6e5ec;
  border-radius: 6px;
  min-width: 0;
  padding: 0 12px;
}

.manual-license-item summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
}

.manual-license-item summary > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.manual-license-item summary code {
  color: #385563;
  overflow-wrap: anywhere;
  white-space: normal;
}

.manual-license-item summary small {
  color: #607784;
  flex: 0 0 auto;
}

.manual-license-edit {
  border-top: 1px solid #e3edf1;
  padding: 12px 0;
}

.manual-license-delete {
  border-top: 1px solid #edf2f5;
  padding: 0 0 12px;
}

.manual-license-delete button {
  width: auto;
}

.auto-license-panel {
  background: #fff;
}

@media (max-width: 980px) {
  .manual-license-create,
  .manual-license-edit {
    grid-template-columns: 1fr 1fr;
  }

  .manual-license-create button,
  .manual-license-edit button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .manual-license-create,
  .manual-license-edit {
    grid-template-columns: 1fr;
  }

  .manual-license-item summary {
    align-items: start;
    flex-direction: column;
  }
}

.ticket-timeline {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.ticket-timeline li {
  background: #f7fbfc;
  border: 1px solid #d9e8ee;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  grid-template-columns: 10px minmax(0, 1fr);
  padding: 9px 10px;
}

.ticket-timeline li.is-current {
  background: #eef9f6;
  border-color: #bfe8df;
}

.ticket-timeline li > span {
  background: #a7e879;
  border-radius: 999px;
  height: 8px;
  margin-top: 5px;
  width: 8px;
}

.ticket-timeline strong,
.ticket-timeline a {
  color: #3158d4;
  display: -webkit-box;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ticket-timeline small {
  color: #647985;
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
}

.ticket-timeline-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collapsed-side-section {
  padding-bottom: 14px;
}

.collapsed-side-section h2 {
  margin: 0;
}

.clients-filter {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) auto;
}

.device-table td:first-child {
  min-width: 210px;
}

.device-layout,
.client-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.summary-strip {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: -2px -2px 22px;
  padding-bottom: 18px;
}

.summary-strip div,
.kv-grid div {
  min-width: 0;
}

.summary-strip dd,
.kv-grid dd {
  overflow-wrap: anywhere;
}

.kv-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 10px 0 24px;
}

.kv-grid div {
  border-top: 1px solid #e4e8ef;
  display: grid;
  gap: 5px;
  padding-top: 10px;
}

.detail-main h2 {
  margin-top: 28px;
}

.split-tables {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form {
  gap: 12px;
  padding: 0 0 20px;
}

.client-form {
  gap: 26px;
}

.client-form.embedded {
  padding: 0;
}

.client-form section {
  display: grid;
  gap: 12px;
}

.agent-section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 20px;
}

.section-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.compact-table {
  font-size: 13px;
}

.compact-table small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.command-result {
  min-width: 280px;
}

.command-result summary {
  cursor: pointer;
  font-weight: 700;
}

.command-result-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 220px;
}

.ip-scan-network {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 10px;
}

.ip-scan-network .compact-table {
  margin-top: 8px;
}

.ip-scan-page {
  max-width: 1440px;
}

.ip-scan-summary-panel {
  margin-bottom: 18px;
}

.ip-scan-network-panel {
  margin-bottom: 18px;
}

.ip-scan-network-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ip-scan-network-header h2 {
  margin: 0;
}

.ip-scan-network-header p {
  color: var(--muted);
  margin: 4px 0 0;
}

.ip-scan-result-table td,
.ip-scan-result-table th {
  vertical-align: top;
}

.ip-scan-result-table .mono {
  white-space: nowrap;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-chip {
  background: #eef8fa;
  border: 1px solid #cfe8ee;
  border-radius: 6px;
  color: #153745;
  display: inline-flex;
  line-height: 1.3;
  margin: 0 6px 6px 0;
  padding: 4px 7px;
}

.pill {
  background: #eef3f8;
  border: 1px solid #d5deea;
  border-radius: 6px;
  color: #344054;
  display: inline-flex;
  font-size: 12px;
  line-height: 1.2;
  padding: 4px 6px;
}

.snmp-summary {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.snmp-summary small,
.snmp-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.registry-browser-page {
  max-width: 1440px;
}

.registry-toolbar-panel,
.registry-current-panel {
  margin-bottom: 18px;
}

.registry-toolbar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) minmax(160px, 220px) minmax(120px, 160px) auto;
}

.registry-path-field {
  min-width: 260px;
}

.registry-quick-actions,
.registry-current-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.registry-quick-actions {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}

.registry-current-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.registry-current-header h2 {
  margin: 0;
}

.registry-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
}

.registry-table td,
.registry-table th {
  vertical-align: top;
}

.registry-explorer-page {
  display: grid;
  gap: 14px;
}

.registry-explorer-title {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.registry-explorer-toolbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 180px) minmax(320px, 1fr) auto auto;
}

.registry-explorer-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.4fr);
  min-height: 620px;
}

.registry-tree-pane,
.registry-values-pane {
  min-width: 0;
  overflow: hidden;
}

.registry-pane-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: -4px -4px 10px;
  padding: 0 0 10px;
}

.registry-pane-header h2 {
  margin: 0;
}

.registry-tree {
  background: #fff;
  border: 1px solid var(--line);
  height: 560px;
  overflow: auto;
  padding: 6px;
}

.registry-tree-node {
  align-items: center;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 28px;
  padding-left: calc(var(--level, 0) * 18px);
}

.registry-tree-node.selected {
  background: #eaf2ff;
  outline: 1px solid #b9d3ff;
}

.registry-tree-twist,
.registry-tree-name {
  background: transparent;
  border: 0;
  color: var(--text);
  min-height: 26px;
  padding: 0;
  text-align: left;
}

.registry-tree-twist {
  color: #64748b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.registry-tree-name {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-tree-node:hover {
  background: #f4f8fc;
}

.registry-values-table {
  table-layout: fixed;
}

.registry-values-table th:nth-child(1),
.registry-values-table td:nth-child(1) {
  width: 28%;
}

.registry-values-table th:nth-child(2),
.registry-values-table td:nth-child(2) {
  width: 18%;
}

.registry-status-panel {
  margin-top: 0;
}

.file-transfer-page {
  max-width: 1500px;
  min-width: 0;
  width: 100%;
}

.file-transfer-page .intro h1 {
  font-size: clamp(34px, 4vw, 50px);
  overflow-wrap: anywhere;
}

.file-transfer-toolbar {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  min-width: 0;
  padding: 16px;
}

.file-transfer-location-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  min-width: 0;
}

.file-transfer-field {
  color: #344954;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  min-width: 0;
}

.file-transfer-field input,
.file-transfer-field select {
  background: #ffffff;
  border: 1px solid #b9ccd4;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.file-transfer-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.file-transfer-toolbar-actions button {
  white-space: nowrap;
}

.file-transfer-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  min-width: 0;
}

.file-transfer-pane {
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}

.file-pane-header {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.file-pane-header h2 {
  margin: 0;
}

.file-drop-zone {
  align-items: center;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-bottom: 12px;
  min-height: 150px;
  padding: 18px;
  text-align: center;
}

.file-drop-zone input[type="file"] {
  max-width: 100%;
}

.file-drop-zone.dragging {
  background: var(--accent-soft);
  border-color: var(--brand-teal);
  color: var(--brand-teal-dark);
}

.file-transfer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.file-transfer-table td,
.file-transfer-table th {
  vertical-align: top;
}

.file-transfer-table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
  width: 100%;
}

.file-transfer-table {
  margin: 0;
  width: 100%;
}

.local-file-table-scroll .file-transfer-table {
  min-width: 420px;
}

.remote-file-table-scroll .file-transfer-table {
  min-width: 680px;
}

.file-row {
  cursor: pointer;
}

.file-row.selected {
  background: var(--accent-soft);
  outline: 2px solid var(--brand-teal);
  outline-offset: -2px;
}

.file-transfer-log-panel {
  margin-top: 18px;
  padding: 18px;
}

.file-transfer-log {
  background: #0b1220;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  color: #dbeafe;
  display: grid;
  gap: 4px;
  max-height: 180px;
  min-height: 80px;
  overflow: auto;
  padding: 12px;
}

.empty-state,
.hint {
  color: var(--muted);
  line-height: 1.5;
}

.token-copy {
  border: 1px solid #cbd3df;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.secret-value {
  white-space: nowrap;
}

.wrap-text {
  overflow-wrap: anywhere;
  white-space: normal;
}

.console-output {
  background: #0b1220;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  color: #dbeafe;
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  max-height: 520px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
  width: 100%;
}

.rmm-tool-form {
  border-top: 1px solid #e4e8ef;
  gap: 10px;
  margin-top: 10px;
  padding: 14px 0 18px;
}

.rmm-tool-form textarea {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.alert {
  border-radius: 8px;
  font-weight: 700;
  padding: 12px 14px;
}

.danger-alert {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rmm-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.rmm-action-form {
  display: grid;
  margin: 0;
  padding: 0;
}

.rmm-action-button {
  gap: 10px;
  min-height: 44px;
  padding: 11px 16px;
  width: 100%;
}

.rmm-action-button svg {
  flex: 0 0 18px;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.rmm-action-button span {
  display: inline-block;
  line-height: 1.1;
}

.rustdesk-launch-button {
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
}

@media (max-width: 980px) {
  .admin-ticket-create-hero,
  .admin-ticket-create-layout {
    grid-template-columns: 1fr;
  }

  .admin-ticket-create-hero {
    align-items: stretch;
    display: grid;
  }

  .admin-ticket-create-hero .button {
    justify-self: start;
  }

  .admin-ticket-create-side {
    position: static;
  }

  .admin-ticket-form-grid {
    grid-template-columns: 1fr;
  }

  .registry-toolbar,
  .registry-grid,
  .registry-explorer-toolbar,
  .registry-explorer-layout,
  .file-transfer-layout {
    grid-template-columns: 1fr;
  }

  .file-transfer-toolbar,
  .file-transfer-location-fields {
    grid-template-columns: 1fr;
  }

  .file-transfer-toolbar-actions {
    justify-content: flex-start;
  }

  .registry-explorer-title {
    display: grid;
  }

  .registry-tree {
    height: 360px;
  }

  .registry-current-header {
    display: grid;
  }

  .cookie-consent-card {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .cookie-preferences {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .file-transfer-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-transfer-toolbar-actions button,
  .file-transfer-actions button {
    width: 100%;
  }

  .file-transfer-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }
}

.audit-json {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0 24px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  width: 100%;
}

.audit-json pre {
  background: #101828;
  border-radius: 8px;
  color: #eef4ff;
  display: block;
  max-height: 360px;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  padding: 14px;
  white-space: pre;
  width: 100%;
}

.command-result-page {
  min-width: 0;
  width: 100%;
}

.command-result-page .result-panel {
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
}

.command-result-page .result-panel > * {
  max-width: 100%;
  min-width: 0;
}

.message-list {
  display: grid;
  gap: 10px;
}

.message {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.message.private {
  background: #fff8e6;
}

.device-chat-panel {
  margin-bottom: 24px;
}

.device-chat-history {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
}

.device-chat-message {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  max-width: 84%;
  padding: 10px 12px;
}

.device-chat-message.consultant {
  background: #eef6ff;
  justify-self: end;
}

.device-chat-message.user {
  background: #ecfdf3;
  justify-self: start;
}

.device-chat-message small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.device-chat-message p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-window-body {
  background: #f2f4f7;
  min-height: 100vh;
}

.device-chat-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  margin: 0 auto;
  max-width: 900px;
}

.device-chat-header {
  align-items: center;
  background: #111827;
  color: #ffffff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 22px;
}

.device-chat-header h1,
.device-chat-header p {
  margin: 0;
}

.device-chat-header .eyebrow {
  color: #5eead4;
}

.device-chat-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.device-chat-header-actions button,
.device-chat-header-actions .button {
  min-height: 36px;
  padding: 8px 12px;
}

.device-chat-window-history {
  align-content: start;
  background: #ffffff;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.device-chat-window-history .device-chat-message {
  max-width: min(78%, 620px);
}

.chat-empty-state {
  align-self: center;
  justify-self: center;
}

.device-chat-compose {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 14px 18px 18px;
}

.device-chat-compose label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.device-chat-compose-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 110px;
}

.device-chat-compose textarea {
  min-height: 74px;
  resize: vertical;
}

.device-chat-live-status {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.chat-board {
  grid-template-columns: minmax(0, 1fr);
}

.chat-board-mode {
  color: #314956;
  font-size: 12px;
  white-space: nowrap;
}

.chat-select-all {
  align-items: center;
  color: #506774;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  gap: 8px;
  white-space: nowrap;
}

.chat-select-all input,
.chat-row-check {
  accent-color: var(--brand-teal);
}

.chat-bulk-toolbar {
  border: 1px solid #dbe8ee;
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 8px 12px;
}

.chat-list-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dde8ed;
  border-left: 4px solid transparent;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  grid-template-columns: 18px 38px minmax(220px, 1.05fr) minmax(300px, 1.35fr) minmax(165px, 0.68fr) minmax(125px, 0.52fr);
  min-height: 72px;
  padding: 10px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.chat-row-check {
  justify-self: center;
}

.chat-list-card:hover {
  border-color: #a9cfd8;
  box-shadow: 0 8px 28px rgba(20, 55, 68, 0.08);
  transform: translateY(-1px);
}

.chat-list-card.needs-response {
  background: #fffaf2;
  border-left-color: var(--brand-orange);
}

.chat-list-identity,
.chat-list-preview,
.chat-list-status,
.chat-list-actions {
  min-width: 0;
}

.chat-list-identity p {
  color: #5d7380;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-identity small,
.chat-list-preview span,
.chat-list-preview small,
.chat-list-status span,
.chat-list-actions span {
  color: #788a94;
  display: block;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-preview {
  display: grid;
  gap: 4px;
}

.chat-list-preview strong {
  color: #365260;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-preview span {
  color: #415c68;
}

.chat-list-status,
.chat-list-actions {
  align-content: center;
  display: grid;
  gap: 6px;
  justify-items: start;
}

.chat-list-actions .compact-button {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  min-height: 28px;
  padding: 5px 9px;
}

@media (max-width: 1100px) {
  .ticket-board,
  .client-board,
  .device-board {
    grid-template-columns: 1fr;
  }

  .ticket-detail-layout {
    grid-template-columns: 1fr;
  }

  .ticket-conversation,
  .ticket-properties-panel,
  .ticket-context-panel {
    border-right: 0;
    min-height: 0;
  }

  .ticket-properties-panel,
  .ticket-context-panel {
    border-top: 1px solid var(--line);
  }

  .ticket-filter-sidebar,
  .client-filter-sidebar,
  .device-filter-sidebar {
    border: 1px solid var(--line);
    min-height: auto;
    position: static;
    width: auto;
  }

  .ticket-list-card,
  .client-list-card,
  .device-list-card {
    grid-template-columns: 18px 44px minmax(0, 1fr);
  }

  .ticket-list-meta,
  .client-list-contact,
  .client-list-scope,
  .client-list-status,
  .device-list-owner,
  .device-list-system,
  .device-list-remote,
  .device-list-status {
    grid-column: 3;
  }

  .client-list-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .client-list-contact,
  .client-list-scope,
  .client-list-status {
    grid-column: 2;
  }

  .device-list-card {
    grid-template-columns: 18px 38px minmax(0, 1fr);
  }

  .device-list-owner,
  .device-list-system,
  .device-list-remote,
  .device-list-status {
    grid-column: 3;
  }

  .chat-list-card {
    grid-template-columns: 18px 38px minmax(0, 1fr);
  }

  .chat-list-preview,
  .chat-list-status,
  .chat-list-actions {
    grid-column: 3;
  }

  .settings-customer-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .settings-customer-company,
  .settings-customer-stats,
  .settings-customer-badges {
    grid-column: 2;
    justify-content: flex-start;
  }

  .settings-customer-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .settings-customer-aliases,
  .settings-customer-edit {
    grid-template-columns: 1fr;
  }

  .settings-customer-email-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .customer-editor-header {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-editor-summary {
    grid-template-columns: 42px 1fr;
  }

  .customer-editor-summary > div:not(.client-avatar) {
    grid-column: 2;
  }

  .customer-editor-form,
  .customer-editor-email-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .admin-topbar {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }

  .admin-topbar nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .portal-grid,
  .ticket-layout,
  .ticket-search-row,
  .client-search-row,
  .device-search-row,
  .device-layout,
  .client-layout,
  .form-grid,
  .form-row,
  .checkbox-grid,
  .toolbar,
  .metrics,
  .filter-panel,
  .clients-filter,
  .summary-strip,
  .kv-grid,
  .split-tables {
    grid-template-columns: 1fr;
  }

  .settings-customer-search {
    grid-template-columns: 1fr;
  }

  .settings-customer-search .button {
    width: 100%;
  }

  .table-panel,
  .detail-main {
    overflow-x: auto;
  }

  .ticket-board-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-board-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-conversation {
    padding: 16px;
  }

  .ticket-detail-heading {
    gap: 12px;
  }

  .ticket-detail-heading h1 {
    font-size: 19px;
  }

  .ticket-message-card {
    grid-template-columns: 1fr;
  }

  .ticket-message-card .ticket-message-avatar {
    display: none;
  }

  .ticket-reply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ticket-board-toolbar,
  .client-board-toolbar,
  .device-board-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .ticket-board-toolbar select,
  .ticket-board-toolbar button,
  .ticket-result-count,
  .client-board-toolbar select,
  .client-board-toolbar button,
  .client-board-toolbar .compact-button,
  .client-result-count,
  .device-board-toolbar select,
  .device-board-toolbar button,
  .device-result-count {
    flex: 1 1 150px;
  }

  .ticket-toolbar-spacer,
  .client-toolbar-spacer,
  .device-toolbar-spacer {
    display: none;
  }

  .ticket-list-card,
  .client-list-card,
  .device-list-card,
  .chat-list-card {
    gap: 12px;
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .ticket-avatar,
  .client-avatar,
  .device-avatar {
    display: none;
  }

  .ticket-list-meta,
  .client-list-contact,
  .client-list-scope,
  .client-list-status,
  .device-list-owner,
  .device-list-system,
  .device-list-remote,
  .device-list-status,
  .chat-list-preview,
  .chat-list-status,
  .chat-list-actions {
    grid-column: 2;
  }

  .client-list-card {
    grid-template-columns: 1fr;
  }

  .client-list-contact,
  .client-list-scope,
  .client-list-status {
    grid-column: 1;
  }

  .device-list-card,
  .chat-list-card {
    grid-template-columns: 1fr;
  }

  .device-list-owner,
  .device-list-system,
  .device-list-remote,
  .device-list-status,
  .chat-list-preview,
  .chat-list-status,
  .chat-list-actions {
    grid-column: 1;
  }

  .device-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .device-chat-window-history .device-chat-message {
    max-width: 100%;
  }

  .device-chat-compose-row {
    grid-template-columns: 1fr;
  }

}

.helpdesk-body {
  background:
    linear-gradient(180deg, rgba(10, 129, 151, 0.12), rgba(244, 248, 250, 0) 280px),
    #f4f8fa;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.helpdesk-wrap {
  margin: 0 auto;
  max-width: 1180px;
  padding: 12px 24px 34px;
}

.helpdesk-header {
  align-items: center;
  background: var(--brand-navy);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 3px solid var(--brand-orange);
  border-radius: 14px 14px 0 0;
  display: flex;
  justify-content: space-between;
  min-height: 86px;
  padding: 16px 20px;
}

.helpdesk-logo {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.helpdesk-logo img {
  height: 58px;
  object-fit: contain;
  width: 58px;
}

.helpdesk-logo span {
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
}

.helpdesk-auth {
  align-items: flex-end;
  color: #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  gap: 6px 10px;
  justify-content: flex-end;
}

.helpdesk-auth span {
  flex-basis: 100%;
  text-align: right;
}

.helpdesk-auth a {
  color: #ffffff;
}

.helpdesk-tabs {
  background: linear-gradient(90deg, var(--brand-teal-dark), var(--brand-teal));
  border-radius: 0 0 8px 8px;
  display: flex;
  gap: 0;
  overflow: hidden;
}

.helpdesk-tabs a {
  color: #ecfeff;
  font-weight: 800;
  padding: 14px 18px;
}

.helpdesk-tabs a.active,
.helpdesk-tabs a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.helpdesk-search-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 330px;
  margin-top: 14px;
  padding: 22px 28px;
}

.helpdesk-search-panel.compact {
  grid-template-columns: 1fr;
}

.helpdesk-search h1,
.helpdesk-form-card h1,
.customer-card h1,
.customer-ticket-heading h1,
.ticket-detail-card h1 {
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 12px;
}

.helpdesk-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
}

.helpdesk-search-row input {
  background: #ffffff;
  border: 1px solid #bfd6dd;
  border-radius: 10px 0 0 10px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  color: var(--text);
  font: inherit;
  min-height: 48px;
  padding: 0 16px;
}

.helpdesk-search-row button,
.helpdesk-form-actions button,
.customer-card button,
.modern-action {
  align-items: center;
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 850;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  white-space: nowrap;
}

.helpdesk-search-row button {
  border-radius: 0 10px 10px 0;
}

.helpdesk-actions {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-left: 20px;
}

.helpdesk-actions a {
  align-items: center;
  color: var(--brand-teal);
  display: flex;
  font-weight: 850;
  gap: 10px;
}

.helpdesk-actions span {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: var(--brand-orange-dark);
  display: inline-grid;
  font-size: 16px;
  height: 24px;
  place-items: center;
  width: 24px;
}

.helpdesk-primary-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.helpdesk-primary-action {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 54px minmax(0, 1fr) 28px;
  min-height: 116px;
  padding: 22px 24px;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.helpdesk-primary-action:hover {
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
}

.helpdesk-primary-action:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.42);
  outline-offset: 3px;
}

.helpdesk-primary-action-new {
  background: linear-gradient(135deg, var(--brand-teal-dark), var(--brand-teal));
  color: #ffffff;
}

.helpdesk-primary-action-status {
  background: var(--brand-navy);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.helpdesk-primary-action-icon {
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  color: var(--brand-teal-dark);
  display: inline-flex;
  font-size: 30px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.helpdesk-primary-action-status .helpdesk-primary-action-icon {
  color: var(--brand-orange-dark);
}

.helpdesk-primary-action-copy {
  display: grid;
  gap: 5px;
}

.helpdesk-primary-action-copy strong {
  font-size: 22px;
  line-height: 1.15;
}

.helpdesk-primary-action-copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.35;
}

.helpdesk-primary-action-arrow {
  color: var(--brand-orange);
  font-size: 26px;
  font-weight: 800;
  text-align: right;
}

.helpdesk-main {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  margin-top: 12px;
}

.helpdesk-news-main {
  display: block;
}

.helpdesk-news {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.helpdesk-news-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 22px 24px;
}

.helpdesk-news-header h1 {
  font-size: 25px;
  line-height: 1.15;
  margin: 4px 0 0;
}

.helpdesk-news-eyebrow {
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.helpdesk-news-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.helpdesk-news-source {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 850;
  justify-content: center;
  min-width: 72px;
  padding: 5px 9px;
  white-space: nowrap;
  width: max-content;
}

.helpdesk-news-source-sekurak {
  background: #e6f6f8;
  border-color: #b8e2e8;
  color: #086b7c;
}

.helpdesk-news-source-purepc {
  background: #fff3e8;
  border-color: #fed1aa;
  color: #a84d05;
}

.helpdesk-news-source-cert {
  background: #f1ebff;
  border-color: #d8c7ff;
  color: #6037a3;
}

.helpdesk-news-source-niebezpiecznik {
  background: #fff0f1;
  border-color: #ffc8ce;
  color: #a82432;
}

.helpdesk-news-source-kapitanhack {
  background: #eaf2ff;
  border-color: #c7daf8;
  color: #245994;
}

.helpdesk-news-list {
  display: grid;
}

.helpdesk-news-item {
  align-items: center;
  color: var(--text);
  display: grid;
  gap: 16px;
  grid-template-columns: 132px minmax(0, 1fr) 155px 24px;
  min-width: 0;
  padding: 17px 24px;
  text-decoration: none;
  transition: background-color 140ms ease;
}

.helpdesk-news-item > .helpdesk-news-source {
  justify-self: start;
}

.helpdesk-news-item + .helpdesk-news-item {
  border-top: 1px solid #e4edf1;
}

.helpdesk-news-item:hover {
  background: #f3f9fa;
}

.helpdesk-news-item:focus-visible {
  box-shadow: inset 4px 0 var(--brand-orange);
  outline: 0;
}

.helpdesk-news-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.helpdesk-news-copy strong {
  font-size: 16px;
  line-height: 1.35;
}

.helpdesk-news-copy > span {
  color: #64748b;
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.helpdesk-news-date {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.helpdesk-news-arrow {
  color: var(--brand-teal);
  font-size: 19px;
  font-weight: 850;
  text-align: right;
}

.helpdesk-news-empty {
  display: grid;
  gap: 6px;
  padding: 38px 24px;
  text-align: center;
}

.helpdesk-news-empty span,
.helpdesk-news-notice {
  color: #64748b;
  font-size: 13px;
}

.helpdesk-news-notice {
  background: #fff8ed;
  border-top: 1px solid #fed7aa;
  margin: 0;
  padding: 10px 24px;
  text-align: center;
}

.helpdesk-kb-card,
.helpdesk-form-card,
.customer-card,
.customer-ticket-list,
.ticket-detail-card,
.helpdesk-empty-side {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.helpdesk-kb-card {
  padding: 28px;
}

.helpdesk-kb-card h2 {
  font-size: 25px;
  margin: 0 0 20px;
}

.helpdesk-kb-section {
  border-top: 3px solid var(--brand-orange);
  padding: 14px 0 24px;
}

.helpdesk-kb-section + .helpdesk-kb-section {
  margin-top: 12px;
}

.helpdesk-kb-section h3 {
  color: var(--text);
  font-size: 20px;
  margin: 0 0 10px;
}

.helpdesk-kb-section p {
  color: #6b7280;
  font-size: 15px;
  margin: 0 0 12px;
}

.helpdesk-kb-section ul,
.attachment-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.attachment-list li {
  background: #f8fafc;
  border: 1px solid #dce8ee;
  border-radius: 8px;
  padding: 10px;
}

.attachment-image {
  cursor: zoom-in;
  display: block;
  margin-bottom: 8px;
}

.attachment-image img {
  border: 1px solid #d6e6ec;
  border-radius: 8px;
  display: block;
  height: auto;
  max-height: 520px;
  max-width: min(100%, 900px);
}

.helpdesk-kb-section li {
  align-items: center;
  display: flex;
  gap: 10px;
}

.kb-icon {
  color: #9ca3af;
}

.helpdesk-kb-section a,
.kb-more,
.customer-link {
  color: var(--brand-teal);
  font-weight: 750;
}

.customer-login-links {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
}

.consultant-login-link {
  color: var(--brand-orange-dark);
}

.helpdesk-two-col {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 760px) minmax(280px, 1fr);
  margin-top: 14px;
}

.helpdesk-form-card {
  padding: 28px;
}

.helpdesk-form-card form,
.customer-card form {
  display: grid;
  gap: 18px;
}

.helpdesk-field {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 140px minmax(0, 1fr);
}

.helpdesk-field span,
.helpdesk-field > label {
  font-weight: 650;
  padding-top: 9px;
}

.helpdesk-field b {
  color: var(--brand-orange-dark);
}

.helpdesk-field-hint {
  color: #607985;
  font-size: 12px;
  grid-column: 2;
  line-height: 1.35;
  margin-top: -8px;
}

.helpdesk-field input,
.helpdesk-field select,
.helpdesk-field textarea,
.customer-card input {
  background: #ffffff;
  border: 1px solid #bfd6dd;
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

.helpdesk-field input:focus,
.helpdesk-field textarea:focus,
.helpdesk-search-row input:focus,
.customer-card input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.18);
  outline: none;
}

.helpdesk-field input[readonly] {
  background: #edf4f6;
  color: #3f5964;
  cursor: default;
}

.helpdesk-priority select {
  max-width: 230px;
}

.helpdesk-description {
  align-items: stretch;
}

.rich-text-editor {
  background: #ffffff;
  border: 1px solid #bfd6dd;
  border-radius: 8px;
  grid-column: 2;
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.rich-text-editor:focus-within {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.18);
}

.rich-text-surface {
  cursor: text;
  display: block;
  min-height: 146px;
  overflow: auto;
  padding: 12px;
  user-select: text;
  -webkit-user-select: text;
  word-break: break-word;
}

.rich-text-surface * {
  user-select: text;
  -webkit-user-select: text;
}

.rich-text-surface:focus {
  outline: none;
}

.rich-text-surface:empty::before,
.rich-text-surface.is-empty::before {
  color: #94a3b8;
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-text-surface.invalid {
  background: #fff8f5;
}

.rich-text-surface img,
.ticket-description img,
.message-list img {
  border: 1px solid #d6e6ec;
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 10px 0;
  max-width: 100%;
}

.ticket-description img,
.ticket-mail-content img,
.ticket-message-body img {
  cursor: zoom-in;
}

body.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox[hidden] {
  display: none !important;
}

.image-lightbox {
  background: rgba(6, 16, 24, 0.88);
  display: flex;
  inset: 0;
  padding: 24px;
  position: fixed;
  z-index: 10000;
}

.image-lightbox-backdrop {
  background: transparent;
  border: 0;
  cursor: zoom-out;
  inset: 0;
  padding: 0;
  position: absolute;
}

.image-lightbox-panel {
  background: #0f1b24;
  border: 1px solid rgba(214, 230, 236, 0.24);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.image-lightbox-toolbar {
  align-items: center;
  border-bottom: 1px solid rgba(214, 230, 236, 0.18);
  color: #f8fafc;
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
}

.image-lightbox-title {
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-lightbox-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.image-lightbox-button {
  align-items: center;
  background: #eef6fa;
  border: 1px solid #cfe1e9;
  border-radius: 8px;
  color: #163240;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 12px;
  text-decoration: none;
}

.image-lightbox-button:hover {
  background: #ffffff;
}

.image-lightbox-scroll {
  background: #061019;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px;
  text-align: center;
}

.image-lightbox-img {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  display: inline-block;
  height: auto;
  margin: 0 auto;
  max-height: none !important;
  max-width: none !important;
  width: auto;
}

@media (max-width: 720px) {
  .image-lightbox {
    padding: 10px;
  }

  .image-lightbox-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-lightbox-actions {
    width: 100%;
  }

  .image-lightbox-button {
    justify-content: center;
    width: 100%;
  }

  .image-lightbox-scroll {
    padding: 12px;
  }
}

.ticket-description {
  line-height: 1.6;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ticket-description p,
.ticket-description div {
  margin: 0 0 10px;
}

.ticket-description h2 {
  font-size: 20px;
  margin: 0 0 10px;
}

.ticket-description ul,
.ticket-description ol {
  margin: 8px 0 12px 22px;
  padding: 0;
}

.rich-text-surface code,
.ticket-description code {
  background: #eef6f8;
  border: 1px solid #cfe3ea;
  border-radius: 5px;
  color: #183744;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  padding: 1px 5px;
  white-space: pre-wrap;
}

.rich-text-surface pre,
.ticket-description pre {
  background: #102631;
  border: 1px solid #1f4655;
  border-radius: 8px;
  color: #e8f7fb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  line-height: 1.55;
  margin: 10px 0 14px;
  overflow: auto;
  padding: 12px 14px;
  white-space: pre-wrap;
}

.rich-text-value {
  display: none;
}

.editor-toolbar {
  align-items: center;
  background: linear-gradient(180deg, #f8fcfd 0%, #edf6f8 100%);
  border: 0;
  border-bottom: 1px solid #d6e6ec;
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  grid-column: auto;
  min-height: 36px;
  padding: 5px 8px;
}

.editor-toolbar button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--brand-navy);
  cursor: pointer;
  font-weight: 700;
  min-height: 28px;
  padding: 2px 8px;
}

.editor-toolbar button:hover,
.editor-toolbar button:focus {
  background: rgba(10, 129, 151, 0.1);
  color: var(--brand-teal-dark);
  outline: none;
}

.attach-line {
  color: var(--brand-teal);
  cursor: pointer;
  display: inline-grid;
  font-weight: 800;
  margin-left: 154px;
  width: fit-content;
}

.attach-line input {
  margin-top: 8px;
}

.captcha-box {
  align-items: center;
  background: #ffffff;
  border: 1px solid #bfd6dd;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 1fr auto;
  margin-left: 154px;
  max-width: 340px;
  min-height: 76px;
  padding: 14px;
}

.captcha-widget {
  margin-left: 154px;
  max-width: 100%;
  min-height: 78px;
  overflow: hidden;
}

.captcha-config-note {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  margin: -8px 0 0 154px;
  max-width: 520px;
}

.captcha-challenge {
  align-items: center;
  gap: 12px;
}

.captcha-challenge input[type="number"] {
  width: 96px;
  min-height: 42px;
  border: 1px solid #b9cbd4;
  background: #fff;
  color: #17313d;
  font: inherit;
  text-align: center;
}

.form-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.captcha-box input {
  height: 28px;
  width: 28px;
}

.captcha-box strong {
  color: #64748b;
  font-size: 12px;
}

.helpdesk-form-actions {
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 154px;
  padding-top: 14px;
}

.helpdesk-form-actions.no-offset {
  margin-left: 0;
}

.cancel-button {
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  color: #374151;
  display: inline-flex;
  font-weight: 750;
  min-height: 44px;
  padding: 0 16px;
}

.helpdesk-empty-side {
  min-height: 64px;
}

.helpdesk-confirmation-shell {
  margin-top: 24px;
}

.ticket-created-card {
  margin: 0;
  min-height: 0;
  width: 100%;
}

.ticket-created-card h1 {
  font-size: clamp(34px, 4vw, 48px);
  margin-bottom: 10px;
}

.ticket-created-card .ticket-meta-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.ticket-created-card .helpdesk-form-actions {
  justify-content: flex-start;
}

.helpdesk-footer {
  align-items: center;
  background: #3f444b;
  border-radius: 8px;
  color: #e5e7eb;
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 16px 24px;
}

.helpdesk-footer a {
  color: #e5e7eb;
  font-weight: 700;
}

.helpdesk-footer a:last-child {
  margin-left: auto;
}

.public-site-footer {
  align-items: center;
  background: linear-gradient(90deg, var(--brand-navy), #223541);
  border-bottom: 2px solid var(--brand-orange);
  border-radius: 8px;
  color: #d7edf2;
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0;
  margin-top: 16px;
  min-height: 34px;
  padding: 8px 14px;
  text-align: center;
}

.public-site-footer a {
  color: #ffffff;
  font-weight: 850;
}

.cookie-consent {
  bottom: 16px;
  left: 16px;
  max-width: calc(100vw - 32px);
  position: fixed;
  right: 16px;
  z-index: 80;
}

.cookie-consent[hidden],
.cookie-preferences[hidden] {
  display: none;
}

.cookie-consent-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(42, 156, 174, 0.28);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(18, 41, 53, 0.24);
  color: var(--text);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 auto;
  max-width: 1120px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.cookie-consent-card::before {
  background: linear-gradient(180deg, var(--brand-orange), #ff9b42);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.cookie-consent-main {
  display: grid;
  gap: 6px;
  padding-left: 6px;
}

.cookie-kicker {
  color: var(--brand-teal-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}

.cookie-consent h2 {
  color: var(--brand-navy);
  font-size: 20px;
  line-height: 1.15;
  margin: 0;
}

.cookie-consent p {
  color: #526b78;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.cookie-link-button {
  background: transparent;
  border: 0;
  color: var(--brand-teal-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  justify-self: start;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-preferences {
  border-top: 1px solid #dce9ee;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 10px;
}

.cookie-toggle {
  background: #f8fbfc;
  border: 1px solid #d8e8ee;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  padding: 10px;
}

.cookie-toggle input {
  accent-color: var(--brand-teal);
  margin-top: 2px;
}

.cookie-toggle strong {
  color: #253f4b;
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

.cookie-toggle small {
  color: #607783;
  display: block;
  font-size: 11px;
  line-height: 1.35;
}

.cookie-toggle.is-required {
  background: #eef9fb;
  border-color: #bbe0e8;
}

.cookie-actions {
  align-content: center;
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.cookie-actions button {
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 12px;
}

.cookie-primary {
  background: linear-gradient(180deg, var(--brand-teal), var(--brand-teal-dark));
  border: 1px solid var(--brand-teal-dark);
  color: #ffffff;
}

.cookie-secondary {
  background: #ffffff;
  border: 1px solid #cbd8df;
  color: #2c4652;
}

.cookie-primary:hover,
.cookie-secondary:hover,
.cookie-link-button:hover {
  filter: brightness(0.98);
}

@media (max-width: 980px) {
  .cookie-consent-card {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .cookie-preferences {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .public-site-footer {
    align-items: center;
    flex-direction: column;
    gap: 2px;
    padding: 9px 12px;
  }

  .cookie-consent {
    bottom: 10px;
    left: 10px;
    max-width: calc(100vw - 20px);
    right: 10px;
  }

  .cookie-consent-card {
    border-radius: 12px;
    gap: 12px;
    max-height: calc(100vh - 20px);
    overflow: auto;
    padding: 15px;
  }

  .cookie-preferences,
  .cookie-actions {
    grid-template-columns: 1fr;
  }

  .cookie-consent h2 {
    font-size: 18px;
  }
}

.helpdesk-error,
.helpdesk-success {
  border-radius: 10px;
  font-weight: 750;
  padding: 12px 14px;
}

.helpdesk-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.helpdesk-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.customer-auth-shell,
.customer-ticket-shell {
  margin: 24px auto 0;
  max-width: 860px;
}

.customer-ticket-detail-shell {
  max-width: none;
  width: 100%;
}

.customer-auth-shell {
  display: grid;
  max-width: 480px;
}

.customer-card,
.ticket-detail-card {
  padding: 28px;
}

.customer-ticket-detail-card {
  display: grid;
  gap: 16px;
}

.customer-kicker {
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.customer-card p,
.empty-state p,
.ticket-description {
  color: #64748b;
  line-height: 1.6;
}

.customer-card label {
  display: grid;
  font-weight: 750;
  gap: 8px;
}

.customer-ticket-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.customer-ticket-list {
  overflow: hidden;
}

.customer-ticket-pagination {
  align-items: center;
  background: #f8fbfc;
  border-bottom: 1px solid #dbe7ec;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  min-height: 42px;
  padding: 7px 12px;
  width: 100%;
}

.customer-ticket-pagination:last-child {
  border-bottom: 0;
  border-top: 1px solid #dbe7ec;
}

.customer-ticket-pagination .customer-ticket-range,
.customer-ticket-pagination .customer-ticket-page-label {
  background: transparent;
  border: 0;
  color: #536d79;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: auto;
  line-height: 1.25;
  min-height: 28px;
  padding: 0 5px;
  white-space: nowrap;
  width: auto;
}

.customer-ticket-page-controls {
  align-items: center;
  display: flex;
  gap: 5px;
}

.customer-ticket-page-controls a {
  border-radius: 6px;
  flex: 0 0 30px;
}

.customer-ticket-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.customer-ticket-list table {
  background: #ffffff;
  margin: 0;
  min-width: 720px;
  width: 100%;
}

.empty-state {
  padding: 32px;
}

.ticket-meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 20px 0 26px;
}

.ticket-meta-grid div {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.customer-ticket-detail-card .ticket-message-card {
  max-width: none;
}

.customer-reply-panel {
  background: #f8fafc;
  border: 1px solid #dbe8ee;
  border-radius: 14px;
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 18px;
}

.customer-reply-panel h2 {
  color: #1d3542;
  font-size: 18px;
  margin: 0;
}

.customer-reply-panel form {
  display: grid;
  gap: 14px;
}

.customer-reply-panel label {
  color: #344b57;
  display: grid;
  font-size: 13px;
  font-weight: 850;
  gap: 8px;
}

.customer-reply-panel textarea,
.customer-reply-panel input[type="file"] {
  background: #ffffff;
  border: 1px solid #b9cdd7;
  border-radius: 10px;
  color: #1d3542;
  font: inherit;
  padding: 12px;
}

.customer-reply-panel textarea {
  min-height: 150px;
  resize: vertical;
}

.customer-reply-panel button {
  justify-self: end;
  min-width: 180px;
}

.customer-attachment-input {
  align-items: start;
}

.message-list {
  display: grid;
  gap: 12px;
}

.message-list article {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

.message-list time,
.attachment-list span {
  color: #64748b;
  font-size: 12px;
  margin-left: 8px;
}

.viewer-download-shell {
  margin: 24px auto 0;
  max-width: 960px;
}

.viewer-download-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
  padding: 30px;
}

.viewer-download-card h1 {
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 22px;
}

.viewer-download-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viewer-download-tile {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 20px;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.viewer-download-tile:hover {
  border-color: var(--brand-teal);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.viewer-download-tile strong {
  font-size: 20px;
}

.viewer-download-tile span {
  color: #64748b;
  line-height: 1.45;
}

.admin-dashboard-body {
  background:
    radial-gradient(circle at top left, rgba(42, 156, 174, 0.16), transparent 34rem),
    linear-gradient(180deg, #eef7f9 0%, #f7fbfc 42%, #edf3f5 100%);
  color: var(--text);
  overflow-x: hidden;
}

.dashboard-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
}

.dashboard-rail {
  align-items: center;
  background: #f8fbfc;
  border-right: 1px solid #dbe5ea;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.dashboard-rail-logo {
  display: grid;
  height: 34px;
  place-items: center;
  width: 34px;
}

.dashboard-rail-logo img {
  height: 30px;
  object-fit: contain;
  width: 30px;
}

.dashboard-rail-nav {
  align-items: center;
  display: grid;
  gap: 12px;
  justify-content: center;
}

.dashboard-rail-nav a,
.dashboard-rail-exit {
  align-items: center;
  border-radius: 10px;
  color: #516877;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.dashboard-rail-nav a.active {
  background: #d7e8ef;
  color: var(--brand-navy);
}

.dashboard-rail-nav span,
.dashboard-rail-exit span {
  line-height: 1;
}

.dashboard-rail-exit {
  margin-top: auto;
}

.dashboard-workspace {
  min-width: 0;
}

.dashboard-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #f7fbfc;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  min-height: 32px;
  padding: 7px 12px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.dashboard-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.dashboard-avatar {
  align-items: center;
  background: rgba(245, 130, 32, 0.18);
  border: 1px solid rgba(245, 130, 32, 0.34);
  border-radius: 999px;
  color: #fff1e5;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.dashboard-shell {
  display: grid;
  gap: 14px;
  padding: 14px;
  width: 100%;
}

.ms365-secret-alert {
  align-items: center;
  background: #fff7e8;
  border: 2px solid #f58220;
  border-left-width: 8px;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(101, 54, 8, 0.18);
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 118px;
  padding: 18px 22px;
}

.ms365-secret-alert.danger {
  background: #fff0ee;
  border-color: #c7281c;
  box-shadow: 0 16px 34px rgba(128, 25, 18, 0.2);
}

.ms365-secret-alert-icon {
  align-items: center;
  background: #f58220;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 28px;
  font-weight: 950;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.ms365-secret-alert.danger .ms365-secret-alert-icon {
  background: #c7281c;
}

.ms365-secret-alert span {
  color: #89521e;
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.ms365-secret-alert h1 {
  color: #4d2b0c;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.1;
  margin: 0 0 7px;
}

.ms365-secret-alert p {
  color: #65441f;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.ms365-secret-alert.danger span,
.ms365-secret-alert.danger h1,
.ms365-secret-alert.danger p {
  color: #761c15;
}

.ms365-secret-alert a {
  background: #172329;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  padding: 12px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.ms365-secret-alert a:hover,
.ms365-secret-alert a:focus-visible {
  background: #087f96;
}

.settings-developer-mode {
  align-items: flex-start;
  background: #fff7eb;
  border: 1px solid #f0a34a;
  padding: 14px 16px;
}

.settings-developer-mode span {
  display: grid;
  gap: 3px;
}

.settings-developer-mode strong {
  color: #a64700;
}

.developer-mode-alert .ms365-secret-alert-icon {
  font-size: 12px;
  width: 58px;
}

.dashboard-groupbar,
.dashboard-kpi,
.dashboard-trends,
.dashboard-panel {
  background: #ffffff;
  border: 1px solid rgba(10, 129, 151, 0.18);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(29, 37, 43, 0.08);
}

.dashboard-groupbar {
  align-items: center;
  background: linear-gradient(90deg, #ffffff 0%, #eef9fb 100%);
  border-left: 4px solid var(--brand-orange);
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
}

.dashboard-groupbar strong {
  color: var(--brand-teal-dark);
  font-size: 13px;
}

.dashboard-groupbar span {
  color: #5d737d;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-footer {
  align-items: center;
  background: linear-gradient(90deg, #172329 0%, #223139 100%);
  border-bottom: 3px solid var(--brand-orange);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(29, 37, 43, 0.12);
  color: #d9eef3;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 42px;
  padding: 0 16px;
}

.dashboard-footer strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.dashboard-footer span {
  color: #b9cbd2;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.dashboard-kpis {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.dashboard-kpi {
  border-top: 4px solid var(--brand-teal);
  display: grid;
  gap: 10px;
  isolation: isolate;
  min-height: 96px;
  overflow: hidden;
  padding: 20px;
  position: relative;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dashboard-kpi:hover,
.dashboard-kpi:focus-visible {
  box-shadow: 0 12px 26px rgba(6, 45, 55, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-kpi:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 128, 142, 0.22), 0 12px 26px rgba(6, 45, 55, 0.14);
}

.dashboard-kpi::before {
  background: linear-gradient(180deg, var(--brand-orange), rgba(245, 130, 32, 0));
  content: "";
  height: 58px;
  opacity: 0.55;
  position: absolute;
  right: 16px;
  top: 0;
  width: 4px;
  z-index: -1;
}

.dashboard-kpi:nth-child(2),
.dashboard-kpi:nth-child(6) {
  border-top-color: var(--brand-orange);
}

.dashboard-kpi:nth-child(3),
.dashboard-kpi:nth-child(5) {
  border-top-color: var(--brand-cyan);
}

.dashboard-kpi:nth-child(7) {
  border-top-color: var(--brand-orange);
}

.dashboard-kpi span {
  color: var(--brand-teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.dashboard-kpi strong {
  color: var(--brand-navy);
  font-size: 31px;
  line-height: 1;
}

.dashboard-kpi:nth-child(2) strong,
.dashboard-kpi:nth-child(6) strong {
  color: var(--brand-orange-dark);
}

.dashboard-trends {
  align-items: stretch;
  background: linear-gradient(180deg, #ffffff 0%, #f7fcfd 100%);
  border-top: 4px solid var(--brand-teal);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, 0.9fr);
  min-height: 420px;
  padding: 22px 24px;
}

.dashboard-panel-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dashboard-panel-heading h2 {
  color: var(--brand-navy);
  font-size: 15px;
  margin: 0;
}

.dashboard-panel-heading span,
.dashboard-panel-heading a {
  color: #5f747d;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-panel-heading a {
  color: var(--brand-teal-dark);
}

.dashboard-chart {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.analytics-shell {
  gap: 12px;
  padding: 12px 14px 18px;
}

.analytics-shell .dashboard-groupbar {
  min-height: 42px;
  padding: 0 14px;
}

.analytics-heading > div {
  display: grid;
  gap: 1px;
}

.analytics-heading strong {
  font-size: 14px;
}

.analytics-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(8, minmax(132px, 1fr));
}

.analytics-kpi-card {
  background: #ffffff;
  border: 1px solid rgba(10, 129, 151, 0.16);
  border-radius: 7px;
  border-top: 3px solid var(--brand-teal);
  box-shadow: 0 8px 18px rgba(29, 37, 43, 0.05);
  color: var(--brand-ink);
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 10px 12px;
  text-decoration: none;
}

.analytics-kpi-card:nth-child(2n) {
  border-top-color: var(--brand-orange);
}

.analytics-kpi-card:hover {
  border-color: rgba(10, 129, 151, 0.4);
  transform: translateY(-1px);
}

.analytics-kpi-card span {
  color: #607986;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-kpi-card strong {
  color: var(--brand-navy);
  font-size: 22px;
  line-height: 1;
}

.analytics-kpi-card small {
  color: #6d8189;
  font-size: 11px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-main-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(420px, 1.5fr) repeat(2, minmax(260px, 1fr));
}

.analytics-panel {
  background: #ffffff;
  border: 1px solid rgba(10, 129, 151, 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(29, 37, 43, 0.06);
  min-width: 0;
  overflow: hidden;
}

.analytics-panel-wide {
  grid-row: span 2;
}

.analytics-metric-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 12px;
}

.analytics-metric-grid div {
  background: #f7fbfc;
  border: 1px solid #dbe8ee;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 9px;
}

.analytics-metric-grid dt {
  color: #66808b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-metric-grid dd {
  color: var(--brand-navy);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
  overflow-wrap: anywhere;
}

.analytics-metric-grid small {
  color: #6d8189;
  font-size: 11px;
  font-weight: 750;
}

.analytics-trend-list {
  display: grid;
  gap: 7px;
  padding: 12px 14px 4px;
}

.analytics-trend-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 46px minmax(0, 1fr) 62px;
}

.analytics-trend-row > span {
  color: #607986;
  font-size: 11px;
  font-weight: 850;
}

.analytics-trend-row > div {
  display: grid;
  gap: 3px;
}

.analytics-bar {
  border-radius: 999px;
  display: block;
  height: 7px;
  min-width: 0;
}

.analytics-bar-created {
  background: linear-gradient(90deg, var(--brand-teal), #10a6bf);
}

.analytics-bar-resolved {
  background: linear-gradient(90deg, var(--brand-orange), #ff9b30);
}

.analytics-trend-row strong {
  color: var(--brand-navy);
  font-size: 11px;
  text-align: right;
}

.analytics-legend {
  align-items: center;
  border-top: 1px solid #e2edf2;
  display: flex;
  gap: 14px;
  margin: 10px 14px 0;
  padding: 9px 0 12px;
}

.analytics-legend span {
  align-items: center;
  color: #607986;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  gap: 6px;
}

.analytics-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 18px;
}

.analytics-dot-created {
  background: var(--brand-teal);
}

.analytics-dot-resolved {
  background: var(--brand-orange);
}

.analytics-breakdown-list {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.analytics-breakdown-row {
  display: grid;
  gap: 5px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.analytics-breakdown-row span {
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-breakdown-row strong {
  color: var(--brand-teal-dark);
  font-size: 12px;
}

.analytics-breakdown-row div {
  background: #e8f2f5;
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
}

.analytics-breakdown-row i {
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-orange));
  border-radius: inherit;
  display: block;
  height: 100%;
}

.analytics-empty {
  color: #6d8189;
  font-size: 12px;
  font-weight: 750;
  margin: 0;
}

.analytics-report-list {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.analytics-report-heading {
  grid-column: 1 / -1;
}

.analytics-report-row {
  background: #ffffff;
  border: 1px solid rgba(10, 129, 151, 0.16);
  border-radius: 8px;
  border-top: 3px solid var(--brand-teal);
  box-shadow: 0 8px 18px rgba(29, 37, 43, 0.06);
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.analytics-report-row:nth-child(2n) {
  border-top-color: var(--brand-orange);
}

.analytics-report-row:nth-child(3n) {
  border-top-color: var(--brand-cyan);
}

.analytics-report-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.analytics-report-title h2 {
  color: var(--brand-navy);
  font-size: 14px;
  line-height: 1.25;
  margin: 0;
}

.analytics-report-title span {
  background: #dff0ff;
  border-radius: 999px;
  color: #0052cc;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
}

.analytics-report-row p {
  color: #5e747e;
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}

.analytics-report-row dl {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.analytics-report-row dl div {
  background: #f7fbfc;
  border: 1px solid #dbe8ee;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  min-height: 46px;
  padding: 7px;
}

.analytics-report-row dt {
  color: #66808b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-report-row dd {
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 850;
  margin: 0;
  overflow-wrap: anywhere;
}

.analytics-consultant-panel {
  background: #ffffff;
  border: 1px solid rgba(10, 129, 151, 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(29, 37, 43, 0.08);
  overflow: hidden;
}

.analytics-section-heading {
  align-items: center;
  border-bottom: 1px solid #dfe9ee;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
}

.analytics-section-heading h2 {
  color: var(--brand-navy);
  font-size: 15px;
  margin: 0 0 3px;
}

.analytics-section-heading span {
  color: #607784;
  font-size: 12px;
  font-weight: 750;
}

.analytics-section-heading strong {
  background: rgba(10, 129, 151, 0.1);
  border-radius: 999px;
  color: var(--brand-teal-dark);
  font-size: 12px;
  padding: 5px 10px;
  white-space: nowrap;
}

.analytics-table-wrap {
  max-height: 380px;
  overflow: auto;
  scrollbar-color: #8fc6d1 #ffffff;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.analytics-table-wrap::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

.analytics-table-wrap::-webkit-scrollbar-track {
  background: #ffffff;
}

.analytics-table-wrap::-webkit-scrollbar-thumb {
  background: #8fc6d1;
  border: 3px solid #ffffff;
  border-radius: 999px;
}

.analytics-consultant-table {
  border-collapse: collapse;
  min-width: 1180px;
  width: 100%;
}

.analytics-consultant-table th,
.analytics-consultant-table td {
  border-bottom: 1px solid #e2edf2;
  color: var(--brand-ink);
  font-size: 11px;
  padding: 7px 8px;
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

.analytics-consultant-table th {
  background: #eef7f9;
  background-clip: padding-box;
  box-shadow: 0 1px 0 rgba(10, 129, 151, 0.18), 0 10px 12px -12px rgba(17, 50, 63, 0.55);
  color: var(--brand-teal-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 5;
}

.analytics-consultant-table th:first-child,
.analytics-consultant-table td:first-child {
  min-width: 190px;
  text-align: left;
}

.analytics-compact-table {
  min-width: 900px;
}

.analytics-consultant-table td strong,
.analytics-consultant-table td small {
  display: block;
}

.analytics-consultant-table td strong {
  color: var(--brand-navy);
  font-size: 12px;
}

.analytics-consultant-table td small {
  color: #6b8089;
  font-size: 11px;
  margin-top: 2px;
}

.ticket-trend-chart {
  display: block;
  height: auto;
  max-height: 330px;
  overflow: visible;
  width: 100%;
}

.chart-grid-line {
  stroke: #d7e9ee;
  stroke-width: 1;
}

.chart-axis-line {
  stroke: #6f848c;
  stroke-width: 1.2;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.chart-line.today {
  stroke: var(--brand-teal);
}

.chart-line.yesterday {
  stroke: var(--brand-orange);
}

.chart-dot.today {
  fill: var(--brand-teal);
}

.chart-dot.yesterday {
  fill: var(--brand-orange);
}

.chart-axis-label,
.chart-hour-label,
.chart-value {
  dominant-baseline: middle;
  fill: #6f8490;
  font-size: 10px;
  font-weight: 750;
  text-anchor: middle;
}

.chart-axis-label {
  text-anchor: end;
}

.chart-value.today {
  fill: var(--brand-teal-dark);
}

.chart-value.yesterday {
  fill: var(--brand-orange-dark);
}

.chart-legend {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}

.chart-legend span {
  align-items: center;
  color: #526a74;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
}

.chart-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 18px;
}

.legend-today {
  background: var(--brand-teal);
}

.legend-yesterday {
  background: var(--brand-orange);
}

.dashboard-performance {
  align-content: start;
  display: grid;
  min-width: 0;
}

.performance-grid {
  display: grid;
  gap: 22px 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 28px 4px 0;
}

.performance-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.performance-grid span {
  color: #657a83;
  font-size: 12px;
  font-weight: 850;
}

.performance-grid strong {
  color: var(--brand-navy);
  font-size: 27px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.performance-grid small {
  color: #6f838b;
  font-size: 12px;
  font-weight: 700;
}

.performance-grid div:nth-child(1) strong,
.performance-grid div:nth-child(2) strong {
  color: var(--brand-teal-dark);
}

.performance-grid div:nth-child(4) strong {
  color: var(--brand-orange-dark);
}

.performance-wide {
  grid-column: 1 / -1;
  margin-top: 28px;
  text-align: center;
}

.dashboard-bottom-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.dashboard-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
  border-top: 4px solid var(--brand-teal);
  min-height: 270px;
  padding: 18px;
}

.dashboard-panel:nth-child(2) {
  border-top-color: var(--brand-orange);
}

.dashboard-panel:nth-child(3) {
  border-top-color: var(--brand-cyan);
}

.dashboard-panel:nth-child(4) {
  border-top-color: var(--brand-orange);
}

.dashboard-panel:nth-child(5) {
  border-top-color: var(--brand-teal);
}

.dashboard-list-scroll {
  background: #ffffff;
  background-clip: padding-box;
  border-radius: 4px;
  isolation: isolate;
  max-height: clamp(340px, 40vh, 540px);
  overflow-x: hidden;
  overflow-y: scroll;
  padding-right: 14px;
  scrollbar-color: #8fc6d1 #ffffff;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.dashboard-list-scroll::-webkit-scrollbar {
  width: 12px;
}

.dashboard-list-scroll::-webkit-scrollbar-track {
  background: #ffffff;
  border-left: 1px solid #dbe8ee;
  border-radius: 0;
}

.dashboard-list-scroll::-webkit-scrollbar-thumb {
  background: #8fc6d1;
  border: 3px solid #ffffff;
  border-radius: 999px;
}

.dashboard-mini-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: calc(100% - 2px);
}

.dashboard-mini-table th,
.dashboard-mini-table td {
  font-size: 13px;
  padding: 11px 0;
  vertical-align: top;
}

.dashboard-mini-table th {
  background: #eef7f9;
  background-clip: padding-box;
  box-shadow: 0 1px 0 rgba(10, 129, 151, 0.18), 0 10px 12px -12px rgba(17, 50, 63, 0.55);
  color: var(--brand-teal-dark);
  position: sticky;
  top: 0;
  z-index: 5;
}

.dashboard-mini-table tr + tr td {
  border-top: 1px solid rgba(10, 129, 151, 0.12);
}

.dashboard-mini-table th:last-child,
.dashboard-mini-table td:last-child {
  text-align: right;
}

.dashboard-mini-table small {
  color: #6d8189;
  display: block;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ticket-requester {
  color: var(--brand-teal-dark);
  font-weight: 850;
  margin-top: 3px;
}

@media (max-width: 1320px) {
  .dashboard-kpis {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .analytics-kpis {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .analytics-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-panel-wide {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .analytics-report-row {
    grid-template-columns: 1fr;
  }

  .dashboard-trends {
    grid-template-columns: 1fr;
  }

  .performance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .performance-wide {
    grid-column: auto;
    margin-top: 0;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .ms365-secret-alert {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ms365-secret-alert a {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 820px) {
  .dashboard-app {
    grid-template-columns: 1fr;
  }

  .dashboard-rail {
    flex-direction: row;
    height: auto;
    justify-content: space-between;
    padding: 8px 12px;
    position: static;
  }

  .dashboard-rail-nav {
    display: flex;
    gap: 8px;
  }

  .dashboard-rail-exit {
    margin-top: 0;
  }

  .dashboard-groupbar,
  .dashboard-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

  .dashboard-kpis,
  .dashboard-bottom-grid,
  .analytics-kpis,
  .analytics-main-grid,
  .analytics-metric-grid,
  .analytics-report-row dl,
  .performance-grid {
    grid-template-columns: 1fr;
  }

  .analytics-kpi-card small,
  .analytics-breakdown-row span {
    white-space: normal;
  }

  .dashboard-trends {
    padding: 18px 14px;
  }

  .analytics-report-row {
    padding: 12px;
  }

  .ticket-trend-chart {
    min-width: 720px;
  }

  .dashboard-chart {
    overflow-x: auto;
  }

  .helpdesk-wrap {
    padding: 8px 12px 24px;
  }

  .helpdesk-header,
  .customer-ticket-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .helpdesk-auth {
    justify-content: flex-start;
  }

  .helpdesk-auth span {
    text-align: left;
  }

  .helpdesk-search-panel,
  .helpdesk-primary-actions,
  .helpdesk-two-col,
  .helpdesk-field,
  .ticket-created-card .ticket-meta-grid,
  .ticket-meta-grid,
  .viewer-download-grid {
    grid-template-columns: 1fr;
  }

  .helpdesk-primary-action {
    min-height: 104px;
    padding: 18px;
  }

  .helpdesk-field-hint {
    grid-column: 1;
  }

  .helpdesk-news-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .helpdesk-news-sources {
    justify-content: flex-start;
  }

  .helpdesk-news-item {
    align-items: start;
    gap: 9px 12px;
    grid-template-columns: minmax(0, 1fr) 24px;
    padding: 16px 18px;
  }

  .helpdesk-news-item > .helpdesk-news-source {
    grid-column: 1;
    justify-self: start;
  }

  .helpdesk-news-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .helpdesk-news-date {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }

  .helpdesk-news-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .helpdesk-actions {
    border-left: 0;
    border-top: 1px solid #d8e0ea;
    padding-left: 0;
    padding-top: 18px;
  }

  .editor-toolbar {
    grid-column: 1;
  }

  .rich-text-editor {
    grid-column: 1;
  }

  .attach-line,
  .captcha-widget,
  .captcha-config-note,
  .captcha-box,
  .helpdesk-form-actions {
    margin-left: 0;
  }

  .helpdesk-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .helpdesk-form-actions button,
  .helpdesk-form-actions a {
    width: 100%;
  }
}
