:root { font-family: Inter, "Microsoft YaHei", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
* { box-sizing: border-box; letter-spacing: 0; }
body { color: #20262e; background: #f4f6f9; }
a { color: #0b67c2; text-decoration: none; }
a:hover { text-decoration: underline; }
.public-header { min-height: 64px; background: #fff; border-bottom: 1px solid #dce2e8; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1200px) / 2)); gap: 24px; }
.public-header strong { font-size: 16px; white-space: nowrap; }
.public-header nav { display: flex; align-items: center; gap: 20px; }
.public-main { max-width: 1200px; margin: 0 auto; padding: 32px 24px 72px; }
.app-header { min-height: 58px; border-bottom: 1px solid #dee2e6; }
.app-header strong { color: #20262e; white-space: nowrap; }
.admin-actions { display: flex; align-items: center; gap: 18px; }
.admin-actions form { margin: 0; }
.mobile-admin-nav { display: none; }
.app-sidebar { position: fixed; top: 0; bottom: 0; width: 250px; overflow: hidden; background: #212529 !important; }
.sidebar-brand { min-height: 58px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); display: flex; align-items: center; padding: 0 20px; }
.brand-link, .brand-link:hover { color: #fff; text-decoration: none; }
.sidebar-wrapper { height: calc(100vh - 58px); padding: 14px 10px; overflow-y: auto; }
.sidebar-menu .nav-header { color: #929aa3; font-size: 11px; font-weight: 700; padding: 16px 12px 6px; }
.sidebar-menu .nav-link { min-height: 42px; color: #d7dce1; border-radius: 6px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.sidebar-menu .nav-link:hover { color: #fff; background: #343a40; text-decoration: none; }
.sidebar-menu .nav-link p { margin: 0; }
.nav-icon { width: 24px; height: 24px; border: 1px solid #65707b; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.app-main, .app-header { margin-left: 0; }
.app-content-header { padding: 22px 24px 10px; }
.app-content-header h1 { font-size: 24px; font-weight: 650; }
.app-content { padding: 0 24px 56px; }
.heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.heading h2 { margin: 4px 0 0; font-size: 20px; }
.heading span, .subtle { color: #6c757d; font-size: 12px; }
.eyebrow { margin: 0; color: #0b67c2; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.small-box { min-height: 112px; border-radius: 7px; box-shadow: 0 2px 5px rgba(31, 45, 61, 0.09); }
.small-box .inner { padding: 18px; }
.small-box h3 { margin: 0 0 4px; font-size: 28px; }
.small-box p { margin: 0; }
.card { margin-bottom: 20px; border: 1px solid #dde2e7; border-radius: 7px; box-shadow: 0 2px 5px rgba(31, 45, 61, 0.06); scroll-margin-top: 76px; }
.card-header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; background: #fff; }
.card-title { margin: 0; font-size: 16px; font-weight: 650; }
.card-header > span { color: #6c757d; font-size: 12px; }
.card-body { padding: 18px; }
.narrow { max-width: 600px; margin: 40px auto 0; }
.narrow h1 { margin: 5px 0 24px; font-size: 26px; }
.login-box { width: min(420px, calc(100vw - 32px)); margin: 64px auto 0; }
.login-box .card-header strong { width: 100%; font-size: 20px; }
.login-box-msg { color: #6c757d; text-align: center; }
.form, .password-form, .build-form { display: grid; gap: 16px; }
.password-form { max-width: 520px; }
.build-form { grid-template-columns: minmax(260px, 620px) auto; align-items: end; margin: 20px 0; }
label { display: grid; gap: 7px; color: #343a40; font-size: 12px; font-weight: 600; }
input, select, textarea { width: auto; max-width: 100%; min-height: 40px; padding: 9px 11px; color: #20262e; background: #fff; border: 1px solid #cbd3da; border-radius: 5px; font: inherit; }
input:focus, select:focus, textarea:focus { border-color: #4c95dd; outline: 3px solid rgba(13, 110, 253, 0.14); }
.notice { border-left: 4px solid #198754; border-radius: 5px; background: #eaf7f0; padding: 12px 15px; margin: 0 0 18px; }
.notice.error { border-color: #dc3545; background: #fff0f1; }
.generated h2 { margin: 0 0 5px; font-size: 16px; }
.generated textarea { width: 100%; font-family: Consolas, monospace; }
.table-wrap { margin-top: 16px; overflow-x: auto; }
table { min-width: 760px; margin: 0 !important; }
th, td { padding: 12px !important; vertical-align: middle; }
th { color: #59636e !important; background: #f7f8fa !important; font-size: 11px; font-weight: 700; text-transform: uppercase; }
td small { display: block; color: #87919b; margin-top: 3px; }
td form { margin: 0; }
.inline-form, .row-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.search-form { margin-bottom: 4px; }
.inline-form input[type="datetime-local"] { width: 190px; }
.check { display: flex; align-items: center; gap: 6px; min-height: 40px; white-space: nowrap; }
.check input { width: 16px; min-height: 0; }
.row-form label { min-width: 150px; }
.row-form input[type="file"] { width: min(420px, 100%); }
.status-pill { display: inline-block; padding: 4px 9px; color: #17623a; background: #e8f5ed; border-radius: 999px; font-size: 12px; font-weight: 600; }
.builder-card { border-top: 3px solid #0d6efd; }
.builder-card details { margin-top: 18px; color: #59636e; }
.builder-card summary { cursor: pointer; font-weight: 600; }
.template-form { margin-top: 14px; }
.captcha { display: flex; gap: 10px; align-items: center; }
.captcha input { width: 120px; }
.captcha img { width: 128px; height: 48px; border: 1px solid #cbd3da; border-radius: 5px; }
.filename { font-size: 16px; font-weight: 700; }
dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; margin: 25px 0; }
dt { color: #66717c; }
dd { margin: 0; }
.hash { overflow-wrap: anywhere; font-family: Consolas, monospace; }
.install { max-width: 680px; }
.install ol { line-height: 1.8; padding-left: 22px; }
.install code { padding: 2px 4px; background: #edf1f4; border-radius: 3px; }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.subtle { line-height: 1.6; }
@media (max-width: 992px) {
  .app-wrapper { display: flex !important; flex-direction: column; min-height: 100vh; }
  .app-header { order: 0; }
  .app-sidebar { display: none !important; }
  .mobile-admin-nav { order: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 8px; background: #212529; }
  .mobile-admin-nav a { min-height: 38px; padding: 9px 12px; color: #e2e6ea; background: #2b3035; border-radius: 4px; text-align: center; }
  .mobile-admin-nav a:hover { color: #fff; background: #343a40; text-decoration: none; }
  .app-main { order: 2; width: 100%; }
  .app-main, .app-header { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .public-header { min-height: 58px; padding: 0 16px; }
  .public-header strong { font-size: 13px; }
  .public-header nav { gap: 10px; font-size: 12px; }
  .public-main, .app-content, .app-content-header { padding-left: 14px; padding-right: 14px; }
  .admin-actions > a { display: none; }
  .heading { align-items: start; flex-direction: column; gap: 5px; }
  .stats-grid, .build-form, .split { grid-template-columns: 1fr; }
  .card-header { align-items: start; flex-direction: column; }
  .narrow { margin: 24px auto; }
  dl { grid-template-columns: 1fr; gap: 4px; }
  dd { margin-bottom: 12px; }
}
