/* ══════════════════════════════════════════════════════════════
   商标管理控制台 - UI/UX Pro Max 设计系统 v2
   风格: Modern SaaS Dashboard (Linear/Vercel inspired)
   侧边栏: 深色 Navy  主内容: 浅色 Slate
   字体: System font stack
   ══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* ═══ Surface (浅色主体) ═══ */
  --bg: #f1f5f9;
  --bg-alt: #e2e8f0;
  --card: #ffffff;
  --card-h: #f8fafc;
  --border: #e2e8f0;
  --border-h: #cbd5e1;
  --border-f: #3b82f6;

  /* ═══ Sidebar (深色) ═══ */
  --sidebar: #0f172a;
  --sidebar-h: #1e293b;
  --sidebar-b: #1e293b;
  --sidebar-t: #cbd5e1;
  --sidebar-m: #64748b;

  /* ═══ Brand ═══ */
  --primary: #2563eb;
  --primary-h: #1d4ed8;
  --primary-l: #eff6ff;
  --primary-dim: rgba(37, 99, 235, 0.08);
  --primary-ring: rgba(59, 130, 246, 0.25);

  /* ═══ Semantic ═══ */
  --success: #059669;
  --success-light: #e8f5e9;
  --success-bg: #ecfdf5;
  --success-h: #047857;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-h: #b91c1c;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warn-h: #b45309;

  /* ═══ Accent ═══ */
  --accent: #7c3aed;
  --accent-l: #f5f3ff;

  /* ═══ Text ═══ */
  --text: #0f172a;
  --text-s: #334155;
  --text-dim: #475569;
  --text-muted: #94a3b8;
  --text-link: #2563eb;

  /* ═══ Spacing (4px base) ═══ */
  --sp-3xs: 2px;
  --sp-2xs: 4px;
  --sp-xs: 6px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-2xl: 32px;
  --sp-3xl: 40px;

  /* ═══ Radius ═══ */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* ═══ Shadow ═══ */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.06), 0 8px 10px rgba(0, 0, 0, 0.04);

  /* ═══ Sidebar ── */
  --sidebar-w: 220px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI",
    system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* ── Focus ring ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-h);
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar (深色 Navy) ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: var(--sp-xl) 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-brand {
  padding: 0 var(--sp-lg) var(--sp-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--sp-md);
}

.sidebar-logo {
  width: 140px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-brand .brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.sidebar-brand .brand-sub {
  font-size: 12px;
  color: var(--sidebar-m);
  margin-top: 3px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 var(--sp-sm);
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--sp-md);
  cursor: pointer;
  color: var(--sidebar-t);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  position: relative;
  text-decoration: none;
}

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

.nav-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.65;
}
.nav-item.active .nav-icon {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: var(--sp-lg) var(--sp-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.sidebar-footer .user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-footer .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-footer .user-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 13px;
  line-height: 1.3;
}

.sidebar-footer .user-role {
  font-size: 11px;
  color: var(--sidebar-m);
}

.role-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}
.role-admin {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}
.role-user {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.sidebar-footer .btn-logout {
  margin-top: var(--sp-md);
  width: 100%;
  justify-content: center;
  padding: 7px 14px;
  font-size: 12px;
}

/* ── Main content area ── */
.main {
  flex: 1;
  padding: var(--sp-2xl) var(--sp-3xl);
  overflow-y: auto;
  background: var(--bg);
}

/* ── Panel transitions ── */
.panel {
  display: none;
  animation: fadeUp 0.25s ease;
}
.panel.active {
  display: block;
}

/* SPA 路由切换动画：main-content 切换模块时触发 */
.main.panel-enter {
  animation: panelEnter 0.2s ease;
}

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

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

/* ── Page Header ── */
.page-header {
  margin-bottom: var(--sp-xl);
}
.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.page-header h3 {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════
   COMPONENTS
   ══════════════════════════════════════════════════════════════ */

/* ── Stats Grid ── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--border-h);
}

.stat .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-sm);
}

.stat .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat .stat-change {
  font-size: 11px;
  margin-top: var(--sp-2xs);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}
.stat-change.up {
  color: var(--success);
}
.stat-change.down {
  color: var(--danger);
}

/* ── Card ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-lg);
}
.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-header .card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Form elements ── */
input,
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
input:hover,
textarea:hover,
select:hover {
  border-color: var(--border-h);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--border-f);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: var(--sp-2xs);
  margin-top: var(--sp-md);
}
label:first-child {
  margin-top: 0;
}

/* ── Buttons ── */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active {
  transform: scale(0.97);
}

.btn-p {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.btn-p:hover {
  background: var(--primary-h);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-o {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-s);
}
.btn-o:hover {
  border-color: var(--border-h);
  background: var(--card-h);
  color: var(--text);
}

.btn-d {
  background: var(--card);
  border: 1px solid #fecaca;
  color: var(--danger);
}
.btn-d:hover {
  background: var(--danger-bg);
  border-color: #fca5a5;
}

.btn-s {
  background: var(--card);
  border: 1px solid #a7f3d0;
  color: var(--success);
}
.btn-s:hover {
  background: var(--success-bg);
  border-color: #6ee7b7;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Spinner for loading buttons */
.btn[aria-busy="true"] {
  pointer-events: none;
  position: relative;
  color: transparent;
}
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Outline button in sidebar context */
.sidebar .btn-o {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-t);
}
.sidebar .btn-o:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Generic spinner element */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Flex helpers ── */
.flex-r {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
  flex-wrap: wrap;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
}

/* ── Settings Tabs ── */
.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--sp-xl);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.stab {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  font-family: inherit;
}
.stab:hover {
  color: var(--text);
  background: var(--card-h);
}
.stab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════════════════ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--sp-md) var(--sp-md);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

tbody td {
  padding: 10px var(--sp-md);
  border-bottom: 1px solid var(--border);
  color: var(--text-s);
  line-height: 1.5;
}

tbody tr {
  transition: background 0.1s ease;
}
tbody tr:hover td {
  background: var(--primary-dim);
}

/* ══════════════════════════════════════════════════════════════
   TAGS
   ══════════════════════════════════════════════════════════════ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tag-on {
  background: var(--success-bg);
  color: var(--success);
}
.tag-on::before {
  background: var(--success);
}

.tag-off {
  background: var(--danger-bg);
  color: var(--danger);
}
.tag-off::before {
  background: var(--danger);
}

.tag-warn {
  background: var(--warning-bg);
  color: var(--warning);
}
.tag-warn::before {
  background: var(--warning);
}

.tag-info {
  background: var(--primary-l);
  color: var(--primary);
}
.tag-info::before {
  background: var(--primary);
}

.tag-progress {
  background: var(--primary-l);
  color: var(--primary);
}
.tag-progress::before {
  background: var(--primary);
  animation: pulse 1.5s infinite;
}

.tag-neutral {
  background: var(--bg);
  color: var(--text-muted);
}
.tag-neutral::before {
  background: var(--text-muted);
}

.tag-accent {
  background: var(--accent-l);
  color: var(--accent);
}
.tag-accent::before {
  background: var(--accent);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  top: var(--sp-lg);
  right: var(--sp-lg);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  color: #fff;
  animation: slideIn 0.3s ease;
  max-width: 380px;
  box-shadow: var(--shadow-xl);
}
.toast-ok {
  background: var(--success);
}
.toast-err {
  background: var(--danger);
}
.toast-warn {
  background: var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl);
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.2s ease;
}
@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES
   ══════════════════════════════════════════════════════════════ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #f1f5f9 100%);
  background-image:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(37, 99, 235, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(124, 58, 237, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 80%,
      rgba(5, 150, 105, 0.03) 0%,
      transparent 50%
    );
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--sp-3xl);
  width: 420px;
  max-width: 90vw;
  box-shadow: var(--shadow-xl);
}

.auth-card .auth-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  margin: 0 auto var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.02em;
}

.auth-card .auth-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: var(--sp-xl);
  margin-top: var(--sp-xs);
}

.auth-card .auth-link {
  color: var(--primary);
  font-size: 13px;
  text-align: center;
  margin-top: var(--sp-lg);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s;
}
.auth-card .auth-link:hover {
  color: var(--primary-h);
}

/* ══════════════════════════════════════════════════════════════
   LOG / TERMINAL
   ══════════════════════════════════════════════════════════════ */
.log {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: var(--sp-md);
  max-height: 400px;
  overflow-y: auto;
  font:
    12px/1.8 "SF Mono",
    "Fira Code",
    "JetBrains Mono",
    monospace;
  color: #e2e8f0;
}

.log .e {
  display: flex;
  gap: var(--sp-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding: 3px 0;
  align-items: baseline;
}

.log .t {
  color: #64748b;
  min-width: 52px;
  font-size: 11px;
}

.log .lv {
  min-width: 36px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lv-s {
  color: #34d399;
}
.lv-w {
  color: #fbbf24;
}
.lv-e {
  color: #f87171;
}
.lv-i {
  color: #60a5fa;
}

/* ── Spacing utils ── */
.mt8 {
  margin-top: var(--sp-sm);
}
.mt12 {
  margin-top: var(--sp-md);
}
.mt16 {
  margin-top: var(--sp-lg);
}
.mt24 {
  margin-top: var(--sp-xl);
}
.mb8 {
  margin-bottom: var(--sp-sm);
}
.mb12 {
  margin-bottom: var(--sp-md);
}
.mb16 {
  margin-bottom: var(--sp-lg);
}

/* ── Steps indicator ── */
.steps {
  display: flex;
  gap: 4px;
  margin: var(--sp-md) 0;
}
.steps .s {
  flex: 1;
  text-align: center;
  padding: var(--sp-sm) 4px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.steps .s.done {
  background: var(--success-bg);
  color: var(--success);
  border-color: #a7f3d0;
}
.steps .s.cur {
  background: var(--primary-l);
  color: var(--primary);
  border-color: #93c5fd;
  animation: pulse 2s infinite;
}
.steps .s.fail {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecaca;
}

/* ── Cookie cards (session page) ── */
.c-c {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s;
}
.c-c:hover {
  border-color: var(--border-h);
}

.c-c .cn {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
}
.c-c .cv {
  font-size: 11px;
  color: var(--text-dim);
  font-family: "SF Mono", monospace;
  word-break: break-all;
  margin-top: 2px;
}
.c-c .ca {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Empty state ── */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}
.empty .ic {
  font-size: 48px;
  margin-bottom: var(--sp-lg);
  opacity: 0.3;
}
.empty p {
  font-size: 14px;
  margin-bottom: var(--sp-lg);
  color: var(--text-dim);
}

/* ── Skeleton loader ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg) 25%,
    var(--bg-alt) 50%,
    var(--bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   SUBMISSION CARDS
   ══════════════════════════════════════════════════════════════ */
.submission-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-md);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}
.submission-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.submission-card.expanded {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.submission-card .sub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-md);
}

.submission-card .sub-tm {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.submission-card .sub-cls {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-l);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 600;
}

.submission-card .sub-meta {
  display: flex;
  gap: var(--sp-lg);
  margin-top: var(--sp-sm);
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.submission-card .sub-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.submission-card .sub-detail {
  display: none;
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}
.submission-card.expanded .sub-detail {
  display: block;
  animation: fadeUp 0.2s ease;
}

.sub-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm) var(--sp-xl);
  font-size: 13px;
}
.sub-detail-grid .dk {
  color: var(--text-muted);
  font-weight: 500;
}
.sub-detail-grid .dv {
  color: var(--text);
  word-break: break-all;
}

/* ── Detail sections (商标详情分区) ── */
.sub-section {
  margin-bottom: var(--sp-lg);
}
.sub-section:last-child {
  margin-bottom: 0;
}
.sub-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-sm);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ── Goods list ── */
.goods-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.goods-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.goods-item:last-child {
  border-bottom: none;
}
.goods-item:nth-child(even) {
  background: var(--card-h);
}
.gi-idx {
  color: var(--text-muted);
  font-size: 11px;
  min-width: 22px;
  text-align: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 1px 6px;
}
.gi-name {
  flex: 1;
  color: var(--text);
}
.gi-cls {
  color: var(--primary);
  font-size: 11px;
  background: var(--primary-dim);
  padding: 1px 6px;
  border-radius: 4px;
}
.gi-code {
  color: var(--text-muted);
  font-size: 11px;
  font-family: monospace;
}
.gi-cat {
  color: var(--success);
  font-size: 11px;
  background: var(--success-light, #e6f7ed);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Table detail row ── */
.detail-row td {
  background: var(--card-h);
  padding: 16px 12px;
  border-top: 2px solid var(--primary);
}

/* ── Agent stat cards ── */
.agent-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s;
}
.agent-stat-card:hover {
  border-color: var(--border-h);
}

.agent-stat-card .ag-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.agent-stat-card .ag-counts {
  display: flex;
  gap: var(--sp-xl);
}

.agent-stat-card .ag-count {
  text-align: center;
  min-width: 52px;
}

.agent-stat-card .ag-count .n {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.agent-stat-card .ag-count .label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: var(--sp-sm);
    flex-shrink: 0;
    height: auto;
    position: relative;
  }
  .sidebar-brand {
    display: none;
  }
  .sidebar-footer {
    display: none;
  }
  .nav-item {
    padding: var(--sp-sm) 10px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-item.active::before {
    display: none;
  }

  .main {
    padding: var(--sp-lg);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .flex2 {
    grid-template-columns: 1fr;
  }
  .sub-detail-grid {
    grid-template-columns: 1fr;
  }
  table {
    font-size: 12px;
  }
  thead th,
  tbody td {
    padding: 6px 8px;
  }
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — 工作台首页
   ══════════════════════════════════════════════════════════════ */
.dash-actions {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

/* ── 代办卡片 ── */
.todo-cards {
  display: flex;
  gap: 14px;
  margin-bottom: var(--sp-xl);
  align-items: stretch;
}
.todo-card {
  flex: 1;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s ease;
}
.todo-card:hover {
  border-color: #d9d9d9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.todo-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.todo-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.icon-orange {
  background: #fff7e6;
  color: #fa8c16;
}
.icon-red {
  background: #fff1f0;
  color: #ff4d4f;
}
.icon-yellow {
  background: #fffbe6;
  color: #faad14;
}
.icon-blue {
  background: #e6f7ff;
  color: #1890ff;
}
.icon-green {
  background: #f6ffed;
  color: #52c41a;
}
.icon-purple {
  background: #f9f0ff;
  color: #722ed1;
}
.icon-cyan {
  background: #e6fffb;
  color: #13c2c2;
}
.todo-num {
  font-size: 26px;
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1;
}
.todo-label {
  font-size: 13px;
  color: #8c8c8c;
  font-weight: 500;
}
.todo-desc {
  font-size: 11px;
  color: #bfbfbf;
  line-height: 1.4;
}
.todo-btn {
  margin-top: auto;
  padding: 8px 0;
  text-align: center;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: none;
  color: #fff;
  font-weight: 500;
  transition: all 0.2s ease;
}
.todo-btn:hover {
  opacity: 0.9;
}
.btn-orange {
  background: #fa8c16;
}
.btn-red {
  background: #ff4d4f;
}
.btn-yellow {
  background: #faad14;
}
.btn-blue {
  background: #1890ff;
}
.btn-green {
  background: #52c41a;
}
.btn-purple {
  background: #722ed1;
}
.btn-cyan {
  background: #13c2c2;
}

/* ── 统计卡片 ── */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}
.dash-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.dash-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}
.dash-stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.dash-stat-val.green {
  color: var(--success);
}
.dash-stat-val.red {
  color: var(--danger);
}
.dash-stat-sub {
  font-size: 11px;
  color: var(--text-dim);
}
.dash-stat-sub .up {
  color: var(--danger);
  font-weight: 600;
}
.dash-stat-sub .down {
  color: var(--success);
  font-weight: 600;
}

/* ── 表格区 ── */
.dash-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}
.dash-table-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-table-hd {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.dash-table-wrap {
  overflow-x: auto;
}
.dash-table-ft {
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  border-top: 1px solid var(--border);
}
.dash-table-ft:hover {
  background: var(--primary-dim);
}
.dash-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dash-mini-table th {
  text-align: left;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--card-h);
}
.dash-mini-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-s);
}
.dash-mini-table tr:hover td {
  background: var(--primary-dim);
}

/* ── 流程预览 ── */
.dash-flow {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
}
.dash-flow-hd {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}
.dash-flow-hd span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}
.dash-flow-steps {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 10px;
}
.dash-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.dash-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 60%;
  width: 80%;
  height: 2px;
  border-top: 2px dashed var(--border);
}
.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  z-index: 1;
  background: var(--card);
  border: 2px solid var(--border);
}
.step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}
.step-icon.active .step-num {
  color: var(--primary);
}
.step-icon.active {
  border-color: var(--primary);
  background: var(--primary-l);
}
.step-info {
  text-align: center;
}
.step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.step-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 140px;
}
.step-status {
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
}
.status-orange {
  background: #fff7e6;
  color: #d97706;
}
.status-blue {
  background: #eff6ff;
  color: #2563eb;
}
.status-green {
  background: #ecfdf5;
  color: #059669;
}
.status-red {
  background: #fef2f2;
  color: #dc2626;
}

/* Responsive for dashboard */
@media (max-width: 1200px) {
  .todo-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .dash-tables {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .todo-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-flow-steps {
    flex-wrap: wrap;
    gap: 16px;
  }
  .dash-flow-step {
    flex: 0 0 45%;
  }
  .dash-flow-step::after {
    display: none;
  }
  .dash-actions {
    width: 100%;
    margin-top: 8px;
  }
}

/* ══════════════════════════════════════════════════════════════
   AUTH PAGE — Clean Modern Card
   ══════════════════════════════════════════════════════════════ */
.auth-page-clean {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #f1f5f9 100%);
  padding: 40px 20px;
}
.auth-card-clean {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px 40px;
  box-shadow: var(--shadow-xl);
  width: 420px;
  max-width: 90vw;
}
.auth-logo-clean {
  display: inline-flex;
  margin-bottom: 20px;
}
.auth-logo-clean svg {
  filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.3));
}

/* ══════════════════════════════════════════════════════════════
   我的商标页面 — 全新表格视图
   ══════════════════════════════════════════════════════════════ */

/* ── 页面标题 ── */
.tm-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.tm-page-title h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1f1f1f;
  display: inline;
}
.tm-page-subtitle {
  font-size: 14px;
  color: #8c8c8c;
  margin-left: 12px;
  font-weight: normal;
}
.tm-add-btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* ── 状态标签页 ── */
.tm-status-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tm-status-tab {
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  background: #fff;
  font-size: 13px;
  color: #595959;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}
.tm-status-tab:hover {
  border-color: #1890ff;
  color: #1890ff;
}
.tm-status-tab.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}
.tm-st-count {
  font-weight: 600;
}

/* ── 搜索栏 ── */
.tm-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}
.tm-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 6px 12px;
}
.tm-search-icon {
  color: #bfbfbf;
  display: flex;
  align-items: center;
}
.tm-search-input {
  flex: 1;
  padding: 2px 0;
  border: none;
  outline: none;
  font-size: 13px;
  color: #333;
  background: transparent;
  min-width: 0;
}
.tm-search-input::placeholder {
  color: #bfbfbf;
}
.tm-search-label {
  font-size: 13px;
  color: #595959;
  white-space: nowrap;
}
.tm-search-select {
  width: auto;
  padding: 6px 28px 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 120px;
  color: #595959;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.tm-date-picker {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  color: #bfbfbf;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: #fff;
}

/* ── 操作栏 ── */
.tm-action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

/* ── 表格卡片 ── */
.tm-table-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
}
.tm-table-wrap {
  overflow-x: auto;
}
/* 商标表格覆盖: 匹配参考设计头部和单元格样式 */
.tm-table-wrap th {
  background: #fafafa;
  color: #595959;
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.tm-table-wrap td {
  color: #333;
  vertical-align: middle;
}

/* ── 复选框 ── */
.tm-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1890ff;
}

/* ── 商标图样单元格 ── */
.tm-brand-cell {
  display: flex;
  align-items: center;
  width: 40px;
  height: 40px;
  justify-content: center;
}
.tm-brand-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.tm-brand-placeholder {
  font-weight: 700;
}

/* ── 商标名称单元格 ── */
.tm-name-cell {
  line-height: 1.5;
}
.tm-name-main {
  color: #1f1f1f;
  font-weight: 500;
}
.tm-name-sub {
  color: #8c8c8c;
  font-size: 12px;
}

/* ── 申请号/注册号单元格 ── */
.tm-appno-cell {
  line-height: 1.5;
}
.tm-appno-main {
  color: #1890ff;
}
.tm-appno-sub {
  color: #8c8c8c;
  font-size: 12px;
}

/* ── 国际分类单元格 ── */
.tm-class-cell {
  line-height: 1.5;
}
.tm-class-main {
  color: #1f1f1f;
}
.tm-class-sub {
  color: #8c8c8c;
  font-size: 12px;
}

/* ── 状态标签 ── */
.tm-status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.tm-status-date {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 4px;
  display: block;
}
.tm-tag-blue {
  background: #e6f7ff;
  color: #1890ff;
  border: 1px solid #91d5ff;
}
.tm-tag-orange {
  background: #fff2e8;
  color: #fa8c16;
  border: 1px solid #ffd8bf;
}
.tm-tag-green {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}
.tm-tag-red {
  background: #fff1f0;
  color: #ff4d4f;
  border: 1px solid #ffa39e;
}
.tm-tag-purple {
  background: #f9f0ff;
  color: #722ed1;
  border: 1px solid #d3adf7;
}

/* ── 操作列 ── */
.tm-table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tm-action-link {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #1890ff;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.tm-action-link:hover {
  border-color: #1890ff;
}
.tm-more-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #595959;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-family: inherit;
}
.tm-more-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

/* ── 分页 ── */
.tm-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}
.tm-page-info {
  font-size: 13px;
  color: #595959;
  margin-right: 8px;
}
.tm-page-size {
  padding: 4px 24px 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  color: #595959;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  width: auto;
}
.tm-page-btn {
  padding: 4px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #595959;
  min-width: 32px;
  text-align: center;
  font-family: inherit;
}
.tm-page-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}
.tm-page-btn.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}
.tm-page-btn:disabled {
  color: #d9d9d9;
  cursor: not-allowed;
  border-color: #d9d9d9;
}
.tm-page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #595959;
}
.tm-page-jump-input {
  width: 40px;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  outline: none;
  color: #333;
}

/* ── 表格行悬停 ── */
.tm-table-row {
  cursor: pointer;
  transition: background 0.1s ease;
}
.tm-table-row:hover td {
  background: #f5f7fa;
}

/* ── 商标状态分布 ── */
.dash-status-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}
.dash-status-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.dash-status-content {
  display: flex;
  align-items: center;
  gap: 40px;
}
.dash-status-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}
.dash-status-tag {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  min-width: 70px;
  transition: all 0.2s;
}
.dash-status-tag:hover {
  border-color: var(--primary);
}
.dash-status-tag.active {
  border-color: var(--primary);
  background: var(--primary-l);
}
.ds-tag-name {
  font-size: 12px;
  color: var(--text-s);
}
.ds-tag-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}
.dash-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.dash-donut-chart {
  width: 140px;
  height: 140px;
}
.dash-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-s);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════
   发文管理页面 — 全新表格视图
   ══════════════════════════════════════════════════════════════ */

/* ── 页面标题 ── */
.doc-page-header {
  margin-bottom: 20px;
}
.doc-page-title h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1f1f1f;
  display: inline;
}
.doc-page-subtitle {
  font-size: 14px;
  color: #8c8c8c;
  margin-left: 12px;
  font-weight: normal;
}

/* ── Tab 切换 ── */
.doc-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}
.doc-tab {
  padding: 10px 0;
  font-size: 14px;
  color: #595959;
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.3s;
}
.doc-tab:hover {
  color: #1890ff;
}
.doc-tab.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
  font-weight: 500;
}

/* ── 搜索栏 ── */
.doc-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.doc-search-label {
  font-size: 13px;
  color: #595959;
  white-space: nowrap;
}
.doc-search-input {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  width: 120px;
  background: #fff;
  color: #333;
}
.doc-search-input:focus {
  border-color: #1890ff;
}
.doc-search-input::placeholder {
  color: #bfbfbf;
}
.doc-search-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 120px;
  width: auto;
  color: #595959;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.doc-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-date-input {
  padding: 6px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  width: 140px;
  color: #bfbfbf;
  background: #fff;
}
.doc-date-input:focus {
  border-color: #1890ff;
}
.doc-date-input::placeholder {
  color: #bfbfbf;
}

/* ── 按钮 ── */
.doc-btn {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #595959;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}
.doc-btn:hover {
  opacity: 0.85;
}
.doc-btn-primary {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}
.doc-btn-orange {
  background: #fa8c16;
  color: #fff;
  border-color: #fa8c16;
}

/* ── 表格卡片 ── */
.doc-table-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
}
.doc-table-wrap {
  overflow-x: auto;
}
/* 发文表格覆盖: 匹配参考设计 */
.doc-table-wrap th {
  background: #fafafa;
  color: #595959;
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.doc-table-wrap td {
  color: #333;
  vertical-align: middle;
}
.doc-table-row:hover td {
  background: #f5f7fa;
}

/* ── 复选框 ── */
.doc-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1890ff;
}

/* ── 名称单元格 ── */
.doc-name-cell {
  line-height: 1.5;
}
.doc-name-main {
  color: #1f1f1f;
  font-weight: 500;
}
.doc-name-sub {
  color: #8c8c8c;
  font-size: 12px;
}

/* ── 状态标签 ── */
.doc-tag-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #ffd8bf;
  background: #fff2e8;
  color: #fa8c16;
  white-space: nowrap;
}

/* ── 操作按钮 ── */
.doc-table-actions {
  display: flex;
  gap: 8px;
}
.doc-action-btn {
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  white-space: nowrap;
  font-family: inherit;
}
.doc-btn-view {
  background: #1890ff;
  color: #fff;
}
.doc-btn-view:hover {
  background: #40a9ff;
}
.doc-btn-download {
  background: #fa8c16;
  color: #fff;
}
.doc-btn-download:hover {
  background: #ffa940;
}

/* ── 分页 ── */
.doc-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}
.doc-page-info {
  font-size: 13px;
  color: #595959;
  margin-right: 8px;
}
.doc-page-size {
  padding: 4px 24px 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  color: #595959;
  width: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.doc-page-btn {
  padding: 4px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #595959;
  min-width: 32px;
  text-align: center;
  font-family: inherit;
}
.doc-page-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}
.doc-page-btn.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}
.doc-page-btn:disabled {
  color: #d9d9d9;
  cursor: not-allowed;
  border-color: #d9d9d9;
}
.doc-page-ellipsis {
  color: #8c8c8c;
  font-size: 13px;
  padding: 0 4px;
}
.doc-page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #595959;
}
.doc-page-jump-input {
  width: 40px;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  outline: none;
  color: #333;
}

/* ══════════════════════════════════════════════════════════════
   商标详情页
   ══════════════════════════════════════════════════════════════ */

.tm-detail-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tm-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #595959;
}
.tm-breadcrumb a {
  color: #595959;
  text-decoration: none;
}
.tm-breadcrumb a:hover {
  color: var(--primary);
}
.tm-breadcrumb-sep {
  color: #d9d9d9;
}
.tm-breadcrumb-cur {
  color: #8c8c8c;
}

.tm-dt-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  margin-bottom: 16px;
}
.tm-dt-card-body {
  padding: 24px;
}
.tm-dt-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  padding: 16px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tm-dt-section-title::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}

.tm-dt-basic {
  display: flex;
  gap: 24px;
}
.tm-dt-logo {
  width: 140px;
  height: 140px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
}
.tm-dt-logo svg {
  width: 80px;
  height: 80px;
}
.tm-dt-info-main {
  flex: 1;
}
.tm-dt-info-row {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
}
.tm-dt-info-lbl {
  width: 90px;
  font-size: 13px;
  color: #8c8c8c;
  flex-shrink: 0;
}
.tm-dt-info-val {
  font-size: 13px;
  color: #1f1f1f;
}
.tm-dt-info-right {
  width: 320px;
  flex-shrink: 0;
}
.tm-dt-info-right .tm-dt-info-row {
  margin-bottom: 16px;
}
.tm-dt-info-right .tm-dt-info-lbl {
  width: 80px;
}
.tm-dt-info-right .tm-dt-info-val {
  color: #1f1f1f;
  font-size: 13px;
  line-height: 1.5;
}

.tm-dt-status-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.tm-dt-tag-blue {
  background: #e6f7ff;
  color: #1890ff;
  border: 1px solid #91d5ff;
}
.tm-dt-tag-orange {
  background: #fff2e8;
  color: #fa8c16;
  border: 1px solid #ffd8bf;
}
.tm-dt-tag-green {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}
.tm-dt-tag-red {
  background: #fff1f0;
  color: #ff4d4f;
  border: 1px solid #ffa39e;
}
.tm-dt-tag-purple {
  background: #f9f0ff;
  color: #722ed1;
  border: 1px solid #d3adf7;
}

.tm-dt-docs {
  display: flex;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}
.tm-dt-doc-item {
  text-align: center;
}
.tm-dt-doc-box {
  width: 120px;
  height: 140px;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
}
.tm-dt-doc-label {
  font-size: 12px;
  color: #595959;
}

.tm-dt-license {
  background: #fafafa;
  position: relative;
  flex-direction: column;
  padding: 8px;
}
.tm-dt-lic-hd {
  width: 100%;
  text-align: center;
  font-size: 10px;
  color: #ff4d4f;
  font-weight: bold;
  border-bottom: 1px solid #ffccc7;
  padding-bottom: 4px;
  margin-bottom: 6px;
}
.tm-dt-lic-row {
  width: 100%;
  display: flex;
  margin-bottom: 4px;
}
.tm-dt-lic-lbl {
  font-size: 8px;
  color: #8c8c8c;
  width: 32px;
  flex-shrink: 0;
}
.tm-dt-lic-val {
  font-size: 8px;
  color: #333;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tm-dt-lic-line {
  width: 100%;
  height: 1px;
  background: #f0f0f0;
  margin: 2px 0;
}
.tm-dt-lic-stamp {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #ff4d4f;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tm-dt-lic-stamp-text {
  font-size: 7px;
  color: #ff4d4f;
  font-weight: bold;
  transform: rotate(-15deg);
}

.tm-dt-cert {
  background: #fafafa;
  position: relative;
}
.tm-dt-cert-inner {
  width: 90%;
  height: 90%;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.tm-dt-cert-stamp {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #ff4d4f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #ff4d4f;
  font-weight: bold;
}
.tm-dt-cert-line {
  width: 60%;
  height: 2px;
  background: #f0f0f0;
}

.tm-dt-timeline-wrap {
  padding: 24px;
}
.tm-dt-timeline {
  display: flex;
  position: relative;
  padding-top: 20px;
}
.tm-dt-timeline-line {
  position: absolute;
  top: 24px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: #e8e8e8;
  z-index: 0;
}
.tm-dt-timeline-line-active {
  position: absolute;
  top: 24px;
  left: 60px;
  width: 120px;
  height: 2px;
  background: #fa8c16;
  z-index: 1;
}
.tm-dt-timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}
.tm-dt-step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d9d9d9;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d9d9d9;
}
.tm-dt-step-dot.active {
  background: #fa8c16;
  box-shadow: 0 0 0 1px #fa8c16;
}
.tm-dt-step-dot.done {
  background: #d9d9d9;
  box-shadow: 0 0 0 1px #d9d9d9;
}
.tm-dt-step-date {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 8px;
}
.tm-dt-step-date.active {
  color: #fa8c16;
}
.tm-dt-step-name {
  font-size: 12px;
  color: #8c8c8c;
  margin-top: 4px;
}
.tm-dt-step-name.active {
  color: #1f1f1f;
  font-weight: 500;
}

.tm-dt-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 24px;
  padding: 20px 24px 24px;
}
.tm-dt-grid-item {
  display: flex;
  gap: 8px;
}
.tm-dt-grid-lbl {
  font-size: 13px;
  color: #8c8c8c;
  white-space: nowrap;
}
.tm-dt-grid-val {
  font-size: 13px;
  color: #1f1f1f;
}

.tm-dt-app-grid {
  display: grid;
  grid-template-columns: 120px 1fr 140px 1fr 100px 1fr 80px 1fr;
  gap: 16px 0;
  padding: 20px 24px 24px;
  align-items: start;
}
.tm-dt-app-grid .tm-dt-grid-lbl {
  color: #8c8c8c;
  font-size: 13px;
}
.tm-dt-app-grid .tm-dt-grid-val {
  color: #1f1f1f;
  font-size: 13px;
}

.tm-dt-agent-grid {
  display: grid;
  grid-template-columns: 100px 1fr 120px 1fr 80px 1fr 100px 1fr;
  gap: 16px 0;
  padding: 20px 24px 24px;
  align-items: center;
}
.tm-dt-agent-grid .tm-dt-grid-lbl {
  color: #8c8c8c;
  font-size: 13px;
}
.tm-dt-agent-grid .tm-dt-grid-val {
  color: #1f1f1f;
  font-size: 13px;
}
