.equipment-field { border-top:1px solid #e5e7eb; padding-top:9px; }
.equipment-field label { display:block; margin-bottom:5px; font-size:12px; color:#4b5563; }
.equipment-field input,.equipment-dialog input:not([type=checkbox]):not([type=radio]),.equipment-dialog select,.equipment-dialog textarea { box-sizing:border-box; width:100%; border:1px solid #d1d5db; border-radius:4px; padding:8px 10px; color:#1f2937; background:#fff; font-size:13px; }
.equipment-field input:focus,.equipment-dialog input:focus,.equipment-dialog textarea:focus,.equipment-dialog select:focus { outline:2px solid #2563eb; outline-offset:1px; }
.equipment-options { position:fixed; z-index:100; max-height:320px; overflow-y:auto; background:#fff; color:#1f2937; border:1px solid #d1d5db; border-radius:5px; box-shadow:0 6px 18px #0002; padding:4px; font-size:13px; }
.equipment-options[hidden] { display:none; }
.equipment-options [role=option] { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:36px; padding:7px 9px; cursor:pointer; border-radius:3px; }
.equipment-options [role=option]:hover,.equipment-options [aria-selected=true] { background:#eff6ff; color:#1d4ed8; }
.equipment-options small { white-space:nowrap; font-size:11px; color:#2563eb; }
.equipment-option-group { padding:9px 9px 4px; margin-top:4px; border-top:1px solid #e5e7eb; font-size:11px; font-weight:600; color:#6b7280; }
.equipment-dialog { --eq-border:#e2e8f0; --eq-muted:#64748b; --eq-blue:#2563eb; box-sizing:border-box; width:min(1040px,calc(100vw - 32px)); max-height:90vh; max-height:90dvh; border:1px solid var(--eq-border); border-radius:12px; padding:0; color:#1e293b; background:#fff; box-shadow:0 24px 64px #0f172a33; }
.equipment-dialog[open] { display:flex; flex-direction:column; }
.equipment-dialog[data-view=login] { width:min(440px,calc(100vw - 32px)); }
.equipment-dialog[data-view=editor] { width:min(680px,calc(100vw - 32px)); }
.equipment-dialog::backdrop { background:#0f172a70; }
.equipment-dialog header { flex:none; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 24px; border-bottom:1px solid var(--eq-border); }
.equipment-dialog h2 { margin:0; font-size:18px; font-weight:700; line-height:1.5; }
.equipment-dialog button { cursor:pointer; min-height:44px; border:1px solid var(--eq-border); border-radius:6px; padding:8px 16px; color:#334155; background:#fff; font:inherit; font-size:13px; white-space:nowrap; }
.equipment-dialog button:hover { background:#f1f5f9; border-color:#94a3b8; }
.equipment-dialog button:active { background:#e2e8f0; }
.equipment-dialog button:focus-visible,#equipmentRecords:focus-visible { outline:2px solid var(--eq-blue); outline-offset:2px; }
.equipment-dialog button:disabled,.equipment-dialog [inert] { opacity:.6; cursor:wait; }
.equipment-dialog .equipment-primary { background:var(--eq-blue); border-color:var(--eq-blue); color:#fff; font-weight:600; }
.equipment-dialog .equipment-primary:hover { background:#1d4ed8; border-color:#1d4ed8; }
.equipment-dialog header button { flex:none; min-width:44px; padding:0; font-size:24px; border:0; color:var(--eq-muted); }
.equipment-dialog input:not([type=checkbox]):not([type=radio]),.equipment-dialog select,.equipment-dialog textarea { min-height:44px; border-color:#cbd5e1; border-radius:6px; font-size:14px; line-height:1.5; }
.equipment-dialog textarea { resize:vertical; }
.equipment-login { display:grid; gap:12px; padding:24px; overflow-y:auto; }
.equipment-login p { margin:0 0 4px; color:var(--eq-muted); font-size:14px; line-height:1.7; }
.equipment-login label { font-size:14px; font-weight:600; }
.equipment-login button { margin-top:8px; }
.equipment-catalog { display:flex; flex-direction:column; min-height:0; padding:20px 24px 24px; }
.equipment-libraries { flex:none; display:grid; gap:10px; margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid var(--eq-border); }
.equipment-libraries-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.equipment-libraries h3 { margin:0; font-size:14px; font-weight:600; }
.equipment-libraries p { margin:2px 0 0; font-size:12px; color:var(--eq-muted); overflow-wrap:anywhere; }
.equipment-library-list { display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; max-height:132px; overflow-y:auto; }
.equipment-library { display:flex; min-width:0; border:1px solid var(--eq-border); border-radius:8px; background:#fff; }
.equipment-library[data-viewing=true] { border-color:var(--eq-blue); box-shadow:inset 0 0 0 1px var(--eq-blue); }
.equipment-dialog .equipment-library button { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; min-width:0; max-width:260px; border:0; border-radius:8px 0 0 8px; padding:6px 12px; background:transparent; text-align:left; }
.equipment-library button strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; font-weight:600; }
.equipment-library button small { color:var(--eq-muted); font-size:12px; }
.equipment-library label { display:flex; align-items:center; gap:6px; padding:0 12px; border-left:1px solid var(--eq-border); border-radius:0 8px 8px 0; font-size:12px; color:var(--eq-muted); cursor:pointer; white-space:nowrap; }
.equipment-library label:has(:checked) { color:#065f46; background:#ecfdf5; font-weight:600; }
.equipment-library input { accent-color:var(--eq-blue); width:16px; height:16px; margin:0; }
.equipment-library-actions { display:flex; align-items:center; gap:8px; }
.equipment-library-actions p { flex:1; margin:0; }
.equipment-libraries-empty { padding:4px 0; }
.equipment-toolbar { flex:none; display:grid; grid-template-columns:minmax(0,1fr) minmax(130px,180px) minmax(120px,160px) auto; align-items:end; gap:12px; }
.equipment-toolbar label { display:block; margin-bottom:6px; font-size:12px; color:var(--eq-muted); font-weight:600; }
.equipment-list-summary { flex:none; display:flex; align-items:center; justify-content:space-between; min-height:48px; gap:12px; font-size:12px; color:var(--eq-muted); }
.equipment-list-summary p { margin:0; }
.equipment-list-summary button { min-height:36px; padding:4px 0; border:0; color:var(--eq-blue); background:transparent; }
.equipment-list-summary button[hidden] { display:none; }
#equipmentRecords { min-height:0; overflow-y:auto; border:1px solid var(--eq-border); border-radius:8px; }
.equipment-table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; text-align:left; font-size:13px; line-height:1.6; }
.equipment-table thead th { position:sticky; top:0; z-index:1; background:#f8fafc; color:var(--eq-muted); font-size:12px; font-weight:500; }
.equipment-table th,.equipment-table td { padding:14px 16px; border-bottom:1px solid var(--eq-border); vertical-align:top; overflow-wrap:anywhere; }
.equipment-table thead th:nth-child(1) { width:20%; }
.equipment-table thead th:nth-child(2) { width:26%; }
.equipment-table thead th:nth-child(3) { width:34%; }
.equipment-table thead th:nth-child(4) { width:20%; }
.equipment-table tbody th { font-weight:600; }
.equipment-table tbody tr:last-child>* { border-bottom:0; }
.equipment-table tbody tr:hover { background:#fafcff; }
.equipment-tags { display:flex; flex-wrap:wrap; gap:6px; }
.equipment-tags span { padding:2px 7px; border:1px solid #dbeafe; border-radius:4px; background:#eff6ff; color:#1e40af; font-size:12px; }
.equipment-notes { color:#64748b; white-space:pre-wrap; }
.equipment-row-actions { display:flex; gap:8px; }
.equipment-row-actions button { padding:4px 10px; }
.equipment-dialog .equipment-delete { color:#b91c1c; }
.equipment-dialog .equipment-delete:hover { background:#fef2f2; border-color:#fca5a5; }
.equipment-empty { padding:40px 20px; text-align:center; font-size:14px; color:#475569; }
.equipment-empty strong { display:block; font-weight:600; }
.equipment-empty p { margin:8px 0 0; color:#64748b; font-size:13px; }
.equipment-editor { display:flex; flex-direction:column; min-height:0; }
.equipment-form-body { overflow-y:auto; padding:24px; }
.equipment-form-label { display:block; font-size:14px; font-weight:600; margin-bottom:8px; }
.equipment-form-body input+.equipment-form-label,.equipment-form-body textarea+.equipment-form-label { margin-top:24px; }
.equipment-editor fieldset { min-width:0; border:0; padding:0; margin:24px 0; }
.equipment-editor legend { padding:0; font-size:14px; font-weight:600; margin-bottom:12px; }
.equipment-types { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.equipment-types label { display:flex; align-items:center; gap:8px; padding:8px 10px; min-height:44px; box-sizing:border-box; border:1px solid var(--eq-border); border-radius:6px; font-size:13px; cursor:pointer; }
.equipment-types label:has(:checked) { border-color:#93c5fd; background:#eff6ff; color:#1e40af; }
.equipment-types input { accent-color:var(--eq-blue); width:16px; height:16px; margin:0; flex:none; }
.equipment-required { color:#b91c1c; font-size:12px; font-weight:400; margin-left:4px; }
.equipment-optional { color:var(--eq-muted); font-size:12px; font-weight:400; margin-left:4px; }
.equipment-field-error { color:#b91c1c; font-size:12px; margin:8px 0 0; }
.equipment-field-error:empty { display:none; }
.equipment-actions { flex:none; display:flex; justify-content:space-between; gap:12px; padding:16px 24px; border-top:1px solid var(--eq-border); background:#f8fafc; }
.equipment-error { flex:none; margin:0; padding:12px 24px; border-top:1px solid var(--eq-border); font-size:13px; color:#b91c1c; overflow-wrap:anywhere; }
.equipment-error:empty { display:none; }
.equipment-error[data-success=true] { color:#065f46; }
.equipment-options .equipment-option-detail { display:block; white-space:normal; margin-top:4px; color:#6b7280; line-height:1.5; }
@media(max-width:800px) { .equipment-table th,.equipment-table td { padding:12px 10px; } .equipment-row-actions { gap:4px; } .equipment-row-actions button { padding:4px 7px; } }
@media(max-width:640px) {
    .equipment-dialog,.equipment-dialog[data-view=editor],.equipment-dialog[data-view=login] { width:calc(100vw - 20px); max-height:94vh; max-height:94dvh; }
    .equipment-dialog header { padding:12px 16px; }
    .equipment-catalog { padding:16px; }
    .equipment-library-list { flex-direction:column; flex-wrap:nowrap; max-height:180px; }
    .equipment-dialog .equipment-library button { flex:1; max-width:none; }
    .equipment-library-actions { flex-wrap:wrap; }
    .equipment-library-actions p { flex-basis:100%; }
    .equipment-toolbar { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
    .equipment-search { grid-column:1/-1; }
    .equipment-category { min-width:0; }
    .equipment-dialog input:not([type=checkbox]):not([type=radio]),.equipment-dialog select,.equipment-dialog textarea { font-size:16px; }
    #equipmentRecords { border:0; border-radius:0; }
    .equipment-table,.equipment-table tbody { display:block; }
    .equipment-table thead { display:none; }
    .equipment-table tr { display:block; padding:16px; border:1px solid var(--eq-border); border-radius:8px; margin-bottom:12px; }
    .equipment-table tr:last-child { margin-bottom:0; }
    .equipment-table tbody th,.equipment-table tbody td { display:block; border:0; padding:0; width:auto; }
    .equipment-table tbody th { margin-bottom:12px; font-size:15px; }
    .equipment-table td[data-label] { margin-bottom:12px; }
    .equipment-table td[data-label]::before { content:attr(data-label); display:block; margin-bottom:5px; color:var(--eq-muted); font-size:12px; }
    .equipment-row-actions { justify-content:flex-end; gap:8px; padding-top:4px; }
    .equipment-row-actions button { padding:8px 16px; }
    .equipment-types { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .equipment-form-body { padding:20px 16px; }
    .equipment-actions { padding:12px 16px; }
    .equipment-error { padding:12px 16px; }
}
@media(pointer:coarse) { .equipment-options [role=option],.equipment-field input { min-height:44px; } }
