:root { color-scheme: light; font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; background: #f5f6f8; color: #1f2937; }
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: #f5f6f8; }
a { color: #2563eb; }
.app-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; min-height: 100vh; flex-direction: column; border-right: 1px solid #252d3a; background: #151b26; color: #dbe2ef; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 76px; padding: 0 24px; border-bottom: 1px solid #252d3a; color: #fff; font-size: 1rem; font-weight: 720; line-height: 1.35; text-decoration: none; white-space: nowrap; }
.brand-mark, .nav-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 20px; height: 20px; }
.brand-mark { width: 24px; height: 24px; color: #75a7ff; }
.brand-mark svg, .nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.side-nav { display: grid; gap: 3px; padding: 18px 12px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-left: 2px solid transparent; color: #aab6c7; font-size: .93rem; text-decoration: none; }
.side-nav a:hover { border-left-color: #6d9df5; background: #202939; color: #fff; }
.sidebar-footer { display: grid; gap: 14px; margin-top: auto; padding: 18px 24px; border-top: 1px solid #252d3a; }
.account { display: flex; align-items: center; gap: 10px; color: #e6edf7; font-size: .88rem; }
.account small { display: block; margin-top: 2px; color: #8492a5; font-size: .76rem; }
.sidebar-footer form { display: block; }
.sidebar-footer .language-switch { display: grid; gap: 7px; }
.language-switch label { color: #aab6c7; font-size: .78rem; }
.language-switch select { min-height: 34px; padding: 6px 8px; border-color: #3a4658; background: #202939; color: #e6edf7; }
.language-switch button { min-height: 32px; padding: 0 10px; font-size: .8rem; }
.logout-button { display: inline-flex; align-items: center; gap: 8px; min-height: auto; padding: 0; background: transparent; color: #aab6c7; font-weight: 500; }
.logout-button:hover { background: transparent; color: #fff; }
.page { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 38px 0 56px; }
.page-heading { display: flex; align-items: center; min-height: 48px; margin-bottom: 24px; border-bottom: 1px solid #dde2e8; }
h1 { margin: 0; color: #18212f; font-size: 1.45rem; font-weight: 700; }
h2 { margin: 0 0 14px; color: #2b3646; font-size: 1rem; }
.panel, .login-card { margin: 16px 0; padding: 22px; border: 1px solid #dde2e8; border-radius: 4px; background: #fff; box-shadow: none; }
.login-body { display: grid; place-items: center; padding: 24px; }
.login-body .page { width: min(430px, 100%); margin: 0; padding: 0; }
.login-body .page-heading { justify-content: center; margin: 0 0 16px; border: 0; }
.login-card { margin: 0; }
form { display: grid; gap: 14px; }
.settings-test-form { margin-top: 14px; }
label { display: grid; gap: 7px; color: #475569; font-size: .9rem; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #cbd2dc; border-radius: 4px; background: #fff; color: #1f2937; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #5b8def; outline: 2px solid rgba(91, 141, 239, .18); outline-offset: 0; }
button, .button { justify-self: start; min-height: 38px; padding: 0 15px; border: 1px solid #2563eb; border-radius: 4px; background: #2563eb; color: #fff; font-weight: 650; cursor: pointer; }
.button { display: inline-flex; align-items: center; text-decoration: none; }
button:hover, .button:hover { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
button:disabled { opacity: .55; cursor: not-allowed; }
.danger { border-color: #c24141; background: #c24141; }
.danger:hover { border-color: #a72d2d; background: #a72d2d; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
fieldset { display: grid; gap: 8px; border: 1px solid #d8dee7; border-radius: 4px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: 0; }
.muted, .empty { color: #6b7788; }
.flash { padding: 11px 13px; border: 1px solid #b9d0ff; border-radius: 4px; background: #eff5ff; color: #2859a9; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 8px; border-bottom: 1px solid #e3e7ed; text-align: left; vertical-align: middle; }
th { color: #667386; font-size: .8rem; font-weight: 650; }
td form { display: block; }
code { color: #405a80; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.cards li { display: grid; gap: 5px; padding: 16px; border: 1px solid #dde2e8; border-radius: 4px; background: #fff; }
.cards span, small { overflow-wrap: anywhere; color: #6b7788; }
.actions { display: flex; align-items: center; gap: 10px; }
.checks { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: #475569; }
html[dir="rtl"] .app-layout { display: flex; direction: ltr; }
html[dir="rtl"] .sidebar { order: 2; flex: 0 0 280px; border-right: 0; border-left: 1px solid #252d3a; direction: rtl; }
html[dir="rtl"] .page { order: 1; flex: 0 1 min(1180px, calc(100% - 64px)); width: min(1180px, calc(100% - 64px)); margin: 0 auto; direction: rtl; }
html[dir="rtl"] .side-nav a { border-left: 0; border-right: 2px solid transparent; }
html[dir="rtl"] .side-nav a:hover { border-right-color: #6d9df5; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
@media (max-width: 760px) {
  .app-layout { display: block; }
  .sidebar { position: static; min-height: auto; border-right: 0; }
  html[dir="rtl"] .app-layout { display: block; direction: rtl; }
  html[dir="rtl"] .sidebar { display: flex; border-left: 0; }
  html[dir="rtl"] .page { width: min(100% - 32px, 1180px); margin: 0 auto; }
  .brand { min-height: 62px; }
  .side-nav { display: flex; overflow-x: auto; padding: 9px 12px; }
  .side-nav a { flex: 0 0 auto; }
  .sidebar-footer { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 12px 18px; }
  .page { width: min(100% - 32px, 1180px); padding-top: 24px; }
  .two-columns { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
