:root { color-scheme: light; --accent: #267052; --text: #20352c; --muted: #6d7c74; --line: #e2e8e3; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: #f6f8f5; font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 23px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent); color: #fff; font: 700 24px Georgia, serif; }
.brand-subtitle { margin-left: 5px; padding-left: 16px; border-left: 1px solid var(--line); font-size: 15px; font-weight: 400; color: var(--muted); }
.db-badge { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.status-dot { height: 7px; width: 7px; border-radius: 50%; background: #44845e; }
main.container { padding: 40px 0 60px; min-height: calc(100vh - 165px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.4; letter-spacing: -.8px; }
h2 { font-size: 20px; }
p { margin: 0; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 3px 12px #20352c03; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; background: #fff; color: var(--text); border: 1px solid #d5ded6; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; white-space: nowrap; }
.button:hover { text-decoration: none; background: #f2f6f1; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover { background: #1b593f; }
.danger { background: #b3433f; color: #fff; border-color: #b3433f; }
.danger:hover { background: #95332f; }
.danger-text { color: #b3433f; }
.small { padding: 5px 12px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; }
.search-form { display: flex; align-items: center; gap: 10px; }
input, textarea { width: 100%; padding: 11px 12px; border: 1px solid #d5ded6; border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: 2px solid #76a78b; outline-offset: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.search-form input { width: 300px; background: #fafcf9; }
.text-link { white-space: nowrap; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 13px 24px; background: #f8faf7; color: var(--muted); font-size: 12px; font-weight: 500; border-block: 1px solid var(--line); white-space: nowrap; }
td { padding: 22px 24px; border-bottom: 1px solid #eef1ed; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfb; }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product-name { font-weight: 600; }
.description { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); margin-top: 3px; }
.date { white-space: nowrap; font-size: 12px; }
.stock { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 5px; background: #eff6ed; color: #4f7149; font-size: 13px; }
.stock-empty { background: #fcf0ee; color: #b3433f; }
.row-actions { display: flex; gap: 16px; white-space: nowrap; font-size: 13px; }
.pagination { border-top: 1px solid var(--line); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; gap: 12px; }
.pagination nav { display: flex; gap: 8px; }
.site-footer { padding: 24px 0; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.back-link { display: inline-block; margin-bottom: 24px; font-size: 13px; }
.form-panel { max-width: 720px; padding: 32px; }
.field { margin-bottom: 24px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.validation-summary-valid { display: none; }
.field-error, .validation-summary { color: #a52f2b; font-size: 13px; }
.validation-summary ul { padding-left: 20px; }
.input-validation-error { border-color: #b3433f; }
.notice { padding: 12px 18px; border: 1px solid #c9dfcf; border-radius: 8px; margin-bottom: 24px; }
.success { background: #eef7ee; color: #286442; }
.empty-state { padding: 60px 24px; text-align: center; }
.empty-state p { margin-bottom: 20px; }
.details { margin: 0; }
.details > div { display: grid; grid-template-columns: 145px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid #eef1ed; }
.details > div:last-child { border-bottom: 0; }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 0; overflow-wrap: anywhere; }
.full-description { white-space: pre-wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
@media (max-width: 700px) {
    .container { width: calc(100% - 32px); }
    .header-inner { min-height: 70px; }
    .brand-subtitle, .db-badge { display: none; }
    main.container { padding-top: 28px; }
    h1 { font-size: 27px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
    .toolbar { align-items: flex-start; flex-direction: column; padding: 18px; }
    .search-form { flex-wrap: wrap; width: 100%; }
    .search-form input { width: 100%; flex: 1; min-width: 140px; }
    td, th { padding: 16px; }
    .form-panel { padding: 22px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .details > div { grid-template-columns: 110px 1fr; }
}
