:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #e3e8ef;
  --panel: #ffffff;
  --canvas: #fbfcfd;
  --sidebar: #003c40;
  --sidebar-deep: #00333a;
  --teal: #007c70;
  --teal-dark: #006b61;
  --green: #24ad62;
  --blue: #4897e8;
  --amber: #f59a0a;
  --red: #f05045;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
}

body {
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
svg {
  display: block;
  width: 18px;
  height: 18px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 10px 24px;
  color: #f2fffd;
  background:
    radial-gradient(circle at 4% 0%, rgba(0, 117, 108, 0.32), transparent 32%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-deep));
  overflow-y: auto;
}

.brand {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 9px;
  margin-bottom: 17px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
}
.brand-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}
.nav-list {
  display: grid;
  gap: 4px;
}
.nav-group {
  display: grid;
}

.nav-item {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, #007f74, #006b65);
}
.nav-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #c6e2df;
}
.nav-icon svg,
.nav-item > svg {
  width: 16px;
  height: 16px;
}
.nav-label {
  flex: 1;
}

.nav-new {
  min-width: 40px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 6px;
  color: #fff;
  background: #07998d;
  font-size: 10px;
  font-weight: 700;
}

.nav-chevron {
  display: grid;
  place-items: center;
  transition: transform 160ms ease;
}
.nav-chevron svg {
  width: 15px;
  height: 15px;
}
.nav-group.has-subnav.is-active .nav-chevron,
.nav-group.has-subnav:hover .nav-chevron {
  transform: rotate(180deg);
}

.ticket-subnav {
  position: relative;
  display: grid;
  max-height: 0;
  margin: 0 6px 0 16px;
  padding: 0 0 0 25px;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 180ms ease,
    opacity 130ms ease,
    margin-bottom 180ms ease,
    padding 180ms ease;
}
.nav-group.has-subnav.is-active .ticket-subnav,
.nav-group.has-subnav:hover .ticket-subnav {
  max-height: 124px;
  margin-bottom: 7px;
  padding: 3px 0 3px 25px;
  opacity: 1;
}
.ticket-subnav::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.ticket-subnav a {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f2fffd;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

.ticket-subnav b {
  min-width: 29px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.17);
  font-size: 11px;
}
.ticket-subnav a:hover,
.ticket-subnav a.active {
  color: #fff;
  font-weight: 650;
}
.ticket-subnav a:hover b,
.ticket-subnav a.active b {
  background: rgba(255, 255, 255, 0.25);
}
.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 16px;
}

.status-panel,
.stack-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.status-panel {
  min-height: 72px;
}
.stack-panel {
  min-height: 108px;
}
.status-panel strong,
.stack-panel strong {
  font-weight: 500;
}
.status-panel span,
.stack-panel span,
.stack-panel small {
  color: rgba(255, 255, 255, 0.8);
}
.status-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24b45e;
}
.workspace {
  min-width: 0;
  background: var(--canvas);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.header-menu {
  width: 29px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.header-menu svg {
  width: 22px;
  height: 22px;
}

.search-box {
  width: 578px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid #e0e6ed;
  border-radius: 7px;
  background: #fff;
  color: #8b95a5;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.025);
}

.search-box svg {
  width: 16px;
  height: 16px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
}
.search-box input::placeholder {
  color: #8792a4;
}
.search-box kbd {
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  background: #f6f8fa;
  color: #7c8796;
  font-family: inherit;
  font-size: 11px;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.top-action {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.top-action svg {
  width: 17px;
  height: 17px;
}
.top-action b {
  position: absolute;
  top: 2px;
  right: -8px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 50%;
  background: #007d6d;
  color: #fff;
  font-size: 9px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.profile > svg {
  width: 14px;
  height: 14px;
  color: #607086;
  margin-left: 5px;
}
.avatar,
.initials,
.mini-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #1f6d53, #269759);
  font-weight: 700;
}
.avatar {
  position: relative;
  width: 34px;
  height: 34px;
  font-size: 10px;
  box-shadow: inset 0 0 0 2px #f2e2cf;
}
.avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #08a078;
}
.profile div,
.identity {
  display: grid;
  gap: 3px;
}
.profile strong {
  font-size: 12px;
  font-weight: 600;
}
.profile small,
.identity small,
.subtle {
  color: var(--muted);
}
.profile small {
  font-size: 10px;
}
.page {
  padding: 16px 14px 14px;
}

.metric-grid {
  width: min(100%, 1135px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 13px;
}
.metric-card,
.panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-card {
  height: 123px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 22px 14px 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    transform 140ms ease;
}
.metric-card:hover {
  border-color: #a8d7d1;
  transform: translateY(-1px);
}
.metric-copy {
  min-width: 0;
  display: block;
}
.metric-icon {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}
.metric-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
.metric-icon.blue {
  background: var(--blue);
}
.metric-icon.green {
  background: var(--green);
}
.metric-icon.red {
  background: var(--red);
}
.metric-icon.amber {
  background: var(--amber);
}
.metric-card strong {
  display: block;
  margin-top: 0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.metric-value {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
}

.metric-change {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 19px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.metric-change svg {
  width: 14px;
  height: 14px;
}
.metric-change b {
  font-weight: 500;
}
.metric-change em {
  color: var(--muted);
  font-style: normal;
}
.metric-change.up {
  color: #f04452;
}
.metric-change.down {
  color: #16a461;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 385px;
  gap: 12px;
  align-items: start;
}
.dashboard-grid.detail-closed {
  grid-template-columns: minmax(0, 1fr);
}
.queue-wrap {
  min-width: 0;
}
.panel {
  overflow: hidden;
  box-shadow: none;
}
.table-panel {
  border-radius: 7px;
}

.panel-toolbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 10px 14px;
}
.panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.panel-title .subtle {
  font-size: 15px;
  font-weight: 400;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.soft-button,
.primary-button,
.ghost-button {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}
.soft-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.soft-button svg {
  width: 16px;
  height: 16px;
}
.soft-button svg:last-child:not(:first-child) {
  width: 13px;
  height: 13px;
}
.primary-button {
  border: 1px solid #006d62;
  background: linear-gradient(180deg, #058c7d, #007568);
  color: #fff;
}
.primary-button svg {
  width: 16px;
  height: 16px;
}
.ghost-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--teal-dark);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.data-table th,
.data-table td {
  height: 58px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 11px;
}
.data-table th {
  height: 44px;
  background: #fbfcfd;
  color: #202b3c;
  font-weight: 600;
}
.data-table th:first-child,
.data-table td:first-child {
  text-align: center;
  padding: 0 7px;
}
.data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table tbody tr {
  cursor: pointer;
}
.data-table tbody tr:hover {
  background: #f6fbfa;
}
.data-table tr.selected {
  background: #eef9f8;
  box-shadow: inset 4px 0 0 #008578;
}
.data-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  appearance: none;
  border: 1px solid #c8d0da;
  border-radius: 3px;
  background: #fff;
}
.priority-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
}
.priority-dot.high {
  background: #f2243e;
}
.priority-dot.medium {
  background: #f58b0a;
}
.priority-dot.low {
  background: #13a33b;
}

.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge svg {
  width: 13px;
  height: 13px;
}
.badge.blue {
  color: #0759b2;
  background: #e0edfc;
}
.badge.amber {
  color: #e06d00;
  background: #fff0d9;
}
.badge.green {
  color: #18723b;
  background: #d9f6df;
}
.badge.gray {
  color: #465569;
  background: #e8edf2;
}
.badge.red {
  color: #d91222;
  background: #fde4e6;
}

.table-footer {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  color: #4e5d72;
  font-size: 11px;
}
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pager button {
  width: 39px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.pager button svg {
  width: 15px;
  height: 15px;
}
.pager button.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}
.page-size {
  width: 122px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.page-size svg {
  width: 13px;
  height: 13px;
}
.page-size select {
  width: 90px;
  height: 34px;
  padding-left: 10px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.empty-state svg {
  width: 28px;
  height: 28px;
}
.empty-state strong {
  color: var(--ink);
}

.detail-panel {
  height: 787px;
  overflow: hidden;
  box-shadow: none;
}
.detail-head {
  height: 135px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.detail-title-row,
.detail-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.detail-title-row strong {
  font-size: 15px;
  font-weight: 600;
}
.close-button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #526176;
}
.close-button svg {
  width: 17px;
  height: 17px;
}
.detail-head h2 {
  margin: 1px 0 6px;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}
.detail-head .subtle {
  font-size: 11px;
}
.detail-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.detail-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
}
.customer-section {
  height: 154px;
}
.ticket-section {
  height: 154px;
}
.conversation-section {
  height: 185px;
}

.customer-card {
  height: 108px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
}
.company-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #e5f8ef;
  color: #00936d;
  font-weight: 700;
}
.company-icon svg {
  width: 26px;
  height: 26px;
}
.identity strong {
  font-size: 12px;
  font-weight: 500;
}
.identity small {
  font-size: 10px;
  line-height: 1.25;
}
.profile-button {
  align-self: end;
  min-height: 29px;
  padding: 0 9px;
  font-size: 9px;
}

.ticket-fields {
  display: grid;
  grid-template-columns: 126px 1fr;
  row-gap: 9px;
  align-items: center;
  font-size: 11px;
}
.ticket-fields > span {
  color: #344054;
}
.ticket-fields strong {
  font-weight: 500;
}
.agent-field,
.sla {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mini-avatar {
  width: 19px;
  height: 19px;
  font-size: 6px;
  background: #6c4b2d;
}
.sla {
  color: #667085;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 33px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.tabs button {
  border: 0;
  border-right: 1px solid var(--line);
  background: #fafbfd;
  color: #667085;
  font-size: 10px;
}
.tabs button:last-child {
  border-right: 0;
}
.tabs button.active {
  color: var(--teal-dark);
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--teal);
}
.message {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  font-size: 10px;
  line-height: 1.55;
}
.initials {
  width: 34px;
  height: 34px;
  font-size: 10px;
}
.message strong {
  font-weight: 600;
}
.message time {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--muted);
  font-size: 9px;
}
.message p {
  margin: 6px 0 0;
}
.message-list {
  display: grid;
  gap: 12px;
}
.message.compact {
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
}
.message.compact:first-child {
  padding-top: 0;
  border-top: 0;
}
.conversation-section {
  overflow-y: auto;
}
.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.attachment-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 6px;
  border-radius: 4px;
  background: #eef7f6;
  color: #17685f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-chips svg {
  width: 12px;
  height: 12px;
  flex: none;
}
.activity-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.activity-list li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
}
.activity-list li > span {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--teal);
}
.activity-list div {
  display: grid;
  gap: 3px;
}
.activity-list strong {
  font-size: 10px;
  font-weight: 600;
}
.activity-list small {
  color: var(--muted);
  font-size: 9px;
}

.reply-box {
  position: relative;
  height: 159px;
  display: grid;
  grid-template-rows: 32px 1fr;
  padding: 11px 9px 10px;
}
.reply-tabs {
  display: flex;
  align-items: end;
  gap: 14px;
  padding-left: 7px;
}
.reply-tabs button {
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #55657a;
  font-size: 10px;
}
.reply-tabs button.active {
  color: var(--teal-dark);
  box-shadow: inset 0 -1px 0 var(--teal);
}
.reply-box textarea {
  height: 98px;
  resize: none;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  font-size: 10px;
}
.composer-files {
  position: absolute;
  margin: 67px 0 0 10px;
  max-width: 245px;
  display: flex;
  gap: 5px;
  overflow: hidden;
  pointer-events: none;
}
.composer-files span {
  max-width: 105px;
  padding: 3px 5px;
  border-radius: 4px;
  background: #edf7f5;
  color: #17685f;
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reply-actions {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -39px;
  padding: 0 8px;
  pointer-events: none;
}
.reply-actions button {
  pointer-events: auto;
}
.reply-actions > div {
  display: flex;
  gap: 8px;
}
.composer-icon {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #526176;
}
.composer-icon svg {
  width: 16px;
  height: 16px;
}
.send-button {
  width: 66px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  background: #007b70;
  color: #fff;
}
.send-button svg {
  width: 15px;
  height: 15px;
}
.send-button span {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.3);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.content-card {
  min-height: 160px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.content-card h3 {
  margin: 0;
  font-size: 16px;
}
.content-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.content-card .soft-button,
.content-card .ghost-button {
  justify-self: start;
  margin-top: auto;
}
.split-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid label,
.full-field {
  display: grid;
  gap: 7px;
  color: #263348;
  font-weight: 600;
}
.form-grid input,
.form-grid select,
.form-grid textarea,
.full-field input,
.full-field textarea,
.full-field select {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}
.form-grid textarea,
.full-field textarea {
  min-height: 110px;
  padding-top: 12px;
  resize: vertical;
}
.full-field {
  grid-column: 1 / -1;
}
.panel-body {
  padding: 18px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-grid div {
  display: grid;
  gap: 5px;
}
.field-grid span {
  color: var(--muted);
  font-size: 11px;
}
.settings-list {
  display: grid;
  gap: 10px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
}
.switch {
  width: 43px;
  height: 24px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: #cbd5df;
}
.switch::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin-left: 0;
  border-radius: 50%;
  background: #fff;
  transition: margin 140ms ease;
}
.switch.on {
  background: var(--teal);
}
.switch.on::before {
  margin-left: 19px;
}
.system-detail {
  height: auto;
  min-height: 260px;
}

.ticket-subject-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}
.ticket-subject-cell > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.request-marker {
  min-width: 37px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 650;
}
.request-marker.issue {
  color: #475569;
  background: #edf1f5;
}
.request-marker.feature {
  color: #80540a;
  background: #fff0cf;
}

.company-page-head {
  margin-bottom: 14px;
}
.company-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.company-summary > div {
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}
.company-summary > div:last-child {
  border-right: 0;
}
.company-summary > div > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #08766b;
  background: #e8f5f3;
}
.company-summary > div:nth-child(2) > span {
  color: #a15c00;
  background: #fff2db;
}
.company-summary > div:nth-child(3) > span {
  color: #7250a8;
  background: #f1eafb;
}
.company-summary > div:nth-child(4) > span {
  color: #19733c;
  background: #e3f6e8;
}
.company-summary > div:nth-child(5) > span {
  color: #2563a2;
  background: #e6f0fb;
}
.company-summary svg {
  width: 18px;
  height: 18px;
}
.company-summary p {
  display: grid;
  gap: 4px;
  margin: 0;
}
.company-summary small {
  color: var(--muted);
  font-size: 10px;
}
.company-summary strong {
  font-size: 20px;
  font-weight: 650;
}

.company-directory {
  overflow: hidden;
}
.company-directory-toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.company-directory-toolbar > div:first-child {
  display: grid;
  gap: 4px;
}
.company-directory-toolbar h2 {
  margin: 0;
  font-size: 15px;
}
.company-directory-toolbar > div:first-child > span {
  color: var(--muted);
  font-size: 10px;
}
.company-directory-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.directory-search {
  width: 285px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}
.directory-search svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.directory-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}
.directory-filter {
  position: relative;
  width: 156px;
  height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.directory-filter select {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 11px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  cursor: pointer;
}
.directory-filter svg {
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}
.company-table-scroll,
.company-work-table-scroll,
.company-people-table-scroll {
  overflow-x: auto;
}
.company-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}
.company-table th,
.company-table td {
  height: 70px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10px;
}
.company-table th {
  height: 42px;
  color: #526176;
  background: #fbfcfd;
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}
.company-table th:first-child {
  width: 25%;
}
.company-table th:nth-child(2) {
  width: 16%;
}
.company-table th:nth-child(6) {
  width: 16%;
}
.company-table th:nth-child(7) {
  width: 10%;
}
.company-table th:last-child {
  width: 48px;
}
.company-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}
.company-table tbody tr:hover,
.company-table tbody tr:focus {
  outline: 0;
  background: #f5faf9;
}
.company-table tbody tr:last-child td {
  border-bottom: 0;
}
.company-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.company-avatar,
.company-profile-avatar {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 7px;
  background: #e2f3f0;
  color: #067368;
  font-weight: 750;
}
.company-avatar {
  width: 36px;
  height: 36px;
  font-size: 10px;
}
.company-name-cell > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.company-name-cell strong,
.company-name-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-name-cell strong {
  font-size: 11px;
}
.company-name-cell small {
  color: var(--muted);
  font-size: 9px;
}
.system-pill-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.system-pill-row span {
  min-height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: #edf4f7;
  color: #3e5c6c;
  font-size: 8px;
  font-weight: 700;
}
.system-pill-row span:nth-child(2) {
  color: #80540a;
  background: #fff1d6;
}
.system-pill-row span:nth-child(3) {
  color: #315b9c;
  background: #e7effb;
}
.metric-number {
  font-size: 12px;
  font-weight: 650;
}
.metric-number.attention {
  color: #bd5d00;
}
.metric-number.complete {
  color: #19733c;
}
.progress-cell {
  display: grid;
  gap: 7px;
}
.progress-cell > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.progress-cell b {
  font-size: 9px;
}
.progress-cell small {
  color: var(--muted);
  font-size: 8px;
}
.progress-cell > i {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e9eef3;
}
.progress-cell > i > b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #19a166;
}
.last-activity {
  color: #526176;
  white-space: nowrap;
}
.company-table td:last-child .table-icon-button {
  width: 28px;
  height: 28px;
}

.company-breadcrumb {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 10px;
}
.company-breadcrumb button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #08756a;
  font-weight: 600;
}
.company-breadcrumb svg {
  width: 13px;
  height: 13px;
}
.company-breadcrumb strong {
  color: #526176;
  font-weight: 500;
}
.company-profile-header {
  min-height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.company-profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}
.company-profile-avatar {
  width: 54px;
  height: 54px;
  font-size: 15px;
}
.company-profile-identity > div {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.company-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
.company-title-line h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.15;
}
.company-profile-identity p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.company-profile-identity p span {
  padding-left: 8px;
  border-left: 1px solid #d7dee7;
}
.company-profile-identity code,
.company-info-panel code {
  padding: 3px 6px;
  border-radius: 4px;
  background: #edf5f4;
  color: #076c63;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
}
.company-profile-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.company-profile-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.company-profile-metrics > div {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}
.company-profile-metrics > div:last-child {
  border-right: 0;
}
.company-profile-metrics small {
  color: var(--muted);
  font-size: 9px;
}
.company-profile-metrics strong {
  font-size: 22px;
  font-weight: 650;
}
.company-profile-metrics span {
  color: #526176;
  font-size: 9px;
}
.company-ticket-focus {
  margin-bottom: 14px;
}
.company-ticket-focus-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.company-ticket-focus-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.company-ticket-focus-title > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.company-ticket-focus-title > div > span {
  color: #08756a;
  font-size: 9px;
  font-weight: 700;
}
.company-ticket-focus-title h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.company-ticket-focus-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.complete-ticket-button {
  min-height: 32px;
}
.complete-ticket-button:disabled {
  border-color: #b7ddc2;
  background: #e2f6e7;
  color: #1b743c;
  cursor: default;
}
.company-ticket-focus-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
}
.company-ticket-conversation {
  min-width: 0;
  border-right: 1px solid var(--line);
}
.company-ticket-conversation > .tabs {
  position: static;
  width: min(430px, calc(100% - 30px));
  margin: 14px 15px 0;
}
.company-ticket-messages {
  height: 220px;
  padding: 16px;
  overflow-y: auto;
}
.company-ticket-summary {
  min-width: 0;
}
.company-ticket-submitter {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.company-ticket-submitter > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #e2f3f0;
  color: #08756a;
  font-size: 9px;
  font-weight: 700;
}
.company-ticket-submitter > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.company-ticket-submitter small,
.company-ticket-description small {
  color: var(--muted);
  font-size: 8px;
}
.company-ticket-submitter strong {
  font-size: 10px;
}
.company-ticket-submitter p {
  margin: 0;
  color: #526176;
  font-size: 9px;
}
.company-ticket-summary dl {
  display: grid;
  margin: 0;
  padding: 7px 15px;
  border-bottom: 1px solid var(--line);
}
.company-ticket-summary dl > div {
  min-height: 35px;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.company-ticket-summary dt {
  color: var(--muted);
  font-size: 9px;
}
.company-ticket-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 9px;
  font-weight: 600;
}
.company-ticket-description {
  padding: 13px 15px 16px;
}
.company-ticket-description p {
  margin: 7px 0 0;
  color: #344054;
  font-size: 9px;
  line-height: 1.55;
}
.company-reply-box {
  height: 165px;
  border-top: 1px solid var(--line);
}
.company-reply-box textarea {
  width: 100%;
  box-sizing: border-box;
}
.company-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  align-items: start;
}
.company-main-column,
.company-side-column {
  min-width: 0;
  display: grid;
  gap: 14px;
}
.company-work-panel,
.company-people-panel,
.company-info-panel,
.company-systems-panel {
  overflow: hidden;
}
.company-panel-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}
.company-panel-head > div:first-child {
  display: grid;
  gap: 4px;
}
.company-panel-head h2 {
  margin: 0;
  font-size: 14px;
}
.company-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}
.company-work-tabs {
  height: 34px;
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fb;
}
.company-work-tabs button {
  min-width: 68px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #59677a;
  font-size: 9px;
}
.company-work-tabs button span {
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #e8edf2;
  font-size: 8px;
}
.company-work-tabs button.active {
  color: #086d64;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  font-weight: 650;
}
.company-work-tabs button.active span {
  color: #08756a;
  background: #e3f3f0;
}
.company-work-table,
.company-people-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.company-work-table {
  min-width: 880px;
}
.company-work-table th,
.company-work-table td,
.company-people-table th,
.company-people-table td {
  height: 62px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 9px;
}
.company-work-table th,
.company-people-table th {
  height: 38px;
  color: #59677a;
  background: #fbfcfd;
  font-size: 8px;
  font-weight: 650;
  text-transform: uppercase;
}
.company-work-table th:first-child {
  width: 27%;
}
.company-work-table th:nth-child(2) {
  width: 14%;
}
.company-work-table th:nth-child(3) {
  width: 16%;
}
.company-work-table th:nth-child(4) {
  width: 12%;
}
.company-work-table th:nth-child(5) {
  width: 12%;
}
.company-work-table th:nth-child(6) {
  width: 11%;
}
.company-work-table tbody tr,
.company-people-table tbody tr {
  cursor: pointer;
}
.company-work-table tbody tr:hover {
  background: #f5faf9;
}
.company-work-table tbody tr.selected {
  background: #eef9f8;
  box-shadow: inset 3px 0 0 #008578;
}
.company-work-table tbody tr:last-child td,
.company-people-table tbody tr:last-child td {
  border-bottom: 0;
}
.company-work-table td:first-child {
  display: grid;
  align-content: center;
  gap: 4px;
}
.company-work-table td:first-child strong {
  color: #08756a;
  font-size: 9px;
}
.company-work-table td:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.request-type {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 600;
}
.request-type svg {
  width: 11px;
  height: 11px;
}
.request-type.issue {
  color: #475569;
  background: #edf1f5;
}
.request-type.feature {
  color: #80540a;
  background: #fff0cf;
}
.submitter-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}
.submitter-cell > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #e2f3f0;
  color: #08756a;
  font-size: 7px;
  font-weight: 700;
}
.submitter-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 550;
}
.empty-state.compact {
  min-height: 180px;
}
.company-people-table {
  min-width: 680px;
}
.company-people-table th:first-child {
  width: 32%;
}
.company-people-table tbody tr {
  cursor: default;
}
.company-user-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.company-user-cell > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #e7f3f1;
  color: #08756a;
  font-size: 8px;
  font-weight: 700;
}
.company-user-cell > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.company-user-cell strong,
.company-user-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-user-cell strong {
  font-size: 10px;
}
.company-user-cell small {
  color: var(--muted);
  font-size: 8px;
}
.company-info-panel dl {
  display: grid;
  margin: 0;
  padding: 4px 15px 10px;
}
.company-info-panel dl > div {
  min-height: 49px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.company-info-panel dl > div:last-child {
  border-bottom: 0;
}
.company-info-panel dt {
  color: var(--muted);
  font-size: 9px;
}
.company-info-panel dd {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 9px;
  font-weight: 550;
}
.company-info-panel .table-icon-button {
  width: 26px;
  height: 26px;
  flex: none;
}
.company-system-list {
  display: grid;
}
.company-system-list > div {
  min-height: 70px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.company-system-list > div:last-child {
  border-bottom: 0;
}
.system-code {
  width: 37px;
  height: 37px;
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e8f4f2;
  color: #08756a;
  font-size: 7px;
  font-weight: 750;
}
.company-system-list p {
  min-width: 0;
  display: grid;
  gap: 4px;
  margin: 0;
}
.company-system-list p strong,
.company-system-list p small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-system-list p strong {
  font-size: 10px;
}
.company-system-list p small,
.company-system-list > div > small {
  color: var(--muted);
  font-size: 8px;
}
.company-system-list > div > small {
  grid-column: 3;
  text-align: right;
}
.connection-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 600;
}
.connection-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.connection-state.connected {
  color: #18723b;
}
.connection-state.connected i {
  background: #20a65b;
}
.connection-state.connecting {
  color: #a15c00;
}
.connection-state.connecting i {
  background: #f59a0a;
}
.company-not-found {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}
.company-not-found > span {
  color: var(--teal);
}
.company-not-found > span svg {
  width: 36px;
  height: 36px;
}
.company-not-found h1,
.company-not-found p {
  margin: 0;
}
.company-not-found p {
  color: var(--muted);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

#overlay-root:empty,
#menu-root:empty,
#toast-root:empty {
  display: none;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(9, 19, 31, 0.42);
  backdrop-filter: blur(2px);
}
.modal {
  width: min(100%, 460px);
  max-height: min(90vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #d9e1e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}
.modal.wide {
  width: min(100%, 650px);
}
.modal > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.modal > header h2 {
  margin: 0;
  font-size: 17px;
}
.modal-body {
  overflow-y: auto;
  padding: 18px;
}
.modal > footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
}
.modal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal-form label,
.modal-field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
}
.modal-form input,
.modal-form select,
.modal-form textarea,
.modal-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
.modal-form textarea {
  min-height: 118px;
  padding-top: 11px;
  resize: vertical;
}
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus,
.modal-field select:focus {
  border-color: #4ca89d;
  box-shadow: 0 0 0 3px rgba(0, 124, 112, 0.1);
}
.attachment-field {
  padding: 12px;
  border: 1px dashed #c8d4df;
  border-radius: 7px;
  background: #fbfcfd;
}
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}
.file-list > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 5px;
  background: #edf7f5;
  color: #17685f;
}
.file-list svg {
  width: 13px;
  height: 13px;
}
.file-list small {
  color: #718096;
}
.profile-modal {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
}
.profile-modal .company-icon {
  width: 54px;
  height: 54px;
}
.profile-modal p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.modal-stats div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}
.modal-stats strong {
  font-size: 20px;
}
.modal-stats span {
  color: var(--muted);
  font-size: 10px;
}
.api-key-box {
  display: grid;
  gap: 12px;
}
.api-key-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.api-key-box code {
  display: block;
  padding: 13px;
  border: 1px solid #cfe1df;
  border-radius: 6px;
  background: #f0f8f7;
  color: #075e56;
  overflow-wrap: anywhere;
}
.locked-state {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
}
.locked-state svg {
  width: 36px;
  height: 36px;
  color: var(--teal);
}

.action-menu {
  position: fixed;
  z-index: 70;
  width: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
}
.action-menu h3 {
  margin: 0;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.action-menu button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.action-menu button:last-child {
  border-bottom: 0;
}
.action-menu button:hover {
  background: #f5faf9;
}
.action-menu button > svg {
  width: 17px;
  height: 17px;
  color: var(--teal);
  flex: none;
}
.action-menu button span {
  display: grid;
  gap: 3px;
}
.action-menu small {
  color: var(--muted);
}

#toast-root {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
}
.toast {
  min-width: 260px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid #bfe4d8;
  border-radius: 7px;
  background: #f1fbf7;
  color: #155e4c;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.toast.warning {
  border-color: #f7d7a1;
  background: #fff8ec;
  color: #9a5a00;
}
.toast svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.settings-page-head {
  margin-bottom: 16px;
}
.settings-shell {
  min-height: 650px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
}
.settings-nav {
  align-self: start;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.settings-nav button {
  width: 100%;
  min-height: 43px;
  display: grid;
  grid-template-columns: 19px 1fr 14px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #536174;
  text-align: left;
  font-size: 12px;
}
.settings-nav button > svg {
  width: 17px;
  height: 17px;
}
.settings-nav button > svg:last-child {
  width: 13px;
  height: 13px;
  opacity: 0.55;
}
.settings-nav button:hover {
  background: #f2f7f6;
  color: #164f49;
}
.settings-nav button.active {
  background: #e7f4f2;
  color: #006b61;
  font-weight: 650;
}
.settings-content {
  min-width: 0;
}
.settings-section-head {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.settings-section-head h2 {
  margin: 0;
  font-size: 19px;
}
.settings-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 14px;
  align-items: start;
}
.settings-panel {
  overflow: hidden;
}
.settings-panel .settings-list {
  padding: 10px;
}
.settings-panel .setting-row {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}
.settings-panel .setting-row:last-child {
  border-bottom: 0;
}
.setting-row.detailed > div {
  display: grid;
  gap: 4px;
}
.setting-row.detailed small {
  max-width: 520px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  font-weight: 400;
}
.panel-subhead {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}
.panel-subhead h3 {
  margin: 0;
  font-size: 14px;
}
.phase-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 5px;
  background: #fff2dc;
  color: #9a5a00;
  font-size: 10px;
  font-weight: 650;
}
.settings-search {
  width: 250px;
  height: 37px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}
.settings-search svg {
  width: 15px;
  height: 15px;
}
.settings-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.admin-table-panel {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.admin-table th,
.admin-table td {
  height: 62px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
}
.admin-table th {
  height: 42px;
  background: #fbfcfd;
  color: #526176;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.admin-table tr:last-child td {
  border-bottom: 0;
}
.admin-table th:first-child {
  width: 34%;
}
.admin-table th:last-child {
  width: 130px;
}
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-cell > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.user-cell strong,
.user-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-cell small {
  color: var(--muted);
  font-size: 9px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #e2f3f0;
  color: #057267;
  font-size: 10px;
  font-weight: 700;
}
.role-access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.role-access-grid article {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.role-access-grid article > strong {
  font-size: 11px;
}
.role-access-grid article p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.role-access-grid .role-badge {
  justify-self: start;
}
.role-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  background: #eef2f6;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
}
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5c6878;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}
.status-label.active i {
  background: #1ead5d;
}
.status-label.invited i {
  background: #f59e0b;
}
.status-label.suspended i,
.status-label.inactive i {
  background: #d44b52;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.table-icon-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: #526176;
}
.table-icon-button:hover {
  border-color: #a8d7d1;
  color: var(--teal-dark);
  background: #f3faf9;
}
.table-icon-button svg {
  width: 14px;
  height: 14px;
}
.category-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.color-swatch {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  box-shadow: 0 0 0 1px #d6dee7;
}
.switch.small {
  width: 37px;
  height: 21px;
}
.switch.small::before {
  width: 15px;
  height: 15px;
}
.switch.small.on::before {
  margin-left: 16px;
}

.policy-list {
  display: grid;
  gap: 9px;
}
.policy-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 32px 40px;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.policy-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e9f5f3;
  color: #08756a;
}
.policy-icon svg {
  width: 19px;
  height: 19px;
}
.policy-row > div {
  min-width: 0;
}
.policy-row > div > strong {
  font-size: 12px;
}
.policy-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.admin-audit-list {
  display: grid;
  margin: 0;
  padding: 5px 16px 12px;
  list-style: none;
}
.admin-audit-list li {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
}
.admin-audit-list li:last-child {
  border-bottom: 0;
}
.audit-mark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f6f2;
  color: #0b7c6c;
}
.audit-mark svg {
  width: 13px;
  height: 13px;
}
.admin-audit-list div {
  display: grid;
  gap: 4px;
}
.admin-audit-list strong {
  font-size: 10px;
}
.admin-audit-list small {
  color: var(--muted);
  font-size: 9px;
}

body.auth-page {
  min-height: 100vh;
  background: #fff;
}
body.auth-page .app-shell {
  display: block;
  min-height: 100vh;
}
body.auth-page .sidebar,
body.auth-page .topbar {
  display: none;
}
body.auth-page .workspace {
  min-height: 100vh;
  background: #fff;
}
body.auth-page .page {
  min-height: 100vh;
  padding: 0;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 44%) minmax(430px, 1fr);
}
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 42px clamp(36px, 5vw, 78px);
  overflow: hidden;
  color: #eafffb;
  background: linear-gradient(160deg, #003f43 0%, #004e50 54%, #003239 100%);
}
.auth-brand-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
}
.auth-brand-name svg {
  width: 29px;
  height: 29px;
}
.auth-brand-copy {
  max-width: 520px;
  margin: auto 0 36px;
}
.auth-brand-copy > span {
  display: block;
  margin-bottom: 13px;
  color: #70d2c5;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}
.auth-brand-copy h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 650;
}
.auth-brand-copy p {
  margin: 17px 0 0;
  color: rgba(234, 255, 251, 0.7);
  font-size: 14px;
  line-height: 1.6;
}
.auth-security-list {
  display: grid;
  gap: 12px;
  margin-bottom: 42px;
}
.auth-security-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(234, 255, 251, 0.83);
  font-size: 11px;
}
.auth-security-list svg {
  width: 16px;
  height: 16px;
  color: #67d7c4;
}
.auth-brand > small {
  color: rgba(234, 255, 251, 0.48);
}
.auth-form-area {
  display: grid;
  place-items: center;
  padding: 38px;
  background: #fff;
}
.auth-form {
  width: min(100%, 400px);
}
.auth-form-head {
  margin-bottom: 26px;
}
.auth-form-head.centered {
  text-align: center;
}
.auth-form-head h2 {
  margin: 0;
  font-size: 27px;
}
.auth-form-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.auth-mobile-brand {
  display: none;
}
.auth-form form {
  display: grid;
  gap: 16px;
}
.auth-form form > label:not(.check-row) {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 11px;
  font-weight: 650;
}
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d5dee7;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
}
.auth-form input:focus {
  border-color: #45a89c;
  box-shadow: 0 0 0 3px rgba(0, 124, 112, 0.1);
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.label-row a {
  color: #057267;
  text-decoration: none;
  font-size: 10px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 43px !important;
}
.password-field button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #718096;
}
.password-field svg {
  width: 16px;
  height: 16px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #526176;
  font-size: 10px;
}
.check-row input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}
.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
}
.auth-error {
  min-height: 17px;
  color: #c8323e;
  font-size: 10px;
}
.demo-access {
  display: grid;
  gap: 5px;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px solid #dce6ec;
  border-radius: 6px;
  background: #f8fafb;
  color: #526176;
  font-size: 10px;
}
.demo-access strong {
  color: var(--ink);
}
.demo-access code {
  color: #086e65;
}
.auth-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
  color: #08756a;
  text-decoration: none;
  font-size: 10px;
}
.auth-back.top {
  justify-content: flex-start;
  margin: 0 0 28px;
}
.auth-back svg {
  width: 14px;
  height: 14px;
}
.auth-success-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #e3f6ef;
  color: #0b8767;
}
.auth-success-icon svg {
  width: 27px;
  height: 27px;
}

@media (max-width: 1280px) {
  .metric-grid {
    width: 100%;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
  .metric-card {
    height: 112px;
  }
  .dashboard-grid,
  .split-page {
    grid-template-columns: 1fr;
  }
  .detail-panel {
    height: auto;
  }
  .settings-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .role-access-grid {
    grid-template-columns: 1fr;
  }
  .auth-brand-copy h1 {
    font-size: 29px;
  }
  .company-summary {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    overflow-x: auto;
  }
  .company-workspace {
    grid-template-columns: 1fr;
  }
  .company-side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    width: 235px;
    transform: translateX(-100%);
    transition: transform 160ms ease;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
  }
  .topbar {
    padding: 0 12px;
  }
  .search-box {
    width: auto;
    flex: 1;
  }
  .topbar-actions {
    display: none;
  }
  .page {
    padding: 14px;
  }
  .metric-grid,
  .content-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metric-card {
    height: 105px;
  }
  .panel-toolbar,
  .page-head,
  .table-footer {
    height: auto;
    min-height: 62px;
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar-actions {
    overflow-x: auto;
  }
  .table-panel {
    overflow-x: auto;
  }
  .data-table {
    min-width: 878px;
  }
  .modal-form {
    grid-template-columns: 1fr;
  }
  .modal-stats {
    grid-template-columns: 1fr;
  }
  .action-menu {
    width: min(260px, calc(100vw - 24px));
  }
  .settings-shell {
    grid-template-columns: 1fr;
  }
  .settings-nav {
    display: flex;
    overflow-x: auto;
  }
  .settings-nav button {
    min-width: max-content;
    grid-template-columns: 17px auto;
  }
  .settings-nav button > svg:last-child {
    display: none;
  }
  .settings-section-head {
    align-items: stretch;
    flex-direction: column;
  }
  .settings-search {
    width: 100%;
  }
  .admin-table {
    min-width: 760px;
  }
  .policy-row {
    grid-template-columns: 36px minmax(0, 1fr) 38px;
  }
  .policy-row > .status-label {
    display: none;
  }
  .policy-row > .table-icon-button {
    grid-column: 2;
    justify-self: start;
  }
  .policy-row > .switch {
    grid-column: 3;
    grid-row: 1;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    display: none;
  }
  .auth-form-area {
    min-height: 100vh;
    padding: 28px 20px;
  }
  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 34px;
    color: #056d64;
    font-size: 14px;
    font-weight: 700;
  }
  .auth-mobile-brand svg {
    width: 22px;
    height: 22px;
  }
  .page-head-actions,
  .company-profile-actions {
    width: 100%;
  }
  .page-head-actions > button,
  .company-profile-actions > button {
    flex: 1;
  }
  .company-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .company-summary > div {
    min-height: 74px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .company-summary > div:nth-child(2n) {
    border-right: 0;
  }
  .company-summary > div:last-child {
    border-bottom: 0;
  }
  .company-directory-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .company-directory-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .directory-search,
  .directory-filter {
    width: 100%;
  }
  .company-profile-header {
    align-items: stretch;
    flex-direction: column;
  }
  .company-title-line {
    align-items: flex-start;
    flex-direction: column;
  }
  .company-profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .company-profile-metrics > div {
    min-height: 86px;
    border-bottom: 1px solid var(--line);
  }
  .company-profile-metrics > div:nth-child(2n) {
    border-right: 0;
  }
  .company-profile-metrics > div:last-child {
    border-bottom: 0;
  }
  .company-ticket-focus-head {
    align-items: stretch;
    flex-direction: column;
  }
  .company-ticket-focus-title h2 {
    white-space: normal;
  }
  .company-ticket-focus-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .company-ticket-focus-body {
    grid-template-columns: 1fr;
  }
  .company-ticket-conversation {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .company-ticket-messages {
    height: auto;
    min-height: 190px;
    max-height: 320px;
  }
  .company-side-column {
    grid-template-columns: 1fr;
  }
  .company-panel-head {
    align-items: stretch;
    flex-direction: column;
  }
  .company-work-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .company-work-tabs button {
    flex: 1;
    min-width: 78px;
  }
}
