:root {
  --bg: #f5f2ed;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --ink: #221c17;
  --ink-2: #4a413a;
  --muted: #877c71;
  --line: #e8e1d8;
  --brand: #c0432c;
  --brand-dark: #9e3320;
  --brand-soft: #fbeee9;
  --amber: #d8931f;
  --amber-soft: #fdf4e3;
  --green: #2c7f52;
  --green-soft: #e9f5ee;
  --blue: #2f6c9e;
  --blue-soft: #eaf2f8;
  --dark: #201a15;
  --dark-2: #2c241d;
  --shadow: 0 1px 2px rgba(34, 28, 23, .06), 0 8px 24px rgba(34, 28, 23, .05);
  --radius: 14px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.num { font-variant-numeric: tabular-nums; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background: var(--dark);
}
.login-art {
  position: relative;
  padding: 56px;
  color: #f7f2ea;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(192, 67, 44, .5), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(216, 147, 31, .28), transparent 60%),
    var(--dark);
}
.login-art h1 { font-size: 44px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.login-art p { color: #c9bdb1; max-width: 460px; margin-top: 18px; font-size: 15px; }
.login-art .grid-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.6), transparent 70%);
  pointer-events: none;
}
.brand-row { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: .04em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #e2573a, #a32d19);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 20px rgba(192, 67, 44, .35);
}
.login-points { display: flex; gap: 28px; color: #cec2b5; font-size: 13px; flex-wrap: wrap; }
.login-points b { display: block; color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.login-panel {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.login-form { width: 340px; }
.login-form h2 { font-size: 24px; margin-bottom: 6px; }
.login-form .sub { color: var(--muted); margin-bottom: 28px; font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: .02em; }
.input {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); outline: none; transition: .15s;
}
.input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(192,67,44,.1); }
.hint { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }
.hint code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-family: var(--mono); }

/* ---------------- 布局 ---------------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--dark); color: #e9e0d6; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; }
.side-brand .name { font-weight: 600; font-size: 15px; color: #fff; }
.side-brand .sub { font-size: 11px; color: #9c8f81; }
.nav-label { font-size: 10px; letter-spacing: .12em; color: #857767; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  color: #c7bbae; font-size: 13.5px; border: 0; background: none; width: 100%; text-align: left;
  transition: .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(192,67,44,.28); }
.nav-item .ic { width: 18px; height: 18px; opacity: .9; display: grid; place-items: center; }
.nav-badge { margin-left: auto; background: rgba(255,255,255,.16); padding: 1px 7px; border-radius: 20px; font-size: 11px; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #9c8f81; }
.side-foot b { color: #e9e0d6; font-weight: 500; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px;
  padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; }
.topbar .crumb { color: var(--muted); font-size: 12px; }
.topbar .spacer { flex: 1; }
.shift-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 500;
}
.shift-chip.off { background: var(--brand-soft); color: var(--brand); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(145deg, #e2573a, #a32d19);
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.user-chip .meta { line-height: 1.2; }
.user-chip .meta b { font-size: 13px; font-weight: 500; }
.user-chip .meta span { display: block; font-size: 11px; color: var(--muted); }

.view { padding: 24px 26px 40px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head .spacer { flex: 1; }

/* ---------------- 组件 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14px; }
.card-head .spacer { flex: 1; }
.card-head .sub { font-size: 12px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-main { grid-template-columns: 1.55fr 1fr; }

.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .value { font-size: 30px; font-weight: 650; letter-spacing: -.035em; margin-top: 8px; line-height: 1.1; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi .foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
.kpi .spark { position: absolute; right: 14px; bottom: 14px; opacity: .9; }
.kpi.accent { background: linear-gradient(140deg, #fff, #fdf3ee); border-color: #f0ddd4; }
.kpi.accent .value { color: var(--brand); }
.trend-up { color: var(--green); font-weight: 500; }
.trend-down { color: var(--brand); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #d6cbbf; background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-lg { padding: 11px 18px; font-size: 14px; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line);
}
.tag.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tag.red { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.tag.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.tag.blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.tag.dark { background: #efeae4; color: var(--ink-2); border-color: transparent; }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 500;
  padding: 10px 12px; border-bottom: 1px solid var(--line); letter-spacing: .02em;
}
.table td { padding: 12px; border-bottom: 1px solid #f2ece5; font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fdfbf8; }
.table .right { text-align: right; }
.table .strong { font-weight: 600; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button {
  border: 0; background: none; padding: 5px 12px; border-radius: 6px; font-size: 12.5px; color: var(--muted);
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 500; }
.select, .date {
  padding: 8px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface);
  outline: none; font-size: 13px;
}
.search { position: relative; }
.search input { padding-left: 32px; width: 200px; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: .35; }

/* ---------------- 工作台 ---------------- */
.trend-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding: 8px 2px 0; }
.trend-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend-bar .bar {
  width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: #efe6dc; min-height: 3px;
  position: relative; transition: .2s;
}
.trend-bar:hover .bar { background: #e3d3c4; }
.trend-bar.today .bar { background: linear-gradient(180deg, #d9543a, var(--brand)); }
.trend-bar .lbl { font-size: 10.5px; color: var(--muted); }
.trend-bar .val { font-size: 10px; color: var(--ink-2); opacity: 0; transition: .15s; }
.trend-bar:hover .val { opacity: 1; }

.topdish { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.topdish:last-child { border-bottom: 0; }
.topdish .rank {
  width: 20px; height: 20px; border-radius: 6px; background: var(--surface-2); display: grid;
  place-items: center; font-size: 11px; color: var(--muted); font-weight: 600;
}
.topdish .rank.top { background: var(--brand-soft); color: var(--brand); }
.topdish .name { flex: 1; font-size: 13px; }
.topdish .qty { font-size: 12px; color: var(--muted); }
.topdish .amt { font-size: 13px; font-weight: 500; width: 76px; text-align: right; }

.queue-row { display: flex; gap: 10px; }
.queue-card {
  flex: 1; border-radius: 10px; padding: 12px; background: var(--surface-2);
  border: 1px solid var(--line);
}
.queue-card .n { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.queue-card .t { font-size: 11.5px; color: var(--muted); }

/* ---------------- 收银 ---------------- */
.pos { display: grid; grid-template-columns: 240px 1fr 330px; gap: 14px; align-items: start; }
.pos-tables { max-height: calc(100vh - 118px); overflow: auto; }
.pos-table-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.pos-table-item:hover { background: var(--surface-2); }
.pos-table-item.active { background: var(--brand-soft); border-color: #f0d3c8; }
.pos-table-item .no { font-weight: 600; font-size: 14px; width: 36px; }
.pos-table-item .meta { flex: 1; line-height: 1.25; }
.pos-table-item .meta span { display: block; font-size: 11px; color: var(--muted); }
.pos-table-item .amt { font-size: 12.5px; font-weight: 500; }

.menu-scroll { max-height: calc(100vh - 190px); overflow: auto; padding: 4px 2px 12px; }
.cat-title { font-size: 12px; color: var(--muted); letter-spacing: .06em; margin: 14px 4px 8px; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.dish-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 11px;
  cursor: pointer; transition: .15s; position: relative; display: flex; flex-direction: column; gap: 4px;
}
.dish-card:hover { border-color: #d8c9ba; transform: translateY(-1px); box-shadow: var(--shadow); }
.dish-card.off { opacity: .55; }
.dish-card .thumb {
  height: 62px; border-radius: 8px; margin-bottom: 4px; display: grid; place-items: center;
  font-size: 22px; background: linear-gradient(140deg, #f7efe6, #f1e4d6); color: #b08e6c;
}
.dish-card .name { font-size: 13px; font-weight: 500; }
.dish-card .desc { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-card .price { color: var(--brand); font-weight: 600; font-size: 14px; }
.dish-card .price small { font-size: 11px; font-weight: 400; }
.dish-card .soldout {
  position: absolute; top: 8px; right: 8px; background: rgba(34,28,23,.72); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
}

.cart { position: sticky; top: 78px; }
.cart-items { max-height: 42vh; overflow: auto; }
.cart-line { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .name { font-size: 13px; font-weight: 500; }
.cart-line .spec { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cart-line .amt { font-size: 13px; font-weight: 500; width: 62px; text-align: right; }
.stepper { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.stepper button {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; font-size: 13px; color: var(--ink-2); line-height: 1;
}
.stepper span { font-size: 12.5px; min-width: 16px; text-align: center; }
.cart-total { padding: 14px 0 6px; }
.cart-total .row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--ink-2); }
.cart-total .row.big { font-size: 19px; font-weight: 600; color: var(--ink); padding-top: 8px; }
.cart-total .row.big span:last-child { color: var(--brand); }

/* ---------------- 桌台 ---------------- */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.table-card {
  border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: var(--surface);
  position: relative; transition: .15s;
}
.table-card:hover { box-shadow: var(--shadow); }
.table-card.occupied { background: linear-gradient(150deg, #fff, #fdf2ed); border-color: #f0d8cb; }
.table-card .tno { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.table-card .area { font-size: 11px; color: var(--muted); }
.table-card .info { margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.table-card .foot { margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.table-card .corner { position: absolute; top: 12px; right: 12px; }

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed; inset: 0; background: rgba(28, 22, 17, .42); backdrop-filter: blur(2px);
  z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 88vh; overflow: auto; box-shadow: 0 24px 70px rgba(0,0,0,.24);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.modal.wide { max-width: 760px; }
.modal-head { padding: 18px 22px 12px; display: flex; align-items: center; gap: 10px; }
.modal-head h3 { font-size: 17px; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 6px 22px 20px; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px;
  justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 16px 16px;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; background: var(--surface);
  z-index: 70; box-shadow: -18px 0 50px rgba(0,0,0,.15); display: flex; flex-direction: column;
  animation: slide .2s ease;
}
@keyframes slide { from { transform: translateX(30px); opacity: .6; } }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 20px; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

.opt-group { margin-bottom: 16px; }
.opt-group .label { font-size: 12.5px; font-weight: 500; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px;
  background: var(--surface); transition: .12s;
}
.opt:hover { border-color: #d5c6b7; }
.opt.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 500; }
.opt small { color: var(--muted); margin-left: 3px; font-size: 11px; }
.opt.on small { color: var(--brand); }

.money-big { font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
.receipt {
  background: #fffdf9; border: 1px dashed #d8c9b8; border-radius: 10px; padding: 18px;
  font-family: var(--mono); font-size: 12px; line-height: 1.65; white-space: pre; overflow-x: auto;
  color: #3b3129;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.check input { accent-color: var(--brand); width: 15px; height: 15px; }

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--dark); color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop .18s ease;
}
.toast.err { background: #8f2a1a; }
.toast.ok { background: #24603f; }

.loading { padding: 60px; text-align: center; color: var(--muted); font-size: 13px; }
.skeleton { background: linear-gradient(90deg, #efe9e2 25%, #f7f2ec 37%, #efe9e2 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------- 订阅（服务期）提醒 ---------------- */
#sub-banner:empty { display: none; }
.sub-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 26px 0; padding: 11px 15px;
  border-radius: 12px; font-size: 13px; border: 1px solid transparent;
}
.sub-banner .sub-ic {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none;
}
.sub-banner .sub-txt { display: flex; flex-direction: column; gap: 1px; }
.sub-banner .sub-txt b { font-weight: 600; }
.sub-banner .sub-txt span { font-size: 12px; opacity: .86; }
.sub-banner .spacer { flex: 1; }
.sub-banner.warn { background: var(--amber-soft); border-color: #f0e0bf; color: #8a5c0f; }
.sub-banner.warn .sub-ic { background: var(--amber); color: #fff; }
.sub-banner.expired { background: var(--brand); border-color: var(--brand-dark); color: #fff; }
.sub-banner.expired .sub-ic { background: rgba(255, 255, 255, .22); color: #fff; }
.sub-banner.expired .btn { background: rgba(255, 255, 255, .94); border-color: transparent; color: var(--brand-dark); }
.sub-banner.expired .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }

@media (max-width: 1200px) {
  .pos { grid-template-columns: 200px 1fr; }
  .pos .cart { grid-column: 1 / -1; position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .pos { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .view { padding: 16px; }
}

/* ---------------- 公告富文本编辑器 ---------------- */
.rt-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--surface-2);
}
.rt-btn {
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 13px;
  padding: 4px 9px;
  border-radius: 7px;
  color: var(--ink);
  line-height: 1.2;
  min-width: 30px;
}
.rt-btn:hover { background: var(--surface-3, rgba(0,0,0,.06)); }
.rt-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rt-toolbar input[type="color"] {
  width: 30px; height: 27px; padding: 1px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); cursor: pointer;
}
.rt-img {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.rt-editor {
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.7;
  background: var(--surface);
  outline: none;
  word-break: break-word;
}
.rt-editor:focus { border-color: var(--brand); }
.rt-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.rt-editor img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.rt-editor h3 { font-size: 15px; margin: 10px 0 4px; }
.rt-editor p, .rt-editor ul, .rt-editor ol { margin: 6px 0; }
.rt-editor ul { padding-left: 20px; }
.rt-editor ol { padding-left: 22px; }
