
:root {
  color-scheme: dark;
  --bg: #080d19;
  --surface: #0f1728;
  --surface2: #151e30;
  --surface3: #1d2940;
  --line: #293348;
  --line2: #202b3f;
  --text: #eff4ff;
  --muted: #98a5bd;
  --faint: #687791;
  --primary: #8279ff;
  --primary2: #5c58e6;
  --aqua: #46dac7;
  --blue: #5aa9ff;
  --warn: #ffc278;
  --red: #ff7486;
  --green: #61dca9;
  --shadow: 0 20px 70px rgba(0,0,0,.3);
  --radius: 15px;
  --sidebar: 258px;
}
* {
  box-sizing: border-box;
}
html,body {
  height: 100%;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  letter-spacing: .01em;
}
button,input,textarea,select {
  font: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--blue);
}
h1,h2,h3,h4,p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1.15px;
  line-height: 1.17;
}
h2 {
  font-size: 21px;
  letter-spacing: -.6px;
}
h3 {
  font-size: 15px;
}
small {
  font-size: 11px;
}
.hidden {
  display: none!important;
}
.muted {
  color: var(--muted);
}
.subtle {
  color: var(--faint);
}
.success-text {
  color: var(--green);
}
.danger-text {
  color: var(--red);
}
.mono {
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar);
  background: #0d1424;
  border-right: 1px solid #1e2b41;
  display: flex;
  flex-direction: column;
  padding: 25px 13px 14px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 12px;
}
.brand-logo {
  background: linear-gradient(135deg,#9e92ff,#5b4be5);
  height: 38px;
  width: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 8px 24px #6052d735;
  color: white;
  letter-spacing: -4px;
  padding-right: 4px;
  position: relative;
}
.brand-logo:after {
  content: '';
  width: 11px;
  height: 3px;
  position: absolute;
  right: 6px;
  bottom: 10px;
  background: #5de0ca;
  transform: rotate(-40deg);
  border-radius: 4px;
}
.brand strong {
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -.7px;
  display: block;
  line-height: 1.3;
}
.brand small {
  display: block;
  color: #7889a9;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.15px;
}
.workspace-picker {
  border: 1px solid var(--line);
  margin: 34px 4px 25px;
  padding: 10px;
  border-radius: 11px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: #141e30;
}
.ws-avatar {
  border-radius: 8px;
  background: #2a3654;
  color: #b8c6e6;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.ws-label {
  flex: 1;
  min-width: 0;
}
.ws-label strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.ws-label small {
  color: var(--faint);
}
.nav-label {
  color: #5f718d;
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 850;
  margin: 0 15px 10px;
}
.nav-label.nested {
  margin-top: 27px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  color: #96a5c0;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  font-weight: 600;
  transition: .15s;
  min-height: 43px;
}
.nav-link:hover {
  color: white;
  background: #18243b;
}
.nav-link.active {
  color: #ddd9ff;
  background: linear-gradient(90deg,#382f73,#222344);
  border-color: #473d8a;
}
.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 20px;
  line-height: 1;
  color: inherit;
  font-weight: 500;
}
.nav-link em {
  margin-left: auto;
  font-size: 10px;
  background: #242f46;
  color: #bac8e6;
  border-radius: 6px;
  padding: 2px 7px;
  font-style: normal;
}
.nav-beta {
  margin-left: auto;
  font-size: 9px;
  color: #86e4cd;
  border: 1px solid #316c69;
  border-radius: 5px;
  padding: 2px 5px;
  letter-spacing: .4px;
}
.ai-nav-icon {
  color: var(--aqua);
}
.sidebar-bottom {
  margin-top: auto;
}
.ai-connection {
  margin: 12px 5px 17px;
  background: #121d30;
  border: 1px solid #26334b;
  border-radius: 11px;
  display: flex;
  align-items: center;
  padding: 11px;
  gap: 9px;
}
.connection-dot {
  height: 8px;
  width: 8px;
  background: #ffc078;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #ffc07815;
  flex-shrink: 0;
}
.connection-dot.ok {
  background: #44d6a6;
  box-shadow: 0 0 0 3px #44d6a619;
}
.ai-connection>div {
  flex: 1;
  min-width: 0;
}
.ai-connection strong,.ai-connection small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-connection strong {
  font-size: 11px;
}
.ai-connection small {
  color: var(--faint);
  font-size: 10px;
}
.tiny-icon {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 4px;
  font-size: 17px;
}
.sidebar-user {
  border-top: 1px solid var(--line);
  padding: 15px 5px 0;
  display: flex;
  gap: 11px;
  align-items: center;
}
.avatar {
  height: 34px;
  width: 34px;
  background: linear-gradient(140deg,#4768bc,#2a3b7e);
  border: 1px solid #6474aa;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.user-text {
  flex: 1;
  min-width: 0;
}
.user-text strong,.user-text small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-text strong {
  font-size: 12px;
}
.user-text small {
  color: var(--faint);
}
.main-area {
  margin-left: var(--sidebar);
  min-width: 0;
  width: calc(100% - var(--sidebar));
}
.topbar {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line2);
  background: #0b1120d9;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.breadcrumb {
  color: #acb9cf;
  font-size: 12px;
  font-weight: 600;
}
.breadcrumb span {
  color: #596780;
  padding: 0 9px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}
.top-search {
  width: 250px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #131d30;
  border: 1px solid #27344b;
  color: #8c9db6;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  font-size: 12px;
}
.top-search span {
  font-size: 20px;
  line-height: 10px;
}
.top-search kbd {
  margin-left: auto;
  border: 1px solid #354158;
  padding: 1px 5px;
  border-radius: 4px;
  color: #62728e;
  font: 10px ui-monospace;
}
.separator {
  width: 1px;
  height: 23px;
  background: var(--line);
  margin: 0 5px;
}
.icon-btn {
  height: 35px;
  min-width: 35px;
  background: transparent;
  border: 1px solid transparent;
  color: #9cadc5;
  border-radius: 8px;
  font-size: 18px;
}
.icon-btn:hover {
  background: var(--surface2);
  color: var(--text);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface3);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 740;
  white-space: nowrap;
  min-height: 39px;
  transition: transform .1s,background .2s;
}
.btn:hover {
  filter: brightness(1.15);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  color: white;
  background: linear-gradient(145deg,#8271ff,#655de9);
  border-color: #9787ff;
  box-shadow: 0 5px 20px #6356de35;
}
.btn.soft {
  background: #222447;
  border-color: #433c77;
  color: #d8d1ff;
}
.btn.danger {
  color: #ffd2da;
  background: #3b1f34;
  border-color: #714257;
}
.btn.ghost {
  background: transparent;
}
.btn.full {
  width: 100%;
  justify-content: space-between;
}
.btn.sm {
  padding: 7px 12px;
  min-height: 30px;
}
.plus {
  font-size: 17px;
  line-height: 1;
}
.page-container {
  max-width: 1650px;
  margin: 0 auto;
  padding: 32px 38px 56px;
}
.eyebrow {
  font-size: 10px;
  color: var(--aqua);
  font-weight: 800;
  letter-spacing: 1.75px;
  margin-bottom: 9px;
  text-transform: uppercase;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  gap: 20px;
}
.page-head h1 {
  margin-bottom: 7px;
  font-size: 29px;
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 17px;
}
.gradient-banner {
  background: linear-gradient(105deg,#24285a 0%,#1b2b4c 47%,#113c4a 100%);
  border: 1px solid #353c77;
  border-radius: 17px;
  padding: 25px 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.gradient-banner:after {
  content: '✳';
  position: absolute;
  right: 20%;
  top: -80px;
  color: #a8a5ff0b;
  font-size: 270px;
  pointer-events: none;
}
.gradient-banner h2 {
  font-size: 19px;
  margin: 0 0 5px;
}
.gradient-banner p {
  color: #afbcdc;
  font-size: 12px;
  margin: 0;
}
.banner-icon {
  color: #b5fbf0;
  font-size: 27px;
}
.banner-tag {
  color: #79ded1;
  background: #214a51;
  border: 1px solid #3a7577;
  letter-spacing: 1px;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 12px;
  display: inline-block;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line2);
  padding: 19px 20px;
  border-radius: 13px;
  min-height: 141px;
  position: relative;
  overflow: hidden;
}
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9daec7;
  font-size: 11px;
  font-weight: 640;
}
.metric-icon {
  font-size: 21px;
  background: #27324a;
  color: #b5b4ff;
  border-radius: 9px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.metric-value {
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 15px 0 3px;
  line-height: 1;
}
.metric-note {
  font-size: 11px;
  color: #788ba8;
}
.metric-note .up {
  color: var(--green);
}
.metric-note .down {
  color: var(--red);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,1.65fr) minmax(310px,1fr);
  gap: 19px;
  margin-bottom: 20px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  padding: 20px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 730;
}
.panel-head small {
  color: var(--muted);
}
.panel-body {
  padding: 0 22px 22px;
}
.panel-link {
  font-size: 11px;
  color: #b3aaff;
  background: none;
  border: none;
  font-weight: 750;
}
.chart-legend {
  display: flex;
  gap: 19px;
  color: #8d9cb8;
  font-size: 11px;
}
.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  margin-right: 5px;
}
.legend-dot.aqua {
  background: var(--aqua);
}
.chart-box {
  min-height: 215px;
  display: flex;
  align-items: center;
}
.chart-svg {
  width: 100%;
  height: 210px;
  display: block;
}
.chart-grid {
  stroke: #273449;
  stroke-width: 1;
  stroke-dasharray: 4 6;
}
.chart-label {
  fill: #63748f;
  font-size: 10px;
  font-family: inherit;
}
.chart-line {
  fill: none;
  stroke: #9f95ff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-fill {
  fill: #7f74ff15;
}
.chart-line2 {
  fill: none;
  stroke: #4bdac7;
  stroke-width: 2.4;
  stroke-linecap: round;
}
.split-list {
  padding: 0;
}
.activity-entry {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 20px;
  border-top: 1px solid var(--line2);
}
.activity-dot {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #283251;
  color: #b9b4ff;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.activity-entry strong {
  font-size: 11px;
  font-weight: 720;
  display: block;
  line-height: 1.45;
}
.activity-entry p {
  font-size: 10px;
  color: var(--muted);
  margin: 3px 0;
}
.activity-entry time {
  color: #6c7e98;
  font-size: 10px;
}
.ticket-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.ticket-table th {
  color: #7487a1;
  font-size: 10px;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-weight: 700;
  background: #111b2d;
  padding: 12px 17px;
  border-bottom: 1px solid var(--line);
}
.ticket-table td {
  padding: 14px 17px;
  border-top: 1px solid var(--line2);
  font-size: 11px;
  color: #a1b0c8;
}
.ticket-table tbody tr {
  cursor: pointer;
  transition: .13s;
}
.ticket-table tbody tr:hover {
  background: #1a2740;
}
.ticket-table .ticket-title {
  font-size: 12px;
  color: #e7edff;
  font-weight: 650;
  display: block;
  max-width: 390px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-no {
  font-size: 10px;
  color: #7b88a6;
  display: block;
  margin-top: 4px;
  font-family: ui-monospace;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 750;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  white-space: nowrap;
  text-transform: capitalize;
}
.pill:before {
  content: '';
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.open {
  background: #242f56;
  color: #91b7ff;
  border-color: #3d5382;
}
.pill.in_progress {
  background: #27334f;
  color: #a8b9ff;
  border-color: #425178;
}
.pill.waiting {
  background: #3c3026;
  color: #e9bb78;
  border-color: #644933;
}
.pill.resolved,.pill.closed {
  background: #1e4039;
  color: #78d5b8;
  border-color: #32665a;
}
.pill.urgent {
  color: #ff8996;
  background: #4c2838;
  border-color: #734158;
}
.pill.high {
  color: #ffc18a;
  background: #47352b;
  border-color: #755239;
}
.pill.medium {
  color: #a6abff;
  background: #34335a;
  border-color: #55518b;
}
.pill.low {
  color: #76d8b9;
  background: #214337;
  border-color: #386756;
}
.pill.priority:before {
  display: none;
}
.pill.overdue {
  background: #4a2531;
  color: #ff95a2;
  border-color: #784652;
}
.pbar {
  width: 100%;
  height: 7px;
  border-radius: 8px;
  background: #25324b;
  overflow: hidden;
}
.pbar>i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg,#8679ff,#54dfcf);
  border-radius: inherit;
}
.priority-breakdown {
  display: grid;
  gap: 18px;
  padding: 6px 0;
}
.prio-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #99a9c3;
  margin-bottom: 6px;
}
.prio-head b {
  color: var(--text);
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}
.search-input {
  height: 40px;
  min-width: 260px;
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 9px;
  color: var(--faint);
}
.search-input input {
  border: 0;
  background: transparent;
  outline: 0;
  color: var(--text);
  width: 100%;
  font-size: 12px;
}
.search-input input::placeholder {
  color: #65758f;
}
.filter-select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: #acb9d2;
  height: 40px;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 11px;
  max-width: 155px;
}
select option {
  background: var(--surface2);
  color: var(--text);
}
.table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 18px;
  color: var(--muted);
  font-size: 11px;
}
.table-foot .btn {
  min-height: 30px;
}
.blank {
  padding: 55px 18px;
  text-align: center;
  color: var(--muted);
}
.blank .blank-icon {
  font-size: 31px;
  margin-bottom: 9px;
}
.blank h3 {
  color: var(--text);
  font-size: 15px;
}
.blank p {
  max-width: 430px;
  margin: 0 auto 15px;
  font-size: 12px;
}
.kb-grid,.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr));
  gap: 15px;
}
.kb-card,.asset-card {
  padding: 21px;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 13px;
  cursor: pointer;
  transition: .15s;
}
.kb-card:hover,.asset-card:hover {
  background: #19243a;
  border-color: #495575;
  transform: translateY(-1px);
}
.kb-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  color: #b9b1ff;
  background: #333054;
  border: 1px solid #514778;
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.kb-card h3,.asset-card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
.kb-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 15px;
}
.kb-card footer {
  color: var(--faint);
  font-size: 10px;
  display: flex;
  justify-content: space-between;
}
.asset-card .asset-type {
  font-size: 24px;
  color: var(--primary);
  background: #28274a;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.asset-card p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 13px;
}
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  color: #a8b3cc;
  background: var(--surface3);
  font-size: 10px;
}
.team-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 20px;
  border-top: 1px solid var(--line2);
}
.team-row .team-name {
  flex: 1;
}
.team-row strong {
  font-size: 12px;
}
.team-row small {
  display: block;
  color: var(--muted);
}
.team-row .avatar {
  height: 38px;
  width: 38px;
}
.role-badge {
  font-size: 10px;
  background: #293454;
  padding: 5px 9px;
  border-radius: 6px;
  color: #bbcaff;
  text-transform: capitalize;
}
.disabled-user {
  opacity: .45;
}
.copilot-layout {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) 310px;
  gap: 17px;
  min-height: 570px;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 580px;
}
.chat-log {
  flex: 1;
  min-height: 360px;
  max-height: 620px;
  overflow: auto;
  padding: 23px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.chat-message {
  display: flex;
  gap: 12px;
  max-width: 90%;
}
.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-avatar {
  height: 32px;
  width: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg,#645bf1,#28b3b5);
  color: white;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.chat-message.user .chat-avatar {
  background: #344367;
}
.chat-bubble {
  font-size: 12px;
  line-height: 1.8;
  color: #c9d4e9;
  background: #19253b;
  border: 1px solid #2c3b55;
  border-radius: 3px 12px 12px 12px;
  padding: 13px 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-message.user .chat-bubble {
  background: #2d2859;
  border-color: #504588;
  border-radius: 12px 3px 12px 12px;
  color: #eeeaff;
}
.chat-input {
  border-top: 1px solid var(--line);
  padding: 15px;
}
.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #131d30;
  border: 1px solid #34415a;
  border-radius: 12px;
  padding: 10px;
}
.chat-compose textarea {
  min-height: 40px;
  max-height: 150px;
  resize: vertical;
  background: none;
  border: 0;
  color: var(--text);
  flex: 1;
  outline: 0;
  padding: 8px;
  font-size: 12px;
}
.chat-compose textarea::placeholder {
  color: #64768e;
}
.chat-hint {
  color: var(--faint);
  font-size: 10px;
  margin-top: 9px;
}
.tip-card {
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.tip-card strong {
  color: var(--text);
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0,730px) minmax(280px,1fr);
  gap: 20px;
}
.settings-card {
  padding: 23px;
  margin-bottom: 18px;
}
.settings-card h3 {
  font-size: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}
.field label {
  font-size: 11px;
  color: #b1bfd5;
  font-weight: 700;
}
.field input,.field textarea,.field select {
  border: 1px solid #34415a;
  border-radius: 9px;
  background: #121d30;
  color: var(--text);
  outline: none;
  padding: 11px 12px;
  width: 100%;
  font-size: 12px;
}
.field textarea {
  resize: vertical;
  min-height: 115px;
  line-height: 1.7;
}
.field input:focus,.field textarea:focus,.field select:focus {
  border-color: #8679ff;
  box-shadow: 0 0 0 3px #8679ff17;
}
.field small {
  color: var(--faint);
  font-size: 10px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.full-row {
  grid-column: 1/-1;
}
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 30px;
  background: radial-gradient(circle at 50% -30%,#352c79,#0a1020 56%);
}
.auth-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  background: #5e4ff216;
  filter: blur(90px);
  border-radius: 50%;
  top: -120px;
  left: calc(50% - 230px);
}
.auth-card {
  width: min(100%,450px);
  position: relative;
  background: #10182a;
  border: 1px solid #35415c;
  border-radius: 19px;
  padding: 36px 39px;
  box-shadow: var(--shadow);
}
.brand-auth {
  padding: 0;
  margin-bottom: 45px;
}
.auth-badge {
  font-size: 9px;
  color: #91d9ca;
  letter-spacing: 1.4px;
  font-weight: 800;
  margin-bottom: 15px;
}
.auth-card h1 {
  font-size: 29px;
  margin-bottom: 8px;
}
.auth-card>p {
  font-size: 12px;
  margin-bottom: 27px;
}
.auth-card .field {
  margin-bottom: 18px;
}
.auth-card .btn {
  margin-top: 8px;
}
.auth-foot {
  text-align: center;
  margin: 23px 0 0!important;
  font-size: 10px!important;
  color: #6a7d9a!important;
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  justify-content: flex-end;
}
.overlay-shade {
  position: absolute;
  inset: 0;
  background: #030712ab;
  backdrop-filter: blur(3px);
}
.dialog {
  position: relative;
  height: 100%;
  width: min(660px,100%);
  background: #0e1728;
  box-shadow: -25px 0 80px #0008;
  border-left: 1px solid #344159;
  display: flex;
  flex-direction: column;
  animation: slidein .2s ease;
}
@keyframes slidein {
  from {
    transform: translateX(24px);
    opacity: .7;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.dialog-top {
  padding: 24px 27px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.dialog-top h2 {
  margin: 0;
}
.dialog-content {
  overflow: auto;
  min-height: 0;
  padding: 24px 27px 35px;
}
.detail-title {
  font-size: 23px;
  margin-bottom: 13px;
  line-height: 1.4;
  letter-spacing: -.5px;
}
.detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 19px;
}
.detail-desc {
  line-height: 1.85;
  color: #c6d2e6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  background: #152036;
  border: 1px solid #2b3952;
  padding: 16px;
  border-radius: 11px;
  margin: 10px 0 24px;
}
.section-title {
  font-size: 11px;
  color: #8ea0be;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 27px 0 14px;
}
.detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.detail-mini {
  font-size: 10px;
  color: #8295b1;
  margin-bottom: 4px;
}
.detail-cell strong {
  font-size: 12px;
}
.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.comment {
  border-left: 2px solid #665fc3;
  padding: 1px 0 5px 13px;
  margin: 14px 0;
}
.comment.internal {
  border-left-color: #e9b776;
}
.comment strong {
  font-size: 11px;
}
.comment time {
  font-size: 10px;
  color: var(--faint);
  margin-left: 7px;
}
.comment p {
  white-space: pre-wrap;
  color: #beccdf;
  font-size: 12px;
  margin: 6px 0;
}
.comment .internal-tag {
  color: #f1c688;
  font-size: 10px;
  margin-left: 8px;
}
.timeline-item {
  border-left: 1px solid #34425b;
  padding: 0 0 16px 14px;
  margin-left: 4px;
  position: relative;
}
.timeline-item:before {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  left: -4px;
  top: 3px;
  background: #8174ff;
  border-radius: 50%;
}
.timeline-item strong {
  font-size: 11px;
}
.timeline-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.ai-answer {
  margin: 13px 0;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: #cbd8ef;
  border: 1px solid #414272;
  background: #1d2544;
  border-radius: 10px;
  padding: 17px;
}
.ai-box {
  border: 1px solid #3c4275;
  background: linear-gradient(145deg,#202446,#142438);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 22px;
}
.ai-box .ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bbb7ff;
  font-weight: 770;
  font-size: 13px;
  margin-bottom: 8px;
}
.ai-box p {
  color: #a3b2cc;
  font-size: 11px;
}
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ai-actions .btn {
  font-size: 10px;
}
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
.inline-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  margin: 12px 0;
}
.file-row {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px 12px;
  background: #1b2940;
  border-radius: 8px;
  margin-bottom: 7px;
  font-size: 11px;
}
.file-row a {
  color: #b9acff;
}
.file-row small {
  margin-left: auto;
  color: var(--faint);
}
.load-mini {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid #4a5773;
  border-top-color: #b1a3ff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: -2px;
  margin-right: 7px;
}
.spinner {
  display: inline-block;
  width: 23px;
  height: 23px;
  border: 3px solid #3a4258;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loader {
  text-align: center;
  padding: 90px;
  color: var(--muted);
}
.loader .spinner {
  display: block;
  margin: 0 auto 14px;
}
#toast-zone {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.toast {
  padding: 13px 17px;
  border: 1px solid #435479;
  background: #1c2940;
  border-radius: 11px;
  box-shadow: var(--shadow);
  font-size: 12px;
  max-width: 350px;
  color: #dce8ff;
}
.toast.error {
  border-color: #8a4756;
  color: #ffd4d9;
}
.toast.success {
  border-color: #3c7567;
  color: #b2f2e0;
}
.mobile-only {
  display: none;
}
body.light {
  color-scheme: light;
  --bg: #f4f7fc;
  --surface: #fff;
  --surface2: #edf1f9;
  --surface3: #e6ecf7;
  --line: #d9e1f0;
  --line2: #e6eaf3;
  --text: #17243b;
  --muted: #64728a;
  --faint: #8795ac;
  --shadow: 0 18px 50px #29395520;
}
body.light .sidebar {
  background: #f9fbff;
  border-color: #dce4f0;
}
body.light .topbar {
  background: #f9fbffe6;
}
body.light .workspace-picker,body.light .ai-connection {
  background: #eff3fb;
  border-color: #dce4f0;
}
body.light .nav-link {
  color: #5b6b88;
}
body.light .nav-link.active {
  background: #e9e6ff;
  border-color: #d1cbfb;
  color: #554bbe;
}
body.light .metric-icon {
  background: #edeafb;
}
body.light .panel,body.light .metric,body.light .kb-card,body.light .asset-card {
  box-shadow: 0 3px 15px #36476608;
}
body.light .ticket-table th {
  background: #f7f9fe;
}
body.light .ticket-table tbody tr:hover {
  background: #f1f4fa;
}
body.light .ticket-table .ticket-title {
  color: #1b2940;
}
body.light .search-input,body.light .filter-select,body.light .top-search {
  background: #fff;
  color: #50627d;
}
body.light .field input,body.light .field select,body.light .field textarea {
  background: #fff;
  color: #1d2942;
}
body.light .dialog {
  background: #fff;
}
body.light .detail-desc,body.light .chat-bubble,body.light .tip-card {
  background: #f3f6fb;
  color: #263650;
}
body.light .chat-compose {
  background: #f3f6fb;
}
body.light .chat-compose textarea {
  color: #263650;
}
body.light .auth-wrap {
  background: #f3f5fc;
}
body.light .auth-card {
  background: #fff;
  color: #17243b;
}
body.light .gradient-banner {
  color: white;
}
body.light .team-row strong {
  color: #24334d;
}
body.light .settings-card h3 {
  color: #1e2c46;
}
@media(max-width:1250px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2,1fr);
  }
  .top-search {
    width: 180px;
  }
  .page-container {
    padding: 25px 25px 50px;
  }
}
@media(max-width:900px) {
  :root {
    --sidebar: 224px;
  }
  .sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }
  .topbar {
    padding: 0 18px;
  }
  .top-search {
    display: none;
  }
  .copilot-layout {
    grid-template-columns: 1fr;
  }
  .page-container {
    padding: 22px 18px 50px;
  }
}
@media(max-width:670px) {
  .mobile-only {
    display: inline-block;
  }
  .sidebar {
    transform: translateX(-110%);
    transition: transform .2s;
    box-shadow: var(--shadow);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-area {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 62px;
    padding: 0 13px;
  }
  .top-actions {
    gap: 3px;
  }
  .top-create {
    padding: 7px 10px;
    font-size: 0;
  }
  .top-create .plus {
    font-size: 23px;
  }
  .separator {
    display: none;
  }
  .page-container {
    padding: 19px 13px 40px;
  }
  .page-head {
    align-items: start;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .page-head-actions {
    padding-top: 5px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 14px 13px;
    min-height: 119px;
  }
  .metric-value {
    font-size: 25px;
  }
  .metric-icon {
    height: 27px;
    width: 27px;
    font-size: 14px;
  }
  .gradient-banner {
    padding: 18px;
  }
  .dashboard-grid {
    gap: 12px;
  }
  .ticket-table th:nth-child(n+4),.ticket-table td:nth-child(n+4) {
    display: none;
  }
  .ticket-table th,.ticket-table td {
    padding: 12px 10px;
  }
  .panel-head {
    padding: 15px;
  }
  .panel-body {
    padding: 0 15px 16px;
  }
  .search-input {
    min-width: 100%;
  }
  .filter-select {
    flex: 1;
    min-width: 100px;
  }
  .form-grid,.detail-split {
    grid-template-columns: 1fr;
  }
  .dialog-top,.dialog-content {
    padding-left: 18px;
    padding-right: 18px;
  }
  .dialog {
    width: 100%;
  }
  .auth-card {
    padding: 25px;
  }
  .topbar .breadcrumb {
    font-size: 11px;
  }
}
/* NexusDesk 2.0 — actual interactive enhancements */
.nd-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.statbox {
  padding: 20px;
  display: grid;
  gap: 8px;
}
.statbox small {
  color: var(--muted,#9ca3b5);
  font-size: 12px;
}
.statbox strong {
  font-size: 29px;
  line-height: 1.2;
}
.nd-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.audit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 0;
  border-bottom: 1px solid var(--border,rgba(255,255,255,.08));
  font-size: 12px;
}
.audit-row span {
  flex: 1;
  color: var(--muted,#9ca3b5);
}
.audit-row small {
  opacity: .7;
}
.nd-small-head {
  margin: 14px 0 8px;
  font-size: 13px;
}
.nd-sources {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  margin-top: 12px;
}
.nd-source {
  background: rgba(105,113,200,.08);
  border: 1px solid rgba(156,163,255,.18);
  color: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
  font: inherit;
  min-width: 0;
}
.nd-source strong {
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.nd-source small {
  font-size: 10px;
  opacity: .68;
}
.nd-source span {
  font-size: 11px;
  opacity: .78;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.nd-source:hover {
  border-color: #7d79ff;
  background: rgba(125,121,255,.12);
}
.nd-chat-sources {
  border-top: 1px solid rgba(150,155,190,.2);
  margin-top: 14px;
  padding-top: 10px;
}
.nd-chat-sources>.nd-sources {
  max-height: 190px;
}
.nd-notification-list {
  display: grid;
  gap: 8px;
}
.nd-inbox-item {
  background: rgba(145,150,180,.06);
  border: 1px solid rgba(145,150,180,.12);
  border-radius: 10px;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 5px;
  padding: 12px;
  font: inherit;
  cursor: pointer;
}
.nd-inbox-item strong {
  font-size: 13px;
}
.nd-inbox-item span {
  font-size: 12px;
  opacity: .78;
}
.nd-inbox-item small {
  opacity: .57;
  font-size: 10px;
}
.nd-bell {
  position: relative;
}
.nd-notif-count {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  background: #7d79ff;
  color: white;
  display: grid;
  place-items: center;
  font-size: 10px;
}
.nd-task-create {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 20px;
}
.nd-task-create input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid rgba(160,160,190,.2);
  border-radius: 7px;
  padding: 10px;
  color: inherit;
  font: inherit;
}
.nd-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(160,160,190,.1);
  gap: 12px;
}
.nd-task-row label {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  flex: 1;
}
.nd-task-done {
  text-decoration: line-through;
  opacity: .5;
}
.nd-task-row input {
  accent-color: #8c7cff;
}
@media(max-width:720px) {
  .nd-stats {
    grid-template-columns: 1fr;
  }
  .team-row {
    flex-wrap: wrap;
  }
  .nd-actions {
    width: 100%;
  }
}
/* NexusDesk 3.3: explicit, persisted AI database approval */
.nd-action-card {
  margin: 12px 18px;
  padding: 16px 18px;
  border: 1px solid rgba(128,110,255,.42);
  border-radius: 14px;
  background: linear-gradient(120deg,rgba(112,95,235,.14),rgba(21,30,55,.14));
}
.nd-action-label {
  font-size: 11px;
  letter-spacing: .09em;
  font-weight: 800;
  color: #b5a8ff;
  margin-bottom: 12px;
}
.nd-action-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}
.nd-action-card p {
  font-size: 13px;
  color: var(--muted,#aab3cc);
  margin-bottom: 12px;
}
.nd-action-wizard {
  max-width: 760px;
}
.nd-action-progress {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
  margin-bottom: 24px;
}
.nd-action-progress span {
  padding: 10px 7px;
  text-align: center;
  font-size: 12px;
  border-radius: 9px;
  background: rgba(120,132,170,.13);
  color: var(--muted,#9aa5bf);
  border: 1px solid transparent;
}
.nd-action-progress span.active {
  border-color: #9182ff;
  color: #eeeaff;
  background: rgba(140,115,255,.2);
}
.nd-action-progress span.done {
  color: #75d7b6;
}
.nd-action-step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.nd-action-fields>.field {
  margin-bottom: 17px;
}
.nd-action-fields .form-grid {
  margin: 14px 0;
}
.nd-action-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  margin-bottom: 14px;
  background: rgba(118,128,155,.1);
  border-radius: 10px;
  font-size: 13px;
}
.nd-action-summary span {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.nd-action-warning {
  margin: 12px 0 0;
  font-size: 12px;
}
.nd-action-success h3 {
  margin: 10px 0 18px;
}
.nd-action-success p {
  margin: 9px 0;
}
@media(max-width:640px) {
  .nd-action-progress {
    grid-template-columns: 1fr;
  }
  .nd-action-progress span {
    padding: 7px;
  }
  .nd-action-summary span {
    display: block;
  }
}
/* NexusDesk 3.4: visible, independently clickable AI approval control */
.nd-chat-action {
  align-self: stretch;
  margin: 0 20px 10px 46px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #8174e7;
  background: linear-gradient(115deg,#292455,#16273e);
  box-shadow: 0 12px 26px #0002;
  display: grid;
  gap: 8px;
}
.nd-chat-action strong {
  display: block;
  font-size: 13px;
  color: #f0edff;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.nd-chat-action p {
  margin: 0;
  color: #b6c5de;
  font-size: 12px;
  line-height: 1.6;
}
.nd-chat-action .btn {
  justify-self: start;
}
.nd-ai-version {
  font-size: 10px;
  letter-spacing: .02em;
  border: 1px solid #515790;
  border-radius: 6px;
  color: #bdb7ff;
  padding: 2px 6px;
  vertical-align: middle;
  font-weight: 700;
  margin-left: 5px;
}
@media(max-width:600px) {
  .nd-chat-action {
    margin: 0 12px 12px;
    padding: 14px;
  }
  .nd-chat-action .btn {
    width: 100%;
  }
}
/* NexusDesk 3.5 live notifications */
.nd-inbox-item.nd-unread {
  border-color: rgba(125,121,255,.5);
  background: rgba(125,121,255,.11);
}
.nd-inbox-item.nd-unread strong:before {
  content: '•';
  color: #aa9aff;
  margin-right: 7px;
}
.nd-bell {
  font-size: 18px;
  line-height: 1;
}
.nd-notif-count {
  font-family: system-ui,Arial,sans-serif;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
}

/* Saved AI conversations: private to the current technician account. */
.nd-saved-chat-list { display:flex; flex-direction:column; gap:5px; max-height:320px; overflow-y:auto; margin:10px 0; }
.nd-saved-chat-row { display:flex; align-items:center; gap:4px; border:1px solid var(--border, #dce1ec); border-radius:9px; padding:3px; }
.nd-saved-chat-row.selected { border-color:var(--accent, #6765e9); background:rgba(119,110,220,.08); }
.nd-chat-select { flex:1; min-width:0; border:0; background:transparent; color:inherit; text-align:left; padding:9px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font:inherit; font-size:12px; }
.nd-chat-delete { border:0; background:transparent; color:inherit; font-size:21px; padding:3px 10px; cursor:pointer; opacity:.7; }
.nd-chat-delete:hover { color:#d95162; opacity:1; }

/* ───────────────────────────────────────────────────────────────────
   User account settings (v3.9)
   ─────────────────────────────────────────────────────────────────── */
.profile-trigger {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  padding: 7px 6px;
  margin: -7px -6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
}
.profile-trigger:hover, .profile-trigger:focus-visible { background: var(--hover, rgba(129,145,192,.15)); }
.profile-trigger:focus-visible { outline: 2px solid #8a98ff; outline-offset: 2px; }
.profile-chevron { font-size: 14px; color: var(--muted); }
.avatar[data-color="teal"] { background: linear-gradient(140deg,#16a699,#156475); border-color:#3acbb5; }
.avatar[data-color="amber"] { background: linear-gradient(140deg,#e89a3b,#88511c); border-color:#e7bc72; }
.avatar[data-color="rose"] { background: linear-gradient(140deg,#c85088,#702d64); border-color:#e487aa; }
.profile-intro { display:flex; gap:14px; align-items:center; padding:14px; border-radius:12px; background:var(--surface-secondary,rgba(108,127,167,.10)); margin-bottom:22px; }
.profile-intro strong, .profile-intro small { display:block; }
.profile-intro strong { font-size:16px; }
.profile-intro small { color:var(--muted); margin-top:4px; font-size:12px; }
.profile-big-avatar { width:52px; height:52px; font-size:17px; border-radius:15px; }
.profile-section-title { font-size:13px; font-weight:750; padding-top:14px; margin:10px 0 12px; border-top:1px solid var(--line); }
.profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px 14px; }
.profile-hint { color:var(--muted); font-size:12px; line-height:1.6; margin:7px 0 15px; }
@media (max-width:540px) { .profile-grid { grid-template-columns:1fr; } .profile-trigger { gap:8px; } }

/* ================================================================
   Optional Doom Break trial — separate nested sidebar item
   Remove this section along with the trial JS to retire the feature.
   ================================================================ */
.nd-copilot-mode-tabs { display:flex; gap:8px; padding:5px; margin:0 0 18px; border:1px solid var(--border,#303749); border-radius:13px; background:var(--card,#141a2c); width:fit-content; max-width:100%; }
.nd-copilot-mode { border:0; border-radius:9px; padding:10px 18px; background:transparent; color:inherit; cursor:pointer; font-weight:700; font:inherit; white-space:nowrap; }
.nd-copilot-mode.selected { background:#3e387e; color:white; box-shadow:0 2px 10px #15132b44; }
.nd-copilot-mode:focus-visible { outline:2px solid #a79bff; outline-offset:3px; }
.nd-trial-tag { display:inline-block; color:#ffd99b; font-size:10px; letter-spacing:.8px; padding:3px 5px; border:1px solid #9c7543; border-radius:4px; margin-left:7px; }
@media (max-width:700px) { .nd-doom-heading { flex-direction:column; gap:12px; } .nd-doom-help { grid-template-columns:1fr; } .nd-doom-screen { min-height:240px; } .nd-copilot-mode { padding:9px 10px; font-size:12px; } }

/* Secondary navigation item directly beneath AI Copilot. */
.nd-doom-sidebar-link { margin-left:12px; padding-left:23px; border-left:2px solid var(--line,#303749); }
.nd-doom-sidebar-link .nav-icon { color:#e5a162; }
.nd-doom-sidebar-link .nav-beta { font-size:9px; color:#e5a162; background:#54312b; }

/* 3.10.5: independently scrolling navigation, without scroll chaining */
.sidebar { height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.sidebar-brand { flex-shrink: 0; }
.sidebar-backdrop { display:none; }
.sidebar-close { border: 0; border-radius: 9px; background: #202d43; color: #fff; width: 38px; height: 38px; font-size: 23px; cursor: pointer; flex: 0 0 38px; }
@media(max-width:670px) {
 .sidebar.mobile-open { z-index: 62; }
 .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(5,12,25,.68); border: 0; z-index: 61; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s; }
 .sidebar.mobile-open + .sidebar-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
 .sidebar-close { display: inline-grid; place-items: center; }
 body.sidebar-open { overflow: hidden !important; touch-action: none; }
 body.sidebar-open .sidebar { touch-action: pan-y; }
}

/* NexusDesk 3.10.6: experimental mobile app interface; desktop unchanged */
.mobile-tabbar { display: none; }
@media (max-width:670px) {
  html { -webkit-text-size-adjust:100%; }
  body { overscroll-behavior-y:contain; }
  .app-shell { min-height:100dvh; }
  .main-area { min-height:100dvh; padding-bottom:calc(78px + env(safe-area-inset-bottom, 0px)); }
  .topbar { height:64px; min-height:64px; padding:0 15px; background:var(--bg,#0b1120); border-bottom:1px solid var(--line2); }
  .topbar .top-left { min-width:0; }
  .topbar .breadcrumb { font-size:12px; max-width:140px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .top-actions { gap:5px; }
  .top-search { width:40px; height:40px; min-width:40px; padding:0; justify-content:center; font-size:0; border-radius:12px; }
  .top-search span { font-size:23px; }
  .top-search kbd, #refresh, #theme-toggle { display:none; }
  .top-actions .icon-btn { width:40px; height:40px; min-width:40px; }
  .top-create { height:40px; min-width:40px; border-radius:12px; }
  .page-container { padding:21px 14px 30px; width:100%; max-width:100%; overflow-wrap:anywhere; }
  .page-head { gap:10px; margin-bottom:18px; }
  .page-head h1 { font-size:clamp(23px,6.5vw,29px); letter-spacing:-.6px; }
  .page-head p { line-height:1.5; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
  .metric { border-radius:18px; min-height:118px; padding:15px; }
  .metric-value { font-size:clamp(24px,7vw,31px); }
  .panel, .statbox, .gradient-banner, .auth-card { border-radius:18px; }
  .panel-head { padding:16px; }
  .panel-body { padding:0 16px 17px; }
  button, select, input { -webkit-tap-highlight-color:transparent; }
  .btn, .nav-link, .icon-btn { touch-action:manipulation; }
  input, select, textarea { font-size:16px; max-width:100%; }
  .mobile-tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:35; height:calc(70px + env(safe-area-inset-bottom, 0px)); padding:6px 7px calc(7px + env(safe-area-inset-bottom, 0px)); background:rgba(13,20,36,.97); border-top:1px solid #29364c; backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); box-shadow:0 -8px 24px #02071433; justify-content:space-around; align-items:stretch; }
  .mobile-tab { color:#9caec7; background:transparent; border:0; flex:1 1 0; min-width:0; border-radius:13px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font:600 10px/1.2 inherit; font-family:inherit; font-size:10px; font-weight:650; cursor:pointer; touch-action:manipulation; }
  .mobile-tab-icon { font-size:24px; line-height:26px; height:27px; }
  .mobile-tab.active { color:#c4bcff; background:#7663e823; }
  .mobile-tab:focus-visible { outline:2px solid #a397ff; outline-offset:-2px; }
  .sidebar { width:min(86vw,340px); border-radius:0 20px 20px 0; padding-top:calc(19px + env(safe-area-inset-top, 0px)); padding-bottom:calc(18px + env(safe-area-inset-bottom, 0px)); }
  .sidebar-close { min-width:44px; min-height:44px; }
  .nav-link { min-height:44px; }
  .sidebar.mobile-open { box-shadow:12px 0 40px #0008; }
  .dialog { max-height:calc(100dvh - 12px); border-radius:20px 20px 0 0; }
  .dialog-content { overscroll-behavior:contain; }
  .mobile-tabbar .staff-only.hidden, .mobile-tabbar .hidden { display:none; }
}
@media (max-width:380px) { .page-container { padding-inline:10px; } .topbar { padding-inline:9px; } .mobile-tabbar { padding-inline:3px; } }
@media (max-width:670px) and (prefers-reduced-motion:reduce) { .sidebar, .sidebar-backdrop { transition:none !important; } }
body.light .mobile-tabbar { background:rgba(250,251,255,.97); border-color:#dbe2ef; box-shadow:0 -6px 23px #29364c18; }
body.light .mobile-tab { color:#53627e; }
body.light .mobile-tab.active { background:#6e58d91b; color:#5746bf; }

/* 3.10.7 mobile UX polish. Does not affect desktop. */
@media (max-width:670px) {
  html, body { max-width:100%; overflow-x:clip; }
  .main-area { width:100%; margin-left:0; }
  .topbar { height:calc(60px + env(safe-area-inset-top,0px)); min-height:calc(60px + env(safe-area-inset-top,0px)); padding-top:env(safe-area-inset-top,0px); gap:7px; }
  .topbar .breadcrumb { font-size:13px; font-weight:750; max-width:110px; }
  #menu-toggle { display:none; }
  .top-create { padding:0 12px; font-size:0; gap:0; width:43px; justify-content:center; }
  .top-create .plus { font-size:25px; }
  .top-search { flex:0 0 40px; }
  .top-actions .separator { display:none; }
  .mobile-tabbar { height:calc(67px + env(safe-area-inset-bottom,0px)); padding:5px 8px calc(5px + env(safe-area-inset-bottom,0px)); }
  .mobile-tab { position:relative; min-height:54px; font-size:11px; gap:2px; }
  .mobile-tab-icon { font-size:23px; }
  .mobile-tab.active::before { content:''; position:absolute; top:0; width:24px; height:3px; border-radius:0 0 5px 5px; background:#a99cff; }
  .mobile-tab:active { transform:scale(.96); }
  .page-container { padding:19px 13px calc(96px + env(safe-area-inset-bottom,0px)); }
  .page-head { flex-direction:column; align-items:stretch; gap:13px; margin-bottom:19px; }
  .page-head-actions { display:flex; flex-wrap:wrap; gap:8px; }
  .page-head-actions .btn { min-height:44px; flex:1 1 auto; justify-content:center; }
  .page-head h1 { font-size:clamp(24px,7vw,30px); line-height:1.12; }
  .page-head p { font-size:13px; }
  .toolbar { gap:8px; margin-bottom:13px; }
  .toolbar .search-input { width:100%; min-width:0; flex-basis:100%; min-height:46px; }
  .toolbar .filter-select { flex:1 1 calc(50% - 5px); min-width:0; max-width:none; height:44px; font-size:13px; }
  .panel { min-width:0; overflow:hidden; }
  .panel-head { gap:10px; flex-wrap:wrap; }
  .ticket-table { min-width:640px; }
  .panel > div[style*="overflow:auto"] { overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
  .table-foot { flex-wrap:wrap; gap:10px; justify-content:center; text-align:center; }
  .table-foot > div { justify-content:center; width:100%; }
  .table-foot .btn { min-height:44px; flex:1; }
  .metric { min-width:0; padding:14px; border-radius:17px; }
  .metric-value { font-variant-numeric:tabular-nums; }
  .dialog { width:100%; max-width:100%; max-height:calc(100dvh - env(safe-area-inset-top,0px) - 12px); }
  .dialog-top { padding-top:calc(16px + env(safe-area-inset-top,0px)); }
  .dialog-content { max-height:calc(100dvh - 125px - env(safe-area-inset-bottom,0px)); overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .btn, .icon-btn, .nav-link, .mobile-tab { -webkit-tap-highlight-color:transparent; }
  :is(.btn,.icon-btn,.nav-link,.mobile-tab):focus-visible { outline:2px solid #b0a5ff; outline-offset:2px; }
  .sidebar { max-height:100dvh; overscroll-behavior:contain; }
  .sidebar-brand { position:sticky; top:0; background:inherit; z-index:2; }
}
@media (max-width:390px) {
  .topbar .breadcrumb { max-width:83px; }
  .page-container { padding-left:10px; padding-right:10px; }
  .mobile-tabbar { padding-left:2px; padding-right:2px; }
}
@media (max-width:670px) and (prefers-reduced-motion:reduce) { .mobile-tab:active { transform:none; } }

/* 3.10.9: mobile dashboard should not display the large AI emblem. */
@media (max-width: 670px) {
  .gradient-banner::after { content: none !important; display: none !important; }
}

/* ================================================================
   3.11 utilities: replace inline style="" attributes, which the
   strict Content-Security-Policy (style-src 'self') blocks.
   ================================================================ */
.u-scroll { overflow:auto; }
.u-mt11 { margin-top:11px; }
.u-mt20 { margin-top:20px; }
.u-mb12 { margin-bottom:12px; }
.u-mb19 { margin-bottom:19px; }
.u-m-auto { margin:auto; }
.u-fs11 { font-size:11px; }
.u-fs12 { font-size:12px; }
.u-maxw250 { max-width:250px; }
.u-flex1 { flex:1; min-width:0; }
.u-span-all { grid-column:1/-1; }
.u-row8 { display:flex; gap:8px; }
.u-row7-wrap { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.u-row9-wrap { display:flex; gap:9px; flex-wrap:wrap; }
.u-row-between { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.u-end-pb15 { display:flex; align-items:end; justify-content:end; padding-bottom:15px; }
.pbar>i.pbar-fill { width:0; transition:width .5s ease; }
.pbar>i.pbar-urgent { background:#ff7486; }
.pbar>i.pbar-high { background:#ffb675; }
.pbar>i.pbar-medium { background:#837bff; }
.pbar>i.pbar-low { background:#57d8b7; }
