@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  /* 背景与面板 */
  --bg: #f1f5f9;
  --bg-sub: #e2e8f0;
  --panel: rgba(255, 255, 255, 0.98);
  --panel-strong: #ffffff;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  /* 文字 */
  --text: #0f172a;
  --text-secondary: #334155;
  --muted: #64748b;
  /* 主色 - 沉稳蓝 */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --primary-soft-strong: rgba(37, 99, 235, 0.12);
  /* 状态色 */
  --success: #059669;
  --success-dark: #047857;
  --success-soft: rgba(5, 150, 105, 0.1);
  --warn: #d97706;
  --warn-dark: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --info: #0891b2;
  --info-soft: rgba(8, 145, 178, 0.1);
  /* 阴影 - 更柔和 */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 24px rgba(15, 23, 42, 0.1), 0 4px 8px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.18);
  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  /* 过渡 */
  --transition-fast: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  padding: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 48px);
}

.sidebar {
  background: linear-gradient(175deg, #0f172a 0%, #1e293b 50%, #1e3a5f 100%);
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand h1,
.brand h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand p {
  margin: 6px 0 0;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
}

.login-summary {
  margin-top: 10px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.92);
  font-size: 12px;
  line-height: 1.65;
}

.login-summary .label {
  color: rgba(226, 232, 240, 0.68);
}

.side-nav {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.side-link {
  position: relative;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(241, 245, 249, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
}

.side-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 420ms ease;
}

.side-link:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 16px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.side-link:hover::after {
  left: 120%;
}

.side-link.active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.36), rgba(37, 99, 235, 0.22));
  border-color: rgba(147, 197, 253, 0.56);
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.side-link strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.side-link span {
  display: none;
}

.side-footer {
  margin-top: auto;
  padding-top: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 10px;
  line-height: 1.6;
}

.side-footer .login-summary {
  margin-top: 0;
}

.content {
  display: grid;
  gap: 18px;
}

.hero {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero p {
  margin: 8px 0 0;
  max-width: 720px;
  line-height: 1.7;
  color: var(--muted);
  font-size: 14px;
}

.hero-actions,
.toolbar,
.form-grid,
.chips,
.stack,
.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.subnav-link {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.subnav-link.active {
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.1);
}

.toolbar {
  align-items: center;
  justify-content: space-between;
}

.grid-4,
.grid-3,
.grid-2 {
  display: grid;
  gap: 16px;
}

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

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

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

.input-with-date-btn {
  display: flex;
  gap: 4px;
  align-items: center;
}
.input-with-date-btn input {
  flex: 1;
}
.date-pick-btn {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.date-pick-btn:hover {
  background: #f3f4f6;
}
.date-pick-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.panel:hover {
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}

.orders-filter-panel {
  background: linear-gradient(180deg, #ffffff, #fafbfc);
  border-radius: var(--radius-xl);
}

.orders-table-panel {
  padding: 16px;
  border-radius: var(--radius-xl);
}

.panel h2,
.panel h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 18px;
  font-weight: 700;
}

.panel-head:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.metric-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.92));
  border: 1px solid var(--line);
}

.metric-card .label {
  color: var(--muted);
  font-size: 13px;
}

.metric-card .value {
  margin-top: 8px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.metric-card .hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.pill.success {
  background: var(--success-soft);
  color: var(--success-dark);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn-dark);
}

.pill.danger {
  background: var(--danger-soft);
  color: var(--danger-dark);
}

.pill.primary {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.pill.info {
  background: var(--info-soft);
  color: var(--info);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

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

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* 覆盖浏览器自动填充的背景色 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

button:hover {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

button.secondary {
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

button.secondary:hover {
  background: #f8fafc;
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

button.warn {
  background: var(--warn);
}

button.warn:hover {
  background: var(--warn-dark);
}

button.danger {
  background: var(--danger);
}

button.danger:hover {
  background: var(--danger-dark);
}

button.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary-soft-strong);
  box-shadow: none;
}

button.ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

button.success {
  background: var(--success);
}

button.success:hover {
  background: var(--success-dark);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.action-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  background: #ffffff;
  transition: all var(--transition);
}

.action-card:hover {
  border-color: var(--primary-soft-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.action-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

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

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  table-layout: auto;
}

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.compact-title {
  font-size: 18px !important;
  margin: 0 0 12px 0 !important;
  font-weight: 600 !important;
}

.compact-button {
  padding: 6px 12px !important;
  font-size: 12px !important;
  border-radius: var(--radius-sm) !important;
}

.compact-input, .compact-select {
  padding: 8px 12px !important;
  font-size: 13px !important;
  border-radius: var(--radius-sm) !important;
}

.compact-table th, .compact-table td {
  padding: 10px 12px !important;
  font-size: 13px !important;
}

.compact-badge {
  padding: 4px 8px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

.compact-panel {
  padding: 16px !important;
}

.compact-ops-row button {
  padding: 5px 10px !important;
  font-size: 11px !important;
  border-radius: var(--radius-sm) !important;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 10;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

.ops-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.ops-row button {
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.timeline {
  display: grid;
  gap: 16px;
  padding: 4px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 20px minmax(0, 1fr);
  gap: 16px;
}

.timeline-time {
  color: var(--muted);
  font-size: 12px;
  padding-top: 4px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.timeline-dot {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.timeline-dot::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 12px);
  background: linear-gradient(to bottom, var(--line-strong), transparent);
}

.timeline-item:last-child .timeline-dot::after {
  display: none;
}

.timeline-body {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: all var(--transition);
}

.timeline-body:hover {
  border-color: var(--primary-soft-strong);
  box-shadow: var(--shadow-sm);
}

.timeline-body strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.timeline-body span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.kv .item {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  transition: all var(--transition);
}

.kv .item:hover {
  border-color: var(--primary-soft-strong);
  box-shadow: var(--shadow-sm);
}

.kv .key {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.kv .val {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.empty {
  padding: 32px 24px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--line);
  color: var(--muted);
  text-align: center;
  background: rgba(248, 250, 252, 0.5);
  font-size: 14px;
}

.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #0f172a;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.mobile-shell {
  max-width: 460px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.mobile-hero {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 60%, #2563eb 100%);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.mobile-hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

.mobile-hero p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  font-size: 14px;
}

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

.tab-bar button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
}

.hidden {
  display: none !important;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn var(--transition-fast);
}

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

.modal-mask.show {
  display: flex;
}

.modal-card {
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  padding: 28px;
  animation: slideUp var(--transition);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 20px;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-sub);
  color: var(--text);
}

.modal-body {
  padding: 4px 0;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.date-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.date-input-row .date-input-main {
  flex: 1;
}

.date-input-row .date-pick-btn {
  white-space: nowrap;
}

.date-input-row .date-input-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1200px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body {
    padding: 16px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-radius: var(--radius-lg);
    padding: 14px 12px;
  }

  .panel {
    padding: 16px;
    border-radius: var(--radius-lg);
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .kv {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-dot {
    display: none;
  }

  .timeline-time {
    text-align: left;
    font-size: 11px;
  }

  .modal-card {
    width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg);
    padding: 20px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .panel {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  button {
    padding: 8px 14px;
    font-size: 12px;
  }

  .ops-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .ops-row button {
    padding: 5px 8px;
    font-size: 10px;
  }
}

/* ========== 编辑弹窗样式 ========== */
.edit-modal .modal-card {
  max-width: 800px;
}

.edit-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.edit-form-grid > div {
  background: #fafbfc;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.edit-form-grid label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 6px;
}

.edit-form-grid input,
.edit-form-grid select {
  background: #ffffff;
}

.edit-form-full {
  margin-bottom: 12px;
}

.edit-form-full label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.edit-form-full textarea {
  min-height: 80px;
  background: #ffffff;
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ========== 视频弹窗样式 ========== */
.video-modal .modal-card {
  max-width: 900px;
}

.video-filter-bar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-sub);
  border-radius: 10px;
}

.video-filter-bar > div {
  min-width: 160px;
}

.video-filter-bar label {
  margin-bottom: 4px;
}

.video-list {
  max-height: 400px;
  overflow-y: auto;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  transition: all 150ms ease;
}

.video-item:hover {
  border-color: var(--primary-soft-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.video-thumb {
  width: 80px;
  height: 60px;
  background: var(--bg-sub);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 24px;
  flex-shrink: 0;
}

.video-info {
  flex: 1;
  min-width: 0;
}

.video-info h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.video-info p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.video-actions {
  display: flex;
  gap: 8px;
}

/* ========== 日志界面样式 ========== */
.log-section .log-item {
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: all 150ms ease;
}

.log-section .log-item:hover {
  border-color: var(--primary-soft-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.log-section .log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.log-section .log-time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.log-section .log-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== 日期选择器行 ========== */
.date-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.date-input-row .date-input-main {
  flex: 1;
}

.date-input-row .date-pick-btn {
  flex-shrink: 0;
  padding: 8px 12px !important;
  font-size: 12px !important;
}

.date-input-row .date-input-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ========== 打印样式 ========== */
@media print {
  body {
    padding: 0;
    background: white;
  }

  .sidebar,
  .subnav,
  .ops-row,
  button {
    display: none !important;
  }

  .panel {
    box-shadow: none;
    border: 1px solid #e5e7eb;
    break-inside: avoid;
  }

  .table-wrap {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
}

/* ========== 动画效果 ========== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.3s ease-in-out;
}
