/* Resources page (views/resources.mjs, PRD §9.11): tree | detail | borrowed/lent.
   Only layout and the few page-specific rows; colours, tags, buttons, lists and
   inputs come from components.css so the page reads as the rest of the product. */
.rs-layout { display:grid; grid-template-columns:minmax(250px,300px) minmax(0,1fr) minmax(260px,340px); gap:12px; align-items:start; }
.rs-col { min-width:0; padding:12px; }
.rs-col--tree, .rs-col--side { position:sticky; top:12px; max-height:calc(100vh - 120px); overflow-y:auto; scrollbar-width:thin; }
.rs-col--tree .task-workspace-panel { min-height:0; }
@media (max-width:1180px) { .rs-layout { grid-template-columns:minmax(230px,270px) minmax(0,1fr); } .rs-col--side { grid-column:1 / -1; position:static; max-height:none; } }
@media (max-width:760px) { .rs-layout { grid-template-columns:minmax(0,1fr); } .rs-col--tree { position:static; max-height:none; } }

/* Tree: the Task page's device-tree components (views.css .task-workspace-panel.task-tree,
   .task-tree__device, .task-device-tab__*) do the rows, dots and header; only what the
   Resources tree adds is here. */
.rs-col--tree { padding:0; }
.rs-tree { min-height:0; display:flex; flex-direction:column; }
.rs-tree .task-tree__devices { padding:8px; flex:1; }
.rs-tree__group { margin-top:10px; }
.rs-tree__group:first-child, .rs-tree .task-tree__device + .rs-tree__group { margin-top:12px; }
.rs-tree .task-tree__eyebrow { margin:0 6px 4px; }
.rs-tree .task-tree__device { margin-top:2px; }
.rs-tree__none { margin:0 6px 4px; color:var(--mx-faint); font-size:12px; }
.rs-tree__children { margin-bottom:4px; }
.rs-tree__leaf { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:7px; padding:4px 8px; color:var(--mx-dim); font-size:11.5px; }
.rs-tree__leaf .task-device-tab__name { font-size:11.5px; font-weight:600; }
.rs-tree__leaf .task-device-tab__state { font-size:10px; }
.task-device-tab__dot--idle { background:var(--mx-faint); }
.task-device-tab__dot--none { background:transparent; border:1px solid var(--mx-line-strong); }
.rs-tree .task-tree__legend .task-device-tab__dot { box-shadow:none; }

/* Detail */
.rs-detail__head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:6px; }
.rs-detail__head h2 { display:flex; align-items:center; gap:8px; margin:0; font-size:18px; letter-spacing:-.02em; }
.rs-detail__head p { margin:4px 0 0; }
.rs-section { margin-top:14px; padding-top:12px; border-top:1px solid var(--mx-line); }
.rs-section > h3, .rs-section > summary { margin:0 0 8px; font-size:12px; font-weight:700; color:var(--mx-dim); letter-spacing:.04em; text-transform:uppercase; }
.rs-section > summary { cursor:pointer; }
.rs-section .rs-section { border-top:0; padding-top:0; }
.rs-list li { display:grid; gap:4px; }
.rs-list li > span:first-child { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.rs-list--plain li { padding:4px 8px; border-color:transparent; }
.rs-actions { display:flex; gap:6px; flex-wrap:wrap; }
.rs-empty { padding:14px; }
.rs-id { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; }
.rs-id__k { color:var(--mx-faint); font-size:11px; }
.rs-id__v { font-size:12px; overflow-wrap:anywhere; }
.rs-id__v--secret { user-select:all; }
.rs-minted { margin:8px 0; padding:10px; border:1px dashed var(--mx-iris); border-radius:9px; display:grid; gap:6px; }
.rs-inline { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:8px; }
.rs-inline .mx-input--small { max-width:240px; }
.rs-lend { margin-top:4px; }
.rs-lend__price { width:90px; }
.rs-kv { display:grid; gap:4px; font-size:12px; }

/* Side */
.rs-side__tabs { margin-bottom:10px; }
.rs-side__tabs .mx-tab span { margin-left:4px; color:var(--mx-faint); font-variant-numeric:tabular-nums; }
.rs-side__body { display:grid; gap:8px; }
.rs-share { margin-top:6px; }
.rs-share .mx-input--small { flex:1 1 120px; max-width:none; }
