/* Control panel extras on top of 95.css */
body.page #panel { max-width: 1040px; }
.tabs { display: flex; gap: 0; padding-left: 4px; position: relative; z-index: 1; flex-wrap: wrap; }
.tabs [role=tab] {
  font: inherit; border: 0; background: var(--face); padding: 3px 10px 4px; margin-top: 2px; cursor: pointer;
  box-shadow: inset 1px 1px var(--hi), inset -1px 0 var(--dark), inset -2px 0 var(--shadow), inset 2px 2px var(--light);
  border-radius: 3px 3px 0 0;
}
.tabs [role=tab][aria-selected=true] { margin-top: 0; padding-bottom: 6px; margin-bottom: -2px; position: relative; z-index: 2; }
.tab-body { box-shadow: var(--out); padding: 12px; min-height: 420px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

table.list { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--field); }
table.list th { text-align: left; font-weight: normal; background: var(--face); box-shadow: var(--out); padding: 2px 6px; position: sticky; top: 0; }
table.list td { padding: 3px 6px; border-bottom: 1px solid #eee; vertical-align: middle; }
table.list tr.sel td { background: var(--navy); color: #fff; }
table.list tr.sel td a { color: #fff; }
table.list tr:hover td { background: #e8e8ff; }
table.list tr.sel:hover td { background: var(--navy); }
table.list td.c, table.list th.c { text-align: center; width: 1%; white-space: nowrap; }
table.list input.field-in { padding: 1px 3px; }
.list-wrap { max-height: 380px; overflow: auto; }

.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbar .spacer { flex: 1; }
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.muted { color: var(--shadow); }
.check { display: inline-flex; gap: 4px; align-items: center; margin: 0 12px 6px 0; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-item { background: #fff; box-shadow: var(--field); padding: 4px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.media-item .prev { aspect-ratio: 4/3; background: var(--face); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-item .prev img { width: 100%; height: 100%; object-fit: cover; }
.media-item .prev canvas { width: 32px; height: 32px; }
.media-item .name { word-break: break-all; }
.media-item .row { display: flex; gap: 4px; }
.media-item .row .btn { min-width: 0; padding: 2px 6px; flex: 1; }
.media-item.pick { cursor: pointer; }
.media-item.pick:hover { outline: 2px solid var(--navy); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chip { position: relative; width: 80px; height: 60px; box-shadow: var(--field); background: var(--face); padding: 2px; }
.chip img { width: 100%; height: 100%; object-fit: cover; }
.chip button { position: absolute; top: 2px; right: 2px; min-width: 0; padding: 0 4px; font: bold 10px var(--mono); }
.cover-prev { width: 160px; height: 120px; box-shadow: var(--field); background: var(--face); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 6px; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.link-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 4px; margin-bottom: 4px; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-bg .window { position: relative; width: min(760px, 100%); max-height: 90vh; }
.modal-bg .window-body { overflow: auto; }
.progress { height: 16px; box-shadow: var(--field); background: #fff; padding: 2px; }
.progress div { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--navy) 0 8px, transparent 8px 10px); }
