/* BotPanel Design Kit. Reusable rules extracted from src/styles.css. */

:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #17202f;
  background: #f3f5f7;
  font-synthesis: none;
  font-size: 14px;
  --bg: #f3f5f7;
  --panel: #fff;
  --sidebar: #fafbfc;
  --text: #17202f;
  --muted: #7b8798;
  --secondary: #556477;
  --border: #e4e8ee;
  --blue: #0077ff;
  --blue-soft: #e9f2ff;
  --hover: #f6f8fa;
  --green: #26a566;
  --red: #dc5059;
  --input: #fff;
  --shadow: 0 2px 8px #172b4d05;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button {
  color: inherit;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
div[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
input,
select,
textarea {
  color: var(--text);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 600;
}
button {
  border: 0;
  background: none;
}
svg {
  flex-shrink: 0;
}
strong {
  font-weight: 600;
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.mono,
code,
.code-input {
  font-family: Consolas, "SFMono-Regular", monospace;
}
.spacer {
  flex: 1;
}
.break-all {
  overflow-wrap: anywhere;
}
.full-width {
  width: 100%;
}
.text-red {
  color: var(--red);
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 73px;
  padding: 0 22px;
  color: var(--text);
}
.brand strong {
  font-size: 23px;
  letter-spacing: -0.9px;
}
.brand-icon {
  height: 34px;
  width: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
}
.brand-chevron {
  margin-left: auto;
  color: #aab3bf;
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 1.1px;
  color: #9aa3af;
  font-weight: 600;
  padding: 22px 24px 11px;
}
.sidebar nav {
  padding: 0 12px;
}
.nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 43px;
  text-align: left;
  border-radius: 7px;
  gap: 12px;
  padding: 10px 12px;
  color: var(--secondary);
  margin: 3px 0;
  font-size: 14px;
}
.nav-link svg {
  color: #7f8d9e;
}
.nav-link:hover {
  background: var(--hover);
}
.nav-link.active {
  background: #e2eeff;
  color: #0769d7;
  font-weight: 600;
}
.nav-link.active svg {
  color: var(--blue);
}
.nav-count {
  margin-left: auto;
  font-size: 11px;
  color: #8c98a9;
  min-width: 21px;
  text-align: center;
}
.nav-link.active .nav-count {
  color: #4c85c9;
}
.nav-separated {
  margin-top: 22px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 18px 12px 0;
}
.sidebar-version {
  border-top: 1px solid var(--border);
  margin: 14px -12px 0;
  padding: 15px 24px;
  color: #9aa4b1;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}
.workspace {
  margin-left: 224px;
}
.topbar {
  height: 66px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  color: #8b96a5;
  font-size: 12px;
}
.topbar-breadcrumb span {
  color: var(--secondary);
}
.topbar-breadcrumb svg {
  color: #a8b1bd;
}
.top-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  width: 260px;
  color: #98a3b2;
}
.top-search input {
  outline: none !important;
  border: 0;
  background: none;
  min-width: 0;
  width: 100%;
  font-size: 12px;
  color: var(--secondary);
  padding: 8px 0;
}
.top-search input::placeholder {
  color: #9ca6b3;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  color: #9ca6b3;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 5px;
  white-space: nowrap;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
.topbar-divider {
  height: 26px;
  width: 1px;
  background: var(--border);
  margin: 0 3px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.profile > svg {
  margin-left: 8px;
  color: #9aa5b4;
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e6effb;
  color: #5785bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.profile strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.profile small {
  display: block;
  color: #96a1af;
  font-size: 10px;
}
.mobile-menu {
  display: none !important;
}
main {
  padding: 28px 28px 0;
  max-width: 1900px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 2px 0 25px;
}
.page-heading h1 {
  font-size: 27px;
  letter-spacing: -0.6px;
  line-height: 1.25;
}
.page-heading p {
  margin-top: 9px;
  font-size: 13px;
  color: var(--secondary);
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 35px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 18px;
  text-decoration: none;
}
.button.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.button.primary:hover:not(:disabled) {
  background: #006be6;
}
.button.secondary {
  background: var(--panel);
  border-color: var(--border);
  color: var(--secondary);
}
.button.secondary:hover:not(:disabled) {
  background: var(--hover);
  border-color: #cdd5df;
}
.button.ghost {
  color: var(--blue);
  padding-left: 5px;
  padding-right: 5px;
}
.button.danger {
  background: #fff1f1;
  color: var(--red);
}
.button-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #8491a2;
  flex-shrink: 0;
  padding: 0;
}
.icon-button:hover:not(:disabled),
.icon-button.selected {
  background: var(--blue-soft);
  color: var(--blue);
}
.icon-button.bordered {
  border: 1px solid var(--border);
  background: var(--panel);
  height: 35px;
  width: 35px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  padding: 0;
  color: var(--blue);
  line-height: 20px;
  white-space: nowrap;
}
.text-button:hover {
  text-decoration: underline;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: clip;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 21px;
  gap: 12px;
}
.panel-heading h2 {
  font-size: 16px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}
.count {
  font-size: 11px;
  min-width: 21px;
  height: 20px;
  border-radius: 5px;
  padding: 3px 6px;
  background: #f0f3f7;
  color: #8492a5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 400;
  padding: 5px 8px;
  border-radius: 5px;
  background: #f0f2f5;
  color: #8b95a3;
  line-height: 15px;
}
.status > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status.running {
  color: #29925c;
  background: #edf8f1;
}
.status.error,
.status.dead {
  color: #d45660;
  background: #fff0f1;
}
.status.partial,
.status.restarting {
  color: #bc8a31;
  background: #fff8e9;
}
.status.unknown {
  color: #8b95a3;
  background: #f0f2f5;
}
.mini-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mini-dot.green {
  background: #29b36e;
}
.mini-dot.gray {
  background: #b3bcc9;
}
.mini-dot.red {
  background: #e86a72;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 19px 19px 15px;
  box-shadow: var(--shadow);
  min-width: 0;
  position: relative;
}
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--secondary);
  font-size: 12px;
  margin-bottom: 16px;
}
.stat-label > svg {
  color: #9caabe;
}
.stat-number {
  font-size: 29px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.9px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 14px;
  white-space: nowrap;
}
.stat-number > span {
  font-size: 12px;
  color: #8793a4;
  letter-spacing: 0;
  font-weight: 400;
}
.stat-number > span.of-total {
  font-size: 19px;
  color: #9aa5b5;
  margin-left: 4px;
}
.stat-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #919ba9;
  min-height: 17px;
  margin-top: 9px;
}
.progress {
  height: 4px;
  background: #edf0f5;
  border-radius: 4px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: #4c9afa;
  border-radius: 4px;
}
.progress.gray > span {
  background: #9babbe;
}
.progress.red > span {
  background: var(--red);
}
.sparkline {
  width: 80px;
  height: 34px;
  margin-left: auto;
  align-self: center;
  margin-bottom: -2px;
}
.sparkline-empty {
  width: 60px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 22px;
  align-items: start;
}
.dashboard-primary,
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.tabs {
  display: flex;
  align-items: stretch;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}
.tabs > button {
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tabs > button.active {
  color: var(--blue);
  border-color: var(--blue);
  font-weight: 500;
}
.tabs > button > span {
  font-size: 10px;
  min-width: 16px;
  text-align: center;
  background: #f1f3f6;
  border-radius: 4px;
  padding: 2px 4px;
  color: #97a1b0;
}
.tabs > button.active > span {
  background: var(--blue-soft);
  color: var(--blue);
}
.table-controls {
  padding: 0 21px;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input);
  color: #a0aabb;
  padding: 0 11px;
  height: 35px;
  min-width: 0;
}
.search-input input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 12px;
  padding: 8px 0;
  color: var(--text);
}
.search-input input::placeholder {
  color: #a3adba;
}
.table-search > .search-input {
  flex: 1;
}
.search-input:focus-within {
  border-color: #8cbcf5;
}
.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #d8dee8 transparent;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.data-table th {
  background: #fafbfd;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 400;
  color: #8a96a7;
  padding: 12px 16px;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf0f4;
  color: var(--secondary);
  height: 68px;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: var(--hover);
}
.data-table th:first-child,
.data-table td:first-child {
  padding-left: 21px;
}
.data-table th:last-child,
.data-table td:last-child {
  padding-right: 14px;
  width: 40px;
}
.project-table .numeric {
  font-size: 11px;
  color: #748196;
}
.project-table .status {
  font-size: 10px;
}
.project-table th,
.project-table td {
  padding-left: 12px;
  padding-right: 12px;
}
.project-name,
.project-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  min-width: 0;
  padding: 0;
}
.project-name strong,
.project-cell strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}
.project-name small,
.project-cell small {
  display: block;
  color: #9aa5b5;
  font-size: 10px;
  margin-top: 3px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-name:hover strong {
  color: var(--blue);
}
.project-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.project-avatar.small {
  height: 26px;
  width: 26px;
  font-size: 9px;
  border-radius: 7px;
}
.color-0 {
  background: #e7f0ff;
  color: #5185cc;
}
.color-1 {
  background: #e7f4ee;
  color: #55957c;
}
.color-2 {
  background: #f1ebfc;
  color: #9782bb;
}
.color-3 {
  background: #fff1df;
  color: #b59466;
}
.color-4 {
  background: #fcebed;
  color: #bb7d8a;
}
.color-5 {
  background: #e4f2f7;
  color: #689eae;
}
.table-footer {
  border-top: 1px solid var(--border);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  font-size: 10px;
  color: #a0aab7;
  min-height: 43px;
}
.empty {
  text-align: center;
  padding: 50px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.empty-icon {
  color: #90a7c0;
  background: #f1f6fc;
  border-radius: 12px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 17px;
}
.empty h3 {
  font-size: 16px;
  margin-bottom: 9px;
}
.empty p {
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
  max-width: 360px;
}
.empty .button {
  margin-top: 19px;
}
.small-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 20px 0 27px;
  line-height: 20px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  border: 1px solid #dbe8f8;
  border-radius: 7px;
  background: #f4f8fe;
  color: #6682a4;
  font-size: 12px;
  line-height: 19px;
  margin-bottom: 18px;
}
.notice > svg {
  margin-top: 1px;
}
.notice.error {
  background: #fff6f6;
  border-color: #f4dfe0;
  color: #c86870;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 112px);
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 5px 26px #17202f22;
  z-index: 150;
  max-width: min(620px, 90vw);
  min-width: 280px;
  padding: 12px 13px 12px 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 19px;
}
.toast > svg {
  color: var(--green);
}
.toast > .icon-button {
  margin-left: 4px;
  width: 23px;
  height: 23px;
}
dialog {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 0;
  box-shadow: 0 16px 64px #11243c24;
}
dialog::backdrop {
  background: #15233866;
  backdrop-filter: blur(1px);
}
dialog.modal {
  border-radius: 12px;
  width: 500px;
  max-width: calc(100vw - 28px);
  max-height: 90vh;
}
dialog.modal.wide {
  width: 640px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 2;
}
.modal-head h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.modal-head p {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
  line-height: 19px;
}
.modal-head > .icon-button {
  margin-top: -3px;
  margin-right: -6px;
}
.modal-body {
  padding: 22px 24px;
}
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: sticky;
  bottom: 0;
  background: var(--panel);
  z-index: 2;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 19px;
  font-size: 12px;
  color: var(--secondary);
  min-width: 0;
}
.field > span {
  font-weight: 500;
}
.field > small {
  font-size: 11px;
  color: #97a3b2;
  line-height: 17px;
}
input:not([type="checkbox"]):not([type="file"]),
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input);
  color: var(--text);
  min-height: 37px;
  padding: 9px 11px;
  outline: none;
  font-size: 12px;
  width: 100%;
}
select {
  width: auto;
  max-width: 100%;
  padding-right: 27px;
  cursor: pointer;
}
input::placeholder,
textarea::placeholder {
  color: #a4adba;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #8cbcf5;
  box-shadow: 0 0 0 2px #0077ff08;
}
.field select {
  width: 100%;
}
input[type="file"] {
  font-size: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  line-height: 25px;
}
input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  background: var(--hover);
  border-radius: 5px;
  padding: 6px 10px;
  margin-right: 10px;
  font: inherit;
  color: var(--secondary);
}
textarea {
  resize: vertical;
  line-height: 21px;
}
.code-input {
  font-size: 12px !important;
  line-height: 22px !important;
  background: #fafbfd !important;
  tab-size: 2;
  min-height: 120px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 17px;
}
.form-section h3 {
  font-size: 13px;
  margin-bottom: 18px;
}
.form-section .section-label h3 {
  margin-bottom: 0;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-label h3 {
  font-size: 14px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}
.setting-row strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.setting-row small {
  display: block;
  font-size: 11px;
  line-height: 17px;
  color: var(--muted);
  margin-top: 6px;
  max-width: 330px;
}
.toggle {
  height: 20px;
  width: 35px;
  border-radius: 12px;
  background: #d5dce6;
  padding: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.toggle > span {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: white;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px #0002;
}
.toggle.on {
  background: var(--blue);
}
.toggle.on > span {
  margin-left: 15px;
}
.help-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 19px;
  margin: 14px 0 17px;
}
dialog.drawer {
  height: 100dvh;
  max-height: 100dvh;
  width: 780px;
  max-width: 100vw;
  margin: 0 0 0 auto;
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}
.drawer .modal-head {
  padding: 23px 26px;
}
.drawer .modal-body {
  padding: 21px 26px;
}
.drawer-tabs {
  gap: 22px;
  overflow-x: auto;
}
.drawer-tabs > button {
  font-size: 12px;
  padding: 12px 0 14px;
}
.drawer-content {
  padding-top: 24px;
}
.drawer .empty {
  padding: 42px 25px;
}
input[type="checkbox"] {
  accent-color: var(--blue);
}
.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px 20px;
  background: var(--bg);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -1px;
  margin-bottom: 28px;
}
.auth-card {
  width: 410px;
  max-width: 100%;
  padding: 30px 32px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  box-shadow: 0 3px 17px #17202f05;
}
.auth-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: #548dcb;
  margin-bottom: 20px;
}
.auth-card h1 {
  font-size: 24px;
  letter-spacing: -0.6px;
}
.auth-card > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 20px;
  margin: 10px 0 26px;
}
.auth-card .button {
  margin-top: 6px;
}
.auth-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #8aa0b9;
  border-top: 1px solid var(--border);
  margin-top: 25px;
  padding-top: 22px;
}
.auth-caption {
  font-size: 11px;
  color: #a2adba;
  margin-top: 25px;
}
.initial-loading {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: #7c97b8;
  font-size: 12px;
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.top-search input:not([type="checkbox"]),
.search-input input:not([type="checkbox"]) {
  border: 0;
  box-shadow: none;
  padding: 8px 0;
  background: transparent;
  min-height: 0;
  font-size: 12px;
}
.top-search input:not([type="checkbox"]) {
  font-size: 11px;
}
[data-theme="dark"] {
  --bg: #171b21;
  --panel: #20262e;
  --sidebar: #1c2128;
  --text: #e1e7ef;
  --muted: #8a98aa;
  --secondary: #afbac9;
  --border: #303944;
  --blue: #4b9cff;
  --blue-soft: #24394f;
  --hover: #242d38;
  --input: #1c222b;
  --shadow: none;
  background: var(--bg);
  color: var(--text);
}
[data-theme="dark"] .nav-link.active {
  background: #233b56;
  color: #72b1ff;
}
[data-theme="dark"] .data-table th,
[data-theme="dark"] .code-input {
  background: #1c232c !important;
}
[data-theme="dark"] .data-table td {
  border-color: var(--border);
}
[data-theme="dark"] .status.running {
  background: #20392e;
  color: #69b88b;
}
[data-theme="dark"] .status.error {
  background: #402a31;
  color: #e2939b;
}
[data-theme="dark"] .status:not(.running):not(.error) {
  background: #2d3540;
  color: #a4b0c1;
}
[data-theme="dark"] .progress,
[data-theme="dark"] .count,
[data-theme="dark"] .tabs > button > span {
  background: #303b49;
}
[data-theme="dark"] .empty-icon {
  background: #293747;
}
[data-theme="dark"] .notice {
  background: #233244;
  border-color: #354861;
  color: #a0b6d0;
}
[data-theme="dark"] .notice.error {
  background: #38272d;
  border-color: #5b3942;
  color: #dba1a8;
}
[data-theme="dark"] .project-avatar {
  filter: saturate(0.55) brightness(0.85);
}
@media (min-width: 1650px) {
  main {
    padding: 33px 32px 0;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }
  .stat-grid {
    gap: 22px;
  }
  .data-table td {
    height: 72px;
  }
  .stat-card {
    padding: 21px 22px 17px;
  }
  .panel-heading {
    padding: 22px 24px;
  }
  .stat-label {
    font-size: 13px;
  }
  .stat-number {
    font-size: 33px;
  }
  .project-name strong {
    font-size: 13px;
  }
  .project-name small {
    font-size: 11px;
  }
  .project-table .status {
    font-size: 11px;
  }
  .stat-grid {
    margin-bottom: 26px;
  }
  .page-heading {
    margin-bottom: 29px;
  }
}
@media (max-width: 1280px) {
  .sidebar {
    width: 205px;
  }
  .workspace {
    margin-left: 205px;
  }
  .topbar {
    padding: 0 22px;
    gap: 14px;
  }
  .top-search {
    width: 200px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 258px;
    gap: 18px;
  }
  .dashboard-primary,
.dashboard-side {
    gap: 18px;
  }
  main {
    padding: 24px 22px 0;
  }
  .stat-grid {
    gap: 13px;
  }
  .stat-card {
    padding: 17px 15px 13px;
  }
  .stat-number {
    font-size: 25px;
  }
  .stat-number > span {
    font-size: 11px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-label > svg {
    height: 16px;
    width: 16px;
  }
  .sparkline {
    width: 52px;
  }
  .data-table th,
.data-table td {
    padding-left: 10px;
    padding-right: 10px;
  }
  .project-table .project-name small {
    max-width: 130px;
  }
  .tabs {
    gap: 15px;
  }
  .table-controls {
    padding: 0 18px;
  }
  .toast {
    left: calc(50% + 102px);
  }
}
@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .topbar-breadcrumb {
    font-size: 11px;
  }
  .topbar-breadcrumb > span,
.topbar-breadcrumb > svg {
    display: none;
  }
  .top-search {
    width: 190px;
  }
  .topbar-right {
    gap: 10px;
  }
  .stat-number {
    font-size: 27px;
  }
  .topbar-right .profile small {
    display: none;
  }
  .profile > svg {
    display: none;
  }
}
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s;
    z-index: 100;
    width: 224px;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: #15233866;
    z-index: 99;
  }
  .workspace {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-flex !important;
  }
  .topbar {
    padding: 0 17px;
    height: 60px;
    gap: 10px;
  }
  .topbar-breadcrumb {
    display: none;
  }
  .top-search {
    margin-left: 4px;
    margin-right: auto;
    width: 210px;
  }
  .topbar-right .profile > span:not(.user-avatar) {
    display: none;
  }
  .topbar-right {
    gap: 8px;
  }
  .topbar-divider {
    margin: 0 3px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 12px;
    max-width: 330px;
    line-height: 19px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 21px;
  }
  .page-actions {
    padding-top: 3px;
    gap: 7px;
  }
  main {
    padding: 23px 18px 0;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-label {
    font-size: 12px;
  }
  .stat-number {
    font-size: 29px;
  }
  .dashboard-side {
    gap: 17px;
  }
  .page-actions > .icon-button {
    display: none;
  }
  .page-actions .button {
    padding: 7px 10px;
    font-size: 11px;
  }
  .toast {
    left: 50%;
    bottom: 18px;
  }
  .panel-heading > .button-group {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .panel-heading > .button-group select {
    max-width: 160px;
  }
  .top-search kbd {
    display: none;
  }
}
@media (max-width: 500px) {
  main {
    padding: 21px 13px 0;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    max-width: 220px;
    font-size: 11px;
    line-height: 18px;
  }
  .page-actions .button {
    font-size: 10px;
    gap: 4px;
    padding: 6px 8px;
    min-height: 32px;
  }
  .page-actions .button svg {
    width: 14px;
  }
  .stat-card {
    padding: 16px 13px 12px;
  }
  .stat-label {
    font-size: 11px;
    margin-bottom: 13px;
  }
  .stat-number {
    font-size: 27px;
    gap: 3px;
  }
  .stat-number > span {
    font-size: 10px;
  }
  .stat-bottom {
    font-size: 9px;
  }
  .sparkline {
    width: 58px;
  }
  .stat-label > svg {
    width: 15px;
  }
  .dashboard-side {
    grid-template-columns: 1fr;
  }
  .panel-heading {
    padding: 18px 16px;
  }
  .table-controls {
    padding: 0 16px;
  }
  .table-search {
    padding: 13px 15px;
  }
  .table-footer {
    padding: 13px 15px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .modal-head {
    padding: 20px;
  }
  .modal-head h2 {
    font-size: 19px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-foot {
    padding: 14px 20px;
  }
  .modal-foot .button {
    padding: 7px 10px;
    font-size: 11px;
  }
  .drawer .modal-head {
    padding: 20px;
  }
  .drawer .modal-body {
    padding: 17px;
  }
  .drawer-tabs {
    gap: 20px;
  }
  .auth-card {
    padding: 27px 25px;
  }
  .auth-brand {
    margin-bottom: 24px;
  }
  .top-search {
    width: 150px;
  }
  .topbar {
    gap: 5px;
  }
  .topbar-right {
    gap: 3px;
  }
  .topbar-divider {
    margin: 0 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
*::before,
*::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Helpers used only by the portable example. Component sizes above come from BotPanel. */
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button .icon, .icon-button .icon { width: 16px; height: 16px; }
.brand-icon .icon { width: 23px; height: 23px; }
.auth-symbol .icon { width: 28px; height: 28px; }
.panel-body { padding: 20px 21px; }
.component-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 24px; }
.component-stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.component-stack .button-group { flex-wrap: wrap; }
.component-stack .notice { margin: 0; }
.component-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.component-title { font-size: 12px; font-weight: 600; margin: 0 0 12px; }
.component-grid .panel { align-self: start; }
.preview-footer { color: var(--muted); font-size: 11px; padding: 22px 0 26px; line-height: 18px; }
.auth-brand .brand-icon { flex-shrink: 0; }
.auth-card .notice[hidden] { display: none; }
.auth-card .notice { margin-bottom: 18px; }
.table-search input { padding: 0; min-height: 35px; border: 0; background: transparent; box-shadow: none; }
.item-details strong { display: block; font-size: 12px; font-weight: 600; color: var(--text); }
.item-details small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.preview-user { display: flex; align-items: center; gap: 10px; }
.preview-user strong { display: block; font-size: 12px; }
.preview-user small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.preview-user .user-avatar { width: 32px; height: 32px; }
.component-sample { font-size: 12px; line-height: 20px; color: var(--secondary); }
.table-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 1100px) { .component-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .preview-user div { display: none; } }
@media (max-width: 500px) {
  .auth-card { padding: 26px 24px; }
  .page-heading { flex-wrap: wrap; gap: 14px; }
  .page-heading p { max-width: 100%; }
  .top-search { width: auto; min-width: 0; flex: 1; }
  .top-search input { width: 100%; }
  .panel-heading { padding: 18px 16px; }
  .panel-body { padding: 18px 16px; }
  .modal-foot { flex-wrap: wrap; }
  .component-grid { gap: 16px; }
}
