:root {
  --ink: #15201c;
  --muted: #6e7a74;
  --line: #dfe7e2;
  --panel: #ffffff;
  --canvas: #f4f7f5;
  --green: #167a55;
  --green-soft: #e4f3eb;
  --orange: #d97b36;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px 1fr; }
.sidebar { background: #102b22; color: #eaf5ef; padding: 28px 20px 22px; display: flex; flex-direction: column; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: #d9f1e3; color: #126144; display: grid; place-items: center; font-weight: 800; font-size: 22px; margin-bottom: 18px; }
.brand-copy { display: flex; flex-direction: column; gap: 5px; margin-bottom: 48px; }
.brand-copy strong { font-size: 20px; letter-spacing: .04em; }
.brand-copy span { color: #9ab4a7; font-size: 13px; }
.nav-list { display: grid; gap: 8px; }
.nav-item { border: 0; background: transparent; color: #aec5b9; text-align: left; padding: 13px 14px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.nav-item span { font-size: 12px; color: #769989; }
.nav-item:hover, .nav-item.active { background: #1d4938; color: #fff; }
.nav-item.active span { color: #c0efd4; }
.sidebar-foot { margin-top: auto; color: #91afa1; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.status-dot { width: 8px; height: 8px; background: #67d597; border-radius: 50%; }
.workspace { padding: 34px 48px 56px; max-width: 1460px; width: 100%; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.eyebrow { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .08em; margin: 0 0 10px; text-transform: uppercase; }
h1 { font-size: clamp(28px, 3vw, 44px); line-height: 1.12; margin: 0; letter-spacing: -.03em; }
.upload-btn, .primary-btn { border: 0; border-radius: 9px; background: var(--green); color: white; padding: 12px 16px; font-weight: 700; }
.upload-btn:hover, .primary-btn:hover { background: #0d6243; }
.top-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.top-actions form { margin: 0; }
.current-user { color: var(--muted); font-size: 13px; }
.admin-btn, .logout-btn { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 12px; color: var(--ink); }
.controls { margin-top: 34px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.search-box { flex: 1 1 360px; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; padding: 0 14px; height: 48px; }
.search-box span { font-size: 24px; color: #82908a; margin-right: 10px; }
.search-box input { border: 0; outline: none; width: 100%; color: var(--ink); background: transparent; }
.dimension-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.dimension-tab { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 9px 13px; font-size: 13px; }
.dimension-tab:hover, .dimension-tab.active { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.summary-row { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin: 28px 0 15px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.summary-row strong { font-size: 22px; margin-right: 7px; }
.summary-row span, .summary-note { color: var(--muted); font-size: 13px; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.content-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; min-height: 256px; transition: transform .15s ease, box-shadow .15s ease; }
.content-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(21, 55, 41, .08); }
.card-top { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.product-label { font-size: 12px; color: var(--green); font-weight: 800; }
.dimension-label { font-size: 11px; padding: 5px 7px; background: #f1f5f2; border-radius: 5px; color: var(--muted); white-space: nowrap; }
.content-card[data-status="uploaded_pending_text_extraction"] { border-color: #e6c59d; }
.content-card h3 { font-size: 18px; line-height: 1.4; margin: 19px 0 10px; }
.image-preview { border: 0; padding: 0; margin: -18px -18px 16px; height: 132px; position: relative; overflow: hidden; background: #eaf0ec; cursor: zoom-in; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.image-preview:hover img { transform: scale(1.04); }
.image-preview span { position: absolute; left: 10px; bottom: 9px; color: #fff; background: rgba(16,43,34,.76); padding: 5px 8px; border-radius: 5px; font-size: 11px; }
.content-card p { color: #5d6c65; line-height: 1.65; font-size: 14px; margin: 0; }
.qualifier { background: #fff8ed; color: #91632f; padding: 9px 10px; border-radius: 7px; margin-top: 14px !important; font-size: 12px !important; }
.card-foot { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.source-link { color: var(--muted); font-size: 12px; background: none; border: 0; padding: 0; text-decoration: underline; }
.copy-btn { border: 1px solid #bddacb; color: var(--green); background: var(--green-soft); border-radius: 7px; padding: 8px 10px; font-size: 12px; font-weight: 700; }
.copy-btn:hover { background: #d3ecdd; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-icon { font-size: 44px; color: #a6b4ad; }
.empty-state h2 { color: var(--ink); font-size: 20px; }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); box-shadow: 0 25px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(16, 43, 34, .48); }
.upload-panel { padding: 28px; position: relative; display: grid; gap: 14px; }
.upload-panel h2 { margin: 0; font-size: 26px; }
.dialog-copy { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.upload-panel label { display: grid; gap: 7px; color: #506159; font-size: 13px; font-weight: 700; }
.upload-panel select, .upload-panel input[type=file] { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fbfdfc; }
.close-btn { position: absolute; right: 16px; top: 14px; border: 0; background: none; font-size: 26px; color: var(--muted); }
.upload-status { min-height: 18px; color: var(--green); font-size: 13px; margin: 0; }
.preview-dialog { width: min(820px, calc(100vw - 28px)); max-width: 94vw; padding: 14px; background: #102b22; border: 0; border-radius: 12px; }
.preview-dialog::backdrop { background: rgba(0,0,0,.74); }
.preview-dialog img { display: block; width: 100%; max-height: 86vh; object-fit: contain; border-radius: 7px; }
.preview-close { position: absolute; right: 18px; top: 14px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 24px; line-height: 1; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #102b22; }
.login-panel { width: min(440px, 100%); background: #fff; padding: 38px; border-radius: 12px; }
.login-panel h1 { font-size: 30px; margin-bottom: 28px; }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 8px; font-weight: 700; color: #506159; }
.login-form input { height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.login-error { color: #a33a35; margin: 0; font-size: 13px; }
.admin-dialog { width: min(900px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 12px; }
.admin-panel { position: relative; padding: 28px; min-height: 500px; }
.admin-panel h2 { margin: 0 0 20px; }
.admin-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-tabs button { border: 0; background: transparent; padding: 8px 10px; color: var(--muted); }
.admin-tabs button.active { color: var(--green); font-weight: 800; }
.admin-content { display: grid; gap: 10px; padding-top: 16px; max-height: 62vh; overflow: auto; }
.admin-row { border: 1px solid var(--line); border-radius: 8px; padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.admin-row p { margin: 3px 0; color: var(--muted); font-size: 13px; }
.admin-actions { display: flex; gap: 6px; align-items: center; }
.admin-actions button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 9px; }
.admin-actions .publish { color: var(--green); border-color: #acd0bf; }
.admin-actions .withdraw { color: #a33a35; border-color: #e5b9b7; }
@media (max-width: 860px) { .app-shell { grid-template-columns: 1fr; } .sidebar { padding: 18px; } .brand-mark { display: none; } .brand-copy { margin-bottom: 18px; } .nav-list { display: flex; overflow-x: auto; } .nav-item { min-width: 150px; } .sidebar-foot { display: none; } .workspace { padding: 28px 18px 42px; } .topbar { align-items: stretch; flex-direction: column; } .upload-btn { align-self: flex-start; } .summary-row { align-items: flex-start; flex-direction: column; gap: 8px; } }
