.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel h3, .panel-title h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: 0; }
.button { appearance: none; border: 0; border-radius: 8px; background: var(--brand); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--brand-strong); }
.button-secondary { background: var(--accent); }
.button-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button-danger { background: var(--danger); }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.icon-button { display: none; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 40px; height: 40px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.metric span { color: var(--muted); }
.metric strong { display: block; margin-top: 8px; font-size: 30px; letter-spacing: 0; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; background: var(--surface-muted); color: var(--text); }
.badge-available { background: #dff4ea; color: #11603d; }
.badge-issued { background: #e7ecfb; color: #284a9d; }
.badge-damaged { background: #ffe4df; color: #923326; }
.badge-in_repair { background: #fff1cc; color: #805700; }
.badge-written_off, .badge-lost { background: #eceff3; color: #4f5968; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; color: var(--muted); background: #fafbfd; }
.notice { border-radius: var(--radius); padding: 12px 14px; }
.notice-error { background: #ffe8e5; color: #8b2e25; border: 1px solid #ffc6bd; }
.notice-success { background: #e2f5eb; color: #145c3e; border: 1px solid #b8e4cd; }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--surface-muted); }
.thumb-empty { display: block; }
.qr-image { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 8px; }
.has-modal { overflow: hidden; }
.media-modal[hidden] { display: none; }
.media-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(12, 18, 25, .72); isolation: isolate; }
.media-modal-backdrop { display: none; }
.media-modal-dialog { position: relative; z-index: 1; width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.32); padding: 16px; display: grid; gap: 12px; }
.media-modal-dialog h3 { margin: 0; padding-right: 44px; }
.media-modal-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 24px; line-height: 1; }
.media-modal-viewer { min-height: min(70vh, 720px); display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 10px; }
.media-modal-body { min-width: 0; min-height: 0; display: grid; place-items: center; background: transparent; border-radius: var(--radius); overflow: hidden; touch-action: pan-y; }
.media-modal-body img, .media-modal-body video { position: relative; z-index: 1; max-width: 100%; max-height: 76vh; width: auto; height: auto; }
.media-modal-nav { appearance: none; width: 48px; height: 64px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.94); color: var(--text); cursor: pointer; font-size: 42px; line-height: 1; }
.media-modal-nav:hover { border-color: var(--brand); color: var(--brand); }
.media-modal-nav:focus-visible { outline: 3px solid rgba(23,107,91,.28); outline-offset: 2px; }
.media-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.media-modal-footer [data-media-modal-counter] { color: var(--text); font-weight: 700; }
