:root {
  color-scheme: light;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #161719;
  background: #f6f6f7;
  font-synthesis: none;
  font-size: 16px;
}
.endpoint-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.endpoint-facts dt { font-size: 12px; color: #657086; margin-bottom: 4px; }
.endpoint-facts dd { margin: 0; overflow-wrap: anywhere; }
.endpoint-apps { max-height: 320px; overflow: auto; }
[data-theme="dark"] .endpoint-facts dt { color: #a9b3c4; }
@media (max-width: 520px) { .endpoint-facts { grid-template-columns: 1fr; } }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: #d71920;
}
button {
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  padding: 10px 15px;
  background: #fff;
  color: #243047;
  font-weight: 600;
}
button:hover {
  background: #f0f4fb;
}
button.primary {
  background: #d71920;
  color: white;
  border-color: #d71920;
}
button.primary:hover {
  background: #b71118;
}
.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #171719;
  color: #a9b7cc;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  gap: 35px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  padding: 0 10px;
}
.brand-mark {
  background: #d71920;
  color: white;
  border-radius: 9px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
}
.brand strong {
  font-size: 20px;
  letter-spacing: -0.6px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.5px;
  margin-top: 3px;
}
.nav-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 12px 12px;
  color: #91a3bd;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav button {
  color: #c1cde0;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 13px 14px;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav button.active {
  background: #392124;
  color: #fff;
}
.nav svg {
  width: 18px;
  height: 18px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 15px 10px 0;
  border-top: 1px solid #304058;
  font-size: 13px;
  line-height: 1.8;
}
.sidebar-bottom strong {
  color: #e2e9f5;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid #e1e6ef;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  gap: 16px;
}
.breadcrumb {
  font-size: 14px;
  color: #69778e;
}
.breadcrumb b {
  color: #23344d;
  font-weight: 500;
  margin-left: 12px;
}
.account {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fcebec;
  color: #bf151d;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.account button {
  font-size: 12px;
  padding: 7px 10px;
}
.content {
  padding: 36px 38px;
  max-width: 1680px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  text-transform: uppercase;
  color: #8b555b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  margin: 0 0 8px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 0 0 8px;
  font-weight: 650;
}
h2 {
  font-size: 19px;
  margin: 0;
}
h3 {
  font-size: 16px;
  margin: 0;
}
.muted {
  color: #718096;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  padding: 21px 22px;
  position: relative;
}
.stat-label {
  font-size: 14px;
  color: #65758c;
}
.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 650;
  margin: 12px 0 3px;
  letter-spacing: -1px;
}
.stat small {
  font-size: 12px;
  color: #718096;
}
.stat-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  background: #fff0f1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #c4131a;
}
.stat-icon svg {
  width: 17px;
}
.panel {
  background: #fff;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  overflow: hidden;
}
.panel-header {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8ecf3;
}
.count {
  background: #edf2fa;
  border-radius: 6px;
  color: #5b6e89;
  padding: 3px 8px;
  font-size: 12px;
  margin-left: 8px;
}
.filters {
  display: flex;
  gap: 12px;
  padding: 18px 24px;
  flex-wrap: wrap;
}
.filters input {
  flex: 1;
  min-width: 180px;
}
.filters select {
  width: auto;
  min-width: 145px;
}
input,
select,
textarea {
  border: 1px solid #d8e0eb;
  border-radius: 7px;
  padding: 11px 12px;
  width: 100%;
  background: white;
  color: #23344d;
  font-size: 14px;
}
textarea {
  resize: vertical;
  min-height: 120px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
thead {
  background: #f9fafc;
  font-size: 12px;
  color: #718096;
}
th {
  font-weight: 500;
  padding: 13px 24px;
  white-space: nowrap;
}
td {
  padding: 20px 24px;
  border-top: 1px solid #edf0f5;
  vertical-align: middle;
}
td:first-child {
  min-width: 285px;
}
.ticket-title {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.ticket-title:hover {
  color: #d71920;
  background: transparent;
}
.ticket-meta {
  color: #7b889d;
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 6px;
  background: #edf2fb;
  color: #476587;
}
.badge.open {
  background: #eaf1ff;
  color: #245bc9;
}
.badge.in-progress {
  background: #fff3de;
  color: #986313;
}
.badge.waiting {
  background: #f0ebff;
  color: #7050b8;
}
.badge.resolved,
.badge.closed {
  background: #e6f5ee;
  color: #21754f;
}
.priority {
  font-size: 13px;
  white-space: nowrap;
}
.priority.high,
.priority.urgent {
  color: #c1433d;
  font-weight: 600;
}
.person {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  white-space: nowrap;
}
.person .avatar {
  width: 27px;
  height: 27px;
  font-size: 10px;
}
.empty {
  padding: 65px 25px;
  text-align: center;
}
.empty h3 {
  font-size: 18px;
  margin-bottom: 9px;
}
.empty p {
  max-width: 400px;
  margin: 0 auto 22px;
}
.table-footer {
  padding: 15px 24px;
  color: #7b889d;
  border-top: 1px solid #edf0f5;
  font-size: 12px;
}
.error {
  background: #fff0f0;
  border: 1px solid #f5cccc;
  color: #a12b2b;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.error:empty {
  display: none;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: #171719;
  color: white;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-story h1 {
  font-size: 50px;
  line-height: 1.12;
  max-width: 500px;
  margin: 40px 0 22px;
}
.auth-story p {
  color: #b3c4de;
  max-width: 400px;
  line-height: 1.8;
}
.auth-story small {
  color: #96abc7;
}
.auth-form {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-form form {
  width: 100%;
  max-width: 380px;
}
.auth-form h2 {
  font-size: 27px;
  margin-bottom: 12px;
}
.fields {
  display: grid;
  gap: 19px;
  margin-top: 25px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.auth-form button {
  width: 100%;
}
.auth-form .theme-toggle {
  position: absolute;
  top: 18px;
  right: 24px;
  width: auto;
}
.auth-form {
  padding-top: 76px;
}
.theme-toggle {
  white-space: nowrap;
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(740px, calc(100% - 28px));
  max-height: 90vh;
  box-shadow: 0 30px 100px #081a3655;
  color: #161719;
}
dialog::backdrop {
  background: #17171988;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 28px;
  border-bottom: 1px solid #e4e9f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.dialog-body {
  padding: 24px 28px;
}
.dialog-head button {
  border: 0;
  font-size: 24px;
  padding: 2px 8px;
}
.description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.7;
  background: #f7f9fc;
  padding: 18px;
  border-radius: 8px;
  margin-top: 20px;
}
.detail-meta {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.activity {
  margin-top: 28px;
  border-top: 1px solid #e4e9f1;
  padding-top: 22px;
}
.activity-item {
  border-left: 2px solid #f1cfd3;
  padding: 0 0 20px 16px;
  margin-top: 15px;
}
.activity-item p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.6;
  margin: 6px 0;
}
.activity-item small {
  font-size: 12px;
  color: #718096;
}
.note-form {
  margin-top: 18px;
}
.note-form textarea {
  min-height: 90px;
}
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.employee-card {
  padding: 24px;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  background: white;
}
.employee-card h3 {
  margin: 14px 0 5px;
}
.employee-card .badge {
  margin-top: 16px;
}
.connection {
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.connection-icon {
  background: #eaf1ff;
  padding: 18px;
  border-radius: 14px;
  color: #d71920;
}
.connection p {
  max-width: 580px;
  margin-top: 10px;
}
.connection .badge {
  margin: 15px 0;
}
.loading {
  padding: 40px;
  color: #718096;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #163a2c;
  color: white;
  padding: 15px 23px;
  border-radius: 10px;
  box-shadow: 0 5px 30px #0002;
  z-index: 5;
  max-width: 90vw;
}
#toast:empty {
  display: none;
}
.info {
  background: #eef4ff;
  border: 1px solid #d6e4ff;
  padding: 14px;
  border-radius: 8px;
  color: #36547e;
  font-size: 14px;
  line-height: 1.6;
}
.icon-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.icon-inline svg {
  width: 17px;
  height: 17px;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .content {
    padding: 28px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 18px 15px;
  }
  .stat-icon {
    display: none;
  }
  td,
  th {
    padding: 16px;
  }
  .auth-story {
    padding: 35px;
  }
  .auth-story h1 {
    font-size: 40px;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 18px;
    gap: 18px;
  }
  .sidebar .brand {
    padding: 0;
  }
  .nav {
    display: flex;
    overflow: auto;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav button {
    white-space: nowrap;
    padding: 10px;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .breadcrumb {
    display: none;
  }
  .account {
    width: 100%;
    justify-content: flex-end;
  }
  .content {
    padding: 25px 16px;
  }
  .page-heading {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .page-heading .muted {
    max-width: 230px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat-number {
    font-size: 27px;
  }
  .panel-header,
  .filters {
    padding: 18px;
  }
  .filters input {
    flex-basis: 100%;
  }
  .filters select {
    flex: 1;
    min-width: 0;
  }
  .auth {
    display: block;
  }
  .auth-story {
    padding: 26px;
  }
  .auth-story h1 {
    font-size: 30px;
    margin: 25px 0 10px;
  }
  .auth-story p,
  .auth-story small {
    display: none;
  }
  .auth-form {
    padding: 35px 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .dialog-body,
  .dialog-head {
    padding: 20px;
  }
  .connection {
    flex-direction: column;
  }
  .page-heading button {
    padding: 10px;
    font-size: 13px;
  }
}
@font-face {
  font-family: Inter;
  src: url("/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/barlow-condensed.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
.brand img {
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.brand strong {
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand small {
  font-size: 7px;
  letter-spacing: 1.2px;
}
.brand {
  padding: 0;
  gap: 9px;
}
h1 {
  font-family: "Barlow Condensed", Inter, sans-serif;
  text-transform: uppercase;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0;
}
.auth-story h1 {
  font-size: 64px;
}
.sidebar {
  border-top: 4px solid #d71920;
}
.topbar {
  border-top: 4px solid #d71920;
}
.nav button.active {
  box-shadow: inset 3px 0 #d71920;
}
.auth-story {
  border-top: 6px solid #d71920;
}
.connection-icon svg {
  width: 28px;
  height: 28px;
}
@media (max-width: 1100px) and (min-width: 721px) {
  .brand strong {
    font-size: 20px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .brand small {
    font-size: 5px;
  }
}
@media (max-width: 720px) {
  h1 {
    font-size: 32px;
  }
  .auth-story h1 {
    font-size: 40px;
  }
}
.sidebar .brand strong {
  font-size: 21px;
}
.sidebar .brand small {
  font-size: 6px;
  letter-spacing: 0.9px;
}
.sidebar .brand img {
  width: 32px;
  height: 32px;
}
@media (min-width: 721px) and (max-width: 1100px) {
  .sidebar .brand strong {
    font-size: 17px;
  }
  .sidebar .brand img {
    width: 25px;
    height: 25px;
  }
  .sidebar .brand small {
    font-size: 5px;
    letter-spacing: 0.5px;
  }
}

/* Dark surfaces retain the TechSync red accent and distinct status colors. */
:root[data-theme="dark"] {
  color-scheme: dark;
  color: #edf0f5;
  background: #111215;
}
[data-theme="dark"] button,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #22252c;
  color: #edf0f5;
  border-color: #414651;
}
[data-theme="dark"] button:hover { background: #303540; }
[data-theme="dark"] button.primary {
  background: #d71920;
  border-color: #d71920;
  color: #fff;
}
[data-theme="dark"] button.primary:hover { background: #b71118; }
[data-theme="dark"] :focus-visible { outline: 2px solid #ff858b; }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #a4aebf; opacity: 1; }
[data-theme="dark"] a,
[data-theme="dark"] .ticket-title:hover { color: #ff858b; }
[data-theme="dark"] .topbar,
[data-theme="dark"] .stat,
[data-theme="dark"] .panel,
[data-theme="dark"] .employee-card,
[data-theme="dark"] dialog {
  background: #1b1d23;
  color: #edf0f5;
  border-color: #353a44;
}
[data-theme="dark"] .topbar { border-top-color: #d71920; }
[data-theme="dark"] .panel-header,
[data-theme="dark"] td,
[data-theme="dark"] .table-footer,
[data-theme="dark"] .dialog-head,
[data-theme="dark"] .activity { border-color: #353a44; }
[data-theme="dark"] .breadcrumb,
[data-theme="dark"] .muted,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .stat small,
[data-theme="dark"] .ticket-meta,
[data-theme="dark"] .table-footer,
[data-theme="dark"] .activity-item small,
[data-theme="dark"] .loading { color: #a9b3c4; }
[data-theme="dark"] .breadcrumb b { color: #edf0f5; }
[data-theme="dark"] .eyebrow { color: #e6a0a6; }
[data-theme="dark"] thead,
[data-theme="dark"] .description { background: #242830; color: #c0cada; }
[data-theme="dark"] .avatar,
[data-theme="dark"] .stat-icon,
[data-theme="dark"] .connection-icon { background: #41252c; color: #ff989e; }
[data-theme="dark"] .count,
[data-theme="dark"] .badge { background: #2b3546; color: #b9cce8; }
[data-theme="dark"] .badge.open { background: #203655; color: #a7c9ff; }
[data-theme="dark"] .badge.in-progress { background: #43351e; color: #f5cd86; }
[data-theme="dark"] .badge.waiting { background: #392c52; color: #d0b5ff; }
[data-theme="dark"] .badge.resolved,
[data-theme="dark"] .badge.closed { background: #203e32; color: #94dfb8; }
[data-theme="dark"] .priority.high,
[data-theme="dark"] .priority.urgent { color: #ff9993; }
[data-theme="dark"] .error { background: #42262a; border-color: #754047; color: #ffb7bc; }
[data-theme="dark"] .info { background: #23334c; border-color: #3c557b; color: #b6d1fa; }
[data-theme="dark"] .activity-item { border-color: #754047; }
[data-theme="dark"] dialog { box-shadow: 0 30px 100px #0009; }
[data-theme="dark"] dialog::backdrop { background: #08090cbb; }
[data-theme="dark"] .nav button,
[data-theme="dark"] .ticket-title { background: transparent; }
[data-theme="dark"] .nav button:hover { background: #292c33; }
[data-theme="dark"] .nav button.active { background: #392124; color: #fff; }
@media (max-width: 720px) {
  .auth-form { padding-top: 76px; }
  .account { gap: 8px; }
  .account > span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account button { flex-shrink: 0; }
}
.dashboard-link { color: var(--muted, #b1b7c2); padding: 12px 16px; display: block; font-size: 14px; text-decoration: none; }
