* { box-sizing: border-box; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { margin: 0; background: #f4f6fa; color: #1f2937; }

/* 顶部导航（门户风格，每端通用） */
.nav { background: #111827; color: #fff; padding: 0 24px; display: flex; align-items: center; gap: 6px; height: 56px; }
.nav .brand { font-weight: 800; font-size: 17px; color: #fff; margin-right: 18px; text-decoration: none; letter-spacing: .5px; }
.nav a.link { color: #cbd5e1; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.nav a.link:hover { background: #1f2937; color: #fff; }
.nav a.link.active { background: #2563eb; color: #fff; }
.nav .spacer { flex: 1; }
.nav .me { color: #93c5fd; font-size: 13px; }

/* 角色页头 */
.role-head { padding: 22px 24px 0; }
.role-head h1 { margin: 0; font-size: 22px; }
.role-head .desc { color: #6b7280; font-size: 13px; margin-top: 4px; }

.wrap { padding: 18px 24px 32px; max-width: 1100px; margin: 0 auto; }

/* 卡片 */
.cards { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.card { flex: 1 1 160px; background: #fff; border: 1px solid #eef0f3; border-radius: 12px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card .label { color: #6b7280; font-size: 13px; }
.card .value { font-size: 22px; font-weight: 800; margin-top: 6px; }
.v-green{color:#059669} .v-blue{color:#2563eb} .v-orange{color:#d97706} .v-purple{color:#7c3aed}

h3 { margin: 24px 0 10px; font-size: 16px; border-left: 4px solid #2563eb; padding-left: 10px; }

table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { border-bottom: 1px solid #eef0f3; padding: 10px 12px; text-align: left; }
th { background: #f9fafb; color: #6b7280; font-weight: 600; }
tr:hover td { background: #f9fafb; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
select, input, textarea { padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
button { padding: 8px 16px; background: #2563eb; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; }
button:hover { background: #1d4ed8; }
button.sm { padding: 5px 12px; font-size: 13px; }
button.ghost { background: #fff; color: #2563eb; border: 1px solid #2563eb; }
button.ghost:hover { background: #eff6ff; }
button.green { background: #059669; }
button.green:hover { background: #047857; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
.hint { color: #6b7280; font-size: 13px; }

.badge { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fee2e2; color: #b91c1c; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.info { background: #dbeafe; color: #1d4ed8; }

/* 商品卡片 */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pcard { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #fff; display: flex; flex-direction: column; }
.pcard .pname { font-weight: 700; font-size: 15px; }
.pcard .pdesc { color: #6b7280; font-size: 13px; margin: 6px 0 10px; min-height: 36px; flex: 1; }
.pcard .prow { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.pcard .price { color: #d97706; font-weight: 800; font-size: 17px; }
.pcard .qty { width: 56px; text-align: center; }

/* 门店选择卡片（顾客端） */
.store-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.store-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; background: #fff; cursor: pointer; transition: .15s; }
.store-card:hover { border-color: #93c5fd; box-shadow: 0 2px 10px rgba(37,99,235,.12); }
.store-card.sel { border-color: #2563eb; background: #eff6ff; }
.store-card .sname { font-weight: 800; font-size: 16px; }
.store-card .scount { color: #6b7280; font-size: 13px; margin-top: 4px; }

/* 购物车 */
.cart { background: #fff; border: 1px solid #eef0f3; border-radius: 12px; padding: 16px; }
.cart .line { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; }
.cart .total { font-weight: 800; font-size: 16px; margin-top: 10px; }

/* 门户入口 */
.portal { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 10px; }
.pentry { display: block; text-decoration: none; color: inherit; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px; background: #fff; transition: .15s; }
.pentry:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); border-color: #93c5fd; }
.pentry .ico { font-size: 30px; }
.pentry .pt { font-weight: 800; font-size: 18px; margin: 10px 0 6px; }
.pentry .pd { color: #6b7280; font-size: 13px; line-height: 1.5; }

.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: #059669; color: #fff; padding: 11px 20px; border-radius: 8px; opacity: 0; transition: .3s; z-index: 99; font-weight: 600; }
.toast.show { opacity: 1; }
.empty { color: #9ca3af; padding: 14px 4px; }
