:root { font-family: "Microsoft JhengHei", system-ui, sans-serif; color: #2d2b29; background: #f7f4ef; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 80px; }
.narrow { max-width: 700px; }
.header { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 34px; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: #a45535; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.04em; }
.subtitle { margin: 10px 0 0; color: #81786f; }
.button { border: 0; border-radius: 10px; padding: 12px 18px; color: #4d453e; background: #ebe4db; text-decoration: none; cursor: pointer; font: inherit; }
.button.primary { color: white; background: #a45535; box-shadow: 0 7px 18px #a4553530; }
.button.full { width: 100%; margin-top: 8px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(140px, 230px)); gap: 16px; margin-bottom: 24px; }
.summary-card { padding: 20px 22px; border: 1px solid #e7e0d8; border-radius: 14px; background: white; }
.summary-card span { display: block; color: #8a8178; font-size: 14px; }
.summary-card strong { display: block; margin-top: 7px; font-size: 31px; }
.summary-card.warning strong { color: #bd6f35; }
.summary-card.expiry strong { color: #ad6d62; }
.toolbar { display: flex; justify-content: space-between; margin-bottom: 12px; }
.filter-active { color: #a45535; background: #f8e9df; }
.search-form { display: flex; gap: 8px; width: min(500px, 100%); }
input, select, textarea { width: 100%; border: 1px solid #ded5cb; border-radius: 9px; padding: 11px 12px; background: #fffdfb; font: inherit; color: inherit; }
.clear, .back { align-self: center; color: #a45535; text-decoration: none; padding: 8px; }
.table-card, .form-card { overflow: hidden; border: 1px solid #e7e0d8; border-radius: 16px; background: white; box-shadow: 0 10px 30px #45301b09; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
th, td { padding: 17px 18px; text-align: left; border-bottom: 1px solid #eee9e4; white-space: nowrap; }
th { color: #8a8178; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
tr:last-child td { border-bottom: 0; }
.low-row { background: #fffaf4; }
.quantity { font-weight: 800; color: #477356; }
.quantity.low { color: #bd6f35; }
.adjust-form { display: flex; gap: 5px; align-items: center; }
.adjust-form input { width: 64px; padding: 7px; }
.adjust-form button { width: 31px; height: 31px; border: 0; border-radius: 7px; background: #eee7df; color: #584e45; font-size: 18px; cursor: pointer; }
.actions { display: flex; align-items: center; gap: 12px; }
.edit { color: #a45535; text-decoration: none; }
.delete { border: 0; background: transparent; color: #ad6d62; cursor: pointer; }
.movement-type { font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.movement-type.in, .positive { color: #477356; }
.movement-type.out, .negative { color: #ad6d62; }
.adjustment-direction { max-width: 50%; }
.messages { margin-bottom: 18px; }
.message { margin: 8px 0; padding: 12px 14px; border-radius: 9px; background: #edf6ef; color: #477356; }
.message.error { background: #fff0eb; color: #a24e3f; }
.empty { padding: 80px 20px; text-align: center; }
.empty-icon { font-size: 44px; }
.empty h2 { margin: 12px 0 6px; }
.empty p { color: #81786f; margin-bottom: 25px; }
.back { display: inline-block; margin-bottom: 22px; padding-left: 0; }
.form-card { padding: 34px; }
.auth-card { max-width: 520px; margin: 10vh auto 0; }
.form-card h1 { font-size: 36px; }
.form-card h2, .section-heading h2 { margin: 0; font-size: 22px; }
.form-card p, .section-heading p { color: #81786f; line-height: 1.6; }
.ingredient-form { display: grid; gap: 18px; margin-top: 30px; }
fieldset.lot-fields { border: 1px solid #e7e0d8; border-radius: 10px; padding: 16px; }
fieldset.lot-fields legend { padding: 0 6px; color: #a45535; font-size: 13px; font-weight: 800; }
label { display: grid; gap: 8px; color: #665d55; font-size: 14px; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section-gap { margin-top: 24px; }
.upload-card { max-width: 720px; }
.compact { padding: 38px 20px; }
.compact .empty-icon { font-size: 32px; }
.section-heading { padding: 20px 22px 0; }
.sales-table { min-width: 980px; }
.sales-table select { min-width: 280px; }
.sales-table small { display: block; margin-top: 6px; color: #81786f; }
.import-summary { padding: 24px 34px; }
.import-summary p { margin-bottom: 0; }
.import-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
@media (max-width: 650px) { .container { width: min(100% - 24px, 1180px); padding-top: 30px; } .header { align-items: start; flex-direction: column; } .header-actions { flex-wrap: wrap; } .summary-grid { grid-template-columns: 1fr 1fr; } .form-card { padding: 24px 18px; } .form-row { grid-template-columns: 1fr; } .adjustment-direction { max-width: 100%; } }
