:root{--bg:#f4f7fb;--panel:#fff;--text:#182230;--muted:#718096;--line:#e5eaf1;--primary:#2563eb;--primary-dark:#1d4ed8;--green:#0f9f6e;--orange:#d97706;--purple:#7c3aed;--danger:#dc2626;--shadow:0 12px 32px rgba(28,44,74,.08)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 "Segoe UI","Microsoft YaHei",sans-serif}button,input,select{font:inherit}button{cursor:pointer}.topbar{min-height:72px;padding:0 40px;display:flex;align-items:center;justify-content:space-between;background:var(--panel);border-bottom:1px solid var(--line)}.brand,.topbar-actions,.main-nav,.page-heading,.panel-header,.form-actions,.form-notice{display:flex;align-items:center}.brand{gap:12px}.brand-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(135deg,#2563eb,#4f46e5);color:#fff;font-weight:700}.brand strong,.brand span{display:block}.brand strong{font-size:16px}.brand span{color:var(--muted);font-size:12px;margin-top:2px}.topbar-actions{gap:14px}.environment-badge{padding:6px 10px;border-radius:99px;background:#fff7ed;color:#9a3412;font-size:12px}.main-nav{gap:5px;padding:0 40px;height:52px;background:var(--panel);border-bottom:1px solid var(--line)}.nav-item{height:52px;padding:0 16px;border:0;background:transparent;color:var(--muted);border-bottom:2px solid transparent}.nav-item:hover,.nav-item.active{color:var(--primary);border-bottom-color:var(--primary)}.nav-count{display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:4px;padding:0 5px;border-radius:99px;background:#dbeafe;color:#1d4ed8;font-size:11px}.page-shell{max-width:1240px;margin:0 auto;padding:34px 28px 70px}.view{display:none}.view.active{display:block}.page-heading{justify-content:space-between;gap:20px;margin-bottom:24px}.page-heading h1{margin:4px 0 6px;font-size:28px;letter-spacing:-.5px}.eyebrow{margin:0;color:var(--primary);font-weight:700;font-size:12px;letter-spacing:.08em}.muted{color:var(--muted);margin:0}.primary-button,.secondary-button,.ghost-button,.text-button{border-radius:9px;border:1px solid transparent;padding:10px 15px;font-weight:600;transition:.2s ease}.primary-button{background:var(--primary);color:#fff}.primary-button:hover{background:var(--primary-dark);transform:translateY(-1px)}.secondary-button{background:#e8f0ff;color:#2457bc}.ghost-button{border-color:var(--line);color:#475569;background:#fff}.ghost-button:hover{border-color:#b9c5d6;background:#f8fafc}.text-button{padding:4px 0;color:var(--primary);background:transparent}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px}.stat-card{padding:20px;background:var(--panel);border:1px solid var(--line);border-top:3px solid var(--primary);border-radius:12px;box-shadow:var(--shadow)}.stat-card.orange{border-top-color:var(--orange)}.stat-card.green{border-top-color:var(--green)}.stat-card.purple{border-top-color:var(--purple)}.stat-card span,.stat-card small{display:block;color:var(--muted)}.stat-card strong{display:block;margin:8px 0 4px;font-size:30px}.dashboard-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:20px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:22px}.panel-header{justify-content:space-between;gap:12px;margin-bottom:15px}.panel h2{margin:0 0 3px;font-size:17px}.table-wrap{overflow:auto}.data-table{width:100%;min-width:680px;border-collapse:collapse}.data-table th,.data-table td{padding:13px 10px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}.data-table th{color:#64748b;font-size:12px;font-weight:700;background:#fbfcfe;white-space:nowrap}.data-table tbody tr:hover{background:#fbfdff}.notification-list{display:grid;gap:10px;max-height:280px;overflow:auto}.notification{padding:11px 12px;border-radius:9px;background:#f8fafc;border:1px solid var(--line)}.notification.unread{background:#eff6ff;border-color:#bfdbfe}.notification p{margin:0}.notification time{display:block;margin-top:3px;color:var(--muted);font-size:12px}.form-panel{max-width:980px}.form-section-title{margin:4px 0 15px;padding-bottom:9px;border-bottom:1px solid var(--line);font-weight:700;color:#334155}.form-section-title:not(:first-child){margin-top:25px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.form-grid label{display:flex;flex-direction:column;gap:6px;color:#475569;font-weight:600}.form-grid input,.form-grid select{width:100%;padding:10px 12px;border:1px solid #d4dce8;border-radius:8px;outline:0;background:#fff;color:var(--text)}.form-grid input:focus,.form-grid select:focus{border-color:#7aa2f7;box-shadow:0 0 0 3px #dbeafe}.form-grid input[readonly]{background:#f8fafc;color:#64748b}.optional{margin-left:4px;color:var(--muted);font-size:12px;font-weight:400}.form-notice{gap:9px;margin-top:22px;padding:11px 13px;border:1px solid #bfdbfe;border-radius:9px;background:#eff6ff;color:#1e40af}.form-actions{justify-content:flex-end;gap:10px;margin-top:24px}.status-badge,.sync-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:99px;font-size:12px;white-space:nowrap}.status-pending_approval{color:#1d4ed8;background:#dbeafe}.status-borrowed{color:#9a3412;background:#ffedd5}.status-overdue{color:#b91c1c;background:#fee2e2}.status-returned{color:#047857;background:#d1fae5}.status-rejected,.status-cancelled{color:#64748b;background:#e2e8f0}.status-force_closed{color:#6b21a8;background:#f3e8ff}.sync-synced{color:#047857;background:#d1fae5}.sync-pending{color:#1d4ed8;background:#dbeafe}.sync-failed{color:#b91c1c;background:#fee2e2}.sync-manual{color:#9a3412;background:#ffedd5}.row-actions{display:flex;flex-wrap:wrap;gap:6px}.small-button{padding:6px 9px;border:1px solid var(--line);border-radius:7px;color:#475569;background:#fff;font-size:12px}.small-button:hover{border-color:#93a4bb;background:#f8fafc}.small-button.primary{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.small-button.danger{border-color:#fecaca;background:#fff1f2;color:#b91c1c}.small-button:disabled{cursor:not-allowed;opacity:.45}.empty-state{padding:34px 12px;text-align:center;color:var(--muted)}.toast{position:fixed;right:24px;bottom:24px;z-index:10;max-width:380px;padding:12px 15px;border-radius:10px;background:#182230;color:#fff;box-shadow:0 14px 36px rgba(24,34,48,.22);opacity:0;transform:translateY(15px);pointer-events:none;transition:.25s ease}.toast.show{opacity:1;transform:translateY(0)}.toast.error{background:#991b1b}@media(max-width:900px){.topbar{padding:0 20px}.main-nav{padding:0 20px;overflow:auto}.page-shell{padding:26px 16px 50px}.stats-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}}@media(max-width:580px){.topbar{height:auto;padding:16px;align-items:flex-start;gap:12px;flex-direction:column}.topbar-actions{width:100%;justify-content:space-between}.page-heading{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr}.stats-grid{gap:10px}.stat-card{padding:14px}.stat-card strong{font-size:25px}}

/* 车辆工作表：申请页显示当月和下月，全年视图使用同一套日期状态。 */
.apply-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;align-items:start}
.apply-layout .form-panel{max-width:none}
.vehicle-schedule{position:sticky;top:18px;min-width:0}
.schedule-legend{display:flex;flex-wrap:wrap;gap:12px 16px;margin:-2px 0 14px;color:#64748b;font-size:12px}
.schedule-legend span{display:inline-flex;align-items:center;gap:6px}
.legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.legend-dot.available{background:#cbd5e1}.legend-dot.reserved{background:#f59e0b}.legend-dot.busy{background:#2563eb}
#scheduleMonths{display:grid;gap:16px}
.schedule-month{border:1px solid var(--line);border-radius:11px;padding:13px;background:#fbfcfe}
.schedule-month-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.schedule-month-header strong{font-size:14px}.schedule-month-header span{color:var(--muted);font-size:11px}
.schedule-weekdays,.schedule-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.schedule-weekdays{margin-bottom:4px;color:#94a3b8;font-size:10px;text-align:center}
.schedule-weekdays span{font-weight:600}
.schedule-day{min-width:0;min-height:46px;padding:4px 2px;border:1px solid #e2e8f0;border-radius:7px;background:#fff;text-align:center;color:#64748b;font-size:11px;overflow:hidden}
.schedule-day-empty{border-color:transparent;background:transparent}
.schedule-date,.schedule-state,.schedule-detail{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.schedule-date{font-weight:700;color:#475569;font-size:11px;line-height:16px}
.schedule-state{margin-top:1px;font-size:10px;line-height:13px}
.schedule-detail,.schedule-time{font-size:10px;line-height:13px;color:#64748b}
.schedule-time{font-size:9px;color:#94a3b8}
.schedule-day.available .schedule-state{color:#94a3b8}.schedule-day.available{border-color:#e2e8f0}
.schedule-day.busy{border-color:#bfdbfe;background:#eff6ff}.schedule-day.busy .schedule-date,.schedule-day.busy .schedule-state{color:#1d4ed8}
.schedule-day.reserved{border-color:#fde68a;background:#fffbeb}.schedule-day.reserved .schedule-date,.schedule-day.reserved .schedule-state{color:#b45309}
.schedule-day.today{box-shadow:inset 0 0 0 2px #f59e0b}
.year-modal[hidden]{display:none}
.year-modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:24px}
.year-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48)}
.year-modal-dialog{position:relative;width:min(1120px,100%);max-height:min(900px,calc(100vh - 48px));overflow:auto;padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:0 24px 70px rgba(15,23,42,.3)}
.year-modal-dialog .panel-header{margin-bottom:14px}.year-modal-dialog h2{margin:0 0 3px;font-size:20px}
#yearScheduleMonths,.year-schedule-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#yearScheduleMonths .schedule-month,.year-schedule-months .schedule-month{padding:10px}
#yearScheduleMonths .schedule-day,.year-schedule-months .schedule-day{min-height:37px;padding:3px 1px}
#yearScheduleMonths .schedule-state,#yearScheduleMonths .schedule-detail,#yearScheduleMonths .schedule-time,.year-schedule-months .schedule-state,.year-schedule-months .schedule-detail,.year-schedule-months .schedule-time{font-size:9px;line-height:12px}
body.modal-open{overflow:hidden}
.reason-modal[hidden]{display:none}
.reason-modal{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:24px}
.reason-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48)}
.reason-modal-dialog{position:relative;width:min(520px,100%);padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:0 24px 70px rgba(15,23,42,.3)}
.reason-modal-dialog .panel-header{margin-bottom:14px}.reason-modal-dialog h2{margin:0 0 3px;font-size:20px}
.reason-field{display:grid;gap:6px;color:#475569;font-weight:600}
.reason-field textarea{width:100%;resize:vertical;padding:10px 12px;border:1px solid #d4dce8;border-radius:8px;outline:0;background:#fff;color:var(--text);font:inherit;font-weight:400}
.reason-field textarea:focus{border-color:#7aa2f7;box-shadow:0 0 0 3px #dbeafe}
@media(max-width:900px){.apply-layout{grid-template-columns:1fr}.vehicle-schedule{position:static}#yearScheduleMonths,.year-schedule-months{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:580px){#yearScheduleMonths,.year-schedule-months{grid-template-columns:1fr}.year-modal,.reason-modal{padding:12px}.year-modal-dialog,.reason-modal-dialog{max-height:calc(100vh - 24px);padding:16px}.schedule-day{min-height:42px}}
.time-label{display:inline-block;min-width:22px;color:#64748b;font-weight:700}
.ledger-table{min-width:1040px;table-layout:fixed}
.ledger-table th:nth-child(1),.ledger-table td:nth-child(1){width:145px}
.ledger-table th:nth-child(2),.ledger-table td:nth-child(2){width:72px;text-align:center}
.ledger-table th:nth-child(3),.ledger-table td:nth-child(3){width:80px;white-space:nowrap}
.ledger-table th:nth-child(4),.ledger-table td:nth-child(4){width:95px;white-space:nowrap}
.ledger-table th:nth-child(5),.ledger-table td:nth-child(5){width:130px}
.ledger-table th:nth-child(6),.ledger-table td:nth-child(6){width:190px}
.ledger-table th:nth-child(7),.ledger-table td:nth-child(7){width:160px}
.ledger-table th:nth-child(8),.ledger-table td:nth-child(8){width:75px;text-align:center}
.ledger-table th:nth-child(9),.ledger-table td:nth-child(9){width:90px}
.ledger-table td:nth-child(1){word-break:keep-all}
.ledger-table td:nth-child(5){overflow-wrap:anywhere}
.ledger-time-cell{white-space:nowrap;vertical-align:middle}
.time-stack{display:grid;gap:4px}
.time-stack>div{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
/* 统一视觉：深色导航、清晰层级与舒展的记录表 */
:root{--bg:#f3f6f8;--primary:#087f75;--primary-dark:#06685f;--text:#192f38;--muted:#7c8d96;--line:#e7edf0;--shadow:0 4px 22px rgba(27,49,60,.035)}
body{font-family:"Segoe UI","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
.topbar{background:#172f39;color:#fff;min-height:82px;padding:0 36px;border:0}
.brand-mark{background:#20b7a5;border-radius:12px;width:42px;height:42px;font-size:20px;box-shadow:0 4px 14px #0002}
.brand strong{font-size:18px;letter-spacing:1px}.brand span{color:#a3b9c2}.environment-badge{background:#ffffff0d;color:#b7cbd1;border:1px solid #ffffff15}
.topbar .ghost-button{background:transparent;border-color:#ffffff26;color:#c2d3d9;font-size:12px}
.main-nav{height:64px;padding:0 36px;gap:14px;box-shadow:0 3px 10px #19333e03}
.nav-item{height:64px;padding:0 20px;font-weight:600;color:#778b95;position:relative;border:0}
.nav-item.active{color:#087f75;background:#f0faf7}.nav-item.active:after{content:"";position:absolute;bottom:0;left:20px;right:20px;height:3px;background:#087f75;border-radius:3px}
.nav-count{background:#e0f3ed;color:#087f75}
.page-shell{max-width:1480px;padding:38px 36px 70px}.page-heading{margin-bottom:30px}.page-heading h1{font-size:29px;font-weight:650;letter-spacing:.2px;margin:7px 0 10px}.eyebrow{font-size:11px;letter-spacing:1.4px;color:#7b959e}.page-heading .muted{font-size:13px;line-height:1.8}
.panel{padding:26px;border-radius:16px;border-color:#e8edf0}.panel h2{font-size:16px;font-weight:650}.panel-header .muted{font-size:12px;margin-top:5px}
.stats-grid{gap:20px;margin-bottom:26px}.stat-card{position:relative;border:1px solid #e5ecef;border-radius:14px;padding:23px 25px;overflow:hidden}.stat-card:after{content:"";position:absolute;right:24px;top:26px;width:10px;height:10px;background:#91b9d8;border-radius:50%;box-shadow:0 0 0 7px #f0f6fb}.stat-card.orange:after{background:#dfa04a;box-shadow:0 0 0 7px #fff7e9}.stat-card.green:after{background:#2aa68b;box-shadow:0 0 0 7px #eaf8f3}.stat-card.purple:after{background:#8991c9;box-shadow:0 0 0 7px #f2f2fa}.stat-card strong{font-size:36px;line-height:1.2;margin:13px 0 10px;font-weight:600;font-variant-numeric:tabular-nums}.stat-card small{font-size:12px}.dashboard-grid{grid-template-columns:1.7fr 1fr;gap:24px}
.primary-button,.secondary-button,.ghost-button{padding:11px 18px;border-radius:9px}.primary-button{box-shadow:0 4px 10px #087f7515}.secondary-button{background:#e3f3ef;color:#087f75}.text-button{color:#087f75;font-size:12px}.small-button{padding:7px 11px;border-radius:7px;white-space:nowrap}.small-button.primary{color:#087f75;border-color:#c6e8dd;background:#edf8f3}.small-button.danger{background:#fff;border-color:#f0dce0;color:#b75d65}
.data-table th{padding:15px 14px;background:#f6f9fa;color:#7f9098;font-size:12px;font-weight:500}.data-table td{padding:19px 14px;font-size:13px;line-height:1.8}.data-table td small{color:#8b9ba3;font-size:11px}.data-table td strong{font-weight:600;font-size:12px;letter-spacing:.1px}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#f8fcfb}.status-badge{font-size:11px;padding:3px 9px;border-radius:6px}.status-borrowed{background:#fff3df;color:#b77b24}.status-pending_approval{background:#e9f1fd;color:#587fb8}.status-returned{background:#e5f6ef;color:#248a6f}
.ledger-table{min-width:980px;width:100%;table-layout:fixed}.ledger-table th:nth-child(1),.ledger-table td:nth-child(1){width:165px}.ledger-table th:nth-child(2),.ledger-table td:nth-child(2){width:90px;text-align:left}.ledger-table th:nth-child(3),.ledger-table td:nth-child(3){width:115px}.ledger-table th:nth-child(4),.ledger-table td:nth-child(4){width:95px}.ledger-table th:nth-child(5),.ledger-table td:nth-child(5){width:150px}.ledger-table th:nth-child(6),.ledger-table td:nth-child(6),.ledger-table th:nth-child(7),.ledger-table td:nth-child(7){width:160px}.time-stack{gap:7px;font-variant-numeric:tabular-nums}.time-label{font-size:10px;min-width:20px;font-weight:500;background:#f0f4f5;border-radius:4px;text-align:center;color:#81969e}.record-note{font-size:11px;color:#91a0a7}.ledger-panel .panel-header{margin-bottom:24px}
.row-actions{display:table-cell;min-width:160px}.row-actions .small-button{margin:3px 4px 3px 0}.notification{border:0;border-left:3px solid #e3eeeb;border-radius:4px;padding:13px;background:#f8fafb;font-size:12px}.notification.unread{background:#f0f8f5;border-color:#51b79e}.notification time{font-size:10px;margin-top:6px}
.form-section-title{font-size:14px;padding-bottom:13px}.form-grid{gap:20px}.form-grid label{font-size:12px;color:#607881;font-weight:500}.form-grid input,.form-grid select{padding:12px;border-color:#dfe7eb;font-size:13px}.form-grid input:focus,.form-grid select:focus{border-color:#73bcae;box-shadow:0 0 0 3px #edf7f3}.form-notice{background:#f1f8f6;border-color:#d8ece5;color:#659085;font-size:12px}.form-actions{padding-top:20px;border-top:1px solid #edf1f3}.apply-layout{grid-template-columns:minmax(0,1fr) 380px;gap:24px}.schedule-month{background:#fbfdfd}.schedule-day.busy{background:#eaf5f1;border-color:#c9e7dd}.schedule-day.busy .schedule-date,.schedule-day.busy .schedule-state{color:#087f75}.legend-dot.busy{background:#087f75}
button:focus-visible{outline:3px solid #7cc7b7;outline-offset:3px}.toast{z-index:50}
@media(max-width:1100px){.page-shell{padding:28px 22px}.dashboard-grid{grid-template-columns:1fr}.apply-layout{grid-template-columns:minmax(0,1fr) 340px}}
@media(max-width:900px){.apply-layout{grid-template-columns:1fr}.topbar{padding:16px 22px}.main-nav{padding:0 12px;gap:0}.nav-item{padding:0 15px;white-space:nowrap}}
@media(max-width:580px){.page-shell{padding:24px 14px}.panel{padding:18px}.page-heading h1{font-size:24px}.stats-grid{gap:12px}.stat-card{padding:18px}.stat-card:after{right:18px}.stat-card strong{font-size:30px}.environment-badge{font-size:10px}.record-note{display:none}}

/* 简洁且固定的记录序号 */
.ledger-table th:nth-child(1),.ledger-table td:nth-child(1){width:65px;text-align:center;font-variant-numeric:tabular-nums}

.form-grid .form-full-width{grid-column:1 / -1}
/* 全项目文字大小与手机阅读适配 */
body{font-size:16px;line-height:1.65;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
.muted{color:#627781}
.page-heading h1{font-size:28px;line-height:1.4}
.panel h2,.year-modal-dialog h2,.reason-modal-dialog h2{font-size:20px;line-height:1.5}
.brand strong{font-size:20px}.brand span,.environment-badge,.topbar .ghost-button{font-size:14px}
.eyebrow,.page-heading .muted,.panel-header .muted,.optional,.record-note{font-size:14px;line-height:1.65;letter-spacing:0}
.nav-item,.primary-button,.secondary-button,.ghost-button{font-size:16px}
.text-button,.small-button{font-size:14px;min-height:44px}
.nav-count{font-size:13px;min-width:22px;height:22px}
.stat-card span{font-size:16px}.stat-card small{font-size:14px;line-height:1.6}.stat-card strong{font-size:36px}
.form-section-title{font-size:18px}.form-grid label,.reason-field{font-size:16px;line-height:1.6}
.form-grid input,.form-grid select,.reason-field textarea{font-size:16px;line-height:1.5;min-height:48px;min-width:0}
.form-grid label{min-width:0}.form-notice{font-size:14px;line-height:1.75;align-items:flex-start}
.data-table th{font-size:14px;color:#627781}.data-table td,.data-table td strong{font-size:16px;line-height:1.65}
.data-table td small,.status-badge,.time-label{font-size:14px}.data-table td small{color:#627781}.time-label{min-width:24px;color:#627781}
.notification{font-size:16px;line-height:1.7}.notification time{font-size:14px;color:#627781}
.schedule-legend,.schedule-weekdays,.schedule-month-header span{font-size:14px;color:#627781}
.schedule-month-header strong{font-size:18px}.schedule-date{font-size:16px;line-height:24px}
.schedule-state,.schedule-detail,.schedule-time{font-size:14px;line-height:20px}
.schedule-day.available .schedule-state,.schedule-time{color:#627781}
.schedule-time{display:block;white-space:normal;overflow-wrap:anywhere}
#yearScheduleMonths .schedule-state,#yearScheduleMonths .schedule-detail,#yearScheduleMonths .schedule-time,.year-schedule-months .schedule-state,.year-schedule-months .schedule-detail,.year-schedule-months .schedule-time{font-size:14px;line-height:20px}
.schedule-day{min-height:64px}.toast,.empty-state{font-size:16px;line-height:1.6}
@media(max-width:600px){
 .page-heading h1{font-size:24px}.panel h2{font-size:20px}.brand strong{font-size:20px}
 .stat-card strong{font-size:30px}.stat-card:after{display:none}
 .panel-header{align-items:flex-start;flex-wrap:wrap}.panel-header .text-button{flex-shrink:0}
 .topbar-actions{flex-wrap:wrap;gap:10px}.environment-badge{font-size:14px;white-space:normal}
 .main-nav{height:56px}.nav-item{height:56px;flex-shrink:0;font-size:16px}
 .form-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 .primary-button,.secondary-button,.ghost-button{min-height:48px}
 .schedule-month{padding:8px}.schedule-grid,.schedule-weekdays{gap:3px}
 .schedule-day{padding:4px 1px}.schedule-detail{white-space:normal;overflow-wrap:anywhere}
 .schedule-time{line-height:1.5}.schedule-state{white-space:normal}
 .year-modal-dialog,.reason-modal-dialog{overflow-y:auto;max-height:calc(100dvh - 24px)}
 .toast{left:16px;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));max-width:none}
 .table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}
 .dashboard-grid,.apply-layout{min-width:0}.dashboard-grid>.panel{min-width:0}
 .ledger-table{min-width:1060px}.ledger-table th:nth-child(6),.ledger-table td:nth-child(6),.ledger-table th:nth-child(7),.ledger-table td:nth-child(7){width:185px}
}
/* 借还登记操作保持同一行，窄屏由表格容器横向滚动 */
#view-borrow .data-table{min-width:980px}
#view-borrow .row-actions{white-space:nowrap;min-width:420px}
#view-borrow .row-actions .small-button{display:inline-block;vertical-align:middle;margin:0 6px 0 0}
#view-borrow .row-actions .small-button:last-child{margin-right:0}
/* 借还登记保留表格，仅收紧列间距与操作按钮留白 */
#view-borrow .table-wrap{overflow-x:auto}
#view-borrow .data-table{min-width:0;width:100%;table-layout:auto}
#view-borrow .data-table th,#view-borrow .data-table td{padding:16px 6px;white-space:nowrap}
#view-borrow .data-table th:first-child,#view-borrow .data-table td:first-child{width:5%}
#view-borrow .data-table th:nth-child(2),#view-borrow .data-table td:nth-child(2){width:10%}
#view-borrow .data-table th:nth-child(3),#view-borrow .data-table td:nth-child(3),#view-borrow .data-table th:nth-child(4),#view-borrow .data-table td:nth-child(4){width:16%}
#view-borrow .data-table th:nth-child(5),#view-borrow .data-table td:nth-child(5){width:10%}
#view-borrow .row-actions{min-width:0;width:auto;white-space:nowrap}
#view-borrow .row-actions .small-button{margin:0 3px 0 0;padding:9px 6px;font-size:14px;vertical-align:middle}
#view-borrow .row-actions .small-button:last-child{margin-right:0}

/* 当月工作表与申请表等高 */
.apply-layout{align-items:stretch}
.vehicle-schedule{position:static;display:flex;flex-direction:column}
.vehicle-schedule #scheduleMonths{flex:1;display:flex;flex-direction:column}
.vehicle-schedule .schedule-month{flex:1;display:flex;flex-direction:column}
.vehicle-schedule .schedule-grid{flex:1;grid-auto-rows:1fr}
.vehicle-schedule .schedule-day{display:flex;flex-direction:column;justify-content:center}
@media(max-width:900px){
 .apply-layout{align-items:start}
 .vehicle-schedule .schedule-grid{flex:initial;grid-auto-rows:auto}
 .vehicle-schedule .schedule-day{min-height:72px}
}

.home-actions{display:flex;gap:12px;flex-wrap:wrap}
.main-nav{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:25;display:flex;flex-wrap:nowrap;height:calc(64px + env(safe-area-inset-bottom));padding:0 12px env(safe-area-inset-bottom);justify-content:space-around;gap:0;overflow-x:auto;overflow-y:hidden;background:#fff;border-top:1px solid #e5e8e8;border-bottom:0;box-shadow:0 -2px 10px #0000000d}
.main-nav .nav-item{flex:1;min-width:max-content;white-space:nowrap;height:64px;padding:0 14px}
.page-shell{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
body.modal-open .main-nav{pointer-events:none}
.person-group th{background:#edf5f4;color:#22665b;font-size:14px;text-align:left}
.module-record.record-unresolved{background:#fff1f0;border:1px solid #f2cfcc;border-radius:10px;padding:16px;margin:12px 0}
.module-record.record-unresolved h3{color:#9b3430}
.record-photo{cursor:zoom-in}
.photo-viewer{position:fixed;inset:0;z-index:10000;background:rgba(12,20,30,.96);display:flex;flex-direction:column;color:#fff}
.photo-viewer[hidden]{display:none}
.photo-toolbar{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px;flex-shrink:0;flex-wrap:wrap}
.photo-toolbar button{border:1px solid #657283;background:#263545;color:#fff;min-width:44px;min-height:44px;padding:8px 14px;border-radius:8px;font:inherit;cursor:pointer}
.photo-toolbar button:disabled{opacity:.4;cursor:default}.photo-toolbar button:focus-visible{outline:3px solid #72d8cd;outline-offset:2px}
.photo-toolbar output{min-width:56px;text-align:center;font-variant-numeric:tabular-nums}
.photo-stage{position:relative;flex:1;min-height:0;overflow:hidden;display:flex;align-items:center;justify-content:center;touch-action:none;cursor:grab;user-select:none}
.photo-stage:active{cursor:grabbing}.photo-stage img{flex:none;max-width:none;max-height:none;object-fit:contain;transform-origin:center;pointer-events:none;will-change:transform}
.photo-help{text-align:center;font-size:14px;color:#c7d1db;padding:8px 16px;margin:0;line-height:1.6;flex-shrink:0}
@media(max-width:480px){.photo-toolbar{gap:6px;padding:10px 6px}.photo-toolbar button{padding:8px 10px}.photo-help{font-size:13px}}
.module-session{display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:1440px;margin:12px auto;padding:0 24px;font-size:14px}
.module-session select{width:auto;max-width:100%;font-size:16px;min-height:42px;border:1px solid #ccd7df;border-radius:8px;padding:8px;background:white}
.module-record{padding:20px 0;border-top:1px solid #e1e7ec;overflow-wrap:anywhere}
.module-record h3{margin:0;font-size:18px}.module-record p{line-height:1.65}
.record-photo{width:112px;height:90px;object-fit:cover;border-radius:8px;margin:4px 8px 4px 0;border:1px solid #dce5eb}
.repair-result{margin-top:12px;padding:12px;background:#f0f8f6;border-radius:8px}
.module-dialog{max-height:90vh;overflow:auto;width:min(680px,calc(100vw - 24px))}
#moduleError{color:#b42318}#moduleFields input[type=file]{max-width:100%;font-size:14px}
.main-nav{flex-wrap:wrap}
@media(max-width:600px){.module-session{padding:0 16px;gap:8px}.module-session .muted{width:100%;font-size:14px}.module-record{padding:16px 0}.module-record .panel-header{gap:10px;flex-wrap:wrap}.record-photo{width:88px;height:76px}#moduleFields{grid-template-columns:1fr}}

/* Mobile-first WeChat-style layout: compact header, horizontal tabs, native-feeling list rows. */
@media(max-width:600px){
 body{background:#f3f5f5;font-size:15px;padding-bottom:env(safe-area-inset-bottom)}
 .topbar{position:sticky;top:0;z-index:40;height:54px;min-height:54px;padding:0 14px;flex-direction:row;align-items:center;gap:8px;background:#07a47b;color:#fff;box-shadow:0 1px 4px #00000012}
 .brand{gap:8px;min-width:0}.brand-mark{width:30px;height:30px;border-radius:7px;font-size:15px;background:#ffffff24;box-shadow:none}
 .brand strong{font-size:17px;letter-spacing:0;white-space:nowrap}.brand span,.environment-badge{display:none}
 .topbar-actions{width:auto;margin-left:auto;gap:0}.topbar .ghost-button{min-height:40px;padding:6px 9px;border:0;color:#fff;font-size:13px;background:#ffffff18}
 .main-nav{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:25;display:flex;flex-wrap:nowrap;gap:0;width:100%;height:calc(62px + env(safe-area-inset-bottom));padding:5px 4px calc(5px + env(safe-area-inset-bottom));overflow-x:auto;overflow-y:hidden;background:#fff;border-top:1px solid #e5e8e8;box-shadow:0 -2px 10px #0000000d;scrollbar-width:none;overscroll-behavior-x:contain}
 .main-nav::-webkit-scrollbar{display:none}.nav-item{height:52px;min-width:76px;flex:1;padding:25px 5px 3px;font-size:11px;line-height:1.1;color:#68777a;border:0;border-radius:7px;position:relative}
 .nav-item.active{color:#079b75;background:#edf9f5;border:0}.nav-count{position:absolute;top:5px;right:calc(50% - 22px);min-width:16px;height:16px;margin:0;font-size:10px;background:#e7f6f1;color:#078b6b}
 .module-session{position:relative;margin:0;padding:8px 14px;background:#fff;border-bottom:1px solid #ecefef;gap:7px;font-size:13px}
 .module-session>span:first-child{color:#536367}.module-session select{min-height:36px;padding:5px 9px;border-radius:6px;border-color:#e5e9e9;font-size:14px}
 .module-session .muted{width:100%;font-size:12px;color:#879396;line-height:1.4}
 .page-shell{width:100%;max-width:none;margin:0;padding:15px 12px calc(82px + env(safe-area-inset-bottom))}
 .page-heading{flex-direction:row;align-items:center;gap:10px;margin:2px 2px 13px}
 #view-dashboard .page-heading{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}
 #view-dashboard .page-heading>div{min-width:0}
 #view-dashboard .page-heading h1{max-width:100%;font-size:20px;overflow-wrap:anywhere}
 #view-dashboard .page-heading .muted{font-size:12px}
 #view-dashboard .home-actions{justify-content:flex-start}
 .page-heading h1{margin:0;font-size:21px;line-height:1.35;font-weight:600;color:#243536}
 .page-heading .eyebrow{display:none}.page-heading .muted{font-size:13px;line-height:1.45;margin-top:3px}
 .page-heading:has(.muted) > div{min-width:0}.page-heading .primary-button,.page-heading .secondary-button{flex:0 0 auto;min-height:40px;padding:8px 12px;font-size:14px;border-radius:6px}
 .home-actions{gap:7px;justify-content:flex-end}.home-actions .primary-button,.home-actions .secondary-button{min-height:40px;padding:8px 10px}
 .panel{padding:14px;border:0;border-radius:8px;box-shadow:none;background:#fff}
 .dashboard-grid,.apply-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px}
 .stat-card{min-height:94px;padding:12px;border:0;border-radius:8px;background:#fff;box-shadow:none}
 .stat-card span{font-size:13px;color:#718080}.stat-card strong{font-size:25px;line-height:1.15;margin:6px 0 2px;color:#172f2d}.stat-card small{font-size:12px;line-height:1.35;color:#8a9696}
 .panel-header{align-items:center;gap:8px;margin-bottom:10px}.panel h2{font-size:16px;line-height:1.4;font-weight:600}
 .text-button{min-height:40px;padding:6px 8px;font-size:13px}
 .notification-list{gap:0;max-height:320px}.notification{padding:11px 4px;border:0;border-bottom:1px solid #edf0f0;border-radius:0;background:#fff;font-size:14px}.notification.unread{background:#f3faf7;border-left:2px solid #07a47b;padding-left:8px}.notification time{font-size:12px}
 .form-panel{max-width:none}.form-section-title{margin:0 0 8px;padding:0 0 8px;font-size:15px;color:#253b3b;border-bottom:1px solid #eef0f0}.form-section-title:not(:first-child){margin-top:19px}
 .form-grid{grid-template-columns:minmax(0,1fr);gap:12px}.form-grid label{gap:5px;font-size:14px;color:#526465}
 .form-grid input,.form-grid select{min-height:44px;padding:9px 11px;border:1px solid #e1e6e6;border-radius:6px;font-size:16px;background:#fff}
 .form-notice{margin-top:13px;padding:9px 10px;border:0;border-radius:6px;background:#f2f8f6;font-size:13px;line-height:1.55}
 .form-actions{gap:8px;margin-top:14px;padding-top:12px}.form-actions button{min-height:44px;padding:8px 13px;font-size:14px;border-radius:6px}
 .vehicle-schedule{padding:12px}.schedule-legend{margin:0 0 8px;font-size:12px;gap:12px}.schedule-month{padding:7px;border:0;border-radius:6px;background:#f7f9f9}.schedule-month-header{margin-bottom:6px}.schedule-month-header strong{font-size:15px}
 .schedule-weekdays,.schedule-grid{gap:2px}.schedule-weekdays{font-size:11px}.schedule-day{min-height:47px;padding:3px 0;border-radius:5px}.schedule-date{font-size:12px;line-height:17px}.schedule-state,.schedule-detail,.schedule-time{font-size:10px;line-height:13px}.schedule-detail{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .table-wrap{overflow-x:auto;max-width:100%;border-radius:6px}
 .data-table{min-width:620px}.data-table th,.data-table td{padding:10px 8px;font-size:13px;line-height:1.5}.data-table td small{font-size:12px}
 #view-dashboard .data-table{min-width:480px}
 #view-approval .data-table{min-width:690px}
 #view-borrow .data-table{min-width:760px}.ledger-table{min-width:950px}
 #view-borrow .data-table th,#view-borrow .data-table td{padding:9px 6px;font-size:12px}
 #view-borrow .row-actions{min-width:300px}.row-actions .small-button{min-height:38px;padding:6px 8px;font-size:12px}
 .module-record{padding:12px 0;margin:0;border-top:1px solid #edf0f0;overflow-wrap:anywhere}
 .module-record h3{font-size:15px;line-height:1.4}.module-record p{font-size:14px;line-height:1.55;margin:8px 0}
 .module-record .muted{font-size:12px;line-height:1.5}.module-record.record-unresolved{padding:12px;margin:9px 0;border-radius:7px;background:#fff0ef}
 .module-record .record-photo{width:78px;height:68px;margin:3px 5px 3px 0;border-radius:5px}
 .module-record .panel-header{align-items:flex-start;flex-wrap:wrap}.module-record .panel-header button{min-height:38px;padding:7px 9px;font-size:13px}
 .repair-result{padding:9px;border-radius:6px}.empty-state{padding:22px 8px;font-size:14px}
 .reason-modal,.year-modal{padding:10px}.reason-modal-dialog,.year-modal-dialog{width:100%;max-height:calc(100dvh - 20px);padding:15px;border-radius:8px;overflow:auto}
 .module-dialog{width:100%;max-height:calc(100dvh - 20px)}#moduleFields{grid-template-columns:minmax(0,1fr)}
 .toast{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));font-size:14px}
 .photo-toolbar{padding-top:calc(8px + env(safe-area-inset-top))}
}

/* 更多功能上拉菜单 */
.main-nav .nav-item[hidden]{display:none}
.nav-sheet[hidden]{display:none}
.nav-sheet{position:fixed;inset:0;z-index:100;display:flex;align-items:flex-end;justify-content:center}
.nav-sheet-backdrop{position:absolute;inset:0;border:0;background:rgba(0,0,0,.42);width:100%;height:100%;cursor:default}
.nav-sheet-dialog{position:relative;width:min(560px,100%);border-radius:18px 18px 0 0;background:#f2f3f3;padding:10px 12px calc(12px + env(safe-area-inset-bottom));max-height:90dvh;overflow:auto;box-shadow:0 -8px 40px #0002;animation:sheet-rise .18s ease-out}
.nav-sheet-handle{width:36px;height:4px;background:#ced4d3;border-radius:4px;margin:0 auto 12px}
.nav-sheet-dialog h2{font-size:16px;color:#586965;text-align:center;margin:0 0 12px;font-weight:500}
.nav-sheet-links{background:#fff;border-radius:12px;overflow:hidden}
.nav-sheet-links button,.nav-sheet-cancel{width:100%;min-height:55px;padding:14px 18px;border:0;background:#fff;color:#263c36;font:inherit;font-size:16px;text-align:left}
.nav-sheet-links button{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0ee}
.nav-sheet-links button:last-child{border:0}.nav-sheet-links button span{color:#9aa7a2;font-size:24px;line-height:1}
.nav-sheet-links button:hover{background:#eef8f3}.nav-sheet-cancel{margin-top:10px;border-radius:12px;text-align:center;color:#66736f}
@keyframes sheet-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}
@media(max-width:600px){.main-nav .nav-item{min-width:0;padding:0 4px;height:52px;font-size:12px;display:flex;align-items:center;justify-content:center}.main-nav{overflow-x:hidden}.main-nav .nav-count{top:0;right:8px}.main-nav .nav-item.active::after{display:none}}
@media(prefers-reduced-motion:reduce){.nav-sheet-dialog{animation:none}}


.nav-sheet-links button[aria-current="page"]{color:#079b75;background:#edf9f3;font-weight:600}
/* 紧贴右下角“更多”按钮的竖向菜单 */
.nav-sheet-backdrop{background:transparent}
.nav-sheet-dialog{position:absolute;padding:0;max-height:calc(100dvh - 100px);border-radius:9px;background:#fff;border:1px solid #e1e8e5;box-shadow:0 4px 24px #173a3026;animation:more-pop .15s ease-out;transform-origin:bottom right}
.nav-sheet-handle,.nav-sheet-dialog h2,.nav-sheet-cancel{display:none}
.nav-sheet-links{border-radius:8px}
.nav-sheet-links button{min-height:56px;justify-content:center;padding:14px 10px;text-align:center;font-size:15px}
.nav-sheet-links button span{display:none}
@keyframes more-pop{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.nav-sheet-dialog{animation:none}}

/* 手机记录纵向阅读，字段与操作全部自然换行，无横向滚动。 */
@media(max-width:600px){
 .page-shell .table-wrap{overflow:visible;max-width:100%}
 .page-shell .data-table,#view-borrow .data-table,#view-dashboard .data-table,#view-approval .data-table,.page-shell .ledger-table{display:block;width:100%;min-width:0;table-layout:auto}
 .page-shell .data-table thead{display:none}
 .page-shell .data-table tbody{display:block;width:100%;min-width:0}
 .page-shell .data-table tbody tr{display:block;width:100%;min-width:0;padding:10px 0;margin:0;border-bottom:1px solid #e3eae7;background:transparent}
 .page-shell .data-table tbody tr:last-child{border-bottom:0}
 .page-shell .data-table tbody td,#view-borrow .data-table tbody td{display:block;width:100%;min-width:0;max-width:100%;padding:6px 0;border:0;text-align:left;white-space:normal;overflow-wrap:anywhere;word-break:normal;font-size:14px;line-height:1.6}
 .page-shell .data-table tbody td[data-label]{display:grid;grid-template-columns:92px minmax(0,1fr);column-gap:10px;align-items:start}
 .page-shell .data-table tbody td[data-label]::before{content:attr(data-label);grid-column:1;grid-row:1 / span 20;color:#75837e;font-size:13px;font-weight:400;line-height:1.7}
 .page-shell .data-table tbody td[data-label]>*{grid-column:2;min-width:0;max-width:100%}
 .page-shell .data-table tbody td br{display:none}
 .page-shell .data-table td small{display:block;font-size:13px}
 .page-shell .data-table td strong{font-size:14px}
 .page-shell .data-table .time-stack{min-width:0;gap:4px}
 .page-shell .data-table .time-stack>div{white-space:normal;flex-wrap:wrap;gap:5px}
 .page-shell .data-table .status-badge{justify-self:start}
 .page-shell .data-table tbody td.row-actions,#view-borrow .data-table tbody td.row-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:0;width:100%;white-space:normal;margin:6px 0 0;padding-top:10px;border-top:1px dashed #e5ece8}
 .page-shell .data-table td.row-actions::before{display:none}
 .page-shell .row-actions .small-button,#view-borrow .row-actions .small-button{flex:1 1 auto;margin:0;padding:8px;min-height:42px;white-space:normal;font-size:13px}
 .page-shell .data-table .person-group{padding:8px 10px;background:#edf5f0;border-radius:5px;margin-top:8px}
 .page-shell .data-table .person-group th{display:block;width:auto;padding:0;border:0;background:none;font-size:14px}
 .page-shell .data-table tr[hidden]{display:none}
 #module-people input{max-width:100%;width:100%;min-width:0;min-height:42px;font-size:16px;border:1px solid #dfe7e3;border-radius:6px;padding:8px}
 .module-record .panel-header h3{flex-basis:100%}.module-record .panel-header button{flex:1 1 auto}
 .form-grid input[type=datetime-local]{max-width:100%;width:100%;min-width:0}
 .page-heading{flex-wrap:wrap}.home-actions{flex-wrap:wrap}
 .nav-sheet-links button{padding:12px 2px;font-size:13px;white-space:normal;overflow-wrap:anywhere}
 .toast{bottom:calc(78px + env(safe-area-inset-bottom))}
}

.server-status{padding:6px 16px;font-size:13px;background:#edf8f2;color:#267357}.server-status.sync-error{background:#fff0ed;color:#a3372b}

.integration-page{display:grid;gap:16px;max-width:900px}.integration-page h1{font-size:22px;margin:0}.integration-check{padding:14px 0;border-bottom:1px solid #e5ece8}.integration-check>span{float:right;font-size:14px}.integration-check p{clear:both;font-size:14px;margin-top:6px}.config-ok{color:#078654}.config-missing{color:#a04c37}.integration-page li{margin:10px 0}.topbar a{text-decoration:none}
