:root {
  --bg: #eef2ee;
  --panel: #ffffff;
  --ink: #172820;
  --muted: #728078;
  --line: #dde5df;
  --green: #087957;
  --green-dark: #0b392c;
  --mint: #dff4e9;
  --amber: #b77417;
  --amber-soft: #fff1d6;
  --red: #c65545;
  --red-soft: #ffebe7;
  --blue: #3777bd;
  --blue-soft: #eaf3ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1100px;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #e7fff4;
  background: linear-gradient(145deg, #16a374, #07583f);
  box-shadow: 0 8px 20px rgba(7, 88, 63, 0.25);
  font-size: 26px;
  font-weight: 800;
}

.login-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(circle at 82% 14%, rgba(92, 192, 151, 0.24), transparent 27%),
    linear-gradient(145deg, #0d3228, #071b15);
}

.login-card {
  width: 430px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  color: var(--ink);
  background: #f8fbf8;
  box-shadow: 0 35px 90px rgba(0, 19, 12, 0.35);
}

.login-brand {
  display: flex;
  align-items: center;
}

.login-brand > div {
  display: flex;
  flex-direction: column;
  margin-left: 11px;
}

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

.login-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.login-copy {
  margin: 34px 0 24px;
}

.login-copy > span {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 1.6px;
}

.login-copy h1 {
  margin: 12px 0 10px;
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -0.8px;
}

.login-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

#loginForm {
  display: grid;
  gap: 14px;
}

#loginForm label {
  display: grid;
  gap: 7px;
  color: #5f6e66;
  font-size: 12px;
}

#loginForm input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

#loginForm input:focus {
  border-color: #7abda4;
  box-shadow: 0 0 0 3px rgba(8, 121, 87, 0.07);
}

.primary-button {
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #0d8763, #07543f);
  font-size: 14px;
  font-weight: 700;
}

.demo-entry {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #cfe2d9;
  border-radius: 12px;
  color: var(--green);
  background: var(--mint);
  font-size: 12px;
  font-weight: 650;
}

.login-tip {
  margin: 12px 0 0;
  color: #98a39d;
  font-family: Consolas, monospace;
  font-size: 10px;
  text-align: center;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 20px 14px;
  color: #e8f7ef;
  background:
    radial-gradient(circle at 0 0, rgba(51, 151, 113, 0.18), transparent 36%),
    #10271f;
}

.brand {
  display: flex;
  align-items: center;
  padding: 4px 8px 25px;
}

.brand > div {
  display: flex;
  flex-direction: column;
  margin-left: 10px;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.5px;
}

.brand small {
  margin-top: 4px;
  color: rgba(222, 250, 236, 0.42);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 1.2px;
}

#nav {
  display: grid;
  gap: 5px;
}

.nav-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(227, 248, 238, 0.58);
  background: transparent;
  text-align: left;
  font-size: 13px;
}

.nav-button > span {
  width: 24px;
  color: rgba(168, 239, 203, 0.58);
  font-size: 18px;
}

.nav-button i {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  border-radius: 8px;
  color: #ffdf9f;
  background: rgba(228, 160, 48, 0.13);
  font-size: 10px;
  font-style: normal;
}

.nav-button:hover,
.nav-button.active {
  border-color: rgba(132, 224, 180, 0.11);
  color: white;
  background: rgba(136, 226, 184, 0.09);
}

.nav-button.active > span {
  color: #8ee3b9;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(210, 247, 228, 0.1);
}

.live-connection {
  display: flex;
  align-items: center;
  color: rgba(221, 249, 234, 0.52);
  font-size: 10px;
}

.live-connection span {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #52d9a1;
  box-shadow: 0 0 8px rgba(82, 217, 161, 0.55);
}

.live-connection.offline span {
  background: #d87866;
}

#logoutButton {
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: rgba(221, 249, 234, 0.38);
  background: transparent;
  font-size: 10px;
}

.main {
  min-width: 0;
  padding: 0 30px 35px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 108px;
  border-bottom: 1px solid rgba(35, 67, 53, 0.08);
}

.crumb {
  color: var(--muted);
  font-size: 10px;
}

.crumb strong {
  color: #53635a;
  font-weight: 600;
}

.topbar h2 {
  margin: 6px 0 0;
  font-size: 24px;
  letter-spacing: -0.6px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.region-pill,
.clock,
.operator {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

.operator {
  color: var(--green);
  background: var(--mint);
}

.view {
  display: none;
  padding-top: 24px;
}

.view.active {
  display: block;
}

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

.metric {
  position: relative;
  display: flex;
  min-height: 133px;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid rgba(30, 62, 48, 0.06);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(28, 58, 46, 0.04);
}

.metric::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(18, 106, 76, 0.08);
  border-radius: 50%;
  content: "";
}

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

.metric strong {
  margin: 6px 0;
  font-size: 37px;
  font-weight: 680;
  letter-spacing: -1px;
}

.metric small {
  color: #96a199;
  font-size: 10px;
}

.metric.warning {
  color: #6b4b20;
  background: linear-gradient(145deg, #fff8e9, #fff);
}

.metric.active {
  color: #e9fff5;
  background: linear-gradient(145deg, #114434, #0b2d23);
}

.metric.active > span,
.metric.active small {
  color: rgba(226, 251, 238, 0.54);
}

.metric.success {
  background: linear-gradient(145deg, #f2fbf6, #fff);
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  border: 1px solid rgba(30, 62, 48, 0.06);
  border-radius: 19px;
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(28, 58, 46, 0.035);
}

.urgent-panel,
.side-panel {
  min-height: 420px;
  padding: 21px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.eyebrow {
  color: #84928a;
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 1.4px;
}

.panel h3,
.view-intro h3 {
  margin: 6px 0 0;
  font-size: 18px;
}

.pulse-label {
  display: flex;
  align-items: center;
  color: var(--green);
  font-size: 9px;
}

.pulse-label i {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #25a977;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 5px rgba(37, 169, 119, 0.08); }
}

.live-order-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.live-order {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfdfb;
}

.live-order-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--green);
  background: var(--mint);
  font-size: 18px;
}

.live-order.repair .live-order-icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.live-order-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.live-order-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-order-copy span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-order-copy small {
  margin-top: 5px;
  color: #96a199;
  font-size: 9px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint);
  font-size: 10px;
  white-space: nowrap;
}

.status-badge.waiting {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-badge.completed {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-badge.cancelled {
  color: #6e7973;
  background: #eef1ef;
}

.coverage-state {
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding: 13px;
  border-radius: 14px;
  background: #f4f8f5;
}

.radar {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin-right: 13px;
  border: 1px solid #b9ded0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 12px, #e0eee7 13px 14px);
}

.radar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(8, 121, 87, 0.08);
}

.radar i {
  position: absolute;
  right: -7px;
  top: 3px;
  color: var(--green);
  font-size: 9px;
  font-style: normal;
}

.coverage-copy {
  display: flex;
  flex-direction: column;
}

.coverage-copy strong {
  font-size: 12px;
}

.coverage-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.coverage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.coverage-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.coverage-stats span {
  color: var(--muted);
  font-size: 9px;
}

.coverage-stats strong {
  margin-top: 5px;
  font-size: 18px;
}

.api-note {
  margin-top: 16px;
  padding: 13px;
  border-radius: 13px;
  background: #102d23;
}

.api-note span {
  color: #86dab5;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.api-note p {
  margin: 6px 0 0;
  color: rgba(226, 251, 239, 0.56);
  font-size: 10px;
  line-height: 1.6;
}

.filter-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
}

.filter {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

.filter.active {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.table-panel {
  overflow: hidden;
}

.table-head,
.order-row {
  display: grid;
  grid-template-columns: 1.4fr 1.25fr 0.65fr 0.8fr 0.75fr 0.95fr;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
}

.table-head {
  min-height: 45px;
  color: #8a978f;
  background: #f6f9f6;
  font-size: 10px;
}

.order-row {
  min-height: 66px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.order-main,
.merchant-cell,
.staff-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.order-main strong,
.merchant-cell strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-main small,
.merchant-cell small,
.staff-cell small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  border-radius: 7px;
  color: var(--green);
  background: var(--mint);
  font-size: 9px;
}

.type-chip.repair {
  color: var(--amber);
  background: var(--amber-soft);
}

.row-action {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #c9ddd3;
  border-radius: 8px;
  color: var(--green);
  background: #f4faf6;
  font-size: 9px;
  font-weight: 650;
}

.row-action:hover {
  background: var(--mint);
}

.row-action:disabled {
  color: #9aa49f;
  background: #f2f4f2;
  cursor: not-allowed;
}

.view-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 15px;
}

.intro-count {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.view-intro-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.new-device-button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--green);
  box-shadow: 0 7px 18px rgba(9, 105, 76, 0.16);
  font-size: 11px;
  font-weight: 700;
}

.rider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.rider-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.rider-top {
  display: flex;
  align-items: center;
}

.rider-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  border-radius: 14px;
  color: #ecfff6;
  background: #174536;
  font-size: 13px;
  font-weight: 700;
}

.rider-name {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.rider-name strong {
  font-size: 13px;
}

.rider-name span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.online-badge {
  display: flex;
  align-items: center;
  color: var(--green);
  font-size: 10px;
}

.online-badge i {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
}

.online-badge.busy {
  color: var(--amber);
}

.online-badge.busy i {
  background: var(--amber);
}

.rider-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.rider-stats div {
  display: flex;
  flex-direction: column;
}

.rider-stats span {
  color: var(--muted);
  font-size: 9px;
}

.rider-stats strong {
  margin-top: 5px;
  font-size: 11px;
}

.rider-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.rider-actions > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rider-edit-button {
  height: 31px;
  padding: 0 10px;
  border: 1px solid #c8ddd3;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint);
  font-size: 10px;
  font-weight: 650;
}

.rider-status-select {
  height: 31px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #f7faf7;
  font-size: 10px;
  outline: none;
}

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

.merchant-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 20px rgba(28, 58, 46, 0.035);
}

.merchant-card-head {
  display: flex;
  align-items: center;
}

.merchant-avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  border-radius: 13px;
  color: #eafff3;
  background: linear-gradient(145deg, #2e6a52, #173e2f);
  font-size: 14px;
  font-weight: 700;
}

.merchant-card-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.merchant-card-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-card-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.merchant-state {
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--green);
  background: var(--mint);
  font-size: 9px;
}

.merchant-state.disabled {
  color: #a74e42;
  background: #fff0ed;
}

.merchant-address {
  margin-top: 14px;
  padding: 10px;
  border-radius: 10px;
  color: #627168;
  background: #f4f8f5;
  font-size: 10px;
  line-height: 1.55;
}

.merchant-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
}

.merchant-meta div {
  display: flex;
  flex-direction: column;
}

.merchant-meta span {
  color: var(--muted);
  font-size: 9px;
}

.merchant-meta strong {
  margin-top: 5px;
  font-size: 11px;
}

.merchant-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 9px;
}

.merchant-contact button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #c8ded4;
  border-radius: 8px;
  color: var(--green);
  background: var(--mint-light);
  font-size: 9px;
}

.merchant-contact > div {
  display: flex;
  gap: 7px;
}

.device-head,
.device-row {
  grid-template-columns: 1.25fr 1fr 1.35fr 0.65fr 0.75fr;
}

.device-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 17px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.device-row:hover {
  background: #f5faf6;
}

.device-stock strong {
  font-size: 15px;
}

.cabin-sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid #d7e5dd;
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.cabin-sync-status strong {
  color: var(--ink);
}

.cabin-sync-status .success {
  color: var(--green);
}

.cabin-sync-status .failed {
  color: var(--red);
}

.cabin-head,
.cabin-row {
  grid-template-columns: 1.15fr 1.35fr 1.7fr 1.2fr 0.65fr 0.65fr 0.65fr 0.65fr 0.75fr;
  min-width: 1180px;
}

.cabin-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.cabin-row:hover {
  background: #f5faf6;
}

.cabin-row strong {
  color: var(--ink);
  font-size: 11px;
}

.cabin-duration {
  font-family: Consolas, monospace;
  font-weight: 700;
}

.cabin-duration.alert {
  color: var(--red);
}

.cabin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cabin-detail-grid > div {
  padding: 11px;
  border-radius: 10px;
  background: #f5f8f5;
}

.cabin-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.cabin-detail-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.integration-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.table-panel {
  overflow-x: auto;
}

.integration-card {
  padding: 21px;
}

.integration-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.integration-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.integration-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 128, 91, 0.1);
}

.integration-status.offline {
  color: var(--muted);
}

.integration-status.offline i {
  background: #a8b2ac;
  box-shadow: none;
}

.integration-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.integration-config div {
  padding: 11px;
  border-radius: 10px;
  background: #f5f8f5;
}

.integration-config span,
.integration-count span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.integration-config strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.integration-count {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.integration-count strong {
  display: block;
  margin-top: 5px;
  font-size: 23px;
}

.integration-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}

.integration-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #c9ddd3;
  border-radius: 9px;
  color: var(--green);
  background: var(--mint);
  font-size: 10px;
  font-weight: 700;
}

.integration-actions button.primary {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.integration-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.integration-help {
  margin-top: 13px;
  padding: 12px;
  border: 1px dashed #c9dcd2;
  border-radius: 10px;
  color: var(--muted);
  background: #f7faf7;
  font-size: 10px;
  line-height: 1.7;
}

.integration-help code {
  color: var(--green);
  font-family: Consolas, monospace;
}

.integration-events-panel {
  padding: 20px;
}

.integration-events {
  margin-top: 14px;
}

.integration-event-row {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 0.7fr 0.6fr 1.4fr;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 11px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.integration-event-row strong {
  color: var(--ink);
  font-size: 11px;
}

.integration-event-row .failed {
  color: #b94e3f;
}

.integration-event-row .delivered {
  color: var(--green);
}

.audit-panel {
  overflow: hidden;
}

.audit-head,
.audit-row {
  grid-template-columns: 1.05fr 0.85fr 1fr 0.9fr 2.2fr;
}

.audit-row {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 8px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.audit-row strong {
  color: var(--ink);
  font-size: 11px;
}

.audit-action {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--green);
  background: var(--mint);
  font-size: 9px;
}

.audit-details {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 200;
  top: 18px;
  left: 50%;
  padding: 11px 16px;
  border: 1px solid rgba(118, 214, 173, 0.22);
  border-radius: 11px;
  color: #ecfff5;
  background: rgba(11, 50, 38, 0.96);
  box-shadow: 0 14px 35px rgba(10, 35, 26, 0.28);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -9px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.drawer-layer {
  position: fixed;
  z-index: 120;
  inset: 0;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 28, 20, 0.36);
  backdrop-filter: blur(3px);
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 410px;
  padding: 35px 25px;
  overflow-y: auto;
  background: #f8fbf8;
  box-shadow: -20px 0 60px rgba(14, 42, 30, 0.18);
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: white;
  font-size: 21px;
}

.drawer h3 {
  margin: 9px 0 20px;
  font-size: 20px;
}

.drawer-block {
  margin-bottom: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.drawer-block strong {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
}

.drawer-block p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.drawer-photos {
  display: flex;
  gap: 8px;
}

.drawer-photos a {
  width: 0;
  height: 74px;
  flex: 1;
  overflow: hidden;
  border-radius: 9px;
  background: #edf2ee;
}

.drawer-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.device-form input,
.device-form select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 12px;
}

.device-form input[readonly] {
  color: var(--muted);
  background: #f1f5f2;
}

.device-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.staff-skill-fieldset {
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.staff-skill-fieldset legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.device-form .staff-skill-option {
  display: flex;
  flex-direction: row;
  flex: 1;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 11px;
}

.staff-skill-option input {
  width: 16px;
  height: 16px;
}

.device-form-submit {
  min-height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.assign-select {
  width: 100%;
  height: 43px;
  margin: 8px 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  font-size: 11px;
}

.assign-button {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: var(--green);
  font-size: 12px;
  font-weight: 650;
}

.empty-block {
  padding: 55px 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.skeleton {
  height: 75px;
  border-radius: 13px;
  background: linear-gradient(90deg, #f2f6f3, #e8efeb, #f2f6f3);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.empty-state {
  padding: 65px 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
