/* App Hub 1.5: information density controls and cached website preview thumbnails. */
.card-detail-toggle{display:none;align-self:flex-start;border:1px solid #dae5f1;border-radius:7px;color:#647b94;background:#f7fafd;padding:3px 7px;font-size:11px;font-weight:650;cursor:pointer;min-height:29px}
.card-detail-toggle:focus-visible{outline:2px solid #3c7ac6}
.card-detail-toggle span{margin-left:2px}
body[data-hub-density="mini"] .cards:not(.list-view){grid-template-columns:repeat(auto-fill,minmax(166px,1fr));gap:9px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card{padding:12px;gap:6px;border-radius:12px;min-height:110px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-logo{height:32px;width:32px;font-size:17px;border-radius:9px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card h3{font-size:13px;line-height:1.25;margin:0}
body[data-hub-density="mini"] .cards:not(.list-view) .card-main{min-height:0}
body[data-hub-density="mini"] .cards:not(.list-view) .card-footer{padding-top:5px;gap:4px}
body[data-hub-density="mini"] .cards:not(.list-view) .card-footer a{min-height:30px;font-size:11px;padding:4px 6px}
body[data-hub-density="mini"] .cards:not(.list-view) .card-actions .icon-button{min-height:30px;min-width:29px;font-size:16px}
body[data-hub-density="mini"][data-hub-previews="true"] .cards:not(.list-view) .app-cover{display:flex;min-height:57px;height:57px;padding:5px 8px;border-radius:9px;margin-bottom:0}
body[data-hub-density="mini"] .cards:not(.list-view) .card-main p,
body[data-hub-density="mini"] .cards:not(.list-view) .card-location,
body[data-hub-density="mini"] .cards:not(.list-view) .meta,
body[data-hub-density="mini"] .cards:not(.list-view) .card-tags,
body[data-hub-density="mini"] .cards:not(.list-view) .repo{display:none}
body[data-hub-density="mini"] .cards:not(.list-view) .card-detail-toggle{display:inline-flex;align-items:center;justify-content:center;gap:2px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card.expanded .card-main p{display:-webkit-box}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card.expanded .card-location{display:flex}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card.expanded .meta,
body[data-hub-density="mini"] .cards:not(.list-view) .app-card.expanded .card-tags{display:flex}
body[data-hub-density="mini"][data-hub-previews="true"] .cards:not(.list-view) .app-card.expanded .app-cover{display:flex;height:85px;min-height:85px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card.expanded .repo{display:inline-flex}
body[data-hub-details="hide"] .cards:not(.list-view) .card-detail-toggle{display:inline-flex}
body[data-hub-details="hide"] .cards:not(.list-view) .app-card:not(.expanded) .card-main p,
body[data-hub-details="hide"] .cards:not(.list-view) .app-card:not(.expanded) .card-location,
body[data-hub-details="hide"] .cards:not(.list-view) .app-card:not(.expanded) .meta,
body[data-hub-details="hide"] .cards:not(.list-view) .app-card:not(.expanded) .card-tags{display:none}
body[data-hub-details="hide"] .cards:not(.list-view) .app-card.expanded .card-main p{display:-webkit-box}
body[data-hub-details="show"] .cards:not(.list-view) .card-main p{display:-webkit-box}
body[data-hub-details="show"] .cards:not(.list-view) .card-location{display:flex}
body[data-hub-details="show"] .cards:not(.list-view) .meta,
body[data-hub-details="show"] .cards:not(.list-view) .card-tags{display:flex}
body[data-hub-density="compact"] .cards:not(.list-view){grid-template-columns:repeat(auto-fill,minmax(218px,1fr));gap:10px}
body[data-hub-density="compact"] .cards:not(.list-view) .app-card:not(.expanded) .meta,
body[data-hub-density="compact"] .cards:not(.list-view) .app-card:not(.expanded) .card-tags{display:none}
body[data-hub-density="compact"] .cards:not(.list-view) .card-detail-toggle{display:inline-flex}
body[data-hub-density="compact"] .cards:not(.list-view) .app-card.expanded .meta,
body[data-hub-density="compact"] .cards:not(.list-view) .app-card.expanded .card-tags{display:flex}
/* Cached previews are loaded only from this application's own same-origin /previews directory. */
.app-cover.cached-cover{padding:0;align-items:stretch}
.app-cover.cached-cover:after{display:none}
.app-cover.cached-cover img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.app-cover.cached-cover .cached-preview-mark{position:absolute;bottom:4px;right:6px;padding:2px 5px;border-radius:5px;color:#fff;background:#143153bb;font-size:9px}
.view-density-toggle{border:1px solid #cfdaea;border-radius:9px;background:white;color:#314e72;font-size:12px;font-weight:700;padding:7px 10px;min-height:37px;cursor:pointer}
.view-density-toggle:hover{background:#edf4ff}
@media(max-width:650px){body[data-hub-density="mini"] .cards:not(.list-view){grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card{padding:9px;min-width:0;gap:5px}
body[data-hub-density="mini"] .cards:not(.list-view) .app-card h3{font-size:12px}
body[data-hub-density="mini"] .cards:not(.list-view) .card-footer a{font-size:10px;min-height:28px}
.view-density-toggle{padding:7px 8px}}

.hub-screen-status{margin:4px 0 0!important;font-size:11px;color:#536985}.hub-actions-link{font-size:11px;font-weight:650;color:#2e5c95;text-decoration:underline;text-underline-offset:2px}
/* Progressive disclosure of rarely needed bookmark import/export tools. */
.tools-row .tools{display:none}
.hub-bookmark-help{border:1px solid #dce6f2;background:white;border-radius:10px;padding:0}
.hub-bookmark-help summary{cursor:pointer;padding:12px 13px;color:#2b4e77;font-size:12px;font-weight:750}
.hub-bookmark-help summary:focus-visible{outline:2px solid #4688d3;outline-offset:2px}
.hub-bookmark-help[open] summary{border-bottom:1px solid #e7edf5}
.hub-bookmark-guide{display:grid;gap:11px;padding:13px 15px}
.hub-bookmark-guide h4{font-size:12px;color:#2b486a;margin:3px 0 0}
.hub-bookmark-guide ol{margin:0;padding-left:19px;font-size:12px;line-height:1.7;color:#546983}
.hub-bookmark-guide p{line-height:1.6}

/* v1.7: individual logos and previews remain visible even in Minimal view. */
.app-cover.logo-cover{display:flex;align-items:center;justify-content:center;padding:6px;background:linear-gradient(125deg,var(--hub-start,#214f86),var(--hub-end,#9fc2e9))}
.app-cover.logo-cover:after{display:none}
.app-cover.logo-cover img.cached-image{display:block;width:64px;height:64px;max-width:70%;max-height:82%;object-fit:contain;border-radius:14px;padding:4px;background:#ffffffeb;box-shadow:0 4px 14px #1b305a33}
body[data-hub-density="compact"] .app-cover.logo-cover img.cached-image{width:43px;height:43px;border-radius:9px}
body[data-hub-density="mini"] .app-cover.logo-cover img.cached-image{width:37px;height:37px;max-height:85%;border-radius:9px;padding:3px}
body[data-hub-density="mini"] .app-cover .cover-monogram{font-size:23px}
body[data-hub-density="mini"] .app-cover small{display:none}
body[data-hub-density="mini"] .app-cover .cached-preview-mark{font-size:8px;bottom:2px;right:3px}
.hub-mode-label{display:grid;gap:5px;color:#4c6281;font-size:12px;font-weight:700}
.hub-mode-label select{min-height:38px;border:1px solid #d7e1ee;border-radius:8px;padding:6px 9px;background:white;width:100%}
@media(max-width:650px){body[data-hub-density="mini"][data-hub-previews="true"] .cards:not(.list-view) .app-cover{height:52px;min-height:52px}}

.hub-test-environment-banner{position:sticky;top:0;z-index:99999;width:100%;box-sizing:border-box;padding:9px 14px;text-align:center;background:#a11919;color:#fff;font:800 13px/1.4 system-ui,sans-serif;letter-spacing:.04em;box-shadow:0 2px 10px #0003}
@media(max-width:650px){.hub-test-environment-banner{padding:8px 5px;font-size:11px}}
