:root {
  --primary: #1769c2;
  --primary-dark: #0e4f9c;
  --primary-soft: #eaf3ff;
  --navy: #15304f;
  --text: #25364a;
  --muted: #6c7c90;
  --border: #dfe7f1;
  --border-strong: #ccd7e5;
  --background: #f3f6fa;
  --surface: #ffffff;
  --success: #16845b;
  --success-soft: #e9f8f1;
  --warning: #b96800;
  --warning-soft: #fff4df;
  --danger: #c43c45;
  --danger-soft: #fff0f1;
  --violet: #6d54c7;
  --shadow: 0 8px 24px rgba(25, 55, 88, 0.07);
  --radius: 12px;
  --sidebar-width: 248px;
  --topbar-height: 68px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-size: 14px;
  line-height: 1.6;
}

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

a:hover {
  color: var(--primary-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 270px;
  z-index: 1000;
  padding: 8px 14px;
  color: #fff;
  background: var(--primary-dark);
  border-radius: 6px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.mono {
  font-family: Consolas, "Microsoft YaHei UI", monospace;
  letter-spacing: 0.01em;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.pre-line {
  white-space: pre-line;
}

.align-right {
  text-align: right !important;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

/* 应用框架 */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  flex-direction: column;
  color: #dce9f8;
  background: linear-gradient(180deg, #123d6b 0%, #0e2d50 100%);
  box-shadow: 5px 0 18px rgba(15, 44, 78, 0.12);
}

.sidebar__brand {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #75b9ff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.sidebar__brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.25;
}

.sidebar__brand-text strong {
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.03em;
}

.sidebar__brand-text small {
  margin-top: 3px;
  color: #94b7da;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.sidebar__nav {
  flex: 1;
  padding: 18px 14px;
}

.nav-section-label {
  margin: 17px 12px 7px;
  color: #7fa7ce;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.nav-section-label:first-child {
  margin-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  padding: 10px 13px;
  color: #c7d9ec;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.is-active {
  color: #fff;
  background: #1c68b5;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 5px 14px rgba(0, 30, 68, 0.2);
}

.sidebar__footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 9px;
}

.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #e9f4ff;
  background: #2878c8;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.user-panel__info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.35;
}

.user-panel__info strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
}

.user-panel__info small {
  color: #92b2d1;
  font-size: 11px;
}

.icon-btn {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn--light {
  color: #bed5ec;
  background: transparent;
}

.icon-btn--light:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.app-main {
  display: flex;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(9px);
}

.topbar__title {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.35;
}

.topbar__title strong {
  color: var(--navy);
  font-size: 16px;
}

.topbar__title span {
  color: var(--muted);
  font-size: 11px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #4d6075;
  font-size: 12px;
}

.system-state i {
  width: 7px;
  height: 7px;
  background: #20a36d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #e2f6ee;
}

.topbar-logout {
  padding: 0;
  color: #62758a;
  background: none;
  border: 0;
  cursor: pointer;
}

.topbar-logout:hover {
  color: var(--primary);
}

.menu-button {
  display: none;
  width: 38px;
  height: 36px;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 3px;
}

.sidebar-overlay {
  display: none;
}

.content {
  width: 100%;
  max-width: 1640px;
  min-height: calc(100vh - var(--topbar-height) - 58px);
  margin: 0 auto;
  padding: 26px 30px 36px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 3px 0 0;
  color: #1b3554;
  font-size: 25px;
  line-height: 1.3;
}

.breadcrumb {
  margin: 0;
  color: #8392a5;
  font-size: 12px;
}

.page-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-heading__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.app-footer {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 30px;
  color: #8796a8;
  background: #fff;
  border-top: 1px solid var(--border);
  font-size: 11px;
}

/* 通用组件 */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel__header {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
}

.panel__header--bordered {
  border-bottom: 1px solid var(--border);
}

.panel__header h2,
.side-card h2,
.danger-zone h2,
.status-card h2 {
  margin: 0;
  color: #263d58;
  font-size: 16px;
}

.panel__header p,
.status-card__heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 16px;
  color: #334b65;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  color: inherit;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(32, 67, 105, 0.1);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn--primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn--primary:hover {
  color: #fff;
  background: var(--primary-dark);
}

.btn--secondary {
  color: #155a9f;
  background: #edf6ff;
  border-color: #cfe4f8;
}

.btn--secondary:hover {
  color: #104c88;
  background: #e2f0fe;
}

.btn--ghost {
  color: #52677d;
  background: #fff;
}

.btn--danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn--danger:hover {
  color: #fff;
  background: #a92f38;
}

.btn--small {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
}

.btn--large {
  min-height: 46px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

.btn__icon {
  margin-left: -2px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #eef6ff;
  border: 1px solid #cee3fa;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(35, 70, 110, 0.07);
}

.alert__icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #508bc7;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.alert__close {
  margin-left: auto;
  padding: 0 3px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  opacity: 0.65;
}

.alert--success {
  color: #176748;
  background: var(--success-soft);
  border-color: #bee7d4;
}

.alert--success .alert__icon {
  background: var(--success);
}

.alert--danger {
  color: #9d3039;
  background: var(--danger-soft);
  border-color: #f1cbd0;
}

.alert--danger .alert__icon {
  background: var(--danger);
}

.alert--warning {
  color: #87510d;
  background: var(--warning-soft);
  border-color: #efd8a8;
}

.alert--warning .alert__icon {
  background: var(--warning);
}

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  white-space: nowrap;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge__dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.badge--success {
  color: #137149;
  background: #e8f7f0;
}

.badge--danger {
  color: #b63640;
  background: #ffeaec;
}

.badge--warning {
  color: #a35e06;
  background: #fff0d5;
}

.badge--info {
  color: #1769a8;
  background: #e8f3fd;
}

.badge--neutral {
  color: #667489;
  background: #edf1f5;
}

.badge--low {
  color: #557087;
  background: #eef4f7;
}

.empty-state {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 34px;
  text-align: center;
}

.empty-state__icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #7da5cc;
  background: #eef5fc;
  border-radius: 50%;
}

.empty-state h3 {
  margin: 12px 0 2px;
  color: #334b65;
  font-size: 16px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
}

/* 首页 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 17px;
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 126px;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 20px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card::after {
  position: absolute;
  top: -32px;
  right: -32px;
  width: 105px;
  height: 105px;
  background: currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.035;
}

.stat-card:hover {
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24, 58, 94, 0.11);
}

.stat-card__icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 11px;
}

.stat-card__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card__body {
  display: grid;
  min-width: 0;
  flex: 1;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 8px;
}

.stat-card__body small {
  grid-column: 1 / -1;
  color: #60748a;
}

.stat-card__body strong {
  color: #1d3857;
  font-size: 30px;
  line-height: 1.15;
}

.stat-card__body em {
  color: #92a0b0;
  font-size: 11px;
  font-style: normal;
}

.stat-card__arrow {
  color: #aab8c7;
  font-size: 23px;
}

.stat-card--green .stat-card__icon {
  color: var(--success);
  background: var(--success-soft);
}

.stat-card--red .stat-card__icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.stat-card--violet .stat-card__icon {
  color: var(--violet);
  background: #f0edfc;
}

.ticket-summary {
  display: grid;
  grid-template-columns: 230px 1fr;
  margin-bottom: 17px;
  overflow: hidden;
  background: #173f6c;
  border: 1px solid #173f6c;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ticket-summary__heading {
  display: flex;
  min-height: 112px;
  justify-content: space-between;
  flex-direction: column;
  padding: 19px 21px;
  color: #fff;
  background: linear-gradient(135deg, #174878, #12345b);
}

.ticket-summary__heading div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.ticket-summary__heading .section-kicker {
  position: absolute;
}

.ticket-summary__heading strong {
  margin-top: 25px;
  font-size: 27px;
}

.ticket-summary__heading small {
  color: #c4d8ec;
}

.ticket-summary__heading > a {
  color: #d6e8fa;
  font-size: 12px;
}

.ticket-summary__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.11);
}

.summary-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  color: #fff;
  background: #fff;
}

.summary-item:hover {
  color: #fff;
  filter: brightness(0.985);
}

.summary-item--pending {
  color: #34536f;
}

.summary-item--processing {
  color: #34536f;
}

.summary-item--resolved {
  color: #34536f;
}

.summary-item:hover {
  color: #23415e;
}

.summary-item__indicator {
  width: 9px;
  height: 42px;
  background: #4b94d6;
  border-radius: 6px;
}

.summary-item--processing .summary-item__indicator {
  background: #e09b2e;
}

.summary-item--resolved .summary-item__indicator {
  background: #31a276;
}

.summary-item > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.summary-item small {
  color: #6d7e8f;
  font-size: 12px;
}

.summary-item strong {
  color: #223d59;
  font-size: 25px;
  line-height: 1.15;
}

.summary-item em {
  margin-left: auto;
  color: #94a1af;
  font-size: 11px;
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(290px, 0.75fr);
  gap: 17px;
}

.dashboard-grid__main,
.dashboard-grid__side {
  min-width: 0;
}

.section-kicker {
  color: #7690aa;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.text-link {
  font-size: 12px;
  font-weight: 600;
}

.activity-list {
  margin: 0;
  padding: 0 20px 15px;
  list-style: none;
}

.activity-list li {
  position: relative;
  display: grid;
  grid-template-columns: 13px 1fr;
  gap: 10px;
  padding: 11px 0;
}

.activity-list li:not(:last-child)::before {
  position: absolute;
  top: 25px;
  bottom: -10px;
  left: 5px;
  width: 1px;
  background: #dce6f0;
  content: "";
}

.activity-list__marker {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  background: #5a9bd7;
  border: 3px solid #e7f2fc;
  border-radius: 50%;
}

.activity-list__content {
  min-width: 0;
}

.activity-list__content > a {
  color: #2a4561;
  font-weight: 700;
}

.activity-list__content p {
  margin: 1px 0;
  overflow: hidden;
  color: #5e7083;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list__content small {
  color: #96a3b2;
  font-size: 11px;
}

.compact-empty {
  display: flex;
  min-height: 200px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-direction: column;
  color: var(--muted);
}

/* 表格与筛选 */
.filter-panel {
  margin-bottom: 16px;
  padding: 15px;
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-form__search {
  position: relative;
  min-width: 260px;
  flex: 1;
}

.filter-form__search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #8394a6;
  stroke-width: 1.7;
  stroke-linecap: round;
  transform: translateY(-50%);
}

.filter-form__search input {
  width: 100%;
  padding-left: 40px;
}

.filter-form__select select {
  min-width: 150px;
}

.filter-form__select--asset select {
  min-width: 260px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: #253b54;
  background: #fff;
  border: 1px solid #cbd7e4;
  border-radius: 7px;
  outline: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  min-height: 94px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a2aebb;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #5b9bd4;
  box-shadow: 0 0 0 3px rgba(48, 130, 203, 0.12);
}

.list-panel {
  overflow: hidden;
}

.list-hint {
  color: #8392a4;
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: #405368;
  font-size: 13px;
}

.data-table th {
  padding: 11px 14px;
  color: #687a8d;
  background: #f7f9fc;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e9eef4;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fafcff;
}

.primary-cell,
.asset-cell {
  display: block;
  min-width: 105px;
  color: #2a415b;
  font-weight: 650;
}

.primary-cell:hover,
.asset-cell:hover {
  color: var(--primary);
}

.secondary-cell,
.asset-cell small {
  display: block;
  margin-top: 2px;
  color: #8998a9;
  font-size: 10px;
  font-weight: 400;
}

.code-link {
  color: #1765ad;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.date-cell {
  display: flex;
  color: #354d67;
  flex-direction: column;
  font-weight: 600;
}

.date-cell small {
  color: #8a98a8;
  font-weight: 400;
}

.subtle-link {
  color: #3e5873;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.table-actions form {
  display: inline-flex;
  margin: 0;
}

.table-action {
  display: inline-flex;
  padding: 3px 7px;
  color: #286ba8;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.table-action:hover {
  color: #164e82;
  background: #eaf4fd;
}

.table-action--danger {
  color: #bd3b45;
}

.table-action--danger:hover {
  color: #a12832;
  background: #fff0f1;
}

/* 表单 */
.record-form {
  display: grid;
  gap: 16px;
}

.form-panel {
  padding: 22px;
}

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.form-section-heading__number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #1766ad;
  background: #eaf4fd;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.form-section-heading h2 {
  margin: 0;
  color: #2b425c;
  font-size: 16px;
}

.form-section-heading p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 11px;
}

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

.form-group {
  min-width: 0;
}

.form-group--wide {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #344c65;
  font-size: 13px;
  font-weight: 650;
}

.required-mark {
  color: var(--danger);
}

.conditional-required {
  margin-left: 4px;
  padding: 2px 5px;
  color: #a95e00;
  background: #fff1d9;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.field-help {
  margin: 5px 0 0;
  color: #8a98a8;
  font-size: 11px;
}

.field-error {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 11px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 4px 0 10px;
}

.readonly-value {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: #405770;
  background: #f5f8fb;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.readonly-value small {
  color: #8b99a8;
  font-size: 10px;
}

/* 详情 */
.entity-hero {
  display: flex;
  min-height: 134px;
  align-items: center;
  gap: 17px;
  margin-bottom: 17px;
  padding: 22px 25px;
  background: linear-gradient(135deg, #f8fbff, #eef6fe);
  border: 1px solid #d5e5f5;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.entity-hero__icon {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  color: #2a77bd;
  background: #fff;
  border: 1px solid #dbe9f6;
  border-radius: 13px;
  box-shadow: 0 5px 14px rgba(39, 91, 139, 0.08);
}

.entity-hero__icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entity-hero--ticket .entity-hero__icon {
  color: #5a67b7;
}

.entity-hero--maintenance .entity-hero__icon {
  color: #16845b;
}

.entity-hero__main {
  min-width: 0;
  flex: 1;
}

.entity-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #66809b;
  font-size: 12px;
}

.entity-hero__main h2 {
  margin: 5px 0 3px;
  overflow: hidden;
  color: #1f3b59;
  font-size: 22px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.entity-hero__main p {
  margin: 0;
  color: #60748b;
}

.entity-hero__meta {
  display: grid;
  min-width: 215px;
  grid-template-columns: repeat(2, minmax(85px, 1fr));
  border-left: 1px solid #d8e5f1;
}

.entity-hero__meta div {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  flex-direction: column;
}

.entity-hero__meta div + div {
  border-left: 1px solid #d8e5f1;
}

.entity-hero__meta small {
  color: #75889b;
  font-size: 11px;
}

.entity-hero__meta strong {
  color: #233f5c;
  font-size: 22px;
}

.text-size-normal {
  font-size: 14px !important;
}

.text-size-small {
  font-size: 12px !important;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 305px;
  align-items: start;
  gap: 17px;
}

.detail-layout__main,
.detail-layout__side {
  display: grid;
  min-width: 0;
  gap: 17px;
}

.detail-panel {
  overflow: hidden;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 5px 21px 20px;
}

.detail-grid > div {
  min-width: 0;
  padding: 13px 8px;
  border-bottom: 1px dashed #e1e8f0;
}

.detail-grid__wide {
  grid-column: 1 / -1;
}

.detail-grid dt {
  margin-bottom: 3px;
  color: #8493a4;
  font-size: 11px;
}

.detail-grid dd {
  margin: 0;
  color: #334b64;
  overflow-wrap: anywhere;
}

.content-box {
  margin-top: 5px !important;
  padding: 11px 12px;
  background: #f7f9fc;
  border: 1px solid #e3eaf2;
  border-radius: 7px;
}

.content-box--success {
  color: #22694e !important;
  background: #edf8f3;
  border-color: #cfe9dd;
}

.content-box.is-empty {
  color: #8b99a8;
  font-style: italic;
}

.side-card,
.danger-zone,
.status-card,
.linked-asset-card,
.linked-ticket-card {
  padding: 19px;
}

.side-card > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: #405972;
  border-bottom: 1px solid var(--border);
}

.side-card > a:last-child {
  border-bottom: 0;
}

.danger-zone {
  background: #fffafa;
  border-color: #f0d7da;
  box-shadow: none;
}

.danger-zone h2 {
  color: #8f3239;
}

.danger-zone p {
  margin: 4px 0 13px;
  color: #8a676b;
  font-size: 12px;
}

.status-card__heading {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.status-card .form-group {
  margin-bottom: 12px;
}

.linked-asset-card .section-kicker,
.linked-ticket-card .section-kicker {
  display: block;
  margin-bottom: 7px;
}

.linked-asset-card__name,
.linked-ticket-card > a {
  display: block;
  color: #2d4660;
  font-size: 16px;
  font-weight: 700;
}

.linked-asset-card > p,
.linked-ticket-card > p {
  margin: 3px 0 11px;
  color: #718399;
  font-size: 11px;
}

.linked-asset-card dl {
  margin: 0 0 13px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.linked-asset-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.linked-asset-card dt,
.linked-asset-card dd {
  margin: 0;
}

.linked-asset-card dt {
  color: #8392a4;
  font-size: 11px;
}

.linked-ticket-card > div {
  margin-top: 10px;
}

.history-timeline {
  margin: 0;
  padding: 21px 23px 21px 33px;
  list-style: none;
}

.history-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 15px;
  padding: 0 0 21px 20px;
  border-left: 1px solid #dbe5ef;
}

.history-timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.history-timeline__dot {
  position: absolute;
  top: 4px;
  left: -6px;
  width: 11px;
  height: 11px;
  background: #3c87c9;
  border: 3px solid #e6f1fb;
  border-radius: 50%;
}

.history-timeline__date {
  display: flex;
  flex-direction: column;
}

.history-timeline__date strong {
  color: #4d6379;
  font-size: 12px;
}

.history-timeline__date small {
  color: #98a4b1;
  font-size: 10px;
}

.history-timeline__card {
  padding: 11px 13px;
  background: #f8fafc;
  border: 1px solid #e3eaf1;
  border-radius: 8px;
}

.history-timeline__heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.history-timeline__heading a {
  color: #304b67;
  font-weight: 650;
}

.history-timeline__heading span,
.history-timeline__card small {
  color: #8291a1;
  font-size: 11px;
}

.history-timeline__card p {
  margin: 5px 0;
  color: #53677c;
  font-size: 12px;
}

/* 登录页 */
.auth-shell {
  overflow-x: hidden;
  background: #f5f8fc;
}

.login-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(390px, 1.05fr) minmax(440px, 0.95fr);
}

.login-intro {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 65px;
  color: #fff;
  background: linear-gradient(145deg, #0c3f75 0%, #176db6 65%, #2c83c7 100%);
}

.login-intro::after {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
}

.login-intro__content {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 54px;
}

.login-brand__mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
}

.login-brand__mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.login-brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.login-brand strong {
  font-size: 19px;
}

.login-brand small {
  color: #c8e3fa;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.login-intro h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 3.4vw, 51px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.login-intro__content > p {
  max-width: 470px;
  margin: 0;
  color: #d7e9f8;
  font-size: 15px;
  line-height: 1.9;
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 34px 0 0;
  padding: 0;
  color: #e4f2fd;
  list-style: none;
  font-size: 13px;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.login-features span {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  font-size: 11px;
}

.login-intro__decoration {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.login-intro__decoration--one {
  right: -130px;
  bottom: -130px;
  width: 410px;
  height: 410px;
}

.login-intro__decoration--two {
  top: -95px;
  left: -85px;
  width: 280px;
  height: 280px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
  background: #f6f9fc;
}

.login-card {
  width: min(430px, 100%);
  padding: 35px 38px 29px;
  background: #fff;
  border: 1px solid #dfe7f0;
  border-radius: 15px;
  box-shadow: 0 18px 48px rgba(23, 58, 96, 0.11);
}

.login-card__heading > p {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.login-card__heading h2 {
  margin: 4px 0 2px;
  color: #183653;
  font-size: 25px;
}

.login-card__heading > span {
  color: var(--muted);
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 17px;
  margin-top: 28px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #7f90a3;
  stroke-width: 1.7;
  stroke-linecap: round;
  transform: translateY(-50%);
}

.input-with-icon input {
  min-height: 45px;
  padding-left: 40px;
}

.input-with-icon input[type="password"],
.input-with-icon input[data-password-visible="true"] {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: #8393a5;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #f0f5fa;
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.demo-account {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 21px;
  padding: 12px;
  color: #48617b;
  background: #f1f7fd;
  border: 1px solid #d8e8f7;
  border-radius: 8px;
}

.demo-account__icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #4a8ac4;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.demo-account strong {
  display: block;
  font-size: 12px;
}

.demo-account p {
  margin: 2px 0 0;
  font-size: 11px;
}

.demo-account p span {
  display: inline-block;
  width: 12px;
}

.demo-account code {
  color: #1f5f98;
  font-family: Consolas, monospace;
}

.login-card__footer {
  margin: 23px 0 0;
  color: #9aa6b4;
  font-size: 10px;
  text-align: center;
}

.auth-flashes {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: grid;
  width: min(390px, calc(100vw - 36px));
  gap: 8px;
}

/* 错误页面 */
.error-page,
.standalone-error {
  display: flex;
  min-height: 380px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 45px;
  text-align: center;
}

.error-page strong,
.standalone-error strong {
  color: #bad3eb;
  font-size: 76px;
  line-height: 1;
}

.error-page h2,
.standalone-error h2 {
  margin: 9px 0 3px;
  color: #29445f;
}

.error-page p,
.standalone-error p {
  max-width: 520px;
  margin: 0 0 18px;
  color: var(--muted);
}

/* 自适应 */
@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 275px;
  }

  .ticket-summary {
    grid-template-columns: 205px 1fr;
  }

  .summary-item em {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 244px;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    visibility: hidden;
    background: rgba(14, 33, 55, 0.45);
    border: 0;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  body.sidebar-open .sidebar-overlay {
    visibility: visible;
    opacity: 1;
  }

  .app-main {
    margin-left: 0;
  }

  .menu-button {
    display: flex;
  }

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

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

  .detail-layout__side > :first-child:last-child,
  .detail-layout__side > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .login-layout {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .login-intro {
    padding: 42px;
  }

  .login-panel {
    padding: 30px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 16px;
  }

  .topbar__title span,
  .system-state {
    display: none;
  }

  .topbar__right {
    gap: 8px;
  }

  .content {
    padding: 20px 15px 30px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 105px;
  }

  .ticket-summary {
    grid-template-columns: 1fr;
  }

  .ticket-summary__heading {
    min-height: 92px;
  }

  .ticket-summary__items {
    grid-template-columns: 1fr;
  }

  .summary-item {
    min-height: 82px;
  }

  .filter-form {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-form__search,
  .filter-form__select select,
  .filter-form__select--asset select {
    width: 100%;
    min-width: 0;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-group--wide,
  .detail-grid__wide {
    grid-column: auto;
  }

  .form-panel {
    padding: 18px;
  }

  .entity-hero {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px;
  }

  .entity-hero__meta {
    width: 100%;
    border-top: 1px solid #d8e5f1;
    border-left: 0;
  }

  .detail-layout__side {
    grid-template-columns: 1fr;
  }

  .detail-layout__side > :nth-child(n) {
    grid-column: auto;
  }

  .history-timeline li {
    grid-template-columns: 1fr;
  }

  .history-timeline__heading {
    flex-direction: column;
    gap: 2px;
  }

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

  .login-intro {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 22px;
  }

  .login-card {
    padding: 30px 25px 25px;
  }

  .app-footer {
    align-items: flex-start;
    justify-content: center;
    padding: 15px;
    flex-direction: column;
  }
}

@media print {
  .sidebar,
  .topbar,
  .app-footer,
  .page-heading__actions,
  .filter-panel,
  .danger-zone {
    display: none !important;
  }

  .app-main {
    margin: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .panel,
  .entity-hero {
    box-shadow: none;
  }
}

