:root {
  --navy: #071b46;
  --navy-2: #102e69;
  --blue: #2864f0;
  --blue-soft: #edf3ff;
  --cyan: #3ed6d0;
  --ink: #18243a;
  --muted: #78869b;
  --line: #e9eef5;
  --bg: #f6f8fc;
  --card: #fff;
  --pink: #f3386d;
  --shadow: 0 16px 45px rgba(38, 67, 120, 0.09);
  --radius: 16px;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; display: flex; }
.side-nav { position: fixed; inset: 0 auto 0 0; width: 242px; padding: 25px 16px 20px; background: var(--navy); color: #d8e4ff; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 27px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #102658; background: linear-gradient(135deg, #fff, #82e7e0); font-weight: 900; letter-spacing: -0.08em; }
.brand strong { display: block; color: #fff; font-size: 16px; letter-spacing: .03em; }
.brand span { display: block; margin-top: 3px; color: #8da5d1; font-size: 11px; }
.nav-label { padding: 15px 14px 8px; color: #7189b7; font-size: 10px; letter-spacing: .16em; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; margin: 3px 0; padding: 12px 13px; border-radius: 10px; color: #aabbd9; background: transparent; text-align: left; font-size: 13px; transition: .2s ease; }
.nav-link:hover, .nav-link.active { color: #fff; background: linear-gradient(100deg, rgba(50, 112, 239, .85), rgba(50, 112, 239, .25)); }
.nav-link svg { width: 18px; height: 18px; flex: none; }
.side-footer { margin-top: auto; padding: 16px 13px; border: 1px solid #254272; border-radius: 13px; background: #0d2756; color: #a9bddf; font-size: 11px; line-height: 1.7; }
.side-footer strong { display: block; color: #fff; font-size: 12px; }

.main-shell { width: calc(100% - 242px); margin-left: 242px; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 42px; border-bottom: 1px solid rgba(229, 235, 245, .82); background: rgba(255,255,255,.9); backdrop-filter: blur(16px); }
.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.crumb { color: #97a4b7; font-size: 12px; }
.top-search { width: min(380px, 34vw); display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: #f8faff; color: #9ba9bb; }
.top-search:focus-within { border-color: #9dbbff; background: #fff; box-shadow: 0 0 0 3px #dfe9ff; }
.top-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.top-search input::placeholder { color: #9ba9bb; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-icon-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #60718d; background: transparent; }
.top-icon-button:hover { background: #eef4ff; color: var(--blue); }
.count-dot { position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 99px; background: var(--pink); color: #fff; font-size: 9px; line-height: 1; }
.profile-button { display: flex; align-items: center; gap: 9px; padding: 5px 4px 5px 8px; border-radius: 10px; color: var(--ink); background: transparent; }
.profile-button:hover { background: #f3f6fb; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #d8e5ff, #8ec4ff); color: #fff; font-size: 12px; font-weight: 700; }
.profile-button span:last-child { color: #8190a4; font-size: 11px; }

.page { max-width: 1420px; margin: 0 auto; padding: 30px 42px 70px; }
.hero { position: relative; overflow: hidden; min-height: 300px; padding: 46px 50px; border-radius: 20px; background: linear-gradient(120deg, #081c48 0%, #123c86 54%, #1c65c7 100%); color: #fff; box-shadow: 0 22px 55px rgba(17, 55, 123, .24); }
.hero:before, .hero:after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero:before { width: 420px; height: 420px; right: 3%; top: -210px; background: radial-gradient(circle, rgba(102, 228, 224, .44), rgba(102, 228, 224, 0)); }
.hero:after { width: 500px; height: 500px; right: 18%; bottom: -360px; background: radial-gradient(circle, rgba(144, 112, 255, .38), rgba(144, 112, 255, 0)); }
.hero-copy { position: relative; z-index: 1; max-width: 630px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #9ee8e3; font-size: 11px; letter-spacing: .18em; }
.eyebrow:before { content: ""; width: 20px; height: 1px; background: #78dfd8; }
.hero h1 { margin: 18px 0 12px; font-size: clamp(28px, 3vw, 44px); line-height: 1.17; letter-spacing: -.04em; }
.hero p { max-width: 520px; margin: 0; color: #b8caec; font-size: 14px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 11px; margin-top: 27px; }
.btn { min-height: 40px; padding: 0 18px; border-radius: 9px; font-size: 12px; font-weight: 650; transition: .2s ease; }
.btn-primary { color: #0b2656; background: #fff; box-shadow: 0 9px 20px rgba(6, 15, 51, .16); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 25px rgba(6, 15, 51, .22); }
.btn-ghost { color: #e4eeff; border: 1px solid #6689c5; background: transparent; }
.btn-ghost:hover { border-color: #a9d3ff; background: rgba(255,255,255,.09); }
.hero-visual { position: absolute; right: 7%; bottom: 24px; z-index: 1; width: 280px; height: 190px; padding: 16px; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; background: rgba(10, 34, 83, .45); box-shadow: 0 18px 45px rgba(2, 15, 44, .2); transform: rotate(4deg); }
.visual-bar { display: flex; justify-content: space-between; align-items: center; color: #a4b9e7; font-size: 10px; }
.visual-bars { display: flex; align-items: flex-end; gap: 9px; height: 110px; padding-top: 14px; }
.visual-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #67e4dd, #2864f0); opacity: .92; }
.visual-bars i:nth-child(1){height:35%}.visual-bars i:nth-child(2){height:58%}.visual-bars i:nth-child(3){height:46%}.visual-bars i:nth-child(4){height:78%}.visual-bars i:nth-child(5){height:66%}.visual-bars i:nth-child(6){height:96%}
.visual-foot { display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.14); color: #a6b7dc; font-size: 10px; }

.section { margin-top: 32px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; color: #263650; font-size: 19px; letter-spacing: -.02em; }
.section-heading p { margin: 6px 0 0; color: #97a5b7; font-size: 12px; }
.section-link { color: var(--blue); font-size: 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.quick-card { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 15px 14px; border: 1px solid #edf1f7; border-radius: 12px; background: #fff; box-shadow: 0 8px 22px rgba(74, 99, 140, .035); transition: .2s ease; }
.quick-card:hover { transform: translateY(-2px); border-color: #cfdfff; box-shadow: var(--shadow); }
.quick-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: none; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.quick-card:nth-child(2) .quick-icon{color:#6d55d8;background:#f1edff}.quick-card:nth-child(3) .quick-icon{color:#14a596;background:#e8fbf7}.quick-card:nth-child(4) .quick-icon{color:#dd8b30;background:#fff5e7}.quick-card:nth-child(5) .quick-icon{color:#dc4f78;background:#fff0f4}.quick-card:nth-child(6) .quick-icon{color:#4588dc;background:#eaf4ff}
.quick-card b { display: block; overflow: hidden; color: #30415c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quick-card span { display: block; margin-top: 4px; overflow: hidden; color: #a0acbc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.category-strip { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
.category-strip::-webkit-scrollbar { display: none; }
.category-tab { flex: none; padding: 9px 15px; border: 1px solid #e6ebf3; border-radius: 9px; color: #718096; background: #fff; font-size: 12px; }
.category-tab:hover, .category-tab.active { border-color: #a9c4ff; color: #1f5cda; background: #edf3ff; }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 17px; }
.filter-tabs { display: flex; gap: 18px; }
.filter-tab { padding: 5px 0; color: #94a0b0; background: transparent; font-size: 12px; }
.filter-tab.active { color: #245fdc; font-weight: 700; }
.search-note { color: #9aa7b7; font-size: 11px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid #edf1f7; border-radius: 14px; background: #fff; box-shadow: 0 8px 23px rgba(65, 90, 133, .035); transition: .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-image { position: relative; display: block; width: 100%; aspect-ratio: 1.08; overflow: hidden; background: #f2f5f8; }
.product-image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.product-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #aab6c6; background: linear-gradient(145deg, #f5f8fb, #e9eef5); font-size: 44px; }
.featured { position: absolute; top: 11px; left: 11px; padding: 4px 7px; border-radius: 5px; color: #fff; background: var(--pink); font-size: 10px; }
.favorite-chip { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #708097; background: rgba(255,255,255,.9); }
.favorite-chip.active { color: var(--pink); }
.product-body { padding: 14px 14px 13px; }
.product-title { display: -webkit-box; overflow: hidden; min-height: 38px; color: #28364d; font-size: 13px; font-weight: 650; line-height: 1.45; text-align: left; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-title:hover { color: var(--blue); }
.product-tags { display: flex; gap: 5px; overflow: hidden; margin-top: 9px; white-space: nowrap; }
.product-tags span { padding: 3px 5px; border-radius: 4px; color: #bf7180; background: #fff1f4; font-size: 10px; }
.product-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; }
.product-meta small { display: block; color: #9aa7b7; font-size: 10px; }
.product-meta b { display: block; margin-top: 4px; overflow: hidden; color: #34445c; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.product-meta .accent b { color: var(--pink); }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 11px; border-top: 1px solid #f1f3f7; }
.brand-name { overflow: hidden; color: #a1adbd; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.add-button { flex: none; min-height: 30px; padding: 0 10px; border-radius: 7px; color: #fff; background: var(--blue); font-size: 10px; }
.add-button:hover { background: #1452d2; }
.add-button.added { color: #53709f; background: #edf2fa; }

.board-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .9fr); gap: 17px; }
.panel { min-width: 0; padding: 20px; border: 1px solid #edf1f7; border-radius: 14px; background: #fff; box-shadow: 0 8px 23px rgba(65, 90, 133, .035); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h3 { margin: 0; color: #2b3c57; font-size: 15px; }
.panel-heading p { margin: 6px 0 0; color: #9ba8b8; font-size: 11px; }
.board-tabs { display: flex; gap: 7px; padding: 3px; border-radius: 8px; background: #f4f7fb; }
.board-tab { padding: 7px 9px; border-radius: 6px; color: #8b98aa; background: transparent; font-size: 10px; white-space: nowrap; }
.board-tab.active { color: #245fdc; background: #fff; box-shadow: 0 2px 7px rgba(54, 93, 159, .1); }
.rank-list { display: grid; gap: 10px; margin-top: 17px; }
.rank-row { display: grid; grid-template-columns: 26px 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px; border-radius: 10px; background: #fafbfd; }
.rank-index { color: #9eabba; font-size: 13px; font-style: italic; font-weight: 800; text-align: center; }
.rank-index.top { color: var(--pink); }
.rank-img { width: 52px; height: 52px; overflow: hidden; border-radius: 8px; background: #eef2f7; }
.rank-img img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { min-width: 0; }
.rank-info strong { display: block; overflow: hidden; color: #34445d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rank-info span { display: block; margin-top: 5px; color: #a1adbd; font-size: 10px; }
.rank-value { color: #2b66dd; font-size: 12px; font-weight: 700; }
.rank-empty { padding: 45px 0; color: #9da9b8; text-align: center; font-size: 12px; }
.metric-list { display: grid; gap: 17px; margin-top: 20px; }
.metric-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.metric-line div { min-width: 0; }
.metric-line small { display: block; color: #99a6b8; font-size: 10px; }
.metric-line strong { display: block; margin-top: 5px; color: #2f415c; font-size: 21px; }
.metric-line span { color: #22a68d; font-size: 11px; }
.progress { width: 100px; height: 6px; overflow: hidden; border-radius: 99px; background: #edf2f8; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2769f2, #63d9d1); }

.empty-state { padding: 60px 20px; border: 1px dashed #dbe3ee; border-radius: 13px; color: #9ba8b8; background: #fff; text-align: center; }
.empty-state strong { display: block; margin-top: 10px; color: #617088; font-size: 13px; }
.empty-state p { margin: 7px 0 0; font-size: 11px; }
.skeleton { height: 280px; border-radius: 14px; background: linear-gradient(90deg,#eef2f7 25%,#f8fafc 37%,#eef2f7 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0%{background-position:100% 0}100%{background-position:-100% 0} }

.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title h1 { margin: 0; color: #243650; font-size: 26px; letter-spacing: -.03em; }
.page-title p { margin: 7px 0 0; color: #94a2b4; font-size: 12px; }
.tool-button { padding: 9px 13px; border-radius: 8px; color: #4e607c; background: #fff; box-shadow: 0 4px 12px rgba(53, 76, 115, .06); font-size: 11px; }
.tool-button:hover { color: var(--blue); background: #edf3ff; }

.overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(5, 17, 42, .54); backdrop-filter: blur(5px); }
.modal { width: min(680px, 100%); max-height: min(760px, 90vh); overflow: auto; border-radius: 16px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.2); }
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: #263752; font-size: 16px; }
.close-button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #8290a4; background: transparent; }
.close-button:hover { color: #244fbb; background: #edf3ff; }
.modal-body { padding: 22px; }
.detail-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
.detail-photo { width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #f3f6fa; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy h3 { margin: 0; color: #253750; font-size: 18px; line-height: 1.5; }
.detail-copy p { color: #7e8ca0; font-size: 12px; line-height: 1.7; }
.detail-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 18px 0; }
.detail-stats div { padding: 11px; border-radius: 8px; background: #f7f9fc; }
.detail-stats small { display: block; color: #98a5b6; font-size: 10px; }
.detail-stats b { display: block; margin-top: 5px; color: #33445c; font-size: 17px; }
.detail-stats .accent b { color: var(--pink); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-tags span { padding: 4px 6px; border-radius: 4px; color: #b26e7e; background: #fff0f4; font-size: 10px; }
.detail-section { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.detail-section h4 { margin: 0 0 9px; color: #3d4d64; font-size: 13px; }
.detail-section p { margin: 0; white-space: pre-wrap; }
.platform-row { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #f1f3f7; color: #738198; font-size: 11px; }
.platform-row:first-of-type { border-top: 0; }
.platform-row strong { color: #34455e; }
.copy-button { padding: 6px 10px; border-radius: 6px; color: #2864f0; background: #edf3ff; font-size: 10px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #718096; font-size: 11px; }
.form-field input, .form-field textarea { width: 100%; padding: 10px 11px; border: 1px solid #e1e7ef; border-radius: 8px; outline: 0; color: var(--ink); background: #fbfcfe; font-size: 12px; }
.form-field textarea { min-height: 90px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: #9ebaff; box-shadow: 0 0 0 3px #e4edff; background: #fff; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 120; padding: 11px 16px; border-radius: 9px; color: #fff; background: #17243b; box-shadow: 0 12px 28px rgba(0,0,0,.16); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }

@media (max-width: 1240px) {
  .quick-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .hero-visual { right: 3%; opacity: .78; }
}
@media (max-width: 980px) {
  .side-nav { width: 75px; padding-left: 10px; padding-right: 10px; }
  .brand { justify-content: center; padding: 0 0 25px; }
  .brand > div:last-child, .nav-label, .nav-link span, .side-footer { display: none; }
  .nav-link { justify-content: center; padding: 12px 0; }
  .main-shell { width: calc(100% - 75px); margin-left: 75px; }
  .topbar { padding: 0 25px; }
  .page { padding: 25px; }
  .hero { padding: 38px 35px; }
  .hero-visual { right: -35px; opacity: .52; }
}
@media (max-width: 720px) {
  body { padding-bottom: 64px; }
  .side-nav { display: none; }
  .main-shell { width: 100%; margin: 0; }
  .topbar { height: 62px; padding: 0 15px; }
  .crumb { display: none; }
  .top-search { width: min(100%, 260px); }
  .profile-button span:last-child { display: none; }
  .page { padding: 17px 14px 45px; }
  .hero { min-height: 340px; padding: 30px 24px; border-radius: 16px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 13px; }
  .hero-visual { width: 230px; right: -45px; bottom: 15px; opacity: .32; }
  .hero-copy { position: relative; z-index: 2; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .quick-card { padding: 12px 10px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .product-body { padding: 11px 10px; }
  .product-title { font-size: 12px; }
  .product-meta { gap: 4px; }
  .product-meta b { font-size: 11px; }
  .brand-name { max-width: 80px; }
  .board-layout, .detail-layout { grid-template-columns: 1fr; }
  .detail-photo { max-width: 280px; margin: auto; }
  .page-title { align-items: flex-start; flex-direction: column; gap: 12px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(4,1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #e8edf5; background: rgba(255,255,255,.94); backdrop-filter: blur(15px); }
  .mobile-nav button { display: grid; justify-items: center; gap: 3px; color: #91a0b2; background: transparent; font-size: 10px; }
  .mobile-nav button.active { color: var(--blue); }
}
@media (max-width: 420px) {
  .top-search { width: 42px; padding: 10px; border: 0; background: transparent; }
  .top-search input, .top-search button { display: none; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .hero-actions { flex-wrap: wrap; }
  .filter-row { align-items: flex-start; flex-direction: column; }
  .filter-tabs { width: 100%; justify-content: space-between; gap: 5px; }
  .modal-body { padding: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
}
