:root {
  --ink: #1c2a39;
  --ink-2: #263749;
  --ink-3: #8fa3b8;
  --paper: #eef2f5;
  --surface: #ffffff;
  --line: #d8e0e7;
  --line-2: #e8edf1;
  --text: #1c2a39;
  --muted: #5f6f80;
  --blue: #1f6fb2;
  --blue-soft: #e3eef8;
  --jade: #12805f;
  --jade-soft: #e1f2ec;
  --amber: #9a5f0c;
  --amber-soft: #fbf0dc;
  --red: #b83a2e;
  --red-soft: #f8e4e1;
  --tg-bg: #c9d9c1;
  --tg-bubble: #ffffff;
  --font: 'Barlow', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ───────── 布局 ───────── */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side {
  background: var(--ink);
  color: #dbe5ef;
  padding: 22px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--blue);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px;
}
.brand b { display: block; font-size: 15px; color: #fff; }
.brand small { color: var(--ink-3); font-size: 12px; }
.nav-group { color: var(--ink-3); font-size: 12px; padding: 14px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius);
  color: #c9d6e3; text-decoration: none; font-size: 14.5px;
}
.nav a:hover { background: var(--ink-2); color: #fff; }
.nav a.on { background: var(--blue); color: #fff; }
.nav a .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; flex: none; }
.nav a.on .dot { opacity: 1; }
.side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 13px; color: var(--ink-3); }
.side-foot button { background: none; border: 0; color: #c9d6e3; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; }

.main { padding: 28px 36px 64px; min-width: 0; }
.main:focus { outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 70ch; }

/* ───────── 面板与设置表单 ───────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel + .panel, .panel + .section, .section + .section { margin-top: 18px; }
.panel-pad { padding: 20px 22px; }
.section { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.section > header { padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.section > header p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.row {
  display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 8px 28px;
  padding: 14px 22px; border-bottom: 1px solid var(--line-2); align-items: start;
}
.row:last-child { border-bottom: 0; }
.row > label, .row > .lbl { font-weight: 500; padding-top: 7px; }
.row .help { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.row .ctl { min-width: 0; }
.row .ctl > select, .row .ctl > input[type=text], .row .ctl > input[type=password] { max-width: 560px; }
.save-bar {
  position: sticky; bottom: 0; margin-top: 18px; padding: 12px 0;
  display: flex; gap: 10px; align-items: center;
  background: linear-gradient(to top, var(--paper) 70%, transparent);
}
.save-bar .note { color: var(--muted); font-size: 13px; }

input[type=text], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  background: #fff; border: 1px solid #c7d2dc; border-radius: var(--radius);
  padding: 7px 10px; min-height: 38px;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); outline-offset: 0; }
input.short, select.short { max-width: 220px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > input, .inline > select { width: auto; flex: 1 1 160px; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; padding-top: 6px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 22px; border-radius: 22px; background: #c3ced8; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--jade); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch .state { font-size: 13.5px; color: var(--muted); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 500; font-size: 14.5px;
  padding: 7px 14px; min-height: 36px; border-radius: var(--radius);
  border: 1px solid #c3ced8; background: #fff; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f4f7f9; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #195f99; }
.btn.danger { color: var(--red); border-color: #e3b9b3; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { padding: 3px 10px; min-height: 28px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; font-size: 13px; }

/* 徽标 */
.badge { display: inline-block; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--jade-soft); color: var(--jade); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.err { background: var(--red-soft); color: var(--red); }
.badge.info { background: var(--blue-soft); color: var(--blue); }

.alert { padding: 12px 16px; border-radius: 8px; border: 1px solid; margin-bottom: 18px; font-size: 14px; }
.alert.warn { background: var(--amber-soft); border-color: #ecd3a6; color: #6d4305; }
.alert.info { background: var(--blue-soft); border-color: #c3d9ee; color: #164f80; }
.alert.err { background: var(--red-soft); border-color: #ecc0ba; color: #7c2219; }

/* ───────── 仪表盘 ───────── */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.today > .panel { margin-top: 0; }
.today-main { padding: 22px 24px 18px; }
.today-num { font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.today-num small { font-size: 18px; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.today-sub { color: var(--muted); margin-top: 8px; }
.strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; margin-top: 26px; align-items: end; height: 150px; }
.strip .day { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.strip .bar { width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px; background: #b9cfe3; min-height: 3px; position: relative; }
.strip .day.is-today .bar { background: var(--blue); }
.strip .n { font-size: 12px; color: var(--muted); }
.strip .d { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.strip .day.is-today .d, .strip .day.is-today .n { color: var(--text); font-weight: 600; }
.health { padding: 8px 0; }
.health li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 20px; border-bottom: 1px solid var(--line-2); align-items: center; }
.health li:last-child { border-bottom: 0; }
.health ul { list-style: none; margin: 0; padding: 0; }
.health .k { color: var(--muted); }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.fig { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.fig:last-child { border-right: 0; }
.fig b { display: block; font-size: 26px; font-weight: 600; line-height: 1.2; }
.fig span { color: var(--muted); font-size: 13.5px; }
.fig.alerting b { color: var(--amber); }
.fig a { text-decoration: none; color: inherit; display: block; }

/* ───────── 表格 ───────── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; }
.toolbar .grow { flex: 1 1 220px; }
.toolbar .summary { color: var(--muted); font-size: 13.5px; margin-left: auto; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f7f9fb; white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .sub { color: var(--muted); font-size: 12.5px; }
td.num, th.num { text-align: right; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: 4px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
pre.raw { background: #f5f7f9; border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; margin: 8px 0 0; font-size: 12.5px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

/* ───────── 文案编辑 + Telegram 预览 ───────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.preview-col { position: sticky; top: 20px; }
.phone {
  border-radius: 26px; background: #0f1a24; padding: 10px; border: 1px solid #0b131b;
}
.phone-top { color: #e8f0f7; display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.phone-top .av { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-weight: 700; color: #fff; }
.phone-top b { display: block; font-size: 14px; }
.phone-top small { font-size: 12px; color: #8fa8bd; }
.chat {
  background: var(--tg-bg);
  background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: 14px 14px;
  border-radius: 16px 16px 6px 6px; padding: 14px 12px; min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
}
.bubble {
  align-self: flex-start; max-width: 92%;
  background: var(--tg-bubble); border-radius: 4px 14px 14px 14px; padding: 8px 12px 6px;
  font-size: 14px; line-height: 1.45; color: #111; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
.bubble.me { align-self: flex-end; background: #e2f7cb; border-radius: 14px 4px 14px 14px; }
.bubble .time { display: block; text-align: right; font-size: 11px; color: #8a9aa8; margin-top: 2px; }
.bubble a { color: #1f6fb2; }
.bubble code { background: #eef1f4; }
.bubble img { display: block; max-width: 100%; border-radius: 8px; margin-bottom: 6px; }
.inline-kb { display: grid; gap: 4px; margin-top: 4px; }
.inline-kb span { background: rgba(255,255,255,.55); border-radius: 8px; text-align: center; font-size: 13.5px; padding: 6px; color: #23415c; }
.reply-kb { background: #e9eef2; border-radius: 6px 6px 18px 18px; padding: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 4px; }
.reply-kb span { background: #fff; border-radius: 7px; text-align: center; padding: 8px 4px; font-size: 13px; color: #1c2a39; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.reply-kb span.full { grid-column: 1 / -1; }
.preview-label { color: var(--muted); font-size: 13px; margin: 0 0 8px 4px; }

.text-item { padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.text-item:last-child { border-bottom: 0; }
.text-item.active { background: #f6f9fc; box-shadow: inset 3px 0 0 var(--blue); }
.text-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.text-item-head label { font-weight: 500; }
.text-item:not(.active) .vars { display: none; }
.vars { margin-top: 6px; display: flex; gap: 4px 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.vars button { font: inherit; font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 0 6px; cursor: pointer; color: var(--blue); }
.vars button:hover { background: var(--blue-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; background: #f7f9fb; }
.chip b { font-weight: 600; }

/* ───────── 弹窗与提示 ───────── */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(620px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(15, 26, 36, .28); }
dialog::backdrop { background: rgba(15, 26, 36, .45); }
dialog form { margin: 0; }
.dlg-head { padding: 18px 22px 0; }
.dlg-body { padding: 14px 22px; display: grid; gap: 12px; max-height: 70vh; overflow-y: auto; }
.dlg-body label { display: grid; gap: 4px; font-weight: 500; font-size: 14px; }
.dlg-body label .help { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.dlg-foot { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.toast-box { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: 380px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.err { background: var(--red); }

/* ───────── 登录 ───────── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login {
  width: min(380px, 100%); background: var(--surface); border-radius: 14px; padding: 30px 28px;
}
.login h1 { font-size: 22px; margin: 14px 0 4px; }
.login p { color: var(--muted); margin-bottom: 20px; }
.login label { display: grid; gap: 4px; margin-bottom: 14px; font-weight: 500; }
.login .btn { width: 100%; min-height: 42px; }
.login .err { color: var(--red); font-size: 14px; min-height: 20px; margin-bottom: 8px; }

/* ───────── 响应式 ───────── */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .preview-col { position: static; order: -1; }
  .today { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 2px; }
  .brand { padding: 0 8px 0 0; }
  .brand small, .nav-group, .side-foot { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav a { white-space: nowrap; padding: 6px 10px; }
  .nav a .dot { display: none; }
  .main { padding: 20px 16px 48px; }
  .row { grid-template-columns: 1fr; padding: 12px 16px; }
  .row > label, .row > .lbl { padding-top: 0; }
  .section > header, .text-item { padding-left: 16px; padding-right: 16px; }
  .today-num { font-size: 44px; }
  .strip { gap: 3px; height: 120px; }
  .strip .n { display: none; }
  .strip .day:not(:first-child):not(.is-today) .d { visibility: hidden; }
  .brand > div:last-child { display: none; }
  .fig { border-right: 0; border-bottom: 1px solid var(--line-2); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* brand check mark */
.brand-mark svg { width: 20px; height: 20px; }
.login .brand-mark { width: 40px; height: 40px; }
.row .ctl > input.short, .row .ctl > select.short { max-width: 220px; }

/* image upload field */
.img-pick { display: grid; gap: 8px; justify-items: start; }
.img-thumb { width: 180px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f5f7f9; }
.img-thumb img { display: block; width: 100%; height: auto; max-height: 180px; object-fit: contain; }
.img-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.img-note { color: var(--muted); font-size: 12.5px; }
.img-field { margin-top: 12px; display: grid; gap: 6px; }
.img-label { font-size: 13.5px; color: var(--muted); }
.cap-note { color: var(--amber); font-size: 13px; line-height: 1.45; max-width: 60ch; }
.dlg-field { display: grid; gap: 6px; }
.dlg-label { font-weight: 500; font-size: 14px; }
/* toggles inside dialogs keep their inline layout */
.dlg-body label.switch { display: inline-flex; align-items: center; gap: 10px; padding-top: 0; font-weight: 400; }
.dlg-body .inline { gap: 18px; }
.inline-kb.two { grid-template-columns: 1fr 1fr; }

/* Telegram Menu command list preview */
.cmd-list { align-self: stretch; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.cmd-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; color: #111; }
.cmd-row + .cmd-row { border-top: 1px solid #eef1f4; }
.cmd-row.on { background: #eaf3fb; }
.cmd-row b { font-weight: 600; }
.cmd-row span:last-child { color: #8a9aa8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-sm { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.cmd-bar { background: #fff; border-radius: 6px 6px 18px 18px; margin-top: 4px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; }
.menu-pill { background: #3d9ae8; color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.cmd-input { color: #8a9aa8; font-size: 13.5px; }
.cmd-empty { align-self: stretch; color: #3c4b59; font-size: 13px; background: rgba(255,255,255,.75); border-radius: 8px; padding: 8px 10px; }

/* ───────── Superadmin console ───────── */
.muted-p { color: var(--muted); font-size: 13.5px; margin: -8px 0 12px; }
details.more { display: inline-block; position: relative; vertical-align: top; margin-left: 4px; }
details.more > summary { list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .menu {
  position: fixed; z-index: 80; min-width: 200px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  box-shadow: 0 10px 28px rgba(15, 26, 36, .16); display: grid; text-align: left;
}
details.more .menu button {
  font: inherit; font-size: 14px; text-align: left; background: none; border: 0; border-radius: 6px;
  padding: 8px 10px; cursor: pointer; color: var(--text); white-space: nowrap;
}
details.more .menu button:hover, details.more .menu button:focus-visible { background: #f1f5f8; }
details.more .menu button.danger { color: var(--red); }
dl.creds { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; align-items: center; }
dl.creds dt { color: var(--muted); font-size: 13.5px; }
dl.creds dd { margin: 0; word-break: break-all; }
dl.creds code { font-size: 14px; }
dialog.wide { width: min(900px, calc(100vw - 32px)); }
pre.raw.log { max-height: 60vh; font-size: 12px; line-height: 1.5; margin: 0; }

/* superadmin bar inside a company panel */
.sa-bar {
  position: sticky; top: 0; z-index: 60; min-height: 42px;
  display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap;
  padding: 6px 20px; background: var(--amber-soft); border-bottom: 1px solid #ecd3a6; color: #6d4305; font-size: 13.5px;
}
.sa-bar select { width: auto; min-height: 30px; padding: 3px 8px; font-size: 13.5px; max-width: 260px; }
.sa-bar label { display: inline-flex; gap: 8px; align-items: center; }
.sa-bar a { color: #6d4305; font-weight: 600; }
body.has-sa .side { top: 42px; height: calc(100vh - 42px); }
body.has-sa .shell { min-height: calc(100vh - 42px); }
@media (max-width: 820px) {
  .sa-bar { position: static; padding: 6px 16px; }
  body.has-sa .side { top: 0; height: auto; }
}

/* ───────── Link buttons (one by default, up to two) ───────── */
.lb { display: grid; gap: 8px; }
.lb-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 32px; gap: 8px; align-items: center; }
.lb-remove { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.lb-remove:hover { color: var(--red); border-color: var(--red); }
.lb-add { justify-self: start; }
.inline-kb span { position: relative; }
.inline-kb .ext { position: absolute; top: 2px; right: 6px; font-style: normal; font-size: 10px; opacity: .7; }
.item-help { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 8px 0 0; max-width: 70ch; }
.bubble.hl { box-shadow: 0 0 0 2px var(--blue); }

/* ───────── Send now / Schedule ───────── */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 16px; font-size: 14px; color: var(--muted); }
.seg label + label span { border-left: 1px solid var(--line); }
.seg input:checked + span { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -2px; }
.day-pick { display: flex; flex-wrap: wrap; gap: 5px; }
.day-pick label { position: relative; cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-pick span { display: block; min-width: 44px; text-align: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--muted); background: var(--surface); }
.day-pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.day-pick input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.day-quick { display: flex; gap: 14px; margin-top: 8px; }
.sec-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.sec-title span { color: var(--muted); font-size: 13.5px; }
.err-text { color: var(--red) !important; }
#bf .row .ctl > input[type=time], #bf .row .ctl > input[type=date] { max-width: 220px; }
#b_sched { border-left: 3px solid var(--blue-soft); }
@media (max-width: 820px) {
  .lb-row { grid-template-columns: minmax(0, 1fr) 32px; }
  .lb-row [data-lb-url] { grid-column: 1; grid-row: 2; }
  .lb-row .lb-remove { grid-column: 2; grid-row: 1 / span 2; }
}
