:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --text: #202328;
  --muted: #707780;
  --line: #e4e7eb;
  --brand: #d84b43;
  --brand-soft: #fff0ef;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(27, 31, 36, .06);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 15px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { min-height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; flex-direction: column; min-width: 116px; }
.brand strong { color: var(--brand); font-size: 23px; line-height: 1.2; }
.brand span { color: var(--muted); font-size: 11px; }
.search-form { width: min(430px, 42vw); display: flex; margin-left: 12px; }
.search-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-right: 0; background: #f5f6f7; padding: 10px 15px; border-radius: 22px 0 0 22px; outline: 0; }
.search-form input:focus { border-color: var(--brand); background: #fff; }
.search-form button { border: 0; background: var(--brand); color: #fff; padding: 0 22px; border-radius: 0 22px 22px 0; font-weight: 700; }
.site-nav { margin-left: auto; display: flex; align-self: stretch; }
.site-nav a { display: grid; place-items: center; padding: 0 16px; font-weight: 650; }
.site-nav a.active { color: var(--brand); background: var(--brand-soft); }
.menu-toggle { display: none; border: 0; background: #f2f3f5; border-radius: 8px; padding: 7px 11px; font-size: 21px; }
.main-content { min-height: calc(100vh - 220px); padding-block: 22px 50px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(360px, .8fr); align-items: center; gap: 42px; min-height: 245px; margin-bottom: 20px; padding: 38px 44px; overflow: hidden; border-radius: 14px; color: #fff; background: linear-gradient(125deg, #2e333a 0%, #3c4148 58%, var(--brand) 150%); box-shadow: var(--shadow); }
.hero-eyebrow { display: inline-block; margin-bottom: 7px; color: #f2c7c4; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.hero-copy h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.25; letter-spacing: -.03em; }
.hero-copy p { max-width: 610px; margin: 12px 0 20px; color: #d8dce0; font-size: 16px; }
.hero-action { display: inline-flex; padding: 9px 18px; border-radius: 7px; background: var(--brand); color: #fff; font-weight: 700; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: rgba(255,255,255,.07); backdrop-filter: blur(8px); }
.hero-stats div { padding: 22px 12px; text-align: center; }
.hero-stats div + div { border-left: 1px solid rgba(255,255,255,.12); }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-size: 26px; line-height: 1.2; }
.hero-stats span { margin-top: 5px; color: #cdd1d5; font-size: 12px; }
.category-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.category-nav a { background: #fff; border: 1px solid var(--line); padding: 5px 15px; border-radius: 18px; color: #4b5158; }
.category-nav a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.category-nav small { margin-left: 3px; opacity: .7; }
.section-block { margin-top: 18px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-heading h1, .section-heading h2 { border-left: 4px solid var(--brand); margin: 0; padding-left: 10px; font-size: 22px; line-height: 1.1; }
.section-heading a, .section-heading span { color: var(--muted); font-size: 14px; }
.book-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.book-card { min-width: 0; }
.book-cover { aspect-ratio: 3/4; position: relative; overflow: hidden; border-radius: 8px; background: #e6e9ed; box-shadow: var(--shadow); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.book-card:hover .book-cover img { transform: scale(1.02); }
.cover-placeholder, .detail-cover > span, .result-cover > span { width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; text-align: center; color: #5a626a; background: linear-gradient(145deg,#e8edf0,#d8e0e4); font-weight: 700; }
.badge { position: absolute; top: 7px; padding: 1px 6px; border-radius: 3px; color: #fff; font-size: 10px; line-height: 1.5; }
.badge-new { left: 7px; background: var(--brand); }
.badge-format { right: 7px; background: #539ad7; }
.book-card h2 { margin: 9px 0 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.book-card p { margin: 0; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.empty-state { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 55px 20px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); font-size: 18px; }
.empty-state p { margin: 6px 0 0; }
.public-pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 28px; }
.public-pagination a, .public-pagination span { min-width: 82px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: center; }
.public-pagination span { color: #aaa; background: #f3f4f5; }
.result-list { display: grid; gap: 12px; }
.result-card { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.result-cover { width: 90px; aspect-ratio: 3/4; overflow: hidden; border-radius: 6px; background: #e6e9ed; }
.result-cover img { width: 100%; height: 100%; object-fit: cover; }
.result-card h2 { margin: 2px 0; font-size: 18px; }
.result-card h3 { margin: 2px 0; font-size: 17px; }
.result-card p { margin: 4px 0; color: #4b5158; }
.compact-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-results .result-card { grid-template-columns: 74px 1fr; }
.compact-results .result-cover { width: 74px; }
.meta { color: var(--muted) !important; font-size: 13px; }
.breadcrumb { display: flex; gap: 9px; align-items: center; padding: 11px 14px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.breadcrumb b { color: var(--text); }
.detail-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.detail-head { display: grid; grid-template-columns: 180px 1fr; gap: 22px; }
.detail-cover { width: 180px; aspect-ratio: 3/4; overflow: hidden; border-radius: 8px; background: #e6e9ed; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info h1 { margin: 0 0 4px; font-size: 26px; }
.detail-info .summary { max-width: 850px; margin: 12px 0 15px; line-height: 1.85; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0; }
.tag-row span, .tag-row a { background: var(--brand-soft); color: #bd413a; border-radius: 15px; padding: 3px 10px; font-size: 12px; }
.primary-button, .primary-link, .small-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; background: var(--brand); color: #fff; font-weight: 700; }
.primary-button { padding: 10px 24px; }
.primary-link { padding: 8px 16px; }
.small-button { padding: 6px 11px; font-size: 13px; }
.article-section { margin-top: 22px; border-top: 1px solid var(--line); }
.article-section h2 { border-left: 4px solid var(--brand); padding-left: 10px; font-size: 18px; margin-top: 18px; }
.book-content p { max-width: 900px; line-height: 1.95; color: #3e444b; white-space: pre-line; }
.download-dialog { width: min(520px, calc(100% - 32px)); border: 0; border-radius: 12px; padding: 0; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.download-dialog::backdrop { background: rgba(20,24,28,.55); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.dialog-head button { border: 0; background: transparent; font-size: 24px; color: var(--muted); }
.download-item { display: grid; gap: 8px; margin: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; }
.download-item a { color: var(--brand); font-weight: 700; }
.mobile-download { display: none; }
.site-footer { background: #24282d; color: #b8bec5; }
.footer-row { min-height: 120px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.footer-row strong { color: #fff; font-size: 18px; }
.footer-row p { margin: 4px 0; }
.admin-body { background: #f3f4f6; }
.admin-header { height: 58px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-header form { display: flex; align-items: center; gap: 12px; }
.admin-header button { border: 0; background: transparent; color: var(--brand); }
.admin-shell { min-height: calc(100vh - 58px); display: grid; grid-template-columns: 190px 1fr; }
.admin-sidebar { padding: 18px 12px; background: #282c31; }
.admin-sidebar a { display: block; padding: 10px 13px; margin-bottom: 4px; border-radius: 6px; color: #d7dbe0; }
.admin-sidebar a:hover { background: #373c42; color: #fff; }
.admin-main { min-width: 0; padding: 24px; }
.admin-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-title h1 { margin: 0; font-size: 24px; }
.admin-title p { margin: 3px 0 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats-grid > * { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.stats-grid span { color: var(--muted); }
.stats-grid strong { display: block; margin-top: 5px; font-size: 28px; }
.stats-grid a:hover { border-color: #e7a3a0; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.admin-panel { margin-top: 18px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.admin-panel h2 { margin-top: 0; }
.admin-actions, .admin-title-actions, .row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.secondary-link { display: inline-flex; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.form-panel { max-width: 760px; }
.form-panel label, .login-card label { display: grid; gap: 6px; margin-bottom: 15px; font-weight: 650; }
.form-panel input, .form-panel textarea, .form-panel select, .login-card input, .admin-filter input, .admin-filter select { width: 100%; border: 1px solid #cfd4da; border-radius: 7px; padding: 10px 12px; outline: 0; background: #fff; }
.form-panel textarea { resize: vertical; line-height: 1.65; }
.form-panel input:focus, .form-panel textarea:focus, .form-panel select:focus, .login-card input:focus { border-color: var(--brand); }
.form-panel p { color: var(--muted); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.api-secret { display: grid; gap: 7px; margin-bottom: 18px; padding: 16px; border: 1px solid #b7dfc1; border-radius: 9px; background: #eef9f1; }
.api-secret code { overflow-wrap: anywhere; padding: 10px 12px; border-radius: 6px; background: #fff; color: #1f5f32; font-size: 14px; }
.api-secret small { color: #487755; }
.admin-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { background: #fafafa; color: var(--muted); font-size: 13px; }
.admin-table small { display: block; color: var(--muted); max-width: 460px; }
.admin-filter { display: grid; grid-template-columns: minmax(220px, 1fr) 150px auto auto; align-items: center; gap: 10px; margin-bottom: 16px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.bulk-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bulk-toolbar span { color: var(--muted); }
.bulk-toolbar select { border: 1px solid #cfd4da; border-radius: 7px; padding: 7px 10px; background: #fff; }
.row-actions form { margin: 0; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--brand); }
.status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-badge.published { background: #eaf7ed; color: #24713a; }
.status-badge.review { background: #fff4dc; color: #94610b; }
.admin-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 18px; }
.admin-pagination span { color: #a2a7ad; }
.book-edit-form { max-width: 960px; }
.settings-form { max-width: 960px; }
.settings-form small { color: var(--muted); font-weight: 400; }
.brand-preview { max-width: 220px; max-height: 70px; object-fit: contain; object-position: left center; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.favicon-preview { width: 48px; height: 48px; object-fit: contain; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.brand img { width: auto; height: 42px; object-fit: contain; object-position: left center; }
.status-panel { max-width: 960px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 16px 20px; border: 1px solid #efd4d2; border-radius: 9px; background: #fff; }
.danger-button { border: 1px solid #d75953; border-radius: 7px; padding: 9px 16px; background: #fff; color: #b33c37; font-weight: 700; }
.alert { padding: 11px 14px; border-radius: 7px; }
.alert.error { background: #fff0ef; color: #aa3933; }
.alert.success { background: #eef9f1; color: #287a41; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(390px, 100%); padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.login-card > div:first-child { display: flex; flex-direction: column; margin-bottom: 20px; }
.login-card > div strong { color: var(--brand); font-size: 25px; }
.login-card > div span { color: var(--muted); }
.login-card .primary-button { width: 100%; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: 1fr; gap: 22px; }
  .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .site-nav a { padding-inline: 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .container { width: min(100% - 20px, 1180px); }
  .header-row { flex-wrap: wrap; gap: 10px; padding: 9px 0; }
  .brand { order: 1; }
  .menu-toggle { display: block; order: 2; margin-left: auto; }
  .search-form { order: 4; width: 100%; margin: 0; }
  .site-nav { display: none; order: 3; width: 100%; height: auto; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 8px 12px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .home-hero { min-height: 0; padding: 25px 20px; border-radius: 10px; }
  .hero-copy h1 { font-size: 27px; }
  .hero-copy p { font-size: 14px; }
  .hero-stats div { padding: 15px 5px; }
  .hero-stats strong { font-size: 20px; }
  .section-heading h1, .section-heading h2 { font-size: 19px; }
  .compact-results { grid-template-columns: 1fr; }
  .result-card { grid-template-columns: 74px 1fr; gap: 12px; padding: 10px; }
  .result-cover { width: 74px; }
  .result-card h2 { font-size: 16px; }
  .result-card p:not(.meta) { display: none; }
  .detail-card { padding: 12px; }
  .detail-head { grid-template-columns: 92px 1fr; gap: 12px; }
  .detail-cover { width: 92px; }
  .detail-info h1 { font-size: 19px; }
  .detail-info .meta { line-height: 1.8; }
  .detail-info .summary { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
  .detail-info > .primary-button { display: none; }
  .mobile-download { display: block; position: sticky; bottom: 8px; margin-top: 14px; padding: 8px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 10px; }
  .mobile-download button { width: 100%; }
  .footer-row { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 22px; gap: 10px; }
  .admin-header { padding-inline: 12px; }
  .admin-shell { display: block; }
  .admin-sidebar { display: flex; overflow-x: auto; padding: 8px; }
  .admin-sidebar a { white-space: nowrap; margin: 0; }
  .admin-main { padding: 15px 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .form-columns { grid-template-columns: 1fr; gap: 0; }
  .admin-filter { grid-template-columns: 1fr; }
  .bulk-toolbar { align-items: stretch; flex-direction: column; }
  .status-panel { align-items: flex-start; flex-direction: column; }
}

/* Modern public frontend */
:root {
  --bg: #f7f7f5;
  --surface: #fff;
  --text: #15171a;
  --muted: #73777f;
  --line: #e8e8e4;
  --brand: #df554b;
  --brand-soft: #fff0ee;
  --radius: 18px;
  --shadow: 0 22px 55px rgba(25, 28, 33, .08);
}
body:not(.admin-body) { color: var(--text); background: var(--bg); font-family: Inter, ui-sans-serif, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; letter-spacing: -.012em; }
body:not(.admin-body) .container { width: min(1240px, calc(100% - 48px)); }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(24,27,31,.07); background: rgba(255,255,255,.88); backdrop-filter: blur(18px); }
.header-row { min-height: 82px; gap: 36px; }
.brand { min-width: 184px; flex-direction: row; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--text); color: #fff; font-family: Georgia, serif; font-size: 21px; font-weight: 700; box-shadow: 0 8px 20px rgba(20,22,25,.15); }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { color: var(--text); font-size: 19px; letter-spacing: .02em; }
.brand-copy small { margin-top: 1px; color: #9a9da3; font-size: 8px; font-weight: 750; letter-spacing: .18em; }
.brand img { max-width: 180px; height: 44px; }
.search-form { width: min(360px, 34vw); margin-left: auto; overflow: hidden; border: 1px solid transparent; border-radius: 13px; background: #f2f3f3; transition: .2s ease; }
.search-form:focus-within { border-color: #d8d9d7; background: #fff; box-shadow: 0 0 0 4px rgba(20,22,25,.04); }
.search-form input { border: 0; border-radius: 0; padding: 11px 4px 11px 15px; background: transparent; }
.search-form input:focus { border: 0; background: transparent; }
.search-form button { display: grid; width: 46px; padding: 0; place-items: center; border-radius: 0; background: transparent; color: var(--text); }
.search-form svg, .hero-search svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.site-nav { margin-left: 0; align-self: center; gap: 5px; }
.site-nav a { min-height: 42px; padding: 0 14px; border-radius: 10px; color: #555a61; font-size: 14px; font-weight: 600; }
.site-nav a.active, .site-nav a:hover { color: var(--text); background: #f1f1ef; }
.menu-toggle { width: 42px; height: 42px; place-items: center; gap: 5px; }
.menu-toggle span { display: block; width: 18px; height: 1.5px; background: var(--text); }
.main-content { min-height: calc(100vh - 250px); padding-block: 36px 88px; }
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); min-height: 500px; align-items: center; gap: 55px; margin: 0 0 24px; padding: 64px 70px; overflow: hidden; border: 1px solid #e9e8e2; border-radius: 32px; color: var(--text); background: linear-gradient(135deg,#fff 0%,#faf9f5 55%,#f2efea 100%); box-shadow: 0 20px 70px rgba(33,36,40,.06); }
.home-hero::before { position: absolute; inset: auto auto -160px -90px; width: 360px; height: 360px; border: 1px solid #e6e1d9; border-radius: 50%; content: ""; }
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: #73767b; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.hero-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.hero-copy h1 { margin: 0; color: #111316; font-size: clamp(44px, 5vw, 68px); font-weight: 750; line-height: 1.12; letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--brand); font-style: normal; }
.hero-copy > p { max-width: 610px; margin: 22px 0 28px; color: #62666d; font-size: 17px; line-height: 1.9; }
.hero-search { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 12px; max-width: 620px; padding: 8px 9px 8px 17px; border: 1px solid #deded9; border-radius: 16px; background: #fff; box-shadow: 0 12px 35px rgba(24,27,31,.08); }
.hero-search svg { color: #8b8e94; }
.hero-search input { min-width: 0; padding: 9px 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 15px; }
.hero-search button { padding: 11px 18px; border: 0; border-radius: 11px; background: var(--text); color: #fff; font-size: 13px; font-weight: 700; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; color: #8b8e94; font-size: 12px; }
.hero-facts span + span { position: relative; }
.hero-facts span + span::before { position: absolute; left: -12px; color: #c4c5c4; content: "/"; }
.hero-facts strong { color: var(--text); font-size: 13px; }
.hero-art { position: relative; min-height: 350px; }
.art-orbit { position: absolute; inset: 4% -8% auto auto; width: 330px; height: 330px; border: 1px solid #dbd8d0; border-radius: 50%; }
.art-orbit::after { position: absolute; inset: 42px; border: 1px dashed #d8d5cd; border-radius: inherit; content: ""; }
.art-book { position: absolute; display: flex; width: 180px; height: 248px; flex-direction: column; justify-content: space-between; padding: 23px; border-radius: 5px 13px 13px 5px; box-shadow: -8px 13px 30px rgba(27,30,34,.15); }
.art-book::before { position: absolute; inset: 0 auto 0 8px; width: 1px; background: rgba(255,255,255,.28); content: ""; }
.art-book i, .art-book small { font-size: 9px; font-style: normal; font-weight: 750; letter-spacing: .16em; }
.art-book b { font-size: 25px; line-height: 1.35; }
.art-book-one { z-index: 2; top: 70px; left: 28px; transform: rotate(-9deg); background: #1e2226; color: #fff; }
.art-book-two { z-index: 3; top: 30px; left: 160px; transform: rotate(7deg); background: var(--brand); color: #fff; }
.art-book-three { z-index: 1; top: 115px; left: 250px; width: 130px; height: 210px; transform: rotate(14deg); background: #e9e4d9; color: #34373b; }
.category-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 44px; padding: 14px 4px; }
.category-nav > span { margin-right: 9px; color: #96999e; font-size: 12px; font-weight: 650; }
.category-nav a { padding: 7px 14px; border: 1px solid #e1e1dd; border-radius: 999px; background: transparent; color: #555960; font-size: 13px; transition: .18s ease; }
.category-nav a:hover { border-color: #bfc0bd; background: #fff; }
.category-nav a.active { border-color: var(--text); background: var(--text); color: #fff; }
.category-nav small { color: inherit; opacity: .56; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 42px; }
.section-block { margin-top: 0; }
.section-heading { min-height: 64px; align-items: flex-end; margin-bottom: 22px; }
.section-heading > div { display: grid; gap: 4px; }
.section-heading h1, .section-heading h2 { margin: 0; padding: 0; border: 0; color: var(--text); font-size: 30px; font-weight: 740; line-height: 1.2; letter-spacing: -.035em; }
.section-heading > span { padding-bottom: 4px; color: #96999e; font-size: 12px; }
.section-kicker { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.story-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.story-card { position: relative; display: grid; grid-template-columns: 96px minmax(0,1fr) 20px; gap: 18px; min-height: 190px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.story-card:hover { transform: translateY(-3px); border-color: #d8d7d2; box-shadow: 0 18px 44px rgba(27,30,34,.08); }
.story-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #f2f1ed; color: #4e5258; }
.story-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.story-cover { width: 96px; aspect-ratio: 3/4; align-self: start; overflow: hidden; border-radius: 7px 11px 11px 7px; background: #ecece8; box-shadow: 0 10px 24px rgba(28,31,35,.13); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; }
.story-cover > span { display: flex; width: 100%; height: 100%; flex-direction: column; justify-content: space-between; padding: 12px 10px; background: linear-gradient(145deg,#25282d,#4a4f55); color: #fff; }
.story-cover i { font-family: Georgia,serif; font-size: 13px; font-style: normal; }
.story-cover b { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.story-copy { min-width: 0; }
.story-category { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.story-copy h2, .story-copy h3 { margin: 8px 0 9px; overflow: hidden; color: #1b1d20; font-size: 19px; font-weight: 720; line-height: 1.42; text-overflow: ellipsis; white-space: nowrap; }
.story-copy p { display: -webkit-box; min-height: 46px; margin: 0; overflow: hidden; color: #777b82; font-size: 13px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.story-copy footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; color: #a0a2a6; font-size: 11px; }
.story-arrow { color: #b6b8bb; font-size: 18px; transition: .2s ease; }
.story-card:hover .story-arrow { color: var(--brand); transform: translate(2px,-2px); }
.popular-panel { position: sticky; top: 106px; padding: 27px; border: 1px solid var(--line); border-radius: 23px; background: #fff; }
.popular-panel .section-heading { min-height: 0; margin-bottom: 10px; }
.popular-panel .section-heading h2 { font-size: 25px; }
.ranking-list { margin: 0; padding: 0; counter-reset: ranking; list-style: none; }
.ranking-list li { counter-increment: ranking; border-bottom: 1px solid #efefec; }
.ranking-list li::before { display: inline-block; width: 28px; color: #b4b5b6; font-family: Georgia,serif; font-size: 18px; content: "0" counter(ranking); vertical-align: top; transform: translateY(18px); }
.ranking-list li:nth-child(-n+3)::before { color: var(--brand); }
.ranking-list a { display: inline-flex; width: calc(100% - 32px); align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0; }
.ranking-list a > span { display: grid; min-width: 0; gap: 3px; }
.ranking-list b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list small { overflow: hidden; color: #96999e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list i { color: #b6b8bb; font-style: normal; }
.ranking-more { display: flex; justify-content: space-between; margin-top: 18px; padding: 12px 15px; border-radius: 11px; background: #f3f3f0; color: #45494f; font-size: 12px; font-weight: 700; }
.listing-hero { margin-bottom: 26px; padding: 50px 54px; border: 1px solid var(--line); border-radius: 27px; background: #fff; }
.listing-hero h1 { margin: 7px 0 8px; font-size: clamp(38px,5vw,56px); line-height: 1.15; letter-spacing: -.055em; }
.listing-hero p { margin: 0; color: var(--muted); }
.category-nav-page { margin-bottom: 28px; padding-inline: 2px; }
.listing-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.listing-search { display: flex; max-width: 650px; margin-top: 24px; padding: 7px; border: 1px solid #deded9; border-radius: 14px; background: #fafaf8; }
.listing-search input { min-width: 0; flex: 1; padding: 10px 12px; border: 0; outline: 0; background: transparent; }
.listing-search button { padding: 9px 21px; border: 0; border-radius: 9px; background: var(--text); color: #fff; font-weight: 700; }
.breadcrumb { gap: 10px; margin-bottom: 16px; padding: 4px 1px; border: 0; background: transparent; color: #989ba0; font-size: 12px; }
.breadcrumb b { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.public-pagination { gap: 12px; margin-top: 36px; }
.public-pagination a, .public-pagination span { min-width: 108px; padding: 9px 15px; border-color: var(--line); border-radius: 12px; }
.public-pagination b { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--text); color: #fff; font-size: 13px; }
.empty-state { border-color: var(--line); border-radius: 22px; background: #fff; }
.book-page { display: grid; gap: 30px; }
.detail-hero { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 54px; padding: 55px 62px; border: 1px solid var(--line); border-radius: 28px; background: #fff; }
.detail-cover { position: relative; width: 220px; aspect-ratio: 3/4; border-radius: 8px 16px 16px 8px; background: #efefeb; box-shadow: -9px 16px 35px rgba(26,29,33,.16); }
.detail-cover::after { position: absolute; inset: 0 auto 0 8px; width: 1px; background: rgba(255,255,255,.55); content: ""; }
.detail-info { align-self: center; }
.detail-info h1 { max-width: 800px; margin: 10px 0 8px; font-size: clamp(36px,4.6vw,58px); line-height: 1.18; letter-spacing: -.055em; }
.detail-author { margin: 0; color: #8b8e94; font-size: 14px; }
.detail-author a { color: var(--text); font-weight: 700; }
.detail-info .summary { max-width: 780px; margin: 24px 0 27px; color: #5e6269; font-size: 15px; line-height: 1.95; }
.detail-actions { display: flex; align-items: center; gap: 20px; }
.detail-actions > span { color: #989ba0; font-size: 12px; }
.primary-button { gap: 14px; padding: 12px 20px; border-radius: 12px; background: var(--text); font-size: 13px; }
.primary-button:hover { background: var(--brand); }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; align-items: start; gap: 30px; }
.detail-article, .book-meta-panel { border: 1px solid var(--line); border-radius: 24px; background: #fff; }
.detail-article { padding: 40px 46px; }
.article-section { margin: 0; border: 0; }
.article-section h2 { margin: 6px 0 22px; padding: 0; border: 0; font-size: 29px; letter-spacing: -.035em; }
.book-content p { max-width: 760px; margin: 0; color: #4d5157; font-size: 15px; line-height: 2.05; }
.book-meta-panel { position: sticky; top: 106px; padding: 29px; }
.book-meta-panel h2 { margin: 5px 0 18px; font-size: 23px; }
.book-meta-panel dl { margin: 0; }
.book-meta-panel dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #eeeeeb; font-size: 13px; }
.book-meta-panel dt { color: #999ca1; }
.book-meta-panel dd { margin: 0; text-align: right; }
.tag-row { gap: 6px; margin-top: 20px; }
.tag-row span, .tag-row a { padding: 4px 10px; background: #f3f3f0; color: #64686e; }
.download-dialog { width: min(560px,calc(100% - 32px)); border-radius: 22px; }
.download-dialog::backdrop { background: rgba(15,17,20,.6); backdrop-filter: blur(5px); }
.dialog-head { padding: 21px 23px; }
.dialog-head > div { display: grid; }
.dialog-head small { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.dialog-head strong { font-size: 20px; }
.download-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 14px 20px; padding: 17px; border-color: var(--line); border-radius: 13px; }
.download-item > div { display: grid; }
.download-item span { color: var(--muted); font-size: 12px; }
.download-item a { padding: 9px 13px; border-radius: 9px; background: var(--text); color: #fff; font-size: 12px; }
.dialog-empty { padding: 12px 22px 25px; color: var(--muted); }
.site-footer { border-top: 1px solid #e4e4df; background: #efefeb; color: #64676c; }
.footer-row { display: grid; grid-template-columns: 1fr auto 1.2fr; min-height: 180px; gap: 55px; }
.footer-brand strong { color: var(--text); font-size: 21px; }
.footer-brand p, .footer-note { margin: 5px 0; font-size: 12px; }
.footer-links { display: flex; gap: 22px; font-size: 12px; }
.footer-links a:hover { color: var(--brand); }
.footer-note { text-align: right; }

@media (max-width: 980px) {
  .home-hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { display: none; }
  .home-layout { grid-template-columns: 1fr; }
  .popular-panel, .book-meta-panel { position: static; }
  .detail-layout { grid-template-columns: 1fr; }
  .footer-row { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 700px) {
  body:not(.admin-body) .container { width: min(100% - 28px,1240px); }
  .header-row { min-height: 70px; padding-block: 8px; }
  .brand { min-width: 0; }
  .brand-copy small { display: none; }
  .menu-toggle { display: grid; margin-left: auto; }
  .search-form { order: 4; width: 100%; margin: 0; }
  .site-nav { order: 3; width: 100%; }
  .site-nav.open { display: flex; }
  .main-content { padding-block: 20px 55px; }
  .home-hero { padding: 40px 24px 34px; border-radius: 23px; }
  .hero-copy h1 { font-size: 40px; }
  .hero-copy > p { margin-block: 17px 22px; font-size: 14px; }
  .hero-search { grid-template-columns: 20px minmax(0,1fr); }
  .hero-search button { grid-column: 1 / -1; }
  .hero-facts { gap: 17px; }
  .category-nav { flex-wrap: nowrap; margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
  .category-nav > * { flex: 0 0 auto; }
  .section-heading { min-height: 52px; }
  .section-heading h1, .section-heading h2 { font-size: 26px; }
  .story-grid, .listing-grid { grid-template-columns: 1fr; }
  .story-card { grid-template-columns: 76px minmax(0,1fr) 16px; min-height: 150px; gap: 13px; padding: 14px; }
  .story-cover { width: 76px; }
  .popular-panel { padding: 22px; }
  .listing-hero { padding: 36px 25px; border-radius: 22px; }
  .listing-hero h1 { font-size: 38px; }
  .detail-hero { grid-template-columns: 92px minmax(0,1fr); gap: 20px; padding: 27px 22px; border-radius: 22px; }
  .detail-cover { width: 92px; border-radius: 5px 10px 10px 5px; }
  .detail-info h1 { margin-top: 6px; font-size: 27px; }
  .detail-info .summary { display: -webkit-box; margin: 13px 0 0; overflow: hidden; font-size: 13px; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
  .detail-actions { display: none; }
  .detail-article { padding: 27px 23px; }
  .article-section h2 { font-size: 25px; }
  .book-content p { font-size: 14px; }
  .mobile-download { bottom: 10px; z-index: 10; padding: 7px; border-radius: 14px; }
  .mobile-download button { width: 100%; }
  .footer-row { grid-template-columns: 1fr; gap: 20px; padding-block: 35px; }
  .footer-links { flex-wrap: wrap; }
  .footer-note { grid-column: auto; }
}

/* Modern administration */
.admin-body { background: #f5f6f7; color: #191b1f; font-family: Inter, ui-sans-serif, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; letter-spacing: -.01em; }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0,1fr); min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 24px 16px 18px; overflow: hidden; background: #17191c; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 27px; color: #fff; }
.admin-brand > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--brand); font-family: Georgia,serif; font-size: 19px; font-weight: 700; }
.admin-brand > div { display: grid; }
.admin-brand strong { font-size: 17px; letter-spacing: .02em; }
.admin-brand small { color: #777d84; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.admin-nav { min-height: 0; overflow-y: auto; }
.admin-nav > small { display: block; margin: 21px 12px 8px; color: #666c73; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.admin-nav > small:first-child { margin-top: 0; }
.admin-nav a, .admin-sidebar-bottom > a { display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 10px 12px; border-radius: 10px; color: #aeb3b9; font-size: 13px; font-weight: 600; transition: .18s ease; }
.admin-nav a:hover, .admin-nav a.active, .admin-sidebar-bottom > a:hover { background: #25282d; color: #fff; }
.admin-nav a.active { box-shadow: inset 2px 0 var(--brand); }
.admin-nav svg, .admin-sidebar-bottom svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.admin-sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid #292c31; }
.admin-sidebar-bottom form { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 10px 9px; border-radius: 11px; background: #202328; }
.admin-avatar { display: grid; width: 30px; height: 30px; place-items: center; overflow: hidden; border-radius: 9px; background: #31353b; color: #d5d8dc; font-size: 10px; text-transform: uppercase; }
.admin-sidebar-bottom form button { flex: 1; border: 0; background: transparent; color: #8e949b; font-size: 11px; text-align: left; }
.admin-workspace { min-width: 0; }
.admin-header { display: flex; height: 78px; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid #e8e9e9; background: rgba(255,255,255,.87); backdrop-filter: blur(15px); }
.admin-header > div:first-child { display: grid; }
.admin-header small { color: #a0a4aa; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.admin-header strong { font-size: 14px; }
.admin-header-status { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #e6e8e7; border-radius: 999px; color: #70757b; font-size: 11px; }
.admin-header-status i { width: 7px; height: 7px; border-radius: 50%; background: #45a96a; box-shadow: 0 0 0 4px #e8f6ed; }
.admin-main { width: 100%; max-width: 1580px; margin: 0 auto; padding: 38px 42px 70px; }
.admin-title, .dashboard-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.admin-title h1, .dashboard-welcome h1 { margin: 4px 0 2px; color: #17191c; font-size: 31px; line-height: 1.2; letter-spacing: -.04em; }
.admin-title p, .dashboard-welcome p { margin: 6px 0 0; color: #858a91; font-size: 13px; }
.admin-kicker { color: var(--brand); font-size: 9px; font-weight: 850; letter-spacing: .18em; }
.admin-title-actions, .admin-actions, .row-actions { gap: 9px; }
.primary-link, .admin-body .primary-button, .admin-body .small-button { border: 0; border-radius: 10px; background: #1c1e22; color: #fff; font-size: 12px; font-weight: 700; box-shadow: none; }
.primary-link { padding: 10px 15px; }
.admin-body .primary-button { padding: 10px 18px; }
.admin-body .small-button { padding: 7px 10px; }
.primary-link:hover, .admin-body .primary-button:hover, .admin-body .small-button:hover { background: var(--brand); }
.secondary-link { display: inline-flex; align-items: center; justify-content: center; padding: 9px 13px; border: 1px solid #dedfe0; border-radius: 10px; background: #fff; color: #4e5359; font-size: 12px; font-weight: 650; }
.secondary-link:hover { border-color: #c7c9ca; background: #fafafa; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stats-grid > a { position: relative; display: grid; grid-template-columns: 48px 1fr auto; align-items: start; gap: 14px; min-height: 156px; padding: 21px; overflow: hidden; border: 1px solid #e6e7e7; border-radius: 17px; background: #fff; transition: .2s ease; }
.stats-grid > a:hover { transform: translateY(-2px); border-color: #d6d7d8; box-shadow: 0 16px 38px rgba(25,28,32,.07); }
.stat-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; font-size: 16px; font-weight: 800; }
.stat-dark { background: #ededeb; color: #24272b; }
.stat-green { background: #e9f6ed; color: #328452; }
.stat-amber { background: #fff3dd; color: #af741a; }
.stat-blue { background: #eaf1ff; color: #426ebb; }
.stats-grid > a div { min-width: 0; }
.stats-grid small { color: #858a90; font-size: 11px; font-weight: 650; }
.stats-grid strong { display: block; margin: 4px 0 0; font-size: 32px; line-height: 1.15; letter-spacing: -.04em; }
.stats-grid p { margin: 8px 0 0; color: #aaadb1; font-size: 10px; }
.stats-grid > a > i { color: #b3b6b9; font-size: 15px; font-style: normal; }
.dashboard-panels { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.7fr); align-items: start; gap: 16px; margin-top: 17px; }
.admin-panel { margin-top: 18px; padding: 27px; border: 1px solid #e6e7e7; border-radius: 17px; background: #fff; box-shadow: none; }
.dashboard-panels .admin-panel { margin: 0; }
.panel-heading { display: flex; justify-content: space-between; margin-bottom: 16px; }
.admin-panel h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.025em; }
.quick-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.quick-grid a { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 18px; border: 1px solid #ececeb; border-radius: 13px; background: #fafaf9; transition: .18s ease; }
.quick-grid a:hover { border-color: #d8d9d8; background: #fff; box-shadow: 0 10px 24px rgba(22,25,29,.05); }
.quick-grid a > span { color: var(--brand); font-family: Georgia,serif; font-size: 15px; }
.quick-grid a > div { display: grid; gap: 3px; }
.quick-grid strong { font-size: 13px; }
.quick-grid small { color: #95999f; font-size: 10px; }
.quick-grid i { color: #a8acb0; font-style: normal; }
.system-score { display: flex; align-items: baseline; gap: 8px; margin: 22px 0; }
.system-score strong { font-size: 48px; line-height: 1; letter-spacing: -.06em; }
.system-score strong::after { color: #47a76b; font-size: 14px; content: "%"; }
.system-score span { color: #999da2; font-size: 11px; }
.system-panel ul { margin: 0; padding: 0; list-style: none; }
.system-panel li { display: flex; justify-content: space-between; padding: 11px 0; border-top: 1px solid #eeeeed; font-size: 11px; }
.system-panel li span { display: flex; align-items: center; gap: 8px; color: #73787e; }
.system-panel li i { width: 6px; height: 6px; border-radius: 50%; background: #4cac6d; }
.system-panel li b { color: #42464c; }
.admin-filter { grid-template-columns: minmax(260px,1fr) 170px auto auto; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid #e4e5e5; border-radius: 14px; background: #fff; }
.admin-filter input, .admin-filter select { min-height: 41px; border-color: #e0e1e2; border-radius: 9px; background: #f8f8f7; }
.bulk-toolbar { margin-bottom: 12px; padding: 11px 14px; border-color: #e4e5e5; border-radius: 12px; }
.admin-table-wrap { overflow: hidden; border: 1px solid #e4e5e5; border-radius: 15px; background: #fff; }
.admin-table { border-collapse: separate; border-spacing: 0; }
.admin-table th, .admin-table td { padding: 15px 17px; border-bottom-color: #eeeeed; }
.admin-table th { background: #fafaf9; color: #8b9096; font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.admin-table td { color: #4b5056; font-size: 12px; }
.admin-table td strong { color: #24272b; font-size: 13px; }
.admin-table small { margin-top: 3px; color: #a0a4a9; font-size: 10px; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover td { background: #fcfcfb; }
.status-badge { padding: 4px 8px; font-size: 10px; }
.row-actions { gap: 10px; }
.row-actions a:not(.small-button), .text-button { color: #747980; font-size: 11px; }
.text-button { color: var(--brand); }
.admin-pagination { gap: 12px; padding: 22px; }
.admin-pagination a, .admin-pagination span { padding: 7px 11px; border-radius: 8px; color: #63686e; font-size: 11px; }
.admin-pagination b { padding: 7px 11px; border-radius: 8px; background: #222428; color: #fff; font-size: 11px; }
.form-panel { max-width: 900px; }
.book-edit-form, .settings-form { max-width: 1100px; }
.form-panel h2 { margin: 34px 0 18px; padding-top: 25px; border-top: 1px solid #ececeb; font-size: 19px; }
.form-panel h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-panel label, .login-card label { gap: 7px; margin-bottom: 17px; color: #51565c; font-size: 12px; font-weight: 700; }
.form-panel input, .form-panel textarea, .form-panel select, .login-card input { border-color: #dcddde; border-radius: 10px; padding: 11px 12px; background: #fbfbfa; color: #25282c; }
.form-panel input:focus, .form-panel textarea:focus, .form-panel select:focus, .login-card input:focus { border-color: #aeb1b4; background: #fff; box-shadow: 0 0 0 4px #f1f1ef; }
.form-panel textarea { line-height: 1.8; }
.form-columns { gap: 15px; }
.form-panel p, .settings-form small { color: #92969c; font-size: 11px; }
.brand-preview { border-radius: 10px; }
.status-panel { max-width: 1100px; padding: 18px 21px; border-color: #eadcda; border-radius: 14px; }
.danger-button { border-radius: 10px; font-size: 12px; }
.alert { border-radius: 11px; font-size: 12px; }
.api-secret { border-radius: 14px; }
.login-page { min-height: 100vh; padding: 0; background: #f3f3f0; }
.login-shell { display: grid; width: 100%; min-height: 100vh; grid-template-columns: minmax(380px,.9fr) minmax(500px,1.1fr); }
.login-brand-panel { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: 45px 58px; overflow: hidden; background: #181a1e; color: #fff; }
.login-brand-panel::before { position: absolute; right: -170px; bottom: -180px; width: 520px; height: 520px; border: 1px solid #393c42; border-radius: 50%; content: ""; }
.login-brand-panel::after { position: absolute; right: -85px; bottom: -90px; width: 350px; height: 350px; border: 1px dashed #45484e; border-radius: 50%; content: ""; }
.login-brand-panel > a { display: flex; align-items: center; gap: 11px; }
.login-brand-panel > a span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--brand); font-family: Georgia,serif; }
.login-brand-panel > a strong { font-size: 18px; }
.login-brand-panel > div { position: relative; z-index: 2; }
.login-brand-panel small { color: #868c94; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.login-brand-panel h1 { margin: 15px 0; font-size: clamp(38px,5vw,62px); line-height: 1.16; letter-spacing: -.06em; }
.login-brand-panel p { color: #9da2aa; font-size: 14px; }
.login-brand-panel footer { display: flex; align-items: center; gap: 8px; color: #6f757d; font-size: 10px; letter-spacing: .08em; }
.login-brand-panel footer i { width: 7px; height: 7px; border-radius: 50%; background: #49a96b; }
.login-form-panel { display: grid; place-items: center; padding: 45px; background: #f6f6f3; }
.login-card { width: min(430px,100%); padding: 42px; border: 1px solid #e1e2e0; border-radius: 22px; box-shadow: 0 22px 60px rgba(25,28,32,.08); }
.login-card > div:first-child { margin-bottom: 29px; }
.login-title > span { color: var(--brand); font-size: 9px; font-weight: 850; letter-spacing: .18em; }
.login-title h2 { margin: 6px 0 5px; font-size: 29px; letter-spacing: -.04em; }
.login-title p { margin: 0; color: #92969c; font-size: 12px; }
.login-card label > span { font-size: 11px; }
.login-card input { min-height: 46px; }
.login-card .primary-button { width: 100%; min-height: 46px; justify-content: space-between; margin-top: 5px; }
.login-help { display: block; margin-top: 17px; color: #a2a6ab; font-size: 10px; text-align: center; }
.plugin-install-panel { max-width: none; margin-bottom: 18px; }
.inline-upload-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 16px; }
.inline-upload-form label { margin: 0; }
.form-help { margin: 10px 0 0; }
.plugin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.plugin-card { position: relative; padding: 24px; }
.plugin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 19px; border-bottom: 1px solid #ececeb; }
.plugin-card-head h2 { margin: 5px 0 4px; font-size: 21px; }
.plugin-card-head p { margin: 0; color: #8a8f95; font-size: 11px; }
.plugin-id { color: var(--brand); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.version-badge { padding: 5px 8px; border-radius: 7px; background: #f1f1ef; color: #6f747a; font: 10px ui-monospace,SFMono-Regular,Menlo,monospace; }
.plugin-config-form { margin-top: 19px; }
.plugin-config-form label { display: grid; gap: 7px; margin-bottom: 14px; color: #51565c; font-size: 11px; font-weight: 750; }
.plugin-config-form input:not([type=checkbox]) { width: 100%; padding: 10px 11px; border: 1px solid #dcddde; border-radius: 9px; background: #fbfbfa; }
.switch-line { display: flex!important; align-items: center; gap: 9px!important; }
.switch-line input { width: 16px!important; height: 16px; }
.tall-switch { min-height: 65px; padding-top: 20px; }
.plugin-test-form { position: absolute; right: 24px; bottom: 24px; }
.plugin-test-result { display: grid; gap: 2px; margin: 15px 0 0; padding: 11px 12px; border-radius: 9px; font-size: 11px; }
.plugin-test-result.ok { background: #edf8f1; color: #3d7952; }
.plugin-test-result.failed { background: #fff0ee; color: #a64d45; }
.plugin-test-result span,.plugin-test-result small { opacity: .8; }
.empty-state { grid-column: 1/-1; padding: 45px; text-align: center; }
.empty-state h2 { margin: 0 0 6px; }
.table-panel { margin-top: 18px; padding: 0; overflow: hidden; }
.table-panel .panel-heading { padding: 22px 24px 16px; }
.table-scroll { overflow-x: auto; }
.table-panel .admin-table { margin: 0; }
.admin-table td strong { display: block; }
.admin-table td small { display: block; margin-top: 3px; color: #969aa0; white-space: nowrap; }
.admin-table code { color: #6c7177; font-size: 10px; }
.table-actions { display: flex; gap: 6px; }
.table-actions button { padding: 5px 8px; border: 1px solid #dedfdf; border-radius: 7px; background: #fff; color: #5f646a; font-size: 10px; cursor: pointer; }
.table-actions > a { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid #dedfdf; border-radius: 7px; background: #fff; color: #5f646a; font-size: 10px; }
.table-actions .run-task-button { border-color: #25282c; background: #25282c; color: #fff; }
.table-actions button:disabled { cursor: not-allowed; opacity: .45; }
.table-actions .delete-task-button { border-color: transparent; color: #a6544d; }
.schedule-actions { min-width: 285px; }
.status-pill.danger { background: #fff0ee; color: #a64d45; }
.empty-cell { padding: 36px!important; color: #999da2; text-align: center; }
.run-error { max-width: 280px; overflow: hidden; color: #8b8f95; text-overflow: ellipsis; white-space: nowrap; }
.automation-flow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 22px; }
.flow-step { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border: 1px solid #e3e4e4; border-radius: 13px; background: #fff; color: #858a90; }
.flow-step > b { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #f0f1f1; color: #85898e; font-size: 11px; }
.flow-step span { display: grid; gap: 2px; }
.flow-step strong { color: #52575d; font-size: 12px; }
.flow-step small { font-size: 9px; }
.flow-step.current { border-color: color-mix(in srgb,var(--brand) 30%,#e3e4e4); background: var(--brand-soft); }
.flow-step.current > b { background: var(--brand); color: #fff; }
.flow-step.current strong { color: #24272b; }
.flow-step.done > b { background: #e6f5eb; color: #328452; }
.plugin-state-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 2px; }
.state-chip { padding: 5px 9px; border-radius: 999px; background: #f1f1ef; color: #7d8288; font-size: 9px; font-weight: 750; }
.state-chip.ready { background: #e9f6ed; color: #328452; }
.state-chip.failed { background: #fff0ee; color: #a64d45; }
.plugin-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 22px; }
.plugin-section-title b { font-size: 13px; }
.plugin-section-title span { color: #9a9ea3; font-size: 9px; }
.plugin-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.plugin-card-actions form { margin: 0; }
.plugin-next-step { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #ececeb; }
.plugin-next-step > div:first-child { display: grid; gap: 3px; }
.plugin-next-step b { font-size: 12px; }
.plugin-next-step span { color: #969aa0; font-size: 9px; }
.next-step-disabled { max-width: 150px; text-align: right; }
.secondary-link:disabled { opacity: .45; cursor: not-allowed; }
.advanced-panel { padding: 0; overflow: hidden; }
.advanced-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; cursor: pointer; list-style: none; }
.advanced-panel summary::-webkit-details-marker { display: none; }
.advanced-panel summary span { display: grid; gap: 3px; }
.advanced-panel summary b { font-size: 13px; }
.advanced-panel summary small { color: #989ca1; font-size: 10px; }
.advanced-panel summary i { color: var(--brand); font-size: 10px; font-style: normal; }
.advanced-panel[open] summary { border-bottom: 1px solid #ececeb; }
.advanced-panel .inline-upload-form { padding: 22px 24px 0; }
.advanced-panel .form-help { padding: 0 24px 20px; }
.schedule-create-panel { max-width: none; }
.schedule-create-panel .panel-heading p,.table-panel .panel-heading p { margin: 5px 0 0; color: #92969c; font-size: 10px; }
.schedule-create-panel label small { color: #9a9ea3; font-size: 9px; font-weight: 500; }
.schedule-create-panel label small a { color: var(--brand); }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #f1f1ef; color: #747980; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-pill.published { background: #e9f6ed; color: #328452; }
.status-pill.review { background: #fff3dd; color: #9a681d; }
.log-link { color: var(--brand); font-size: 11px; font-weight: 700; white-space: nowrap; }
.running-alert { border: 1px solid #d9e5f7; background: #edf4ff; color: #446a9e; }
.run-summary-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.run-summary-grid > div { display: grid; gap: 6px; padding: 19px 20px; border: 1px solid #e5e6e6; border-radius: 14px; background: #fff; }
.run-summary-grid small { color: #8f949a; font-size: 9px; font-weight: 750; }
.run-summary-grid strong { font-size: 24px; letter-spacing: -.04em; }
.success-text { color: #328452; }
.danger-text { color: #b14f47; }
.run-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding: 20px 24px; }
.run-overview > div { display: grid; min-width: 0; gap: 4px; }
.run-overview small { color: #979ba1; font-size: 9px; }
.run-overview b { color: #4a4f55; font-size: 11px; font-weight: 650; }
.run-overview .run-target { grid-column: 1/-1; padding-top: 15px; border-top: 1px solid #ececeb; }
.run-target a,.run-log-entry a { overflow: hidden; color: #6e747b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.run-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 270px; align-items: start; gap: 18px; }
.run-log-panel { padding: 25px; }
.run-log-list { position: relative; }
.run-log-entry { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 13px; padding: 0 0 22px; }
.run-log-entry:last-child { padding-bottom: 0; }
.run-log-entry > i { position: relative; width: 9px; height: 9px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: #87909a; box-shadow: 0 0 0 2px #dfe2e4; }
.run-log-entry:not(:last-child) > i::after { position: absolute; top: 10px; left: 2px; width: 1px; height: calc(100% + 17px); background: #e4e5e5; content: ""; }
.run-log-entry.success > i { background: #45a96a; box-shadow: 0 0 0 2px #cfe9d8; }
.run-log-entry.notice > i { background: #d69a35; box-shadow: 0 0 0 2px #f4dfb9; }
.run-log-entry.error > i { background: #cf5b52; box-shadow: 0 0 0 2px #f1d3d0; }
.run-log-entry > div { display: grid; min-width: 0; gap: 4px; }
.run-log-entry header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.run-log-entry header b { font-size: 12px; }
.run-log-entry time { color: #a0a4a9; font-size: 9px; }
.run-log-entry p { margin: 0; color: #696e74; font-size: 11px; line-height: 1.6; }
.run-log-entry .book-result-link { color: var(--brand); font-weight: 700; }
.empty-log { padding: 30px; border-radius: 12px; background: #f8f8f7; text-align: center; }
.empty-log b { font-size: 12px; }
.empty-log p { margin: 6px 0 0; color: #92969c; font-size: 10px; }
.log-help-panel { position: sticky; top: 18px; padding: 24px; }
.log-help-panel ul { margin: 18px 0; padding: 0; list-style: none; }
.log-help-panel li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eeeeed; }
.log-help-panel li i { width: 8px; height: 8px; border-radius: 50%; background: #87909a; }
.log-help-panel li i.success { background: #45a96a; }
.log-help-panel li i.notice { background: #d69a35; }
.log-help-panel li i.error { background: #cf5b52; }
.log-help-panel li span { display: grid; color: #858a90; font-size: 9px; }
.log-help-panel li b { color: #3f444a; font-size: 11px; }
.log-help-panel p { color: #969aa0; font-size: 10px; line-height: 1.7; }
.source-url-cell { max-width: 420px; }
.source-url-cell a { display: block; overflow: hidden; color: #596068; text-overflow: ellipsis; white-space: nowrap; }
.item-error { max-width: 340px; color: #9b5b55!important; white-space: normal; }
.storage-status-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 23px; border: 1px solid #ead7d4; border-radius: 15px; background: #fff7f6; }
.storage-status-card > div { display: flex; align-items: center; gap: 12px; }
.storage-status-card > div > i { width: 10px; height: 10px; border-radius: 50%; background: #ce5c53; box-shadow: 0 0 0 5px #f4dcd9; }
.storage-status-card.connected { border-color: #d5e9dc; background: #f3faf5; }
.storage-status-card.connected > div > i { background: #45a96a; box-shadow: 0 0 0 5px #dcefe2; }
.storage-status-card span { display: grid; }
.storage-status-card small { color: #999da2; font-size: 9px; }
.storage-status-card strong { font-size: 15px; }
.storage-status-card b { color: #6f757b; font-size: 10px; font-weight: 500; }
.storage-status-card p { margin: 0; color: #777c82; font-size: 10px; }
.storage-auth-panel,.storage-config-panel { max-width: none; }
.auth-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.auth-steps span { display: flex; align-items: center; gap: 9px; padding: 13px; border-radius: 10px; background: #f6f6f4; color: #656a70; font-size: 10px; }
.auth-steps b { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; background: #25282c; color: #fff; font-size: 9px; }
.storage-auth-start { margin-bottom: 18px; }
.auth-code-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; padding-top: 18px; border-top: 1px solid #ececeb; }
.auth-code-form label { margin: 0; }

@media (max-width: 1100px) {
  .admin-shell { grid-template-columns: 220px minmax(0,1fr); }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-panels { grid-template-columns: 1fr; }
  .plugin-grid { grid-template-columns: 1fr; }
  .automation-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .run-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .run-detail-grid { grid-template-columns: 1fr; }
  .log-help-panel { position: static; }
}

@media (max-width: 760px) {
  .admin-shell { display: block; }
  .admin-sidebar { position: static; display: block; width: 100%; height: auto; padding: 14px; overflow: visible; }
  .admin-brand { padding: 0 4px 12px; }
  .admin-nav { display: flex; gap: 4px; overflow-x: auto; }
  .admin-nav > small { display: none; }
  .admin-nav a { flex: 0 0 auto; padding: 9px 11px; }
  .admin-nav a span { white-space: nowrap; }
  .admin-sidebar-bottom { display: none; }
  .admin-header { height: 62px; padding: 0 16px; }
  .admin-main { padding: 24px 14px 50px; }
  .admin-title, .dashboard-welcome { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stats-grid > a { grid-template-columns: 38px 1fr; min-height: 135px; padding: 16px; }
  .stat-icon { width: 38px; height: 38px; }
  .stats-grid > a > i { display: none; }
  .quick-grid { grid-template-columns: 1fr; }
  .admin-filter { grid-template-columns: 1fr; }
  .bulk-toolbar { align-items: stretch; flex-direction: column; }
  .admin-table-wrap { overflow-x: auto; }
  .admin-table { min-width: 820px; }
  .form-columns { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; padding: 20px; }
  .login-card { padding: 29px 23px; }
  .inline-upload-form { grid-template-columns: 1fr; }
  .automation-flow { grid-template-columns: 1fr 1fr; gap: 7px; }
  .flow-step { padding: 11px; }
  .flow-step small { display: none; }
  .plugin-next-step { align-items: flex-start; flex-direction: column; }
  .run-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .run-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .storage-status-card { align-items: flex-start; flex-direction: column; }
  .auth-steps { grid-template-columns: 1fr; }
  .auth-code-form { grid-template-columns: 1fr; }
}
