﻿/* ========== CSS Reset & Variables ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0a2647;
  --primary-light: #1a3a5c;
  --primary-lighter: #2d5a8e;
  --accent: #c4953a;
  --accent-light: #d4a94e;
  --accent-dark: #a67d2e;
  --danger: #B9160F;
  --danger-light: #d4322b;
  --success: #28a745;
  --warning: #ffc107;
  --bg: #f4f6f9;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --warning-dark: #856404;
  --success-dark: #155724;
  --danger-dark: #8a100b;
  --brand-red: #B9160F;
  --brand-red-light: rgba(185,22,15,0.08);
}

body {
  /* [1] Alibaba PuHuiTi for Chinese, Inter for numbers/English */
  font-family: 'Alibaba PuHuiTi', 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ========== Loading Overlay ========== */
#loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.75);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: not-allowed;
}
#loading-overlay.active { display: flex; }
.loading-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loading-text { font-size: 13px; color: var(--text-muted); letter-spacing: 0.5px; }

.spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--gray-300);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Toast ========== */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px 12px 20px; border-radius: var(--radius);
  color: var(--white); font-size: 15px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  max-width: 400px;
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
}
.toast-close {
  background: none; border: none; color: inherit;
  font-size: 20px; cursor: pointer; padding: 0 2px;
  opacity: 0.75; line-height: 1; flex-shrink: 0;
}
.toast-close:hover { opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ========== Modal ========== */
.modal-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 5000;
  justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal-lg { max-width: 960px; max-height: 85vh; overflow-y: auto; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-close-btn {
  background: none; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--gray-600);
  font-size: 20px; line-height: 1;
  transition: background 0.2s; flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--gray-200); color: var(--text); }
.modal h3 { font-size: 19px; margin-bottom: 16px; color: var(--primary); }
.modal-header h3 { margin-bottom: 0; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* ========== Header ========== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 0 40px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--brand-red);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-logo {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.header-logo img { height: 56px; }
.header-title { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
/* [10] header-subtitle removed from HTML */
.header-right { display: flex; align-items: center; gap: 16px; }
/* [15] Role badge: styled as a label, not a button */
.header-role {
  background: transparent;
  color: rgba(255,255,255,0.85);
  padding: 5px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  user-select: none;
}
.header-user { font-size: 15px; opacity: 0.9; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 22px; border: none; border-radius: var(--radius);
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: var(--transition); font-family: inherit;
  gap: 6px; white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }
.btn-secondary { background: var(--gray-200); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-300); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover:not(:disabled) { background: var(--danger-light); }
.btn-outline { background: transparent; border: 1px solid var(--gray-400); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-gold { background: var(--accent); color: var(--white); }
.btn-gold:hover:not(:disabled) { background: var(--accent-dark); }
/* [23] Stronger Add Patent button */
.btn-accent-outline {
  background: transparent; border: 1.5px solid var(--accent);
  color: var(--accent-dark); font-weight: 600;
}
.btn-accent-outline:hover:not(:disabled) { background: rgba(196,149,58,0.1); }
.btn-sm { padding: 5px 13px; font-size: 13px; }
.btn-lg { padding: 13px 34px; font-size: 17px; }
.btn-link { background: none; border: none; color: var(--primary-lighter); padding: 4px; cursor: pointer; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }
.btn-ghost-white { color: var(--white); border-color: rgba(255,255,255,0.3); }
.btn-ghost-white:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.btn-block { width: 100%; }

/* ========== Form ========== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px; font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--primary-lighter); box-shadow: 0 0 0 3px rgba(45,90,142,0.15); }
/* [21] Standardize textarea height */
textarea.form-control { min-height: 110px; resize: vertical; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; padding-right: 36px; }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

/* ========== Auth Page ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, #0d3060 50%, var(--primary-light) 100%);
  transition: background 0.3s ease;
  position: relative;
  overflow: hidden;
}
/* 鏂滃悜缁嗙嚎缃戞牸 */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0px,
    transparent 48px,
    rgba(255,255,255,0.028) 48px,
    rgba(255,255,255,0.028) 49px
  );
  pointer-events: none;
  z-index: 0;
}
/* 椤堕儴澶х幆 */
.auth-page::after {
  content: '';
  position: absolute;
  top: -260px; left: 30%;
  width: 800px; height: 800px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  pointer-events: none;
  z-index: 0;
}
.auth-page.register-mode {
  background: var(--bg);
}
.auth-page.register-mode::before,
.auth-page.register-mode::after { display: none; }
.auth-left {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  color: var(--white); padding: 48px 56px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
/* 鍙充笂瑙掑ぇ鐜細绮捐嚧杞粨绾?*/
.auth-left::before {
  content: '';
  position: absolute;
  top: -160px; right: -160px;
  width: 640px; height: 640px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
  background: transparent;
  pointer-events: none;
}
/* 宸︿笅瑙掗噾鑹茬幆锛氳疆寤?+ 鍐呭彂鍏?*/
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 440px; height: 440px;
  border-radius: 50%;
  border: 1px solid rgba(196,149,58,0.18);
  background: radial-gradient(circle at 40% 60%, rgba(196,149,58,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.auth-page.register-mode .auth-left {
  display: none;
}
.auth-left h1 { font-size: 46px; font-weight: 700; margin-bottom: 16px; text-align: center; letter-spacing: 2px; }
.auth-left p { font-size: 22px; opacity: 0.9; text-align: center; max-width: 440px; letter-spacing: 0.5px; }
.auth-slogan {
  margin-top: 36px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 6px;
  opacity: 0.95;
  text-align: center;
  color: var(--accent-light);
}

/* [9] Transition between panels */
.auth-right {
  width: 480px;
  background: linear-gradient(170deg, #ffffff 0%, #f6f8fc 100%);
  display: flex; flex-direction: column;
  justify-content: center; padding: 48px;
  transition: all 0.3s ease;
  box-shadow:
    0 2px 8px rgba(10,38,71,0.06),
    0 16px 40px rgba(10,38,71,0.16),
    0 48px 100px rgba(10,38,71,0.28);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.65);
  margin: 40px 48px 40px 0;
  position: relative;
  min-height: 500px;
  z-index: 1;
}
.auth-page.register-mode .auth-right {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: none;
  min-height: unset;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 48px;
  margin-top: 40px;
  margin-bottom: 40px;
  min-height: unset;
}
.auth-back-link {
  display: none;
  margin-bottom: 20px;
}
.auth-page.register-mode .auth-back-link {
  display: block;
}
.auth-back-link a {
  color: var(--primary-lighter);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.auth-back-link a:hover { text-decoration: underline; }
.auth-form { display: none; opacity: 0; transition: opacity 0.3s ease; }
.auth-form.active { display: block; opacity: 1; }
.auth-form h2 { display: none; }
.auth-page.register-mode .auth-form h2 {
  display: block; font-size: 20px; color: var(--primary);
  margin-bottom: 24px; text-align: center;
}

/* ========== Verify Email Box ========== */
.verify-box {
  text-align: center;
}
.verify-box .verify-icon {
  margin-bottom: 16px;
  display: flex; justify-content: center;
  color: var(--primary);
}
.verify-box h3 { font-size: 20px; color: var(--primary); margin-bottom: 8px; }
.verify-box .verify-hint { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.verify-box .verify-hint strong { color: var(--text); }
.code-input {
  font-size: 28px; font-weight: 700; letter-spacing: 12px;
  text-align: center; width: 100%; padding: 16px 12px;
}

/* ========== Layout ========== */
.app-layout { display: flex; min-height: calc(100vh - 92px); }
/* [14] Sidebar items: larger font and spacing */
.sidebar {
  width: 228px; background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 20px 0;
  box-shadow: var(--shadow-sm);
}
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; font-size: 16px;
  color: var(--text-light); cursor: pointer;
  transition: var(--transition); border: none; background: none;
  width: 100%; text-align: left; font-family: inherit;
}
.sidebar-item:hover { background: var(--gray-100); color: var(--primary); }
/* [31] Unified sidebar icon color */
.sidebar-item.active { background: rgba(10,38,71,0.07); color: var(--primary); font-weight: 600; border-right: 3px solid var(--brand-red); }
.sidebar-item .icon {
  font-size: 16px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); /* unified: all icons use primary navy */
  flex-shrink: 0;
}
.sidebar-item:hover .icon, .sidebar-item.active .icon { color: var(--primary); }
.main-content { flex: 1; padding: 24px; overflow-y: auto; }

/* ========== Page ========== */
.page { display: none; }
.page.active { display: block; }
.page-title { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header .page-title { margin-bottom: 0; }

/* ========== Cards ========== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-200);
}
.card-title { font-size: 17px; font-weight: 700; color: var(--primary); }

/* ========== Status Badge ========== */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 13px; font-weight: 500;
}
.badge-pending { background: rgba(255,193,7,0.15); color: var(--warning-dark); }
.badge-approved { background: rgba(196,149,58,0.15); color: var(--accent-dark); }
.badge-rejected { background: rgba(185,22,15,0.15); color: var(--danger-dark); }

/* ========== Empty State ========== */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state .icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  background: rgba(10,38,71,0.06);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
}
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 12px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ========== Steps (empty state flow) ========== */
.steps-flow {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin: 24px 0; padding: 20px; background: var(--gray-100);
  border-radius: var(--radius-lg);
}
.step-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-light); }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.step-arrow { color: var(--gray-400); font-size: 18px; }

/* ========== Step Progress Bar ========== */
/* [17] Bolder and larger step indicator */
.step-progress {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 32px; padding: 0 20px;
}
.step-progress-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500; color: var(--text-muted);
}
.step-progress-item.active { color: var(--accent-dark); font-weight: 600; }
/* [3] Done checkmark: deep navy/gold instead of green */
.step-progress-item.done { color: var(--accent-dark); }
.step-progress-item .num {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.step-progress-item.active .num { border-color: var(--accent); background: var(--accent); color: var(--white); }
/* [3] Done: use gold/accent instead of success green */
.step-progress-item.done .num { border-color: var(--accent); background: var(--accent); color: var(--white); }
.step-line {
  flex: 1; height: 2px; background: var(--gray-300);
  margin: 0 8px; max-width: 120px;
}
/* [3] Done line: gold instead of green */
.step-line.done { background: var(--accent); }

/* ========== Step Content ========== */
.step-content { display: none; }
.step-content.active { display: block; }
/* [19] Step actions: right-aligned, maintains visual connection */
.step-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gray-200);
}
.step-actions .btn-primary { min-width: 140px; }
.step-actions .btn-gold { min-width: 140px; }
.step-actions .btn-secondary { min-width: 140px; }

/* ========== Success Page ========== */
.success-page {
  text-align: center; padding: 60px 20px;
}
.success-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 36px; margin-bottom: 24px;
}
.success-page h2 { font-size: 24px; color: var(--primary); margin-bottom: 12px; }
.success-page p { color: var(--text-muted); margin-bottom: 32px; }

/* ========== Table ========== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--gray-100); padding: 12px; text-align: left; font-size: 14px; font-weight: 500; color: var(--text-light); border-bottom: 2px solid var(--gray-200); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--gray-200); font-size: 15px; vertical-align: middle; }
tr:hover td { background: var(--gray-100); }
tr:last-child td { border-bottom: none; }

/* ========== Filters ========== */
.filter-bar {
  display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--gray-200);
}
.filter-bar .form-control { width: auto; min-width: 160px; padding: 8px 12px; }
.filter-bar input[type="text"] { min-width: 240px; }
.type-filter-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--gray-200);
}
.type-filter-label { font-size: 13px; color: #5d6d7d; flex-shrink: 0; }
.type-filter-btn {
  padding: 4px 14px; border-radius: 999px; border: 1px solid var(--gray-300);
  background: #fff; font-size: 13px; color: #5d6d7d; cursor: pointer;
  transition: all 0.15s;
}
.type-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.type-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ========== Stats Cards ========== */
/* [29][30] Redesigned stat cards with unified icons and better hierarchy */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 20px;
  border-left: 4px solid var(--gray-300);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.total { border-left-color: var(--primary); }
.stat-card.pending { border-left-color: var(--accent); }
.stat-card.approved { border-left-color: var(--primary-lighter); }
.stat-card.rejected { border-left-color: var(--brand-red); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
/* [29] Unified icon style */
.stat-icon.blue { background: rgba(10,38,71,0.08); color: var(--primary); }
.stat-icon.gold { background: rgba(196,149,58,0.1); color: var(--accent-dark); }
.stat-icon.green { background: rgba(45,90,142,0.08); color: var(--primary-lighter); }
.stat-icon.red { background: rgba(185,22,15,0.08); color: var(--brand-red); }
.stat-info { flex: 1; }
/* [30] Better typographic hierarchy */
.stat-info h4 {
  font-size: 32px; font-weight: 700; color: var(--primary);
  line-height: 1; font-family: 'Inter', sans-serif;
}
.stat-info p { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ========== Brand Card (浼佷笟绔? ========== */
.brand-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gray-300);
  transition: var(--transition);
  cursor: pointer;
}
.brand-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.brand-card.pending { border-left-color: var(--warning); }
.brand-card.approved { border-left-color: var(--accent); }
.brand-card.rejected { border-left-color: var(--danger); }
.brand-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.brand-card-title { font-size: 16px; font-weight: 700; color: var(--primary); }
.brand-card-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.brand-card-meta span { display: flex; align-items: center; gap: 4px; }
.brand-card-actions { margin-top: 12px; display: flex; gap: 8px; }
.modified-tag { font-size: 11px; background: rgba(255,193,7,0.15); color: var(--warning-dark); padding: 2px 8px; border-radius: 10px; margin-left: 8px; }

/* ========== File Upload ========== */
/* [26] Upload zone border: deep navy */
.file-upload-zone {
  border: 2px dashed var(--primary);
  border-radius: var(--radius-lg);
  padding: 36px; text-align: center;
  cursor: pointer; transition: var(--transition);
}
.file-upload-zone:hover { border-color: var(--primary-lighter); background: rgba(10,38,71,0.03); }
/* [25] Cloud upload icon */
.file-upload-zone .icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  color: var(--primary); opacity: 0.6;
  display: flex; align-items: center; justify-content: center;
}
.file-upload-zone p { color: var(--text-muted); font-size: 13px; }
.file-list { margin-top: 12px; }
.file-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--gray-100); border-radius: var(--radius);
  margin-bottom: 8px; font-size: 13px;
}
.file-item .file-name { color: var(--text); }
.file-item .file-size { color: var(--text-muted); font-size: 12px; }

/* ========== Detail View ========== */
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-200); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* [16] Field labels: larger and darker */
.detail-item label { font-size: 14px; color: var(--gray-600); display: block; font-weight: 500; }
.detail-item .value { font-size: 15px; color: var(--text); margin-top: 4px; }
.detail-item.full { grid-column: 1 / -1; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .auth-page { flex-direction: column; }
  .auth-left { display: none; }
  .auth-right { width: 100%; padding: 24px; margin: 0; border-radius: 0; border: none; min-height: unset; box-shadow: none; background: var(--white); }
  .auth-page.register-mode .auth-right { max-width: 100%; margin-top: 16px; padding: 24px; }
  .sidebar { display: none; }
  .main-content { padding: 16px; }
  .form-row { flex-direction: column; gap: 0; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-control { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .step-progress-item span:not(.num) { display: none; }
}

/* ========== Mobile sidebar toggle ========== */
.mobile-menu-btn {
  display: none;
  background: none; border: none; color: var(--white);
  font-size: 24px; cursor: pointer; padding: 4px;
}
.sidebar-backdrop {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); z-index: 998;
}
.sidebar-backdrop.active { display: block; }
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .sidebar.mobile-open { display: block; position: fixed; top: 92px; left: 0; bottom: 0; z-index: 999; }
}

/* ========== Info box ========== */
/* [18] Strengthened info notice box */
.info-box {
  background: rgba(10,38,71,0.04);
  border: 1.5px solid rgba(10,38,71,0.15);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ========== Patent & Standard dynamic rows ========== */
.patent-row, .standard-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.patent-row .patent-type { flex: 0 0 150px; }
.patent-row .patent-name { flex: 1; }
.patent-row .patent-number { flex: 0 0 200px; }
.standard-row .standard-type { flex: 0 0 150px; }
.standard-row .standard-name { flex: 1; }
.standard-row .standard-number { flex: 0 0 200px; }
.btn-patent-remove, .btn-standard-remove {
  flex: 0 0 auto;
  background: none; border: none;
  color: var(--gray-500); cursor: pointer;
  padding: 6px; border-radius: var(--radius);
  display: flex; align-items: center;
  transition: color 0.2s;
  line-height: 1;
}
.btn-patent-remove:hover, .btn-standard-remove:hover { color: var(--danger); }
.patent-add-btn, .standard-add-btn { margin-top: 8px; }

/* ========== Footer ========== */
/* ========== Beta Banner ========== */
/* #beta-banner 宸插垹闄?*/

/* Auth text links (蹇樿瀵嗙爜 / 杩斿洖鐧诲綍) */
.auth-link {
  color: var(--primary-lighter);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* Auth page font sizes (scoped, does not affect admin) */
.auth-page .form-group label { font-size: 15px; }
.auth-page .form-control { font-size: 16px; }
.auth-page .auth-link { font-size: 14px; }

/* Small hint text below inputs */
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Forgot-mode: hide tabs like verify-mode */
.auth-page.forgot-mode .auth-tabs { display: none; }
.auth-page.forgot-mode .auth-back-link { display: none; }

/* [32] Redesigned footer */
.site-footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 13px;
  color: var(--text-muted);
  background: linear-gradient(to right, rgba(10,38,71,0.02), rgba(10,38,71,0.05), rgba(10,38,71,0.02));
  border-top: 2px solid rgba(10,38,71,0.12);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}
.footer-divider {
  color: rgba(10,38,71,0.25);
}
.footer-top, .footer-bottom { font-size: 12px; color: var(--text-muted); }
.footer-top a, .footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-top a:hover, .footer-bottom a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.beian-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
/* 鐧诲綍椤佃仈绯绘柟寮?*/
.guest-entry {
  text-align: center;
  margin-top: 20px;
}
.guest-entry a {
  display: inline-block;
  padding: 7px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.guest-entry a:hover {
  background: var(--accent);
  color: var(--primary);
}

.auth-contact {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  margin-bottom: 0;
}
.auth-contact a {
  color: var(--text-muted);
  text-decoration: underline;
}

/* ========== Auth Layout Extras ========== */
.auth-logo-wrap { margin-bottom: 24px; }
.auth-left-logo { height: 140px; margin: 0 auto 16px; display: block; }
.auth-form button[type="submit"] { margin-top: 12px; }
.auth-verify-btn-wrap { margin-bottom: 12px; }

/* ========== Step Form ========== */
.step-heading { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 20px; }

/* ========== Detail & Review Cards ========== */
.card-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card-detail-header h2 { font-size: 20px; color: var(--primary); }
.review-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.review-card-title { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.review-card-meta { font-size: 14px; color: var(--text-muted); }
.review-card-meta + .review-card-meta { margin-top: 4px; }
.review-card-actions { display: flex; gap: 8px; }
.review-card-tech { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-200); }
.review-card-tech-text { font-size: 13px; }
.review-card-tech-text + .review-card-tech-text { margin-top: 4px; }
.review-card-attachments { font-size: 13px; margin-top: 8px; }
.attachment-btn { margin-right: 4px; }

/* ========== Status & Alerts ========== */
.reject-reason-inline { margin-top: 8px; font-size: 13px; color: var(--danger); }
.reject-reason-box {
  background: rgba(185,22,15,0.08);
  border: 1px solid rgba(185,22,15,0.2);
  padding: 12px; border-radius: var(--radius);
  margin-bottom: 16px; color: var(--danger-dark); font-size: 13px;
}
.status-text-danger { color: var(--danger); font-weight: 500; }
.status-text-success { color: var(--success); }

/* ========== Misc Utilities ========== */
.back-link-wrap { margin-bottom: 16px; }
.cell-truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-actions { display: flex; gap: 12px; }
.file-meta-row { display: flex; align-items: center; gap: 8px; }
.text-accent { color: var(--accent); }
.reject-textarea { margin-top: 12px; }
.no-data-hint { text-align: center; padding: 24px; color: var(--text-muted); }
.no-attachment-hint { color: var(--text-muted); font-size: 13px; }

/* ========== Register 2-step indicator ========== */
.reg-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 28px; padding: 0 4px;
}
.reg-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-muted);
}
.reg-step.active { color: var(--accent-dark); font-weight: 600; }
.reg-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.reg-step.active .reg-step-num { border-color: var(--accent); background: var(--accent); color: var(--white); }
.reg-step.done .reg-step-num { border-color: var(--accent); background: var(--accent); color: var(--white); }
.reg-step.done { color: var(--accent-dark); }
.reg-step-line { flex: 1; height: 2px; background: var(--gray-300); margin: 0 10px; min-width: 40px; }
.reg-step-line.done { background: var(--accent); }

/* Email code inline row */
.email-code-row, .sms-code-row { display: flex; gap: 10px; align-items: flex-end; }
.email-code-row .form-group, .sms-code-row .form-group { flex: 1; margin-bottom: 0; }
.email-code-row .btn, .sms-code-row .btn { flex-shrink: 0; white-space: nowrap; height: 38px; }

/* ========== Approved Brands Card Layout ========== */
.approved-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: var(--transition);
}
.approved-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.approved-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.approved-card-title { font-size: 16px; font-weight: 700; color: var(--primary); }
.approved-card-meta { display: flex; gap: 20px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; margin-bottom: 10px; }
.approved-card-meta span { display: flex; align-items: center; gap: 4px; }
.approved-card-desc { font-size: 14px; color: var(--text-light); margin-bottom: 10px; line-height: 1.5; }
.approved-card-contact { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--gray-200); }
.approved-card-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== btn-logout ========== */
.btn-logout {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  padding: 5px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-logout.btn-guest-login {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-logout.btn-guest-login:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

/* ========== 批量操作栏 ========== */
.batch-action-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin-bottom: 10px;
  background: var(--gray-100); border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  font-size: 14px;
}
.batch-action-bar span { color: var(--text-light); margin-right: 4px; }

/* ========== 灏侀潰鍥句笂浼?========== */
.cover-upload-section {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-100);
}
.cover-upload-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.cover-upload-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.cover-upload-area {
  width: 200px; height: 150px;
  border: 2px dashed var(--gray-400);
  border-radius: var(--radius);
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; background: var(--white);
  transition: border-color 0.2s;
  overflow: hidden; position: relative;
}
.cover-upload-area:hover { border-color: var(--accent); }
#cover-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: 13px; }
.cover-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-reupload-btn {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.55); color: #fff; border: none;
  border-radius: 4px; padding: 3px 8px; font-size: 12px; cursor: pointer;
}
.cover-reupload-btn:hover { background: rgba(0,0,0,0.75); }

/* ========== 宸插叆搴撳搧鐗岀粺璁℃爮 ========== */
.approved-stats-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: 16px 24px; margin-bottom: 16px;
  font-size: 14px; line-height: 1.8;
}
.approved-stats-bar strong { color: var(--accent-light); }

/* ========== 品牌目录卡片（新样式） ========== */
.brand-directory-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 22px;
  padding: 0; margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(15, 57, 88, 0.08);
  border: 1px solid rgba(116, 151, 180, 0.22);
  transition: var(--transition);
  display: flex; gap: 0; overflow: hidden;
}
.brand-directory-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #69b7a6 0%, #9ed6bf 45%, #d8ede4 100%);
}
.brand-directory-card:hover {
  box-shadow: 0 16px 34px rgba(15, 57, 88, 0.12);
  transform: translateY(-2px);
}
.brand-directory-card.my-brand {
  border: 1px solid rgba(196,149,58,0.42);
  box-shadow: 0 14px 30px rgba(196,149,58,0.12);
}
.brand-cover-wrap {
  width: 160px; min-width: 160px; height: 120px;
  padding: 14px;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.brand-cover-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-cover-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: #6f8797; font-size: 12px;
  text-align: center;
}
.brand-directory-body { padding: 18px 22px; flex: 1; min-width: 0; }
.brand-dir-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; gap: 8px; }
.brand-dir-title { font-size: 17px; font-weight: 700; color: var(--primary); flex: 1; min-width: 0; line-height: 1.4; }
.brand-dir-mybadge {
  font-size: 11px; color: var(--accent-dark); background: rgba(196,149,58,0.1);
  border: 1px solid var(--accent); border-radius: 4px;
  padding: 2px 8px; white-space: nowrap; flex-shrink: 0;
}
.brand-dir-company { font-size: 13px; font-weight: 400; color: #7a93a8; margin: 3px 0 10px; display: flex; align-items: center; gap: 4px; }
.brand-dir-meta { display: flex; gap: 10px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; margin-bottom: 10px; }
.brand-dir-meta .tag {
  color: #587083;
  background: rgba(105, 183, 166, 0.12);
  border: 1px solid rgba(105, 183, 166, 0.16);
  border-radius: 999px;
  padding: 3px 10px;
}
.brand-dir-meta .product-type-tag {
  color: var(--accent-dark);
  background: rgba(196, 149, 58, 0.10);
  border: 1px solid rgba(196, 149, 58, 0.22);
  border-radius: 999px;
  padding: 3px 10px;
}
.brand-dir-desc {
  font-size: 14px;
  color: #5d6d7d;
  line-height: 1.75;
  margin-bottom: 8px;
}
.brand-dir-desc .expand-link { color: var(--accent-dark); cursor: pointer; font-size: 13px; margin-left: 4px; }
.brand-dir-downloads {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: #5d6d7d;
}
.brand-dir-downloads .download-label {
  color: #4f6578;
  font-weight: 500;
  flex-shrink: 0;
}
.brand-dir-downloads .download-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #3d7a6e;
  font-weight: 500;
  flex-shrink: 0;
}
.brand-dir-downloads .download-link,
.brand-dir-downloads .download-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 0;
  font-size: 14px;
  color: #2e6296;
  text-decoration: none;
}
.brand-dir-downloads .download-link:hover,
.brand-dir-downloads .download-chip:hover {
  color: #184c82;
  text-decoration: underline;
}
.brand-dir-contact {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #667788;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(116, 151, 180, 0.18);
}
.approved-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0 8px;
}
.approved-pagination .pagination-info {
  font-size: 14px;
  color: var(--text-muted);
}
.approved-pagination-count {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0 4px;
}

.detail-cover-wrap {
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(116, 151, 180, 0.16);
}
.detail-cover-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
  border-radius: 0;
  background: transparent;
}

/* 璇勭骇鍙紪杈戞牱寮?*/
.rating-inline { color: #c4953a; font-size: 15px; margin-left: 4px; }
.rating-inline:hover .rating-edit-hint { opacity: 1; }
.rating-edit-hint { font-size: 12px; color: #999; margin-left: 2px; opacity: 0; transition: opacity 0.15s; }
.rating-empty-hint { font-size: 12px; color: #bbb; margin-left: 4px; }
.rating-empty-hint:hover { color: var(--accent-dark); }

@media (max-width: 600px) {
  .brand-cover-wrap { width: 100px; min-width: 100px; height: 80px; }
  .brand-directory-body { padding: 12px 14px; }
  .brand-dir-title { font-size: 15px; }
  .brand-dir-company { font-size: 12px; }
  .brand-dir-desc { font-size: 13px; }
  .brand-dir-downloads, .brand-dir-downloads .download-link { font-size: 13px; }
  .detail-cover-wrap { padding: 12px; }
}

/* ===== 鑱旂郴鏂瑰紡鍏紑寮€鍏?===== */
.public-contact-toggle { margin-top: 20px; padding: 14px 16px; background: #f8f9fc; border: 1px solid var(--gray-200); border-radius: 8px; }
.toggle-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.toggle-label input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }
.toggle-text { font-size: 14px; color: var(--text); font-weight: 500; }
.toggle-hint { margin: 6px 0 0 26px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ===== 鎺ㄥ箍璧勬枡鍏紑澶嶉€夋 ===== */
.public-toggle { margin: 8px 0 10px; }
.public-toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-muted); }
.public-toggle-label input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--primary); flex-shrink: 0; }

/* ===== 鎰忚鍙嶉娴姩鎸夐挳 ===== */
.feedback-fab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px 0 0 6px;
  padding: 10px 6px;
  font-size: 12px;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  cursor: pointer;
  z-index: 900;
  box-shadow: -2px 2px 8px rgba(0,0,0,0.18);
  transition: background 0.2s;
  line-height: 1;
}
.feedback-fab:hover { background: var(--primary-light); }

/* ===== 鎰忚鍙嶉寮圭獥 ===== */
.feedback-modal-box { width: 460px; max-width: 95vw; }

/* ===== 娉曞緥澹版槑寮圭獥 ===== */
.legal-modal-box { width: 540px; max-width: 95vw; }
.legal-modal-body { padding: 20px 24px; max-height: 60vh; overflow-y: auto; font-size: 13px; color: var(--text); line-height: 1.8; }
.legal-modal-body p { margin-bottom: 12px; }
.legal-modal-body a { color: var(--accent); }

/* ===== 娉曞緥澹版槑灏忓瓧 ===== */
.legal-hint { text-align: center; font-size: 12px; color: var(--gray-500); margin-top: 10px; line-height: 1.6; }
.legal-hint a { color: var(--gray-500); text-decoration: none; border-bottom: 1px solid var(--gray-400); }
.legal-hint a:hover { color: var(--text-muted); }
.legal-notice { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
#auth-page:not(.register-mode) .legal-notice { display: none; }
#auth-page.register-mode .guest-entry { display: none; }
.footer-company-link { color: var(--text-muted); text-decoration: none; }
.footer-company-link:hover { color: var(--primary); text-decoration: underline; }

