/* 设备台账专用 CSS — 从 ledger.html <style> 块提取 */
.ld-wrap { padding: 12px; max-width: 1200px; margin: 0 auto; }
.ld-card { background: #fff; border-radius: 8px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ld-tile { border-radius: 8px; padding: 16px; background: linear-gradient(135deg,#f2faf9,#fff); border-left: 4px solid #16a085; cursor: pointer; position: relative; transition: transform .1s; }
.ld-tile:hover { transform: translateY(-2px); }
.ld-tile .ld-name { font-size: 16px; font-weight: 700; color: #16a085; margin-bottom: 6px; word-break: break-all; }
.ld-tile .ld-meta { color: #7f8c8d; font-size: 12px; }
.ld-tile .ld-badge { position: absolute; top: 8px; right: 8px; background: #e74c3c; color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.ld-tile .ld-actions { position: absolute; bottom: 6px; right: 8px; }
.ld-tile .ld-actions span { color: #95a5a6; font-size: 12px; margin-left: 6px; }
.ld-tile .ld-tile-qr { position: absolute; bottom: 6px; left: 8px; background: #16a085; color: #fff; border-radius: 4px; padding: 3px 10px; font-size: 12px; cursor: pointer; opacity: 0.9; transition: opacity .15s, transform .1s; box-shadow: 0 1px 3px rgba(22,160,133,0.4); font-weight: 600; }
.ld-tile .ld-tile-qr:hover { background: #0e6b5a; transform: scale(1.05); }
.ld-empty { color: #95a5a6; text-align: center; padding: 30px 0; }
.ld-btn { display: inline-block; background: #16a085; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; cursor: pointer; font-size: 14px; margin-right: 8px; }
.ld-btn:hover { background: #138a72; }
.ld-btn-gray { background: #95a5a6; }
.ld-btn-red { background: #c0392b; }
.ld-btn-red:hover { background: #a93226; }
.ld-btn:disabled { background: #bdc3c7; cursor: not-allowed; }
.ld-input, .ld-textarea, .ld-select { width: 100%; padding: 8px 10px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.ld-textarea { min-height: 60px; resize: vertical; font-family: inherit; }
.ld-row { margin-bottom: 10px; }
.ld-label { display: block; color: #34495e; font-size: 13px; margin-bottom: 4px; font-weight: 600; }
.ld-modal-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.ld-modal { background: #fff; border-radius: 8px; padding: 20px; max-width: 520px; width: 92%; max-height: 88vh; overflow-y: auto; }
.ld-modal h3 { margin: 0 0 14px; color: #2c3e50; }
.ld-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ld-table th, .ld-table td { padding: 8px 10px; border-bottom: 1px solid #ecf0f1; text-align: left; }
.ld-table th { background: #f8f9fa; color: #34495e; font-weight: 700; position: sticky; top: 0; }
.ld-table tbody tr { cursor: pointer; }
.ld-table tbody tr:hover { background: #f0faf8; }
.ld-empty-name { background: #fff3cd !important; color: #c0392b !important; font-weight: 700; }
.ld-empty-name::after { content: " ⚠待补填"; color: #c0392b; font-size: 12px; }
.ld-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.ld-photo { position: relative; background: #f5f5f5; border-radius: 6px; overflow: hidden; aspect-ratio: 1/1; }
.ld-photo img { width: 100%; height: 100%; object-fit: cover; }
.ld-photo .ld-ptype { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.ld-photo .ld-pdel { position: absolute; top: 4px; right: 4px; background: rgba(192,57,43,.85); color: #fff; border: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; }
.ld-photo-upload { border: 2px dashed #d0d7de; border-radius: 6px; padding: 20px; text-align: center; cursor: pointer; color: #7f8c8d; background: #fafbfc; }
.ld-photo-upload input { display: none; }
.ld-photo-upload:hover { background: #f0faf8; border-color: #16a085; color: #16a085; }
.ld-bread { color: #7f8c8d; font-size: 13px; margin-bottom: 8px; }
.ld-bread a { color: #16a085; cursor: pointer; }
.ld-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ld-toolbar .ld-input { width: auto; flex: 1; min-width: 140px; }
.ld-hint { color: #7f8c8d; font-size: 12px; margin-top: 4px; }
.ld-locked-banner { background: #fdecea; color: #c0392b; border: 1px solid #f5b6b0; border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.ld-no-perm { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.ld-tabs { display: flex; border-bottom: 2px solid #ecf0f1; margin-bottom: 12px; }
.ld-tab { padding: 8px 16px; cursor: pointer; color: #7f8c8d; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.ld-tab.active { color: #16a085; border-bottom-color: #16a085; font-weight: 700; }
.ld-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; margin-left: 6px; }
.ld-pill-on { background: #16a085; color: #fff; }
.ld-pill-admin { background: #8e44ad; color: #fff; }
.ld-cam { width: 100%; padding: 10px; background: #34495e; color: #fff; border: none; border-radius: 6px; font-size: 14px; cursor: pointer; margin-bottom: 6px; }
.ld-cam:active { background: #2c3e50; }
