:root {
  --workspace-navy: #0c2a50;
  --workspace-blue: #1769ed;
  --workspace-text: #212a37;
  --workspace-muted: #667386;
  --workspace-line: #e7ebf0;
  --workspace-header-height: 58px;
  --workspace-sidebar-width: 224px;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
[v-cloak] { display: none !important; }
.workspace-icon { width: 18px; height: 18px; flex: none; }

.workspace-topbar {
  min-height: var(--workspace-header-height);
  display: flex;
  position: sticky;
  top: 0;
  z-index: 30;
  color: #fff;
  background: var(--workspace-navy);
}
.workspace-brand {
  flex: 0 0 var(--workspace-sidebar-width);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: white;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.workspace-brand-mark {
  width: 31px;
  height: 31px;
  background: #274d7a;
  color: #e6f1ff;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.workspace-tabs { display: flex; align-items: stretch; gap: 2px; }
.workspace-tab {
  display: inline-flex;
  place-content: center;
  align-items: center;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #dce8f7;
  border-bottom: 3px solid transparent;
}
.workspace-tab:hover { background: #163963; color: #fff; }
.workspace-tab[aria-current="page"] { background: #205ddb; color: #fff; border-bottom-color: #73a6ff; }
.workspace-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 0 20px 0 12px;
  font-size: 13px;
  white-space: nowrap;
}
.workspace-account-name { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.workspace-signout { border: 1px solid #48617e; padding: 5px 9px; border-radius: 6px; color: #dce8f7; }
.workspace-signout:hover { background: #20446c; color: #fff; }

.admin-shell { display: flex; min-height: calc(100vh - var(--workspace-header-height)); background: #fff; }
.admin-nav {
  position: sticky;
  top: var(--workspace-header-height);
  flex: 0 0 var(--workspace-sidebar-width);
  width: var(--workspace-sidebar-width);
  height: calc(100dvh - var(--workspace-header-height));
  overflow-y: auto;
  border-right: 1px solid #e0e5eb;
  background: #fbfcfe;
}
.workspace-context { padding: 18px 15px 14px; border-bottom: 1px solid var(--workspace-line); }
.workspace-bot-context { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--workspace-text); font-size: 14px; font-weight: 650; }
.workspace-bot-context .workspace-icon { color: var(--workspace-blue); }
.workspace-group-label { display: block; color: var(--workspace-muted); font-size: 12px; }
.workspace-group-select {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #d8e0ec;
  border-radius: 7px;
  height: 35px;
  background: #fff;
  color: #273448;
  padding: 0 8px;
  font-size: 13px;
}
.nav-items { padding: 5px 8px 20px; }
.workspace-nav-label { padding: 16px 11px 6px; color: #69768a; font-size: 12px; }
.workspace-nav-button {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  width: 100%;
  min-height: 39px;
  text-align: left;
  color: #273244;
  font-size: 14px;
  border-radius: 7px;
}
.workspace-nav-button .workspace-icon { color: #1b63ce; }
.workspace-nav-button:hover { background: #f0f3f8; }
.workspace-nav-button[aria-current="page"] { color: #124b9e; font-weight: 650; background: #eaf0fa; }
.workspace-mobile-menu { display: none; }
.admin-main { flex: 1; min-width: 0; padding: 29px 35px 35px; overflow-x: auto; color: var(--workspace-text); }
.workspace-full { padding-right: clamp(16px, 3.1vw, 52px); padding-left: clamp(16px, 3.1vw, 52px); }

.workspace-page { width: 100%; }
.workspace-page-heading { margin-bottom: 27px; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }
.workspace-page-heading h2 { color: #182235; font-size: clamp(22px, 2.4vw, 29px); line-height: 1.3; font-weight: 700; letter-spacing: -.02em; }
.workspace-page-heading p { color: var(--workspace-muted); font-size: 13px; margin-top: 7px; }
.workspace-actions, .workspace-toolbar, .workspace-scope, .workspace-pager { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.workspace-toolbar { justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.workspace-scope { gap: 3px; padding: 3px; border: 1px solid var(--workspace-line); background: #f7f9fc; border-radius: 7px; }
.workspace-scope button { min-height: 28px; padding: 0 11px; border-radius: 4px; color: #58677c; font-size: 13px; }
.workspace-scope button[aria-pressed="true"] { background: #fff; color: #175bb9; box-shadow: 0 1px 2px #172b461f; font-weight: 650; }
.workspace-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #dce2ec;
  border-radius: 7px;
  font-size: 13px;
  white-space: nowrap;
  color: #2a384c;
  background: #fff;
}
.workspace-button .workspace-icon { width: 15px; height: 15px; }
.workspace-button:hover { border-color: #a9c6ed; color: #1155b5; }
.workspace-button:disabled { opacity: .45; cursor: default; }
.workspace-button.primary { background: var(--workspace-blue); color: #fff; border-color: var(--workspace-blue); }
.workspace-button.primary:hover { background: #105bdb; }
.workspace-button.danger { background: #c12539; border-color: #c12539; color: white; }
.workspace-search { display: flex; min-width: min(100%, 280px); width: min(100%, 338px); align-items: stretch; }
.workspace-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce2ec;
  border-right: 0;
  border-radius: 7px 0 0 7px;
  padding: 0 10px;
  flex: 1;
  min-width: 0;
}
.workspace-search-box .workspace-icon { color: #718197; width: 16px; height: 16px; }
.workspace-search-box input { width: 100%; min-width: 0; outline: none; background: transparent; font-size: 13px; color: #263448; }
.workspace-search-box:focus-within { border-color: var(--workspace-blue); }
.workspace-search .workspace-button { border-radius: 0 7px 7px 0; padding: 0 15px; }
.workspace-table-wrap { border: 1px solid var(--workspace-line); border-radius: 9px; overflow-x: auto; }
.workspace-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; min-width: 780px; }
.workspace-table.bot-list { min-width: 640px; }
.workspace-table thead { background: #f5f7fa; color: #425069; }
.workspace-table th { padding: 13px 15px; font-weight: 650; white-space: nowrap; }
.workspace-table td { padding: 15px; border-top: 1px solid #edf0f5; height: 58px; }
.workspace-table tbody tr:hover { background: #fafcff; }
.workspace-table .workspace-empty { padding: 31px 15px; color: var(--workspace-muted); text-align: center; }
.workspace-target-name { min-width: 170px; color: #172439; font-weight: 600; overflow-wrap: anywhere; }
.workspace-value-muted { color: var(--workspace-muted); }
.workspace-value-code { font-variant-numeric: tabular-nums; white-space: nowrap; color: #445169; }
.workspace-target-note { min-width: 99px; max-width: 200px; white-space: normal; overflow-wrap: anywhere; }
.workspace-row-actions { display: flex; align-items: center; flex-wrap: wrap; column-gap: 11px; row-gap: 3px; min-width: 147px; }
.workspace-link { color: #145fc9; font-weight: 550; white-space: nowrap; }
.workspace-link:hover { text-decoration: underline; }
.workspace-link.subdued { color: #667386; font-weight: 400; }
.workspace-pager { margin-top: 14px; justify-content: flex-end; color: #526178; font-size: 13px; }
.workspace-pager .workspace-button { min-height: 30px; padding: 0 9px; }
.workspace-pager select { height: 30px; border: 1px solid #dce2ec; background: white; border-radius: 5px; padding: 0 6px; }
.workspace-bot-cell { display: flex; align-items: center; gap: 10px; font-weight: 650; color: #172439; }
.workspace-bot-tile { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 8px; background: #eaf2fc; color: #175fc8; }
.workspace-bot-status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #5c6a80; }
.workspace-bot-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #a0aabc; }
.workspace-bot-status.connected { color: #13723e; }
.workspace-bot-status.connected::before { background: #239556; }

.workspace-modal-screen {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  background: #0c203c63;
  padding: 16px;
}
.workspace-modal {
  display: grid;
  gap: 15px;
  width: min(100%, 460px);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 48px #0e22483a;
  font-size: 14px;
}
.workspace-modal h3 { font-size: 17px; font-weight: 700; color: #1b2b42; }
.workspace-modal label { display: block; color: #29374b; font-size: 13px; }
.workspace-modal input, .workspace-modal select, .workspace-modal textarea {
  display: block;
  width: 100%;
  padding: 8px 10px;
  min-height: 36px;
  border: 1px solid #d9e1ec;
  border-radius: 7px;
  margin-top: 5px;
  background: #fff;
  color: #202c41;
  font-size: 14px;
}
.workspace-modal footer { display: flex; gap: 8px; justify-content: flex-end; }
.workspace-modal label.operation-channel { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.workspace-modal .operation-channel input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: #2563eb; }
.workspace-error { font-size: 13px; color: #aa2336; }

.blacklist-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:20px}
.blacklist-search{display:flex;gap:0;width:min(100%,460px)}
.blacklist-search input{border-radius:6px 0 0 6px;flex:1;min-width:0}
.blacklist-search button{border-radius:0 6px 6px 0;flex:none}
.blacklist-toolbar .workspace-actions{margin:0;align-items:center;gap:8px}
.blacklist-state{display:flex;gap:6px;align-items:center;color:#64748b;font-size:13px}
.blacklist-state input,.blacklist-checks input{accent-color:#1677ff;width:16px;height:16px}
.blacklist-table td{overflow-wrap:anywhere;vertical-align:middle}
.blacklist-table th:nth-child(1){width:28%}.blacklist-table th:nth-child(2){width:22%}.blacklist-table th:nth-child(3){width:29%}.blacklist-table th:nth-child(4){width:14%}
.blacklist-pagination{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0;font-size:13px;color:#64748b}
.blacklist-pagination select{width:auto;min-width:96px}
.blacklist-page-number{min-width:30px;height:30px;border-radius:5px;line-height:28px;border:1px solid transparent;color:#334155}
.blacklist-page-number.current{border-color:#1677ff;color:#1677ff;font-weight:600;background:#f5faff}
.blacklist-modal{width:min(100%,780px);padding:24px 30px;gap:24px;border-radius:8px}
.blacklist-modal header{display:flex;align-items:center;justify-content:space-between}
.blacklist-close{font-size:24px;line-height:1;color:#8c8c8c;padding:0 4px}
.blacklist-field{display:grid;grid-template-columns:125px minmax(0,1fr);gap:12px;align-items:start}
.blacklist-field>label{text-align:right;padding-top:12px}
.blacklist-field textarea{resize:vertical;min-height:105px}
.blacklist-field small{display:block;margin-top:7px;font-size:12px}
.blacklist-checks{display:flex;flex-wrap:wrap;gap:18px;align-items:center;min-height:36px}
.blacklist-checks label{display:flex;gap:7px;align-items:center;white-space:nowrap}
.blacklist-checks input{display:inline-block;width:16px!important;height:16px!important;min-height:0!important;padding:0;margin:0}
.blacklist-note{position:relative}.blacklist-note input{padding-right:75px}.blacklist-note span{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#999;font-size:12px}
.blacklist-hint,.blacklist-result{padding:12px 14px;border-radius:6px;background:#f0f6ff;color:#345b88;font-size:13px;line-height:1.7}
.blacklist-result{margin-bottom:16px}
@media(max-width:640px){.blacklist-modal{padding:18px;gap:18px}.blacklist-field{display:block}.blacklist-field>label{text-align:left;padding:0}.blacklist-toolbar .workspace-actions{flex-wrap:wrap}.blacklist-table{min-width:650px}}
.workspace-muted { font-size: 13px; color: var(--workspace-muted); }
.workspace-topbar button:focus-visible, .admin-nav button:focus-visible, .admin-main button:focus-visible, .admin-main a:focus-visible { outline: 2px solid #3685f4; outline-offset: 2px; }

@media (max-width: 950px) { .admin-main { padding: 24px 21px; } }
@media (max-width: 767px) {
  :root { --workspace-header-height: 54px; }
  .workspace-brand { flex-basis: auto; padding: 0 10px; }
  .workspace-tab { padding: 0 12px; font-size: 13px; }
  .workspace-account { gap: 7px; padding: 0 9px 0 5px; }
  .workspace-account-name { display: none; }
  .admin-shell { display: block; }
  .admin-nav { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--workspace-line); overflow-y: visible; }
  .workspace-context { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 0; }
  .workspace-bot-context { display: none; }
  .workspace-group-label { flex: 1; min-width: 0; max-width: 20rem; }
  .workspace-mobile-menu { display: inline-flex; align-items: center; gap: 5px; }
  .nav-items { display: none; padding-bottom: 11px; }
  .nav-items.mobile-open { display: grid; grid-template-columns: 1fr 1fr; }
  .workspace-nav-label { grid-column: span 2; }
  .admin-main { padding: 18px 15px 25px; }
  .workspace-page-heading { margin-bottom: 18px; }
  .workspace-search { flex: 1 1 270px; }
}
@media (max-width: 450px) { .workspace-brand-text { display: none; } }

.telegram-message-editor {
  min-height: 240px;
  max-height: 480px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  padding: 14px 16px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #fff;
  color: #202c41;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.75;
  outline: none;
}
.telegram-message-editor:focus {
  border-color: #1769ed;
  box-shadow: 0 0 0 2px #1769ed15;
}
.telegram-message-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}
.telegram-message-editor a { color: #1769ed; text-decoration: underline; }
.telegram-message-editor blockquote {
  margin: 5px 0;
  border-left: 3px solid #7099cf;
  padding: 5px 12px;
  background: #f1f5fb;
}
.telegram-message-editor pre, .telegram-message-editor code {
  background: #f1f5f9;
  font-family: ui-monospace, monospace;
  white-space: pre-wrap;
}
.telegram-message-editor [data-telegram-entity="tg-emoji"] { display: inline; }
.telegram-message-editor tg-spoiler { border-radius: 3px; background: #e5e9ef; }

/* Reference workspace: flat tables, navy navigation and spacious form dialogs. */
:root{--workspace-navy:#0c2a50;--workspace-blue:#1677ff;--workspace-text:#262626;--workspace-muted:#999;--workspace-line:#f0f0f0;--workspace-header-height:60px;--workspace-sidebar-width:240px}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#262626;background:#fff}
.workspace-brand{visibility:hidden;flex-basis:var(--workspace-sidebar-width)}
.workspace-tab{padding:0 24px;border:0;font-size:16px;color:#fff;font-weight:500}
.workspace-tab[aria-current="page"]{background:#245ce6;border:0}
.workspace-account{font-size:14px}.workspace-signout{border:0;color:#fff}
.admin-nav{background:#fff}.workspace-context{padding:22px 18px;border-bottom:1px solid #e8e8e8}
.workspace-bot-context{margin:0;font-size:14px;font-weight:600}.workspace-bot-context .workspace-icon{display:none}
.workspace-group-label{margin-top:12px}.workspace-group-select{border-color:#e3e3e3;border-radius:6px;background:#fff}
.nav-items{padding:12px 5px}.workspace-nav-label{padding:16px 22px 10px;color:#999;font-size:14px}
.workspace-nav-button{min-height:50px;padding:12px 24px;gap:18px;color:#262626;font-size:14px;border-radius:9px;font-weight:400}
.workspace-nav-button .workspace-icon{width:23px;height:23px;color:#0058cc;stroke-width:1.65}
.workspace-nav-button[aria-current="page"]{background:#f2f2f2;color:#262626;font-weight:400}
.workspace-nav-chevron{margin-left:auto;color:#666}.workspace-subnav{padding:0 0 5px 28px}.workspace-subnav .workspace-nav-button{font-size:14px;padding-left:24px;min-height:42px}
.admin-main{padding:30px 40px 45px;background:#fff}.workspace-full{padding:30px 28px}
.workspace-page-heading{margin-bottom:60px;align-items:center}.workspace-page-heading h2,.admin-main>section>div h2,.admin-main>section>header h2{font-size:25px;line-height:1.4;font-weight:600;color:#303030;letter-spacing:0}
.workspace-page-heading p{display:none}.workspace-actions{gap:10px}.workspace-button{height:38px;min-height:38px;padding:0 15px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;color:#262626;font-size:14px;font-weight:400;box-shadow:0 2px 0 #00000004}
.workspace-button.primary{background:#1677ff;border-color:#1677ff;color:#fff}.workspace-button.danger{background:#d4380d;color:white}.workspace-button:hover{border-color:#4096ff;color:#1677ff}.workspace-button.primary:hover{background:#4096ff;color:#fff}
.workspace-search{width:min(100%,420px);min-width:260px;height:38px}.workspace-search-box{border-color:#d9d9d9}.workspace-search-box input{font-size:14px}.workspace-search-box input::placeholder{color:#bfbfbf}.workspace-toolbar{margin-bottom:18px}.workspace-table-wrap{border:0;border-radius:0}
.workspace-table{font-size:14px;min-width:1000px;color:#262626}.workspace-table th{padding:16px 12px;font-weight:600;background:#fafafa;color:#262626;position:relative}.workspace-table th+th:before{content:"";position:absolute;left:0;top:25%;height:50%;border-left:1px solid #f0f0f0}
.workspace-table td{height:68px;padding:16px 12px;border-top:0;border-bottom:1px solid #f0f0f0;font-weight:400}.workspace-table tbody tr:hover{background:#fafafa}.workspace-target-name{font-weight:400;color:#262626;min-width:220px}.workspace-value-code{color:#262626;font-variant-numeric:tabular-nums}.workspace-value-muted{color:#999}.workspace-row-actions{min-width:110px;gap:5px 12px}.workspace-link{color:#1677ff;font-weight:400}.workspace-link.subdued{color:#1677ff}
.workspace-bot-cell{font-weight:400;color:#262626}.workspace-bot-tile{display:none}.bot-list td{height:85px}.workspace-bot-status{display:block;font-size:12px}.workspace-bot-status:before{display:none}
.permission-badges{display:flex;gap:3px;white-space:nowrap}.permission-badges span{border-radius:3px;padding:1px 4px;background:#e54c42;color:#fff;font-size:12px}.permission-badges .allowed{background:#1890dd}
.workspace-pager{margin-top:22px;font-size:14px}.workspace-pager .workspace-button{border:0;box-shadow:none;color:#888}.workspace-page-number{height:30px;min-width:30px;border:1px solid transparent;border-radius:6px}.workspace-page-number[aria-current="page"]{border-color:#1677ff;color:#1677ff}.workspace-pager select{font-size:14px;border-color:#d9d9d9}
.reference-section-title{font-weight:600;font-size:17px;margin:30px 0 22px}.reference-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;border-bottom:1px solid #f0f0f0;padding:0 0 28px}.reference-overview dt{font-size:14px;color:#888;margin-bottom:12px}.reference-overview dd{font-size:18px;overflow-wrap:anywhere}
.reference-dialog-screen{position:fixed;inset:0;z-index:45;display:flex;align-items:center;justify-content:center;padding:24px;background:#0006}
.reference-dialog{width:min(1100px,100%);max-height:94vh;display:flex;flex-direction:column;border-radius:9px;background:#fff;box-shadow:0 16px 50px #0002;overflow:hidden}
.reference-dialog>header{display:flex;align-items:center;justify-content:space-between;padding:24px 30px}.reference-dialog>header h3{font-size:17px;font-weight:600}.reference-dialog>header>button{font-size:24px;color:#999;line-height:1}.reference-dialog-body{overflow-y:auto;padding:10px 36px 20px}.reference-dialog>footer{padding:20px 30px;display:flex;gap:10px;justify-content:flex-end}
.reference-form-row{display:flex;align-items:flex-start;gap:16px;margin-bottom:30px;font-size:14px}.reference-form-row>label{flex:0 0 150px;text-align:right;padding-top:9px;color:#262626}.reference-form-control{flex:1;min-width:0;max-width:650px}.reference-input{min-height:38px;padding:7px 12px;border:1px solid #d9d9d9;border-radius:6px;background:#fff;font-size:14px}.reference-input:focus{outline:0;border-color:#4096ff;box-shadow:0 0 0 2px #0591ff1a}.reference-input::placeholder{color:#bfbfbf}
.reference-target-picker{display:grid;gap:10px;max-height:180px;overflow:auto;padding:12px 0}.reference-target-picker label{display:block}.reference-add-row{width:100%;height:38px;border:1px dashed #d9d9d9;border-radius:6px;color:#262626;background:white}.reference-add-row:hover{border-color:#1677ff;color:#1677ff}.reference-button-row{margin-bottom:14px}.reference-editor-import{display:flex;flex-wrap:wrap;gap:10px 18px;padding-top:10px;font-size:13px}.schedule-table{min-width:1450px}.schedule-table td{white-space:nowrap}.schedule-table td:nth-child(9){white-space:normal;min-width:100px}.schedule-state{color:#999}.schedule-state.enabled{color:#262626}.schedule-state:disabled{cursor:default}
.telegram-rich-editor{border:1px solid #e8e8e8;border-radius:3px;background:#fff;overflow:hidden}.telegram-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:5px 8px;min-height:44px;border-bottom:1px solid #eee;box-shadow:0 2px 5px #00000008;position:relative;z-index:1}.telegram-editor-toolbar>button{height:32px;min-width:34px;padding:0 7px;border:0;border-radius:4px;font-size:22px;line-height:1;color:#253245;background:#fff}.telegram-editor-toolbar>button:hover{background:#f0f0f0}.telegram-editor-toolbar>button:disabled{opacity:.4}.telegram-editor-toolbar .format-b{font-weight:700}.telegram-editor-toolbar .format-i{font-family:Georgia,serif;font-style:italic}.telegram-editor-toolbar .format-u{text-decoration:underline}.telegram-editor-toolbar .format-s{text-decoration:line-through}.telegram-editor-toolbar .format-code{font-size:17px;font-weight:600}.telegram-editor-toolbar select{max-width:130px;font-size:12px;border:0;background:#fff;color:#777;padding:5px}
.telegram-rich-editor .telegram-message-editor{border:0;border-radius:0;min-height:270px;max-height:420px;padding:16px 12px;resize:vertical;font-size:14px;color:#262626;line-height:1.65;box-shadow:none}.telegram-rich-editor .telegram-message-editor:focus{outline:0;box-shadow:none}.telegram-rich-editor .telegram-message-editor:empty:before{color:#aaa}.telegram-rich-editor.is-disabled{background:#fafafa}.telegram-message-editor[contenteditable="false"]{cursor:default}
.admin-main section.rounded-xl,.admin-main section .shadow-sm,.admin-main section .shadow{box-shadow:none;border-radius:0}.admin-main table{border-collapse:collapse;color:#262626}.admin-main table thead{background:#fafafa}.admin-main table th{text-align:left;font-weight:600;background:#fafafa}.admin-main table td,.admin-main table th{padding:15px 12px}.admin-main table tr{border-color:#f0f0f0}.admin-main table td{border-bottom:1px solid #f0f0f0}.admin-main table button.text-red-600{color:#1677ff}
.admin-main>section.space-y-4>header{margin-bottom:50px}.admin-main>section.space-y-4>div:first-child{margin-bottom:50px}
.moderation-switch{width:44px;height:22px;background:#c7c7c7}.moderation-switch:before{width:18px;height:18px;top:2px;left:2px;box-shadow:0 2px 4px #0003}.moderation-switch:checked{background:#1677ff}.moderation-switch:checked:before{transform:translateX(22px)}
.reference-rule-dialog{max-width:1000px!important;border-radius:9px!important}.reference-rule-dialog>header,.reference-rule-dialog>footer{border:0;padding:22px 30px}.reference-rule-dialog>header p{display:none}.reference-rule-fields{padding:8px 70px 20px!important;gap:26px}.reference-rule-fields>p:first-child{background:#f6ffed;border-color:#b7eb8f;padding:14px 16px;border-radius:7px}.reference-rule-fields>label.flex{flex-direction:row-reverse;justify-content:flex-end;font-weight:400;font-size:14px;gap:20px;margin:30px 0 34px}.reference-punishments{border:0!important;padding:10px 0!important;border-radius:0!important}.reference-punishments>legend{font-weight:400;font-size:14px;padding:0;margin:0 0 12px}.reference-punishments>label,.reference-punishments>div.flex{min-height:45px;margin-top:14px}.reference-punishments label.flex{flex-direction:row-reverse;justify-content:flex-end;gap:20px}.reference-punishments label.flex:has(>.moderation-switch){min-width:200px;justify-content:space-between;flex-direction:row-reverse}.reference-punishments>p{max-width:600px}.reference-rule-fields>.space-y-3>details{display:none}
.admin-main .bg-lime-50,.admin-main .bg-amber-50{background:#f6ffed;border:1px solid #b7eb8f;color:#262626}.workspace-modal{border-radius:8px;box-shadow:0 10px 45px #0002;padding:26px}.workspace-modal-screen{background:#0006}.admin-main .fixed.inset-0.z-50{background-color:#0006}
/* Nested media and import dialogs must stay above the schedule editor. */
#app>div>div.fixed{z-index:70}
@media(max-width:1000px){:root{--workspace-sidebar-width:210px}.admin-main{padding:25px 24px}.workspace-nav-button{padding-left:18px;gap:14px}.reference-rule-fields{padding:8px 20px 20px!important}.reference-form-row>label{flex-basis:125px}.reference-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.workspace-brand{display:none}.workspace-tab{font-size:14px;padding:0 15px}.admin-main{padding:20px 16px}.workspace-full{padding:20px 16px}.workspace-page-heading{margin-bottom:30px}.workspace-context{display:flex;padding:12px 16px}.workspace-group-label{margin:0}.reference-dialog-screen{padding:8px}.reference-dialog{max-height:97vh}.reference-dialog>header{padding:18px}.reference-dialog-body{padding:8px 18px}.reference-form-row{display:block;margin-bottom:22px}.reference-form-row>label{display:block;text-align:left;padding:0 0 8px}.reference-form-control{max-width:none}.telegram-rich-editor .telegram-message-editor{min-height:200px}.reference-rule-fields{padding:0!important}.workspace-search{min-width:0}.reference-overview{gap:18px}.admin-main>section.space-y-4>header{margin-bottom:28px}}
.reference-rule-fields>:not(p:first-child){width:100%;max-width:650px;margin-left:auto;margin-right:auto}
.reference-rule-fields>label.flex{justify-content:flex-end}
.reference-rule-fields>fieldset:not(.reference-punishments){border:0;padding-left:0;padding-right:0;font-size:14px}
.reference-punishments label.flex:has(>.moderation-switch){min-width:200px;width:200px}
.reference-punishments>div:first-of-type:has(input[type="checkbox"]):not(.flex) label.flex{width:auto;max-width:650px}
.reference-rule-fields .telegram-message-editor{min-height:285px}
.workspace-nav-button{gap:12px}.workspace-nav-button>span:first-of-type{min-width:0;flex:1}.workspace-nav-button .workspace-nav-chevron{flex:0 0 auto!important}
.workspace-planned-badge,.workspace-partial-badge{flex:none!important;margin-left:auto;font-size:10px;line-height:18px;padding:0 4px;border-radius:3px;white-space:nowrap;color:#999;background:#f6f6f6}
.workspace-partial-badge{color:#ba8b26;background:#fff8e7}.workspace-subnav .workspace-nav-button{gap:8px;padding-right:12px}.workspace-subnav .workspace-planned-badge{margin-left:auto}
.planned-status{display:inline-block;color:#999;background:#f5f5f5;border:1px solid #e8e8e8;border-radius:4px;padding:3px 10px;font-size:13px}.planned-notice{display:flex;gap:10px;align-items:center;padding:13px 16px;background:#fafafa;border:1px solid #ededed;border-radius:6px;color:#777;font-size:14px}.planned-dot{width:7px;height:7px;border-radius:50%;background:#bfbfbf}.planned-content{display:flex;align-items:center;flex-direction:column;text-align:center;padding:75px 20px}.planned-symbol{width:74px;height:74px;border-radius:50%;display:grid;place-items:center;background:#f5f8fc;color:#8ba7c8;margin-bottom:20px}.planned-symbol .workspace-icon{width:34px;height:34px}.planned-content h3{font-size:19px;color:#555;margin-bottom:12px}.planned-content p{font-size:14px;color:#999;line-height:1.9}.planned-action{margin-top:25px;background:#fafafa;color:#aaa}
.today-data{grid-template-columns:repeat(3,minmax(0,1fr));padding:0 0 30px;row-gap:30px}.planned-value{font-size:14px!important;color:#aaa}.planned-row-button{color:#aaa!important;cursor:not-allowed;font-size:12px}.workspace-row-actions:has(.planned-row-button){flex-direction:column;align-items:flex-start;min-width:180px}
@media(max-width:767px){.today-data{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:768px){:root{--workspace-sidebar-width:240px}.workspace-nav-button{padding-left:14px;padding-right:14px;gap:10px}.workspace-nav-button>span:first-of-type{white-space:nowrap}.workspace-subnav .workspace-nav-button{font-size:13px;padding-left:20px}.workspace-nav-chevron{font-size:12px}}
@media(min-width:768px){.workspace-mobile-menu{display:none}}

.operations-description {
  padding: 14px 18px;
  margin-bottom: 24px;
  background: #f5f8fc;
  border-left: 3px solid var(--workspace-blue);
  color: #475569;
  font-size: 14px;
}
.operations-form { max-width: 850px; margin: 24px 0 34px; }
.operations-field {
  display: grid;
  grid-template-columns: minmax(100px, 135px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}
.operations-field > label { padding-top: 7px; }
.operations-field > .moderation-switch { margin: 6px 0; }
.operations-field textarea { resize: vertical; width: 100%; }
.operation-rule {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #e4e9f0;
  border-radius: 6px;
}
.operation-channel { display: block; padding: 5px 0; }
.operations-page .operations-table { min-width: 540px; }
.operations-table td { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .operations-field { grid-template-columns: 1fr; gap: 6px; }
  .operation-rule > input { width: 100%; }
}
.workspace-modal .schedule-copy-target input { display: inline; width: auto; min-height: 0; margin: 0 7px 0 0; }

.telegram-capture-tools{display:inline-flex;flex-wrap:wrap;gap:4px;margin-left:4px}
.telegram-capture-tools button{min-height:32px;border:1px solid #cbdcf3;border-radius:5px;padding:3px 9px;color:#1554a3;background:#f3f8ff;font-size:13px}
.telegram-capture-tools button:hover{background:#e5f0ff}
.telegram-capture-tools button:disabled{opacity:.5;cursor:default}
.telegram-capture-screen{z-index:100}
.telegram-capture-dialog{width:min(560px,100%);max-height:85vh}
.telegram-capture-dialog .reference-dialog-body{color:#334155;line-height:1.65}
.telegram-capture-dialog a{display:inline-block;margin-top:10px}
.telegram-capture-item{padding:12px 0;border-bottom:1px solid #e2e8f0}
.telegram-capture-item p{max-height:96px;overflow:auto;margin:0 0 6px}
.telegram-capture-item small{color:#64748b;margin-right:14px}
.telegram-button-style{height:36px}
.telegram-button-preview{display:inline-block;border:1px solid #c4d8ee;border-radius:6px;background:#ecf4fd;color:#254e82;padding:6px 12px;text-align:center;font-size:14px}
.telegram-button-preview[data-style="primary"]{background:#145fca;border-color:#145fca;color:white}
.telegram-button-preview[data-style="success"]{background:#117a49;border-color:#117a49;color:white}
.telegram-button-preview[data-style="danger"]{background:#ba303b;border-color:#ba303b;color:white}

.schedule-error-details{color:#aa2336;font-size:13px;margin-top:4px}
.schedule-error-details summary{cursor:pointer}
.schedule-error-details p{max-width:22rem;white-space:normal;line-height:1.5;margin-top:6px}
.schedule-content-source{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.schedule-content-source select{min-width:120px}
.schedule-content-source input{flex:1;min-width:min(230px,100%)}
.schedule-editor-tools{display:flex;max-width:100%}
.schedule-editor-tools>summary{list-style:none;display:inline-block;padding:3px 8px;border-radius:4px;color:#253245;font-size:21px;line-height:26px;cursor:pointer;vertical-align:middle}
.schedule-editor-tools>summary:hover,.schedule-editor-tools[open]>summary{background:#eff5ff;color:#1554a3}
.schedule-editor-tools>summary::-webkit-details-marker{display:none}
.schedule-editor-tools .telegram-capture-tools{vertical-align:middle}
.schedule-button-emoji{min-height:32px;padding:0 6px}
.schedule-actions-menu{position:relative;color:#0f5fbd}
.schedule-actions-menu>summary{cursor:pointer;white-space:nowrap}
.schedule-actions-menu>div{position:absolute;z-index:4;right:0;top:100%;min-width:124px;padding:4px;background:#fff;border:1px solid #dbe4ef;border-radius:7px;box-shadow:0 5px 18px #22355326}
.schedule-actions-menu button{display:block;text-align:left;width:100%;padding:6px 9px;color:#113454}
.schedule-actions-menu button:hover,.schedule-actions-menu button:focus-visible{background:#eef5fd}
.workspace-reply-scope>.workspace-link{float:right;margin:6px 0 12px 20px;font-size:13px}
.schedule-table tbody tr:last-child .schedule-actions-menu>div{top:auto;bottom:100%}

.schedule-audience-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.schedule-audience-picker{margin:auto;width:min(900px,calc(100% - 32px));max-height:calc(100% - 32px);padding:24px;border:1px solid #dbe4ef;border-radius:14px;background:#fff;color:#1b2b42;box-shadow:0 18px 58px #13213a45;overflow:auto}
.schedule-audience-picker::backdrop{background:#17223568}
.schedule-picker-header{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:16px}
.schedule-picker-header h3{font-size:18px;font-weight:700}
.schedule-picker-header p{margin-top:4px;color:#536479;font-size:13px}
.schedule-picker-body{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:start}
.schedule-picker-column{border:1px solid #dbe4ef;border-radius:9px;padding:12px;min-width:0}
.schedule-picker-column h4{display:flex;justify-content:space-between;font-weight:650;margin-bottom:10px}
.schedule-picker-column h4 span,.schedule-picker-type{color:#425873;font-size:12px}
.schedule-picker-column>input{width:100%;min-width:0}
.schedule-picker-select-page{display:flex;align-items:center;gap:8px;font-size:12px;margin-top:8px}
.schedule-picker-list{max-height:min(320px,40vh);overflow:auto;margin:8px 0 0;padding:0;list-style:none}
.schedule-picker-list>li{padding:6px 0;border-bottom:1px solid #edf1f6}
.schedule-picker-list>li:last-child{border:0}
.schedule-picker-row{display:flex;gap:8px;align-items:center;min-height:24px;font-size:13px}
.schedule-picker-row input,.schedule-picker-type,.schedule-picker-row button{flex:none}
.schedule-picker-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.schedule-picker-transfer{align-self:center}
.schedule-picker-pages,.schedule-picker-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:14px;font-size:13px}
.schedule-picker-pages .workspace-button{padding:4px 9px}
.schedule-picker-pages select{min-width:0;height:32px}
@media(max-width:680px){.schedule-audience-picker{padding:16px}.schedule-picker-body{grid-template-columns:1fr}.schedule-picker-transfer{justify-self:end}.schedule-picker-list{max-height:148px}}
