:root {
  --green: #0d685c;
  --green-dark: #0a4f46;
  --green-soft: #e8f4f1;
  --orange: #d9823b;
  --ink: #17312c;
  --muted: #71837f;
  --line: #dfe9e6;
  --paper: #f4f7f6;
  --danger: #b84a43;
  --shadow: 0 14px 35px rgba(15, 61, 53, .09);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-page { position: relative; display: grid; min-height: 100svh; overflow: hidden; place-items: center; padding: 32px 22px; color: #fff; background: linear-gradient(155deg, #0b4d44 0%, #0f6f61 58%, #0a4d44 100%); }
.login-ambient { position: absolute; inset: 0; opacity: .58; background: radial-gradient(circle at 85% 12%, rgba(255,255,255,.17), transparent 25%), radial-gradient(circle at 12% 84%, rgba(239,168,85,.2), transparent 22%); }
.login-ambient::before, .login-ambient::after { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.1); border-radius: 45% 55% 60% 40%; transform: rotate(24deg); }.login-ambient::before { top: -105px; right: -105px; }.login-ambient::after { bottom: -150px; left: -120px; width: 310px; height: 310px; }
.login-card { position: relative; z-index: 1; width: min(100%, 430px); }
.mobile-logo { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(48px, 10svh, 90px); }.mobile-logo > span { display: grid; width: 54px; height: 54px; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.24); border-radius: 14px; background: rgba(255,255,255,.07); }.mobile-logo svg { width: 43px; height: 43px; }.qianshui-logo { fill: none; stroke: currentColor; stroke-width: 2.55; stroke-linecap: round; stroke-linejoin: round; }.mobile-logo div { display: grid; gap: 3px; }.mobile-logo strong { font-size: 20px; letter-spacing: .14em; }.mobile-logo small { color: #a9ccc5; font-size: 10px; letter-spacing: .08em; }
.login-copy p, .app-header p, .section-heading p, .operation-dialog header p { margin: 0 0 7px; color: #a8d2ca; font-size: 9px; font-weight: 800; letter-spacing: .2em; }.login-copy h1 { margin: 0 0 14px; font-family: SimSun, serif; font-size: clamp(34px, 10vw, 45px); line-height: 1.2; letter-spacing: .03em; }.login-copy > span { color: #b9d5cf; font-size: 12px; }
.mobile-auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 28px; padding: 4px; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(0,0,0,.08); }.mobile-auth-tabs button { min-height: 40px; color: #acd0c9; border: 0; border-radius: 9px; background: transparent; font-size: 11px; font-weight: 800; }.mobile-auth-tabs button.active { color: var(--green-dark); background: #fff; box-shadow: 0 5px 14px rgba(0,0,0,.12); }
.login-form { display: grid; gap: 16px; margin-top: 17px; }.login-form label { color: #d7e9e6; }.login-form input { color: #fff; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.1); }.login-form input::placeholder { color: #9bc3bb; }.login-form input:focus { border-color: rgba(255,255,255,.62); box-shadow: 0 0 0 3px rgba(255,255,255,.09); }
.login-form .field-help { color: #b9d6d0; font-size: 10px; font-weight: 400; line-height: 1.55; }
.auth-help { margin: 15px 12px 0; color: #b9d6d0; font-size: 10px; line-height: 1.65; text-align: center; }.desktop-link { display: block; margin-top: 13px; color: #b9d6d0; font-size: 11px; text-align: center; text-decoration: none; }

label { display: grid; gap: 8px; color: #425b55; font-size: 12px; font-weight: 700; }
label em { color: #cf5048; font-style: normal; }
input, select, textarea { width: 100%; color: var(--ink); border: 1px solid #d3e0dd; border-radius: 12px; outline: 0; background: #fff; }
input, select { height: 49px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #60a99f; box-shadow: 0 0 0 3px rgba(13,104,92,.09); }
input::placeholder, textarea::placeholder { color: #a3b0ad; }

.primary-button, .secondary-button { display: inline-flex; min-height: 49px; align-items: center; justify-content: center; padding: 0 18px; border: 0; border-radius: 13px; font-size: 13px; font-weight: 800; }
.primary-button { width: 100%; color: #fff; background: var(--green); box-shadow: 0 9px 24px rgba(8,85,74,.18); }.login-page .primary-button { color: var(--green-dark); background: #fff; }.primary-button:disabled { opacity: .45; box-shadow: none; }
.secondary-button { color: #4e625d; border: 1px solid var(--line); background: #fff; }

.mobile-app { min-height: 100svh; }
.app-header { position: sticky; z-index: 20; top: 0; display: flex; height: 82px; align-items: center; justify-content: space-between; padding: max(13px, env(safe-area-inset-top)) 19px 11px; color: #fff; background: rgba(10,79,70,.96); box-shadow: 0 8px 25px rgba(7,54,47,.13); backdrop-filter: blur(12px); }.app-header p { margin-bottom: 3px; font-size: 8px; }.app-header h1 { margin: 0; font-family: SimSun, serif; font-size: 20px; letter-spacing: .04em; }.profile-button { display: flex; align-items: center; gap: 7px; padding: 0; color: #b9d5d0; border: 0; background: transparent; }.profile-button span { display: grid; width: 36px; height: 36px; place-items: center; color: var(--green-dark); border-radius: 12px; background: #dff1ed; font-size: 13px; font-weight: 850; }.profile-button small { font-size: 9px; }
.app-content { width: min(100%, 720px); margin: 0 auto; padding: 20px 15px calc(92px + env(safe-area-inset-bottom)); }
.mobile-view { display: none; }.mobile-view.active { display: block; animation: viewIn .22s ease; } @keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }

.welcome-card { position: relative; overflow: hidden; padding: 23px 21px 19px; color: #fff; border-radius: 20px; background: linear-gradient(135deg, #0c6559, #0d5148); box-shadow: var(--shadow); }.welcome-card::after { content: ""; position: absolute; top: -55px; right: -45px; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.13); border-radius: 46% 54% 60% 40%; transform: rotate(25deg); }.welcome-card > p { margin: 0 0 7px; color: #a8cec7; font-size: 10px; }.welcome-card h2 { margin: 0 0 6px; font-family: SimSun, serif; font-size: 26px; }.welcome-card > span { color: #b9d3ce; font-size: 10px; }.today-metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 23px; border-top: 1px solid rgba(255,255,255,.13); }.today-metrics div { display: grid; gap: 3px; padding: 15px 8px 0; text-align: center; }.today-metrics div + div { border-left: 1px solid rgba(255,255,255,.12); }.today-metrics strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }.today-metrics small { color: #9ec6bf; font-size: 8px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 26px 3px 13px; }.section-heading p { margin-bottom: 4px; color: #76918a; font-size: 8px; }.section-heading h2 { margin: 0; font-family: SimSun, serif; font-size: 21px; }.section-heading span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.55; }.page-section-heading { margin-top: 3px; margin-bottom: 17px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }.quick-card { display: grid; min-height: 170px; align-content: start; justify-items: start; padding: 17px; color: var(--ink); border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 7px 20px rgba(18,63,55,.045); text-align: left; }.quick-icon { display: grid; width: 38px; height: 38px; margin-bottom: 20px; place-items: center; border-radius: 11px; font-size: 12px; font-weight: 850; }.quick-card.usage .quick-icon { color: #17685c; background: #dff1ed; }.quick-card.material .quick-icon { color: #a2642f; background: #faeadb; }.quick-card strong { font-size: 13px; }.quick-card small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }.quick-card b { margin-top: auto; padding-top: 19px; color: var(--green); font-size: 9px; }
.permission-card, .access-note { margin-top: 15px; padding: 14px 16px; color: #58706a; border: 1px solid #d9e7e3; border-radius: 14px; background: #edf6f4; font-size: 10px; line-height: 1.7; }.permission-card strong, .access-note strong { display: block; margin-bottom: 3px; color: #315d54; font-size: 11px; }.access-note { margin: 0 0 14px; color: #8a5d2e; border-color: #efd8bb; background: #fff6ea; }.access-note strong { color: #925a23; }

.mobile-form { display: grid; gap: 14px; }.form-block { display: grid; gap: 15px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 7px 22px rgba(18,63,55,.04); }.block-title { display: flex; align-items: center; gap: 11px; margin-bottom: 1px; }.block-title > span { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; color: #fff; border-radius: 9px; background: var(--green); font-family: Georgia, serif; font-size: 12px; }.block-title div { display: grid; gap: 3px; }.block-title strong { font-size: 13px; }.block-title small { color: var(--muted); font-size: 9px; font-weight: 400; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.search-field { position: relative; display: block; }.search-field > span { position: absolute; z-index: 1; top: 12px; left: 13px; color: #78908a; font-size: 20px; font-weight: 400; }.search-field input { padding-left: 41px; background: #f8faf9; }.search-results { overflow: hidden; margin-top: -8px; border: 1px solid #d5e3df; border-radius: 12px; background: #fff; box-shadow: var(--shadow); }.search-result { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; color: var(--ink); border: 0; border-bottom: 1px solid #edf2f0; background: #fff; text-align: left; }.search-result:last-child { border: 0; }.search-result div { display: grid; gap: 4px; }.search-result strong { font-size: 11px; }.search-result small { color: var(--muted); font-size: 9px; }.search-result > span { color: var(--green); font-size: 20px; }
.selected-devices { display: flex; min-height: 52px; flex-wrap: wrap; align-items: center; gap: 7px; padding: 8px; border: 1px dashed #c6d7d3; border-radius: 12px; background: #f8faf9; }.selected-devices > p { width: 100%; margin: 0; color: #92a09d; font-size: 10px; text-align: center; }.device-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 7px; padding: 8px 9px; color: #315f56; border-radius: 9px; background: var(--green-soft); font-size: 9px; font-weight: 750; }.device-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.device-chip button { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; padding: 0; color: #5d827b; border: 0; border-radius: 50%; background: rgba(255,255,255,.8); }
.device-chip .certificate-chip-action { width: auto; height: auto; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.usage-certificate-links { display: grid; gap: 6px; padding: 11px 12px; border: 1px solid #d5e3df; border-radius: 10px; background: #f5faf8; font-size: 11px; }
.usage-certificate-links a { color: var(--green); text-decoration: underline; overflow-wrap: anywhere; }
.switch-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 12px; border: 1px solid #d7e4e1; border-radius: 12px; background: #f8faf9; }.switch-row > span { display: grid; gap: 3px; }.switch-row strong { font-size: 12px; }.switch-row small { color: var(--muted); font-size: 9px; font-weight: 400; }.switch-row input { position: relative; width: 46px; height: 27px; flex: 0 0 auto; padding: 0; appearance: none; border: 0; border-radius: 20px; background: #c8d3d0; box-shadow: none; transition: background .18s; }.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.17); transition: transform .18s; }.switch-row input:checked { background: var(--green); }.switch-row input:checked::after { transform: translateX(19px); }
.batch-preview { padding: 12px 13px; color: #527069; border-radius: 11px; background: var(--green-soft); font-size: 10px; line-height: 1.6; }.sticky-submit { position: sticky; z-index: 5; bottom: calc(76px + env(safe-area-inset-bottom)); }.usage-submit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 15px; background: #fff; box-shadow: var(--shadow); }.usage-submit-actions button { min-width: 0; padding: 0 8px; }
.form-message { margin: 0; padding: 11px 13px; color: #9a3f39; border: 1px solid #ecc3bf; border-radius: 11px; background: #fff1f0; font-size: 10px; line-height: 1.6; }.form-message.success { color: #2b675c; border-color: #bee0d8; background: #edf8f5; }.form-message.warning { color: #95493f; border-color: #efc6c1; background: #fff1ef; }

.material-search { margin-bottom: 13px; }.material-list, .today-list { display: grid; gap: 10px; }.material-card { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 6px 20px rgba(18,63,55,.04); }.material-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.material-name { display: flex; min-width: 0; align-items: center; gap: 10px; }.material-name > span { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; color: #9b632f; border-radius: 10px; background: #faeadb; font-size: 11px; font-weight: 850; }.material-name div { display: grid; min-width: 0; gap: 4px; }.material-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.material-name small { color: var(--muted); font-size: 9px; }.stock-value { flex: 0 0 auto; color: #8e5827; font-size: 14px; }.material-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }.material-actions button { height: 39px; color: var(--green); border: 1px solid #c8dfda; border-radius: 10px; background: #f0f8f6; font-size: 10px; font-weight: 800; }.material-actions button.inbound { color: #9a622f; border-color: #ead6bf; background: #fff8ef; }
.operation-dialog .permission-tip { margin: 0; padding: 9px 11px; color: #795625; border-radius: 9px; background: #fff7e8; font-size: 11px; line-height: 1.5; }
.empty-state { margin: 0; padding: 45px 20px; color: #879793; border: 1px dashed #cfddda; border-radius: 15px; background: rgba(255,255,255,.58); font-size: 10px; line-height: 1.7; text-align: center; }.refresh-button { padding: 8px 11px; color: var(--green); border: 1px solid #c9deda; border-radius: 9px; background: #fff; font-size: 9px; font-weight: 750; }
.today-day-label { margin: 8px 3px 0; color: #738883; font-size: 9px; font-weight: 800; letter-spacing: .08em; }.today-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }.today-item > span:first-child { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; font-size: 10px; font-weight: 850; }.today-item.usage > span:first-child { color: #17685c; background: #dff1ed; }.today-item.material > span:first-child { color: #9f652f; background: #faeadb; }.today-item div { display: grid; min-width: 0; gap: 4px; }.today-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.today-item small { color: var(--muted); font-size: 9px; line-height: 1.5; }.today-item > b { color: #677b76; font-size: 9px; white-space: nowrap; }.today-item > b.pending { color: #a2662f; }.today-item > b.conflict { color: var(--danger); }

.bottom-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); min-height: calc(68px + env(safe-area-inset-bottom)); padding: 6px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left)); border-top: 1px solid #dce7e4; background: rgba(255,255,255,.96); box-shadow: 0 -8px 25px rgba(22,63,56,.07); backdrop-filter: blur(13px); }.bottom-nav button { display: grid; min-width: 0; justify-items: center; align-content: center; gap: 3px; padding: 4px; color: #84938f; border: 0; border-radius: 11px; background: transparent; }.bottom-nav button span { font-size: 19px; line-height: 1; }.bottom-nav button small { font-size: 8px; }.bottom-nav button.active { color: var(--green); background: var(--green-soft); font-weight: 800; }

dialog { padding: 0; color: var(--ink); border: 0; outline: 0; }.operation-dialog { width: min(100% - 20px, 520px); max-height: calc(100svh - 20px); overflow: auto; border-radius: 20px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.22); }.operation-dialog::backdrop { background: rgba(7,32,28,.64); backdrop-filter: blur(3px); }.operation-dialog header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 20px 19px 16px; border-bottom: 1px solid var(--line); background: #fff; }.operation-dialog header p { margin-bottom: 4px; color: #75908a; font-size: 8px; }.operation-dialog h2 { margin: 0; font-family: SimSun, serif; font-size: 20px; }.operation-dialog header button { display: grid; width: 34px; height: 34px; place-items: center; color: #6e7f7b; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 22px; }.dialog-body { display: grid; gap: 15px; padding: 19px; }.material-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border-radius: 12px; background: var(--green-soft); }.material-summary > span { overflow: hidden; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }.material-summary > strong { flex: 0 0 auto; color: #5d756f; font-size: 9px; }.material-summary b { color: var(--green-dark); font-size: 12px; }.operation-dialog footer { position: sticky; z-index: 2; bottom: 0; display: grid; grid-template-columns: .7fr 1.3fr; gap: 9px; padding: 13px 19px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }

.toast-region { position: fixed; z-index: 90; top: max(15px, env(safe-area-inset-top)); right: 14px; left: 14px; display: grid; justify-items: center; pointer-events: none; }.toast { width: min(100%, 500px); padding: 13px 15px; color: #fff; border-radius: 12px; background: #174d44; box-shadow: 0 14px 35px rgba(0,0,0,.18); font-size: 11px; line-height: 1.55; animation: toastIn .2s ease; }.toast.warning { background: #a95045; } @keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }
.loading-screen { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; color: #fff; background: rgba(7,40,35,.62); backdrop-filter: blur(3px); }.loading-screen span { width: 31px; height: 31px; border: 3px solid rgba(255,255,255,.28); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }.loading-screen p { font-size: 10px; } @keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 600px) {
  .app-content { padding-right: 22px; padding-left: 22px; }.quick-card { min-height: 185px; }.form-block { padding: 22px; }.material-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 370px) {
  .quick-grid { grid-template-columns: 1fr; }.quick-card { min-height: 145px; }.two-columns { grid-template-columns: 1fr; }.today-item { grid-template-columns: 36px 1fr; }.today-item > b { grid-column: 2; }
}
