* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, "Microsoft YaHei", sans-serif; background:#f5f5f5; color:#333; }
a { text-decoration:none; color:inherit; }

/* 顶部导航 */
.topbar { background:#1a73e8; color:#fff; padding:12px 16px; display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; z-index:100; }
.topbar h1 { font-size:18px; font-weight:600; }
.topbar a { color:#fff; font-size:14px; opacity:.9; }

/* 登录页 */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#1a73e8,#4a9af5); }
.login-box { background:#fff; border-radius:12px; padding:32px 24px; width:90%; max-width:360px; box-shadow:0 8px 30px rgba(0,0,0,.15); }
.login-box h2 { text-align:center; margin-bottom:24px; color:#333; }
.login-box input { width:100%; height:44px; border:1px solid #ddd; border-radius:8px; padding:0 12px; font-size:15px; margin-bottom:14px; outline:none; }
.login-box input:focus { border-color:#1a73e8; }
.login-box button { width:100%; height:46px; background:#1a73e8; color:#fff; border:none; border-radius:8px; font-size:16px; cursor:pointer; }
.login-box button:active { background:#1557b0; }
.login-tip { text-align:center; margin-top:16px; font-size:12px; color:#999; line-height:1.8; }
.error-msg { background:#fde8e8; color:#c53030; padding:10px; border-radius:6px; margin-bottom:14px; font-size:14px; text-align:center; }

/* 管理后台布局 */
.admin-body { padding:16px; max-width:1200px; margin:0 auto; }
.admin-menu { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.admin-menu a { background:#fff; padding:10px 16px; border-radius:8px; font-size:14px; border:1px solid #e0e0e0; }
.admin-menu a.active { background:#1a73e8; color:#fff; border-color:#1a73e8; }
.card { background:#fff; border-radius:10px; padding:16px; margin-bottom:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.card h3 { font-size:16px; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid #eee; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { padding:10px 8px; text-align:left; border-bottom:1px solid #f0f0f0; }
th { color:#888; font-weight:500; background:#fafafa; }
.btn { display:inline-block; padding:6px 14px; border-radius:6px; font-size:13px; cursor:pointer; border:none; }
.btn-primary { background:#1a73e8; color:#fff; }
.btn-danger { background:#e53e3e; color:#fff; }
.btn-sm { padding:4px 10px; font-size:12px; }
.form-row { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; align-items:center; }
.form-row input, .form-row select { height:36px; border:1px solid #ddd; border-radius:6px; padding:0 10px; font-size:14px; }
.price-input { width:90px; text-align:right; }

/* 学校用户下单页 - 左侧分类右侧商品 */
.order-page { display:flex; height:calc(100vh - 48px); overflow:hidden; }
.cat-sidebar { width:90px; background:#fff; border-right:1px solid #eee; overflow-y:auto; flex-shrink:0; }
.cat-item { padding:14px 8px; text-align:center; font-size:13px; color:#666; cursor:pointer; border-left:3px solid transparent; }
.cat-item.active { background:#e8f0fe; color:#1a73e8; border-left-color:#1a73e8; font-weight:600; }
.cat-content { flex:1; overflow-y:auto; padding:12px; padding-bottom:80px; }
.prod-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.prod-card { background:#fff; border-radius:10px; overflow:hidden; position:relative; }
.prod-img { width:100%; height:100px; background:#f0f0f0; object-fit:cover; }
.prod-info { padding:8px; }
.prod-name { font-size:13px; font-weight:500; line-height:1.3; margin-bottom:4px; }
.prod-spec { font-size:11px; color:#999; margin-bottom:4px; }
.prod-price { color:#e53e3e; font-size:15px; font-weight:600; }
.prod-price small { font-size:11px; font-weight:400; }
.qty-control { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:6px; }
.qty-btn { width:26px; height:26px; border-radius:50%; border:none; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.qty-minus { background:#eee; color:#666; }
.qty-plus { background:#1a73e8; color:#fff; }
.qty-num { font-size:14px; min-width:20px; text-align:center; }

/* 底部购物车栏 */
.cart-bar { position:fixed; bottom:0; left:0; right:0; background:#fff; padding:10px 16px; display:flex; align-items:center; justify-content:space-between; box-shadow:0 -2px 10px rgba(0,0,0,.08); z-index:50; }
.cart-left { display:flex; align-items:center; gap:10px; }
.cart-icon { font-size:28px; }
.cart-count { font-size:14px; color:#666; }
.cart-total { color:#e53e3e; font-size:20px; font-weight:700; }
.cart-total small { font-size:12px; font-weight:400; }
.checkout-btn { background:#1a73e8; color:#fff; border:none; padding:10px 24px; border-radius:20px; font-size:15px; cursor:pointer; }
.checkout-btn:disabled { background:#ccc; }

/* 购物车弹层 */
.cart-modal { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.4); z-index:100; display:none; }
.cart-modal.show { display:block; }
.cart-panel { position:absolute; bottom:0; left:0; right:0; background:#fff; border-radius:16px 16px 0 0; max-height:70vh; display:flex; flex-direction:column; }
.cart-header { padding:14px 16px; border-bottom:1px solid #eee; display:flex; justify-content:space-between; align-items:center; }
.cart-body { flex:1; overflow-y:auto; padding:12px 16px; }
.cart-item { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #f5f5f5; }
.cart-footer { padding:12px 16px; border-top:1px solid #eee; }
.cart-footer input { width:100%; height:38px; border:1px solid #ddd; border-radius:6px; padding:0 10px; margin-bottom:8px; }

/* 订单列表 */
.order-card { background:#fff; border-radius:10px; padding:14px; margin-bottom:10px; }
.order-card .row { display:flex; justify-content:space-between; margin-bottom:6px; font-size:14px; }
.order-status { padding:2px 8px; border-radius:4px; font-size:12px; background:#fef3c7; color:#92400e; }

@media (min-width: 1024px) {
  .prod-grid { grid-template-columns: repeat(4, 1fr); gap:12px; }
  .prod-img { height:120px; }
}
@media (min-width: 1400px) {
  .prod-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1024px) {
  .prod-grid { grid-template-columns: repeat(4, 1fr); gap:12px; }
  .prod-img { height:120px; }
}
@media (min-width: 1400px) {
  .prod-grid { grid-template-columns: repeat(5, 1fr); }
}
