*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;background:#f7f7f8;color:#1f1f1f;min-height:100vh;display:flex}
a{color:#0066cc;text-decoration:none}
a:hover{text-decoration:underline}
.center-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}
.auth-card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:30px;width:420px;max-width:94vw}
.auth-card h2{font-size:20px;margin-bottom:18px}
.sidebar{width:220px;background:#fff;border-right:1px solid #e5e5e5;position:fixed;top:0;bottom:0;left:0;z-index:20;display:flex;flex-direction:column}
.sidebar .brand{font-size:16px;font-weight:700;color:#111;padding:20px;border-bottom:1px solid #e5e5e5}
.sidebar a{color:#444;padding:11px 20px;display:block;font-size:14px;border-left:2px solid transparent}
.sidebar a:hover{background:#f5f5f5;color:#111;text-decoration:none}
.sidebar a.active{background:#f0f0f0;color:#111;border-left-color:#111;font-weight:500}
.main{margin-left:220px;flex:1;padding:24px;min-width:0}
.topbar{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:14px 18px;display:flex;align-items:center;margin-bottom:20px}
.topbar .title{font-size:16px;font-weight:600}
.topbar .right{margin-left:auto;color:#666;font-size:13px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:20px}
.stat{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:18px}
.stat .num{font-size:26px;font-weight:700}
.stat .label{color:#666;font-size:13px;margin-top:4px}
.card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:20px;margin-bottom:20px}
.card h3{font-size:15px;font-weight:600;margin-bottom:12px}
.field{margin-bottom:14px}
.field label{display:block;font-size:13px;font-weight:500;color:#333;margin-bottom:5px}
.field input,.field select,.field textarea{padding:8px 10px;border:1px solid #d0d0d0;border-radius:6px;font-size:13px;outline:none;width:100%;background:#fff}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#0066cc;box-shadow:0 0 0 2px rgba(0,102,204,.12)}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.btn{background:#111;color:#fff;border:1px solid #111;border-radius:6px;padding:8px 14px;font-size:13px;cursor:pointer;display:inline-block;text-decoration:none}
.btn:hover{background:#333;color:#fff;text-decoration:none}
.btn-red{background:#fff;color:#dc2626;border:1px solid #e5e5e5;border-radius:6px;padding:7px 12px;font-size:13px;cursor:pointer;display:inline-block}
.btn-red:hover{background:#fef2f2}
.msg{padding:10px 14px;border-radius:6px;margin-bottom:14px;font-size:13px;border:1px solid #e5e5e5;background:#f0f0f0;color:#111}
.msg.success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}
.msg.error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:10px 12px;border-bottom:1px solid #ececec;text-align:left;vertical-align:middle}
th{background:#fafafa;color:#555}
tr:hover td{background:#fafafa}
.public-nav{width:100%;max-width:480px;margin:0 auto;background:#fff;border-bottom:1px solid #e5e5e5;padding:12px 14px;display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:50}
.public-nav .brand{font-size:22px;font-weight:700;background:linear-gradient(135deg,#0066cc,#0ea5e9);-webkit-background-clip:text;background-clip:text;color:transparent}
.public-nav a{color:#444;font-size:14px}
.public-main{flex:1;padding:14px;max-width:480px;margin:0 auto;width:100%;min-height:100vh;background:#fff}
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.product-card{background:#fff;border:1px solid #e5e5e5;border-radius:8px;overflow:hidden;display:block;color:inherit;text-decoration:none}
.product-card:hover{text-decoration:none}
.product-card .cover{height:170px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:40px;color:#bbb;object-fit:contain;width:100%;padding:8px;box-sizing:border-box}
.product-card .info{padding:14px}
.product-card .name{font-weight:700;font-size:15px;color:#111;margin-bottom:4px}
.product-card .desc{font-size:12px;color:#888;height:32px;overflow:hidden}
.product-card .price{color:#e11d48;font-weight:700;font-size:18px;margin-top:6px}
.muted{color:#666;font-size:13px}
@media(max-width:800px){body{display:block}.sidebar{position:relative;width:100%;display:flex;flex-wrap:wrap;border-right:none;border-bottom:1px solid #e5e5e5}.sidebar .brand{width:100%;border-bottom:none;padding:12px 16px}.sidebar a{flex:1;text-align:center;padding:10px 6px;font-size:12px;border-left:none}.sidebar a.active{border-left:none;border-bottom:2px solid #111}.main{margin-left:0;padding:14px}.public-main{padding:14px}}

/* 表格横向滚动，避免内容超出卡片/手机框 */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin-bottom:6px}
.table-wrap table{background:#fff;min-width:720px}
.card .table-wrap table{border-radius:8px}

/* 订单状态中文标签 */
.status-badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;font-weight:600;white-space:nowrap}
.status-pending{background:#fff7ed;color:#b45309;border:1px solid #fed7aa}
.status-paid{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.status-completed{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}
.status-closed{background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}
.status-cancelled{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}

/* 公开页面统一按手机宽度居中，前台背景纯白 */
body:has(.public-main){display:block;background:#fff}
body:has(.public-main) .public-nav,
body:has(.public-main) .public-main{max-width:480px;margin-left:auto;margin-right:auto;width:100%}

/* 兼容当前模板里用到的前台类 */
body.public-body{display:block;background:#fff}
body.public-body .public-nav,body.public-body .public-main{max-width:480px;margin-left:auto;margin-right:auto;width:100%}
.page-title{text-align:center;padding:14px 0 4px}
.page-title h2{margin:0;font-size:22px}
.front-icons{display:flex;gap:12px;overflow-x:auto;padding:8px 12px;background:#fff;border-bottom:1px solid #eee;max-width:480px;margin:0 auto;width:100%}
.front-icon{flex:0 0 auto;width:54px;text-align:center;color:#333;text-decoration:none;font-size:11px;line-height:1.3}
.front-icon:hover{text-decoration:none;color:#0066cc}
.front-icon img{width:38px;height:38px;object-fit:cover;border-radius:10px;display:block;margin:0 auto 4px;border:1px solid #e5e5e5;background:#fafafa}
.front-icon span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.modal-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:999}
.modal-box{background:#fff;border-radius:16px;padding:24px;max-width:520px;width:92vw;box-shadow:0 20px 60px rgba(0,0,0,.2);max-height:86vh;overflow:auto}
.card-textarea{width:100%;box-sizing:border-box;font-family:monospace;font-size:13px;margin:10px 0;resize:none;overflow:auto;background:#fff;border:1px solid #e5e5e5;border-radius:8px;padding:12px;line-height:1.5}
.order-item{background:#fff;border:1px solid #e5e5e5;border-radius:12px;padding:14px;margin-bottom:10px}
.order-item--done{background:#fff;border-color:#bbf7d0}
.order-item--pending{background:#eff6ff;border-color:#bfdbfe}
.order-item--paid{background:#fffbeb;border-color:#fcd34d}
.order-item--closed{background:#f8fafc;border-color:#e5e7eb}
.order-item-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.order-item-title{font-weight:700;font-size:15px}
.order-item-meta{font-size:12px;color:#888;margin:4px 0}
.order-item-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.order-item-hint{font-size:13px;font-weight:600;margin-top:6px}
.order-tag{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700}
.order-tag--done{background:#dcfce7;color:#15803d}
.order-tag--pending{background:#dbeafe;color:#1d4ed8}
.order-tag--paid{background:#fef3c7;color:#b45309}
.order-tag--closed{background:#f1f5f9;color:#64748b}
.order-countdown{color:#1d4ed8;font-size:13px;font-weight:700;margin-top:6px}
.order-item-brief{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#555;font-size:13px;background:#f8f8f8;border-radius:8px;padding:8px 10px;margin-top:6px}
.cover--empty,.detail-cover--empty{font-size:13px;color:#98a2b3;font-weight:600}

/* 客服按钮改为文字后，给按钮留出宽度 */
.icon-btn{width:auto;min-width:52px;padding:0 11px;font-size:12px;font-weight:700}

/* 订单页导航里的站名保证可见 */
.public-nav .brand .brand-text{color:#111;background:none;-webkit-background-clip:border-box;background-clip:border-box}
.public-nav .brand img{width:26px;height:26px;object-fit:cover;border-radius:7px;margin-right:4px;vertical-align:middle}

/* ===== 前台：方形、简洁、分类对称、顶部图标区 ===== */
.front-top{background:#fff;padding:8px 0 0}
.front-icons{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:10px;padding:0 12px 8px;background:#fff;border-bottom:1px solid #eee;max-width:480px;margin:0 auto;width:100%}
.front-icon{flex:0 0 56px;width:56px;text-align:center;color:#333;text-decoration:none;font-size:11px;line-height:1.3}
.front-icon:hover{text-decoration:none;color:#111}
.front-icon img{width:40px;height:40px;object-fit:cover;border-radius:0;display:block;margin:0 auto 4px;border:1px solid #e5e5e5;background:#fafafa}
.front-icon span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.public-body{background:#fff}
body.public-body .public-nav,
body.public-body .public-main,
body.public-body .card,
body.public-body .product-card,
body.public-body .product-card .cover,
body.public-body .cat-item,
body.public-body .btn,
body.public-body .btn-red,
body.public-body .btn-ghost,
body.public-body .field input,
body.public-body .field select,
body.public-body .field textarea,
body.public-body .msg,
body.public-body .order-item,
body.public-body .order-tag,
body.public-body .order-item-brief,
body.public-body .modal-box,
body.public-body .card-textarea,
body.public-body .free-tip,
body.public-body .pay-option,
body.public-body .pay-icon,
body.public-body .front-icon img,
body.public-body .search-form input,
body.public-body .search-form button,
body.public-body .shop-top .top-actions a{border-radius:0 !important}
body.public-body .cat-strip{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:8px;padding:12px 12px 14px;background:#fff}
body.public-body .cat-item{flex:0 0 104px;width:104px;min-width:104px;max-width:104px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:10px 6px;margin:0;font-size:13px;line-height:1.35;overflow:hidden}
body.public-body .cat-item .count{font-size:11px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
body.public-body .cat-item.active{border:1px solid #111 !important;background:#f2f2f2;color:#111;font-weight:700}
body.public-body .cat-item.active .count{opacity:.7}
.cashier-wrap .cashier-card,.cashier-wrap .seg,.cashier-wrap .seg button,.cashier-wrap .qr-box,.cashier-wrap .pay-btn,.cashier-wrap .link-box input,.cashier-wrap .link-box button{border-radius:0 !important}
body.public-body .shop-top .shop-title img{border-radius:0 !important}
body.public-body .shop-top,body.public-body .search-wrap,body.public-body .phone-page{border-radius:0 !important}
/* 电脑端前台整体居中 */
body.public-body .phone-page{margin-left:auto;margin-right:auto}
body.public-body .front-top{width:100%}
.btn[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}
