:root { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #263442; background: #f3f5f7; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid #cf6d21; outline-offset: 3px; }
[hidden] { display: none !important; }
.admin-header { background: #073d80; color: #fff; }
.header-inner { width: min(1120px, calc(100% - 40px)); min-height: 66px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 18px; font-weight: 700; text-decoration: none; }
.brand span { margin-left: 14px; font-size: 15px; font-weight: 400; opacity: .9; }
.home-link { font-size: 13px; text-decoration: none; }
.home-link:hover { text-decoration: underline; }
.admin-shell { width: min(1120px, calc(100% - 40px)); margin: 42px auto 80px; }
.page-heading { text-align: center; }
.page-heading > p, .eyebrow { color: #6e8fb5; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.page-heading > p { margin: 0 0 8px; }
.page-heading h1 { margin: 0 0 8px; color: #073d80; font-size: 30px; }
.page-heading > span { color: #697888; font-size: 14px; }
.notice { margin: 24px 0; border: 1px solid #bfd6c8; border-radius: 4px; background: #edf8f1; color: #205e39; padding: 12px 15px; font-size: 14px; }
.notice.error { border-color: #e9c2bf; background: #fff1ef; color: #a3342a; }
.auth-card, .panel { background: #fff; border: 1px solid #e0e6ed; box-shadow: 0 10px 25px rgba(15, 47, 80, .03); }
.auth-card { width: min(100%, 480px); margin: 30px auto 0; padding: 32px; }
.card-heading h2, .panel-heading h2 { margin: 7px 0 8px; color: #073d80; font-size: 22px; }
.card-heading p, .panel-heading p { margin: 0 0 24px; color: #73808e; font-size: 13px; line-height: 1.6; }
form label { display: block; margin: 17px 0 8px; color: #3d4d5e; font-size: 13px; font-weight: 600; }
form input, form select, form textarea { width: 100%; min-height: 42px; border: 1px solid #cbd6e1; border-radius: 3px; background: #fff; color: #263442; padding: 8px 11px; font-size: 14px; }
form textarea { min-height: 92px; resize: vertical; }
form input[type="file"] { padding: 8px; }
.primary-button { width: 100%; min-height: 44px; margin-top: 26px; border: 0; border-radius: 3px; background: #073d80; color: #fff; cursor: pointer; font-weight: 600; }
.primary-button:hover { background: #0d559f; }
.primary-button:disabled { opacity: .6; cursor: wait; }
.text-button { display: block; margin: 18px auto 0; border: 0; background: none; color: #073d80; font-size: 13px; cursor: pointer; text-decoration: underline; }
.manager-bar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 20px 0; color: #687888; font-size: 13px; }
.manager-bar strong { color: #073d80; }
.manager-bar button { border: 1px solid #cbd6e1; background: #fff; color: #36536e; border-radius: 3px; padding: 7px 12px; cursor: pointer; }
.manager-grid { display: grid; grid-template-columns: minmax(290px, 360px) minmax(0, 1fr); gap: 22px; align-items: start; }
.manager-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; border-bottom: 1px solid #d7e0e9; }
.manager-tabs button { border: 0; border-bottom: 3px solid transparent; background: none; color: #5c6e80; cursor: pointer; padding: 12px 16px; }
.manager-tabs button.active { border-color: #073d80; color: #073d80; font-weight: 700; }
.site-section-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.site-section-card { min-width: 0; padding: 22px; border: 1px solid #dce6ef; background: #f8fafc; }
.site-section-card h3 { margin: 0; color: #073d80; font-size: 18px; }
.site-section-card h4 { margin: 28px 0 8px; color: #3d4d5e; font-size: 14px; }
.site-text-form textarea { min-height: 180px; line-height: 1.6; }
.site-image-list { display: grid; gap: 12px; }
.site-image-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; padding: 12px; border: 1px solid #dce6ef; background: #fff; }
.site-image-card img { width: 110px; height: 90px; grid-row: span 3; object-fit: contain; background: #f4f6f8; }
.site-image-card input { min-width: 0; width: 100%; border: 1px solid #cbd6e1; border-radius: 3px; padding: 7px; }
.site-image-card button { justify-self: start; border: 1px solid #b9cddd; border-radius: 3px; background: #fff; color: #073d80; padding: 5px 10px; cursor: pointer; }
.site-image-card .delete-button { color: #b4473c; border-color: #e1b5ae; }
.site-upload-form { padding-top: 4px; }
.inventory-toolbar { display: flex; gap: 12px; margin-bottom: 22px; }
.inventory-toolbar input { flex: 1; min-width: 0; border: 1px solid #cbd6e1; border-radius: 3px; padding: 9px 12px; }
.inventory-toolbar button, .inventory-actions button, .inventory-form-actions button:not(.primary-button) { border: 1px solid #b9cddd; border-radius: 3px; background: #fff; color: #073d80; cursor: pointer; padding: 8px 14px; white-space: nowrap; }
.inventory-section-heading { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; }
.inventory-section-heading h3 { margin: 0; color: #073d80; font-size: 18px; }
.inventory-section-heading span { color: #7b8997; font-size: 12px; }
.inventory-list { max-width: 100%; overflow-x: auto; border: 1px solid #cbd6e1; }
.inventory-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 12px; }
.inventory-table th { position: sticky; top: 0; background: #2860a7; color: #fff; font-weight: 600; text-align: left; }
.inventory-table th, .inventory-table td { min-width: 110px; max-width: 260px; padding: 11px 12px; border-right: 1px solid #d7e1ed; border-bottom: 1px solid #d7e1ed; vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
.inventory-table tbody tr:nth-child(odd) { background: #f2f6fd; }
.inventory-table tbody tr:hover { background: #e8f0fb; }
.inventory-table .row-number { min-width: 54px; text-align: center; }
.inventory-table .inventory-actions { min-width: 125px; white-space: nowrap; }
.inventory-table .inventory-actions button { margin: 0 5px 5px 0; padding: 5px 8px; font-size: 12px; }
.inventory-table .inventory-actions .delete-button { color: #b4473c; border-color: #e1b5ae; }
.inventory-file-link, .inventory-file-inputs a { color: #0b579e; font-size: 12px; overflow-wrap: anywhere; }
.inventory-file-link img { display: block; width: 100px; max-height: 80px; object-fit: contain; margin-bottom: 4px; }
.inventory-table .price-tier { display: inline-block; border-radius: 20px; padding: 3px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.inventory-table .price-high { color: #9a2c2c; background: #fff0ed; }
.inventory-table .price-medium { color: #8d5900; background: #fff4d9; }
.inventory-table .price-low { color: #28674a; background: #e7f5ed; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.inventory-form { margin-top: 26px; padding: 24px; background: #f5f8fb; border: 1px solid #dce6ef; }
.inventory-form h3 { margin: 0 0 16px; color: #073d80; }
.inventory-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.inventory-form-grid .wide-field { grid-column: 1 / -1; }
.inventory-file-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.inventory-file-inputs a { display: inline-block; margin: 8px 12px 0 0; }
.inventory-form-actions { display: flex; align-items: end; gap: 12px; }
.inventory-form-actions .primary-button { width: auto; min-width: 140px; }
.panel { padding: 28px; }
.list-panel { min-width: 0; }
.document-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid #d7e0e9; }
.document-tab { flex: 1 0 150px; min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 3px solid transparent; background: #fff; color: #5c6e80; cursor: pointer; font-size: 13px; white-space: nowrap; }
.document-tab:hover { background: #f2f6fa; }
.document-tab[aria-pressed="true"] { border-bottom-color: #073d80; color: #073d80; font-weight: 700; }
.document-category-tabs { margin-top: 10px; }
.document-category-tabs .document-tab { flex-basis: 170px; white-space: normal; }
.document-group { padding-top: 20px; }
.document-group h3 { color: #0a467f; font-size: 16px; margin: 0 0 4px; }
.document-count { color: #8794a1; font-size: 12px; margin: 0 0 16px; }
.empty-message { color: #96a0aa; font-size: 13px; margin: 0; }
.document-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid #edf0f2; }
.document-row > div { min-width: 0; }
.document-row a { color: #073d80; font-size: 13px; overflow-wrap: anywhere; text-decoration: underline; }
.document-row time { display: block; color: #8b98a5; font-size: 11px; margin-top: 4px; }
.document-row .uploader { display: block; color: #8b98a5; font-size: 11px; margin-top: 3px; }
.document-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 18px; color: #697888; font-size: 12px; }
.document-pagination button { border: 1px solid #b9cddd; border-radius: 3px; background: #fff; color: #073d80; cursor: pointer; padding: 6px 10px; }
.document-pagination button:disabled { color: #9ca8b3; border-color: #e0e6ed; cursor: default; }
.delete-button { flex: none; border: 0; background: none; color: #b4473c; font-size: 12px; cursor: pointer; padding: 3px; }
.delete-button:hover { text-decoration: underline; }
.people-panel { margin-top: 22px; }
.invite-button { width: auto; min-width: 170px; margin-top: 0; padding: 0 20px; }
.invite-result { margin: 18px 0; padding: 14px; border: 1px solid #c8dbe8; background: #f3f8fc; }
.invite-result p { margin: 0 0 9px; color: #52677b; font-size: 13px; }
.invite-result code { display: block; overflow-wrap: anywhere; color: #073d80; font-size: 15px; }
.user-list { margin-top: 22px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #edf0f2; font-size: 13px; }
.user-row small { color: #7b8997; margin-left: 8px; }
@media (max-width: 760px) {
  .admin-shell { margin-top: 26px; }
  .page-heading h1 { font-size: 25px; }
  .manager-grid { grid-template-columns: 1fr; }
  .site-section-list { grid-template-columns: 1fr; }
  .inventory-form-grid, .inventory-file-inputs { grid-template-columns: 1fr; }
  .inventory-toolbar { flex-direction: column; }
  .panel, .auth-card { padding: 22px; }
  .brand { font-size: 14px; }
  .brand span { display: none; }
}
