* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: #2b3445;
  background: #f4f6f9;
  font-size: 14px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e5aa8 0%, #2c6cb8 100%);
}

.login-card {
  width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  line-height: 56px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: #1e5aa8;
  color: #fff;
  font-size: 28px;
  font-weight: 600;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2d43;
}

.login-sub {
  margin: 8px 0 24px;
  color: #9aa3b2;
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #1e5aa8;
}

.textarea {
  min-height: 90px;
  resize: vertical;
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 90, 168, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

th input[type="checkbox"],
td input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1e5aa8;
}

.btn-primary {
  background: #1e5aa8;
  color: #fff;
}

.btn-default {
  background: #fff;
  color: #1e5aa8;
  border-color: #1e5aa8;
}

.btn-danger {
  background: #fff;
  color: #c0392b;
  border-color: #c0392b;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  margin-top: 6px;
}

.error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 12px;
  min-height: 16px;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #1f2d43;
  color: #cfd8e6;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  padding: 20px 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 6px;
  background: #1e5aa8;
  margin-right: 10px;
  font-size: 16px;
  animation: pulse 3s ease-in-out infinite;
}

.nav {
  flex: 1;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  cursor: pointer;
  border-left: 3px solid transparent;
  animation: fadeInUp 0.3s ease both;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(3px);
}

.nav-item.active {
  background: rgba(30, 90, 168, 0.35);
  color: #fff;
  border-left-color: #4d8ed6;
}

.sidebar-foot {
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: #cfd8e6;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #eef1f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.page-title {
  font-size: 17px;
  font-weight: 600;
  color: #1f2d43;
}

.user {
  color: #6b7486;
}

.content {
  padding: 24px;
}

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(30, 90, 168, 0.05);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2d43;
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar .input,
.toolbar .select {
  width: auto;
  margin-bottom: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(30, 90, 168, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(30, 90, 168, 0.12);
}

.stat-num {
  font-size: 30px;
  font-weight: 600;
  color: #1e5aa8;
}

.stat-label {
  margin-top: 6px;
  color: #6b7486;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef1f5;
  font-size: 13px;
}

th {
  color: #6b7486;
  font-weight: 600;
  background: #f8fafc;
}

tr:hover td {
  background: #fafcfe;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.tag-primary {
  background: #e8f0fa;
  color: #1e5aa8;
}

.tag-warn {
  background: #fdf3e7;
  color: #c77c1a;
}

.tag-info {
  background: #eef2f7;
  color: #5a6577;
}

.tag-success {
  background: #e8f6ee;
  color: #21805a;
}

.tag-danger {
  background: #fdecea;
  color: #c0392b;
}

.muted {
  color: #9aa3b2;
}

.actions {
  white-space: nowrap;
}

.actions .btn {
  margin-right: 6px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(31, 45, 67, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.18s ease;
}

.modal {
  width: 520px;
  max-width: calc(100vw - 40px);
  max-height: 86vh;
  background: #fff;
  border-radius: 10px;
  overflow: auto;
  animation: scaleIn 0.22s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef1f5;
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: #9aa3b2;
}

.modal-body {
  padding: 20px;
}

.form-label {
  display: block;
  margin: 12px 0 4px;
  color: #6b7486;
  font-size: 13px;
}

.form-hint {
  color: #9aa3b2;
  font-size: 12px;
  margin: 2px 0 8px;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2d43;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  z-index: 200;
  font-size: 14px;
  animation: toastIn 0.25s ease;
}

.channel-card {
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: #cbd3e0;
  border-radius: 11px;
  cursor: pointer;
  border: none;
  padding: 0;
}

.switch.on {
  background: #1e5aa8;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.15s;
}

.switch.on::after {
  left: 20px;
}

.config-preview {
  font-family: monospace;
  font-size: 12px;
  color: #6b7486;
  background: #f8fafc;
  padding: 8px;
  border-radius: 6px;
  margin-top: 10px;
  word-break: break-all;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.animate-in {
  animation: fadeInUp 0.3s ease both;
}

.clickable-row {
  cursor: pointer;
  transition: background 0.15s;
}

.panel {
  transition: box-shadow 0.2s;
}

.panel:hover {
  box-shadow: 0 6px 20px rgba(30, 90, 168, 0.08);
}

.nav-item {
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.order-hero {
  position: relative;
  background: linear-gradient(135deg, #1e5aa8 0%, #2c6cb8 100%);
  border-radius: 10px;
  padding: 22px;
  color: #ffffff;
  margin-bottom: 18px;
  overflow: hidden;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}

.order-hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.order-hero-title {
  font-size: 20px;
  font-weight: 600;
  position: relative;
}

.order-hero-sub {
  margin-top: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.hero-btn {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: #ffffff;
  color: #1e5aa8;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #eef1f5;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.info-item {
  background: #ffffff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  color: #9aa3b2;
}

.info-value {
  font-size: 14px;
  color: #1f2d43;
  word-break: break-all;
}

.shot-box {
  margin-bottom: 18px;
}

.shot {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #eef1f5;
}

.detail-section {
  margin-top: 18px;
}

.detail-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2d43;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid #1e5aa8;
}

.batch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.batch-item {
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.timeline {
  padding: 8px 0;
}

.tl-item {
  display: flex;
  position: relative;
  padding-bottom: 20px;
  animation: fadeInUp 0.4s ease both;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e5aa8;
  margin: 4px 16px 0 0;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 4px rgba(30, 90, 168, 0.12);
}

.tl-item:not(:last-child) .tl-dot::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 6px;
  width: 2px;
  height: calc(100% + 6px);
  background: #dce6f2;
}

.tl-card {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 12px 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.tl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 90, 168, 0.1);
}

.tl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-action {
  font-weight: 600;
  color: #1f2d43;
}

.tl-time {
  margin-left: auto;
  font-size: 12px;
}

.tl-operator {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7486;
}

.tl-remark {
  margin-top: 6px;
  font-size: 12px;
  color: #2b3445;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77, 142, 214, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(77, 142, 214, 0); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.content > .panel {
  animation: fadeInUp 0.3s ease both;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #c2c9d4;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9aa3b2;
}

.skeleton-panel {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(30, 90, 168, 0.05);
}

.sk {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, #eef1f5 25%, #f7f9fc 37%, #eef1f5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
}

.sk-title {
  height: 20px;
  width: 140px;
}

.sk-line {
  width: 100%;
}

.sk-line.w80 {
  width: 80%;
}

.sk-line.w70 {
  width: 70%;
}

.sk-line.w60 {
  width: 60%;
}

.sk-block {
  height: 120px;
}

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

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pagination .select {
  width: auto;
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
}
