:root {
  --ink: #192328;
  --ink-2: #2b383e;
  --muted: #6d7a7f;
  --paper: #f3f5f4;
  --white: #fff;
  --line: #dbe1df;
  --green: #2b9e77;
  --green-dark: #17684d;
  --coral: #e67353;
  --yellow: #dfb448;
  --danger: #c9574c;
  --shadow: 0 12px 32px rgba(25, 35, 40, .08);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.65; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.app-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { min-height: 70px; display: flex; align-items: center; gap: 28px; }
.brand { min-width: 220px; padding: 0; display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.brand-logo { width: 51px; height: 32px; flex: 0 0 51px; background: url("assets/logo-web.png") center / contain no-repeat; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 16px; font-weight: 900; }
.brand-copy strong { white-space: nowrap; }
.brand-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.global-search { width: min(420px, 38vw); height: 38px; margin-left: auto; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--muted); }
.global-search > span { padding-left: 12px; font-size: 20px; line-height: 1; }
.global-search input { min-width: 0; flex: 1; height: 100%; padding: 0 9px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.global-search button { height: 100%; padding: 0 14px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.global-search button:hover { background: #e9f3ee; }
.header-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.header-actions .user-link { color: var(--ink-2); font-size: 12px; font-weight: 700; }
.header-actions .user-link strong { color: var(--green-dark); }
.button, .header-actions button { min-height: 36px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; font-size: 12px; font-weight: 800; }
.button-primary, .header-actions .button-primary { background: var(--green); color: var(--white); }
.button-primary:hover { background: var(--green-dark); }
.button-quiet { border-color: var(--line); background: var(--white); color: var(--ink-2); }
.button-quiet:hover { border-color: var(--green); color: var(--green-dark); }
.button-danger { border-color: #efc4bf; background: #fff7f5; color: var(--danger); }
.button-small { min-height: 30px; padding: 0 10px; font-size: 11px; }
.mobile-menu { display: none; width: 38px; height: 38px; padding: 0; border: 0; background: transparent; font-size: 21px; }

.module-nav { background: var(--white); border-bottom: 1px solid var(--line); }
.module-nav-inner { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.nav-item { min-height: 47px; padding: 0 17px; flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #647176; font-size: 12px; font-weight: 700; }
.nav-item:hover { color: var(--green-dark); }
.nav-item.active { border-bottom-color: var(--green); color: var(--green-dark); }

#app-view { min-height: calc(100vh - 165px); padding: 34px 0 68px; }
.page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.page-heading { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.page-heading h1 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 900; }
.page-heading p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; }
.eyebrow { margin: 0 0 8px; color: var(--green-dark); font-size: 10px; font-weight: 900; letter-spacing: .04em; }
.section-title { margin: 0 0 15px; font-size: 18px; line-height: 1.35; }
.muted { color: var(--muted); }
.empty { padding: 46px 20px; border: 1px dashed #c5cfcb; background: var(--white); color: var(--muted); text-align: center; font-size: 12px; }

.dashboard-hero { min-height: 218px; padding: 32px 38px; display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; overflow: hidden; border-radius: 6px; background: var(--ink) url("assets/about-campus.jpg") right center / 47% 100% no-repeat; color: var(--white); }
.dashboard-hero h1 { margin: 0; font-size: 32px; line-height: 1.25; }
.dashboard-hero p { max-width: 590px; margin: 12px 0 0; color: #becac6; font-size: 13px; line-height: 1.85; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 9px; }
.dashboard-hero .button-quiet { border-color: #647176; background: transparent; color: var(--white); }
.dashboard-hero .button-quiet:hover { border-color: #c8d7d1; background: rgba(255, 255, 255, .06); }
.quick-stats { padding: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; border-radius: 4px; background: rgba(20, 31, 36, .82); }
.quick-stats strong { display: block; font-size: 24px; }
.quick-stats small { display: block; margin-top: 3px; color: #a9b9b3; font-size: 10px; }
.quick-stats hr { margin: 18px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.quick-stats span { color: #8bd0ae; font-size: 11px; }
.dashboard-grid { margin-top: 26px; display: grid; grid-template-columns: 1.45fr .75fr; gap: 22px; align-items: start; }
.dashboard-main, .side-column { min-width: 0; }
.dashboard-section + .dashboard-section { margin-top: 24px; }
.dashboard-section-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dashboard-section-head h2 { margin: 0; font-size: 17px; }
.text-link { padding: 0; border: 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 800; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.category-link { min-height: 80px; padding: 13px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 4px; background: var(--white); text-align: left; }
.category-link:hover { border-color: #9bc8b5; box-shadow: var(--shadow); }
.category-link span { color: var(--coral); font-size: 9px; font-weight: 900; }
.category-link strong { font-size: 13px; }
.category-link small { color: var(--muted); font-size: 9px; }
.feed-list, .task-list, .product-list, .channel-list { display: grid; gap: 9px; }
.feed-item, .task-item, .product-item, .channel-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.feed-item:hover, .task-item:hover, .product-item:hover, .channel-item:hover { border-color: #abcdbd; }
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.item-type { color: var(--green-dark); font-size: 10px; font-weight: 800; }
.item-time { color: #9aa5a3; font-size: 10px; }
.feed-item h3, .task-item h3, .product-item h3, .channel-item h3 { margin: 5px 0 5px; font-size: 15px; line-height: 1.45; }
.feed-item p, .task-item p, .product-item p, .channel-item p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.item-footer { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.item-footer-actions { display: flex; gap: 6px; }
.badge { padding: 3px 7px; border-radius: 3px; background: #eaf4ef; color: var(--green-dark); font-size: 9px; font-weight: 800; }
.badge.coral { background: #fff0eb; color: #b95842; }
.side-panel { padding: 19px; border: 1px solid var(--line); background: var(--white); }
.side-panel + .side-panel { margin-top: 13px; }
.side-panel h2 { margin: 0 0 14px; font-size: 16px; }
.side-row { padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: 11px; }
.side-row strong { font-size: 14px; }
.side-row small { color: var(--muted); }
.notice-list { margin: 0; padding: 0; list-style: none; }
.notice-list li { padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.notice-list li:first-child { border-top: 0; padding-top: 0; }

.filter-bar { margin-bottom: 17px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--white); }
.filter-bar input, .filter-bar select { height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; outline: 0; background: var(--white); color: var(--ink); font-size: 11px; }
.filter-chip { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--muted); font-size: 11px; }
.filter-chip.active, .filter-chip:hover { border-color: var(--green); background: #eff8f3; color: var(--green-dark); }
.two-column { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; align-items: start; }
.task-price, .product-price { color: var(--coral); font-size: 19px; font-weight: 900; }
.task-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 15px; color: var(--muted); font-size: 10px; }
.task-meta span::before { content: "· "; color: var(--coral); }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.product-item { min-height: 205px; display: flex; flex-direction: column; }
.product-item .item-footer { margin-top: auto; }
.product-cover { height: 92px; margin: -16px -18px 13px; background: url("assets/product-life.png") center / cover no-repeat; filter: saturate(.75); }
.product-cover.cover-2 { background-image: url("assets/product-information.png"); }
.product-cover.cover-3 { background-image: url("assets/product-transaction.png"); }
.channel-list { grid-template-columns: repeat(3, 1fr); }
.channel-item { min-height: 165px; display: flex; flex-direction: column; }
.channel-item .item-footer { margin-top: auto; }

.order-tabs { margin-bottom: 17px; display: flex; gap: 5px; border-bottom: 1px solid var(--line); }
.order-tab { min-height: 38px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 11px; }
.order-tab.active { border-bottom-color: var(--green); color: var(--green-dark); font-weight: 800; }
.order-list { display: grid; gap: 11px; }
.order-card { padding: 17px 19px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.order-no { color: var(--muted); font-size: 10px; }
.order-state { color: var(--green-dark); font-size: 11px; font-weight: 800; }
.order-main { padding: 14px 0; display: grid; grid-template-columns: 1fr auto; gap: 15px; }
.order-main h3 { margin: 0 0 6px; font-size: 14px; }
.order-main p { margin: 0; color: var(--muted); font-size: 11px; }
.order-amount { color: var(--coral); font-size: 18px; font-weight: 900; text-align: right; }
.order-timeline { margin: 0; padding: 12px 0 4px; display: flex; gap: 0; list-style: none; border-top: 1px solid var(--line); }
.order-timeline li { position: relative; flex: 1; padding-right: 8px; color: #a1aaa8; font-size: 9px; }
.order-timeline li::before { content: ""; width: 7px; height: 7px; margin-bottom: 6px; display: block; border-radius: 50%; background: #c7cfcc; }
.order-timeline li.done { color: var(--green-dark); }
.order-timeline li.done::before { background: var(--green); }
.order-actions { padding-top: 11px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }

.wallet-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 22px; align-items: start; }
.balance-panel { padding: 28px; background: var(--ink); color: var(--white); }
.balance-panel small { color: #9eaca7; font-size: 10px; }
.balance-panel .balance { margin: 8px 0 23px; font-size: 37px; font-weight: 900; }
.balance-panel .balance span { margin-left: 5px; font-size: 13px; font-weight: 400; }
.balance-row { padding: 13px 0; display: flex; justify-content: space-between; border-top: 1px solid #485258; color: #c4cfcb; font-size: 11px; }
.balance-row strong { color: var(--white); }
.wallet-record { border-top: 2px solid var(--ink); }
.wallet-record article { padding: 14px 3px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wallet-record article div { display: flex; flex-direction: column; }
.wallet-record small { color: var(--muted); font-size: 10px; }
.wallet-record strong { font-size: 13px; }
.wallet-record .income { color: var(--green-dark); }
.wallet-record .expense { color: var(--coral); }

.compliance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compliance-card { padding: 23px; border: 1px solid var(--line); background: var(--white); }
.compliance-card h2 { margin: 0 0 14px; font-size: 18px; }
.compliance-card h3 { margin: 20px 0 7px; font-size: 13px; }
.compliance-card p, .compliance-card li { color: var(--muted); font-size: 11px; line-height: 1.85; }
.compliance-card ul { margin: 0; padding-left: 18px; }
.qualification-table { margin-top: 22px; border-top: 2px solid var(--ink); }
.qualification-table > div { padding: 15px 3px; display: grid; grid-template-columns: 220px 1fr; gap: 25px; border-bottom: 1px solid var(--line); background: var(--white); }
.qualification-table span { color: var(--muted); font-size: 11px; }
.qualification-table strong { font-size: 12px; }
.qualification-table a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }

.site-footer { padding: 27px 0; background: #111a1e; color: #aebbb6; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 9px 35px; align-items: center; font-size: 10px; }
.footer-inner strong { color: var(--white); font-size: 15px; }
.footer-inner p { margin: 4px 0 0; }
.footer-inner nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 16px; }
.footer-inner nav button { padding: 0; border: 0; background: transparent; color: inherit; font-size: 10px; }
.footer-inner nav button:hover, .footer-inner nav a:hover { color: var(--white); }
.footer-inner > p { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid #354247; }

.modal-root:empty { display: none; }
.modal-root { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(16, 26, 30, .58); }
.modal { width: min(510px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow: auto; border-radius: 6px; background: var(--white); box-shadow: 0 25px 70px rgba(0, 0, 0, .25); }
.modal.wide { width: min(720px, 100%); }
.modal-head { padding: 19px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-close { width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; }
.modal-body { padding: 21px 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--ink-2); font-size: 11px; font-weight: 800; }
.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 3px; outline: 0; background: var(--white); color: var(--ink); font-size: 12px; }
.form-field textarea { min-height: 93px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(43, 158, 119, .1); }
.form-help { margin: 0; color: var(--muted); font-size: 10px; }
.auth-submit { width: 100%; margin-top: 16px; }
.modal-foot { padding: 14px 22px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }
.payment-box { padding: 18px; background: #eff7f3; }
.payment-box strong { display: block; font-size: 21px; color: var(--green-dark); }
.payment-box p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 18px; }
.detail-grid div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-grid small { display: block; color: var(--muted); font-size: 10px; }
.detail-grid strong { display: block; margin-top: 3px; font-size: 12px; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 30px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 4px; opacity: 0; pointer-events: none; background: var(--ink); color: var(--white); font-size: 12px; transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

@media (max-width: 980px) {
  .header-inner { gap: 14px; }
  .brand { min-width: 190px; }
  .global-search { width: min(330px, 33vw); }
  .dashboard-grid, .two-column, .wallet-grid { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
  .side-panel + .side-panel { margin-top: 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .channel-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .container, .page { width: calc(100% - 32px); }
  .header-inner { min-height: 62px; }
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .global-search { width: auto; flex: 1; margin-left: 0; }
  .global-search button { padding: 0 9px; }
  .header-actions { display: none; }
  .mobile-menu { display: block; }
  .module-nav { position: relative; }
  .module-nav-inner { width: 100%; padding: 0 8px; }
  .nav-item { padding: 0 13px; }
  #app-view { padding: 23px 0 48px; }
  .page-heading { display: block; }
  .page-heading p { margin-top: 9px; }
  .dashboard-hero { min-height: 0; padding: 25px; display: block; background: var(--ink); }
  .dashboard-hero p { max-width: 100%; }
  .quick-stats { margin-top: 28px; padding: 17px 0 0; display: flex; gap: 25px; border-top: 1px solid rgba(255, 255, 255, .2); border-left: 0; background: transparent; }
  .quick-stats hr { display: none; }
  .quick-stats strong { font-size: 20px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .side-column { display: block; }
  .side-panel + .side-panel { margin-top: 13px; }
  .product-grid, .channel-list, .compliance-grid { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; }
  .filter-bar input, .filter-bar select { flex: 1; min-width: 130px; }
  .scene-list { grid-template-columns: 1fr; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .qualification-table > div { grid-template-columns: 1fr; gap: 5px; }
  .footer-inner { display: block; }
  .footer-inner nav { margin-top: 18px; justify-content: flex-start; }
  .footer-inner > p { margin-top: 15px; }
}
@media (max-width: 420px) {
  .brand-logo { width: 44px; flex-basis: 44px; }
  .brand-copy strong { font-size: 13px; }
  .global-search input { font-size: 11px; }
  .global-search button { font-size: 10px; }
  .dashboard-hero h1 { font-size: 27px; }
  .dashboard-hero { background-size: 90% 58%; }
  .order-main { grid-template-columns: 1fr; }
  .order-amount { text-align: left; }
  .order-timeline { overflow-x: auto; }
  .order-timeline li { min-width: 92px; }
}
