/* ===== 宜搜布 - 全局样式 v4 (基于参考设计稿重建) ===== */
:root {
  --primary: #1a3c5e;
  --primary-light: #2a5a8a;
  --primary-hover: #2a5a8a;
  --accent: #d4943a;
  --accent-light: #f0c078;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --warning: #FF7D00;
  --danger: #c62828;
  --bg: #f5f3ef;
  --card-bg: #ffffff;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #8F959E;
  --border: #e2ddd6;
  --border-light: #eeeeef;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--primary); text-decoration: none; }
.logo-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.logo-img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { text-decoration: none; color: var(--text-secondary); font-size: 15px; transition: var(--transition); padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--primary); border-bottom-color: var(--accent); }

/* Header 按钮 */
.btn-nav { background: var(--primary); color: #fff; padding: 8px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; }
.btn-nav:hover { background: var(--primary-light); }
.btn-nav.btn-nav-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn-nav.btn-nav-outline:hover { border-color: var(--primary); }

/* Header 用户区域 */
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; text-decoration: none !important; flex-shrink: 0; transition: transform .2s, box-shadow .2s; }
.nav-avatar:hover { transform: scale(1.08); box-shadow: 0 2px 8px rgba(26,60,94,.4); }
.nav-user-info { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.2; }
.nav-username { font-size: 13px; font-weight: 600; color: var(--text); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.nav-role-badge { padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 700; line-height: 1.5; text-align: left; align-self: flex-start; }
.role-admin  { background: var(--danger); color: #fff; }
.role-premium { background: var(--accent); color: #fff; }
.role-basic   { background: rgba(26,60,94,.15); color: var(--primary); }
.nav-btn-logout { padding: 6px 14px; color: var(--text-tertiary); font-size: 12px; font-weight: 500; transition: var(--transition); text-decoration: none; }
.nav-btn-logout:hover { color: var(--text-secondary); }
.nav-admin-links { display: inline-flex; align-items: center; gap: 20px; border-left: 1px solid var(--border); padding-left: 20px; margin-left: 4px; }
.nav-admin-links a { font-size: 13px; color: var(--text-tertiary); padding: 6px 0; }
.nav-admin-links a:hover, .nav-admin-links a.active { color: var(--accent); }
.nav-user-area { display: flex; align-items: center; gap: 12px; margin-left: auto; padding-left: 16px; border-left: 1px solid var(--border); }

/* ===== Flash 消息 ===== */
.flash-container { position: fixed; top: 72px; right: 20px; z-index: 9999; max-width: 360px; }
.flash-msg { margin-bottom: 8px; padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.flash-success { background: #E6F7FF; border: 1px solid #91D5FF; color: #1A1A1A; }
.flash-error { background: #FFF2E8; border: 1px solid #FFBB96; color: #CF1322; }

/* ===== Hero ===== */
.hero { background: linear-gradient(160deg, #0f2640 0%, #1a3c5e 40%, #1e4d6e 100%); color: #fff; padding: 80px 0 100px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30 L30 0 L60 30 L30 60 Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E"); opacity: 0.5; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 44px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.hero h1 span { color: var(--accent-light); }
.hero p { font-size: 18px; color: rgba(255,255,255,.75); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Search Tabs */
.search-tabs { display: flex; justify-content: center; gap: 4px; margin-bottom: 0; }
.search-tab { padding: 14px 32px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); border: none; cursor: pointer; font-size: 16px; font-weight: 500; transition: var(--transition); }
.search-tab:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.search-tab:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm); }
.search-tab.active, .search-tab:hover { background: var(--accent); color: #fff; }

/* Search Box */
.search-box { max-width: 720px; margin: 0 auto; display: flex; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.search-box input { flex: 1; border: none; padding: 18px 24px; font-size: 16px; outline: none; color: var(--text); }
.search-box input::placeholder { color: #aaa; }
.search-box .search-btn { padding: 18px 40px; background: var(--accent); color: #fff; border: none; font-size: 16px; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.search-box .search-btn:hover { background: #c8852e; }
.search-box .search-btn:disabled { background: #a0b4c8; cursor: not-allowed; }

/* Tab content switch */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Upload area (image tab) */
.hero .upload-area { margin-top: 20px; color: rgba(255,255,255,.6); font-size: 14px; text-align: center; }
.hero .upload-area label { color: var(--accent-light); cursor: pointer; }
.hero-subtitle { font-size: 17px; color: rgba(255,255,255,.7); margin-bottom: 32px; max-width: 640px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.upload-horizontal { display: flex; gap: 20px; align-items: flex-start; justify-content: center; }
.upload-left { flex: 0 0 240px; text-align: center; }
.upload-right { flex: 0 0 480px; min-width: 0; }
.upload-preview-wrap { display: none; margin-bottom: 10px; }
.upload-preview-wrap img { width: 100%; height: 180px; object-fit: contain; border-radius: var(--radius); border: 2px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); }
.clear-upload-btn { margin-top: 8px; color: rgba(255,255,255,.6); font-size: 12px; cursor: pointer; transition: var(--transition); }
.clear-upload-btn:hover { color: #fff; }
.filter-panel-inline { display: none; background: rgba(255,255,255,.08); border-radius: var(--radius); padding: 14px 16px; border: 1px solid rgba(255,255,255,.15); }
.filter-panel-inline.visible { display: block; }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.filter-grid label { display: block; font-size: 15px; font-weight: 700; color: rgba(255,255,255,.9); margin-bottom: 6px; letter-spacing: 0.5px; text-align: left; }
.filter-grid label::before { content: "▸ "; color: #FFB347; font-weight: 700; }
.filter-grid input { width: 100%; padding: 8px 12px; background: rgba(255,255,255,.12); border: none; border-radius: 6px; color: #fff; font-size: 15px; font-weight: 600; outline: none; transition: var(--transition); box-sizing: border-box; }
.filter-grid input::placeholder { color: rgba(255,255,255,.45); font-size: 14px; font-weight: 400; }
.filter-grid input:focus { background: rgba(255,255,255,.2); outline: 2px solid #FFB347; }
.filter-hint { font-size: 12px; color: rgba(255,255,255,.5); text-align: center; font-weight: 500; }

/* 下载APP横幅 */
.download-app-banner { width: 100%; margin: 48px 0 0; padding: 20px 32px; background: #fff8ee; border: 2px dashed #FFB347; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 24px; box-sizing: border-box; text-align: center; }
.download-app-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.download-app-text { line-height: 1.5; }
.download-app-text .label { font-size: 16px; font-weight: 600; color: #1a1a2e; }
.download-app-text .highlight { font-size: 16px; font-weight: 600; color: #FF6B00; }
.download-app-text .desc { font-size: 16px; color: #1a1a2e; }
.download-app-btn { padding: 12px 32px; background: #1A3C5E; color: #fff; text-decoration: none; border-radius: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; flex-shrink: 0; transition: transform .2s; display: inline-block; }
.download-app-btn:hover { transform: scale(1.05); }
.download-app-qrcode { display: inline-block; flex-shrink: 0; line-height: 0; text-decoration: none; transition: transform .2s; }
.download-app-qrcode:hover { transform: scale(1.05); }
.download-app-qrcode img { height: 100px; width: auto; display: block; }

/* 图片搜索面板 */
#image-search-panel .preview-wrap { display: block; max-width: 280px; margin: 0 auto; }
#image-search-panel .preview-wrap img { width: 100%; height: 200px; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--border); background: #FAFBFC; }

/* ===== Stats ===== */
.stats { margin-top: -40px; position: relative; z-index: 2; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow-md); }
.stat-card .stat-num { font-size: 32px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.stat-card .stat-label { font-size: 14px; color: var(--text-secondary); }

/* ===== Section ===== */
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.section-title p { color: var(--text-secondary); font-size: 16px; }

/* ===== Features ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: var(--card); border-radius: var(--radius-lg); padding: 36px 28px; text-align: center; transition: var(--transition); border: 1px solid var(--border); }
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.feature-icon.blue { background: #e8f0f9; color: var(--primary); }
.feature-icon.gold { background: #fef5e7; color: var(--accent); }
.feature-icon.green { background: #e8f5e9; color: var(--success); }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ===== How it Works ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.steps::before { content: ''; position: absolute; top: 28px; left: 15%; right: 15%; height: 2px; border-top: 2px dashed var(--border); z-index: 0; }
.step { text-align: center; position: relative; z-index: 1; }
.step-num { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; margin: 0 auto 16px; }
.step h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--text-secondary); font-size: 13px; }

/* ===== Category Tags ===== */
.categories { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cat-tag { padding: 10px 24px; background: var(--card); border: 1px solid var(--border); border-radius: 50px; font-size: 14px; color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.cat-tag:hover, .cat-tag.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Search Results ===== */
.results-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.fabric-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border); cursor: pointer; position: relative; }
.fabric-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.fabric-card .card-img { height: 260px; background: #e8e4dd; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 48px; position: relative; overflow: hidden; }
.fabric-card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.fabric-card .card-body { padding: 18px 16px 16px; }
.fabric-card .card-body h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.fabric-card .card-body .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.fabric-card .card-body .tag { padding: 3px 10px; background: #f0f0f0; border-radius: 4px; font-size: 12px; color: var(--text-secondary); }
.fabric-card .supplier { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; justify-content: space-between; }
.fabric-card .supplier .price { color: var(--accent); font-weight: 700; font-size: 18px; }
.fabric-card .supplier .locked { color: var(--danger); font-size: 13px; }
.fabric-card .card-hint { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 11px; }
.fabric-card .img-fallback { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #e8e4dd; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 14px; border-radius: var(--radius); padding: 16px; text-align: center; word-break: break-all; }

/* Score Badge */
.score-badge { display: inline-block; padding: 6px 16px; border-radius: 22px; font-size: 14px; font-weight: 700; margin-bottom: 10px; letter-spacing: .3px; }
.badge-success { background: var(--success); color: #fff; }
.badge-warning { background: var(--warning); color: #fff; }
.badge-error { background: var(--danger); color: #fff; }
.badge-info { background: var(--primary); color: #fff; }

/* ===== Pricing ===== */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.plan { background: var(--card); border-radius: var(--radius-lg); padding: 40px 32px; border: 2px solid var(--border); text-align: center; transition: var(--transition); position: relative; display: flex; flex-direction: column; }
.plan .btn { margin-top: auto; }
.plan:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.plan.recommended { border-color: var(--accent); box-shadow: var(--shadow-md); }
.plan .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 4px 20px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.plan h4 { font-size: 20px; margin-bottom: 8px; }
.plan .plan-price { font-size: 42px; font-weight: 800; color: var(--primary); margin: 20px 0 8px; }
.plan .plan-price span { font-size: 16px; color: var(--text-secondary); font-weight: 400; }
.plan .plan-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.plan ul { list-style: none; text-align: left; margin-bottom: 28px; }
.plan ul li { padding: 8px 0; font-size: 14px; color: var(--text-secondary); }
.plan ul li::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* ===== Footer ===== */
.footer { background: #0f2640; color: rgba(255,255,255,.6); padding: 48px 0 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer h5 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer a { color: rgba(255,255,255,.5); text-decoration: none; display: block; padding: 4px 0; transition: var(--transition); }
.footer a:hover { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center; }

/* ===== Toast ===== */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 28px; border-radius: 50px; font-size: 14px; z-index: 300; opacity: 0; transition: opacity .3s; }
.toast.show { opacity: 1; }

/* ===== Detail Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--card); border-radius: var(--radius-lg); max-width: 900px; width: 95%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 24px 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 20px; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-secondary); padding: 8px; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px; }
.modal-body .detail-img { background: #e8e4dd; border-radius: var(--radius); height: 300px; display: flex; align-items: center; justify-content: center; font-size: 64px; color: #aaa; }
.detail-params h4 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: var(--primary); }
.param-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.param-item .p-label { font-size: 12px; color: var(--text-secondary); }
.param-item .p-value { font-size: 14px; font-weight: 500; }
.modal-footer { padding: 24px 32px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* ===== Buttons ===== */
.btn { padding: 10px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); transition: var(--transition); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.4; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(26,60,94,.3); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 14px rgba(26,60,94,.38); transform: translateY(-1px); }
.btn-primary:disabled { background: #a0b4c8; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #c8852e; }
.btn-outline { background: #fff; color: var(--primary); }
.btn-outline:hover { background: var(--bg); }
.btn-vip { background: linear-gradient(135deg, #d4943a, #f0c078); color: #fff; border: none; font-size: 16px; padding: 12px 40px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #E33A3A; }

/* ===== Cards (通用) ===== */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; transition: box-shadow .2s; }
.card:hover { box-shadow: var(--shadow-md); }

/* ===== Form ===== */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: .1px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; outline: none; transition: var(--transition); background: #fff; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,60,94,.1); }

/* ===== Auth Pages (登录/注册) ===== */
.auth-page { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 48px 24px; background-image: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(26,60,94,.06) 0%, transparent 100%), radial-gradient(ellipse 60% 50% at 90% 90%, rgba(212,148,58,.04) 0%, transparent 100%); }
.auth-wrapper { width: 100%; max-width: 440px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header .auth-logo-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; margin: 0 auto 16px; }
.auth-header .auth-logo-img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); margin: 0 auto 16px; display: block; }
.auth-header h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-header .desc { font-size: 14px; color: var(--text-tertiary); }
.auth-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,.04); }

/* Auth form input */
.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.input-wrap .input-icon svg { width: 18px; height: 18px; color: #B0B5C0; }
.input-wrap input { width: 100%; height: 48px; padding: 0 15px 0 46px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 14px; font-family: inherit; color: var(--text); background: #F9FAFB; outline: none; transition: var(--transition); }
.input-wrap input::placeholder { color: #BCC1CA; }
.input-wrap input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(26,60,94,.08); }
.form-group .hint { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; margin-left: 2px; }

/* Auth buttons */
.btn-submit { width: 100%; height: 48px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition); letter-spacing: .3px; margin-top: 6px; box-shadow: 0 2px 8px rgba(26,60,94,.25); position: relative; overflow: hidden; }
.btn-submit::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 60%); pointer-events: none; }
.btn-submit:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,60,94,.35); }
.btn-submit:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(26,60,94,.2); }

.btn-wechat { width: 100%; height: 48px; background: #07C160; color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--transition); letter-spacing: .3px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; box-shadow: 0 2px 8px rgba(7,193,96,.2); font-family: inherit; }
.btn-wechat:hover { background: #06AD56; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(7,193,96,.3); color: #fff; }
.btn-wechat svg { width: 22px; height: 22px; fill: #fff; flex-shrink: 0; }

.divider { display: flex; align-items: center; margin: 28px 0 22px; gap: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--text-tertiary); font-weight: 500; letter-spacing: .5px; }

.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; transition: color .15s; }
.auth-footer a:hover { color: var(--primary-hover); }

.feature-notes { display: flex; gap: 16px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.feature-note { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
.feature-note .dot { width: 6px; height: 6px; background: #10B981; border-radius: 50%; }

/* ===== Profile Page ===== */
.profile-container { max-width: 640px; margin: 32px auto; padding: 0 24px; }
.profile-header { margin-bottom: 24px; }
.profile-header h2 { font-size: 24px; font-weight: 700; }
.profile-user-card { padding: 24px; }
.profile-user-card .user-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 700; }
.profile-table { width: 100%; font-size: 14px; }
.profile-table td { padding: 8px 0; }
.profile-table td:first-child { color: var(--text-secondary); width: 120px; }

/* ===== Detail Page ===== */
.detail-container { max-width: 1000px; margin: 32px auto; padding: 0 24px; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: end; }
.detail-image-section { padding: 24px; }

/* ===== Filter Panel ===== */
.filter-panel { flex: 0 0 auto; text-align: left; background: #FAFBFC; border-radius: var(--radius); padding: 18px; border: 1px solid var(--border-light); }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a, .pagination span { padding: 7px 14px; border-radius: var(--radius-sm); font-size: 14px; text-decoration: none; border: 1px solid var(--border); color: var(--text); transition: all .15s; }
.pagination a:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Data Table ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-light); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th { background: #F7F8FA; padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 13px; white-space: nowrap; border-bottom: 1px solid var(--border-light); }
table.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #FAFBFC; }
table.data-table .thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-light); }
table.data-table .actions { display: flex; gap: 6px; }

/* ===== Action Buttons ===== */
.btn-action { display: inline-flex; align-items: center; gap: 3px; padding: 4px 11px; border-radius: 6px; font-size: 12px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: all .15s; border: 1px solid; line-height: 1.6; background: transparent; }
.btn-action-edit { color: var(--primary); border-color: var(--primary); background: #F0F4FF; }
.btn-action-edit:hover { background: var(--primary); color: #fff; }
.btn-action-delete { color: var(--danger); border-color: var(--danger); background: #FFF1F0; }
.btn-action-delete:hover { background: var(--danger); color: #fff; }
.action-group { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }

/* ===== Search Result (已改为 fabric-card 卡片网格) ===== */

/* Attr table */
.attr-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; }
.attr-table td { padding: 7px 12px; border-bottom: 1px solid var(--border-light); color: var(--text); line-height: 1.55; }
.attr-table td:last-child { border-bottom: none; }
.attr-table .attr-label { font-weight: 600; color: var(--text-secondary); background: #F7F8FA; width: 70px; white-space: nowrap; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 64px 24px; color: var(--text-tertiary); }
.empty-state .icon { font-size: 52px; margin-bottom: 14px; opacity: .35; }

/* ===== Spinner ===== */
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .45s ease both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header .container { padding: 0 16px; }
  .nav { gap: 8px; flex-wrap: wrap; }
  .nav a { font-size: 13px; padding: 6px 10px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 14px; }
  .hero { padding: 60px 0 80px; }
  .features, .steps, .pricing { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .modal-body { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .search-box { flex-direction: column; }
  .search-box .search-btn { padding: 14px 24px; width: 100%; }
  .auth-page { padding: 24px 16px; align-items: flex-start; padding-top: 48px; }
  .auth-card { padding: 28px 20px; }
  .section { padding: 48px 0; }
  .categories { gap: 8px; }
  .cat-tag { padding: 8px 16px; font-size: 13px; }
}

@media (max-width: 480px) {
  .nav { display: none; }
  .header .container { justify-content: center; }
  .hero h1 { font-size: 24px; }
  .results-grid { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: 1fr 1fr; }
}
