Files
dine-order/css/admin.css
T
2026-11-17 12:44:47 +08:00

115 lines
5.8 KiB
CSS

/* 菜单后台:只用 app.css 里的变量与基础样式,这里补布局。 */
body.admin { background: #f3eee5; padding-bottom: 40px; }
.ad-top {
position: sticky; top: 0; z-index: 30;
display: flex; align-items: center; justify-content: space-between; gap: 10px;
padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.ad-top h1 { font-size: 17px; margin: 0; }
.ad-sub { margin: 3px 0 0; font-size: 11px; color: var(--ink-2); display: flex; gap: 10px; }
#dirtyTip { color: var(--gold); font-weight: 600; }
.ad-actions { display: flex; gap: 8px; align-items: center; }
.ad-main { padding: 14px 16px 0; display: grid; gap: 12px; max-width: 720px; margin: 0 auto; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.card h2 { font-size: 14px; margin: 0 0 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field > label { font-size: 12px; color: var(--ink-2); }
.field.checkbox { display: flex; align-items: flex-end; }
.field.checkbox label { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 6px; white-space: nowrap; padding-bottom: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input[type="text"], input:not([type]), input[type="number"], input[type="password"], select, textarea {
width: 100%; font: inherit; font-size: 14px; color: var(--ink);
background: #fdfaf4; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red-soft); border-color: var(--red); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.hint { font-size: 11px; color: var(--ink-2); line-height: 1.6; margin: 6px 0 0; }
.hint.center { text-align: center; margin: 4px 0 0; }
.muted { color: var(--ink-2); font-weight: 400; font-size: 12px; }
.state { font-size: 12px; color: var(--ink-2); }
.state.ok { color: var(--green); }
.state.bad { color: var(--red); }
.btn.tiny { padding: 5px 10px; font-size: 12px; border-radius: 999px; }
.btn.danger, .btn.ghost.danger { color: var(--red); border-color: var(--red-soft); }
.btn:disabled { opacity: .55; }
.banner {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
background: #fdf3dd; border: 1px solid #f0dcae; color: #8a6a2f;
font-size: 12px; padding: 10px 12px; border-radius: 12px;
}
.promo-list { display: grid; gap: 8px; }
.promo-row { display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: 8px; align-items: center; }
.promo-row span { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.promo-row input { max-width: 104px; }
.filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; }
.filter button {
flex: none; font-size: 12px; padding: 5px 11px; border-radius: 999px;
border: 1px solid var(--line); background: #fbf7ef; color: var(--ink-2);
}
.filter button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dish-list { display: grid; gap: 8px; }
.dish-row {
display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center;
border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.dish-row.off { opacity: .55; }
.dish-thumb {
width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
display: grid; place-items: center; font-size: 24px; background: linear-gradient(145deg, #fff4e4, #f7e7d3);
}
.dish-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dish-info { min-width: 0; }
.dish-info b { font-size: 14px; display: block; }
.dish-info small { color: var(--ink-2); font-size: 11px; }
.dish-right { display: flex; align-items: center; gap: 6px; }
.dish-right .price { font-size: 14px; }
.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #ddd3c4; transition: .15s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(17px); }
.sheet-panel { max-height: 92vh; overflow: auto; }
.pic-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.pic-preview {
width: 96px; height: 96px; flex: none; border-radius: 12px; overflow: hidden;
display: grid; place-items: center; font-size: 34px; background: linear-gradient(145deg, #fff4e4, #f7e7d3);
}
.pic-preview img { width: 100%; height: 100%; object-fit: cover; }
.pic-actions { display: grid; gap: 6px; justify-items: start; }
.pic-actions label.btn { cursor: pointer; }
/* 按钮与弹层(后台独立,避免和顾客页样式耦合) */
.btn {
display: inline-block; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
background: #f7f2e9; border: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: center;
}
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: #fff; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; font-size: 14px; color: var(--ink-2); }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30, 20, 10, .45); }
.sheet-panel {
position: relative; width: min(560px, 100%); background: #fff;
border-radius: 18px 18px 0 0; display: flex; flex-direction: column; max-height: 92vh;
}
.sheet-body { overflow-y: auto; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet-head h3 { margin: 0; font-size: 16px; }