/* ioKort Media · Barra única + galería sin paneles. Compatibilidad Kort UI v2. */
:root { --media-bg:#171c28; --media-tint:#009d81; }
html,body{min-width:320px;}
body{background:#171c28!important;background-image:none!important;color:#f3f7f9}
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Todo el buscador, filtros y acciones vive DENTRO del banner principal. */
header.header{position:sticky;z-index:60;top:0;display:flex;align-items:center;justify-content:space-between;gap:14px;height:auto;min-height:62px;padding:10px clamp(12px,1.8vw,26px);background:#0e1924f5;border-bottom:1px solid #81d9c124;backdrop-filter:blur(14px);max-width:none;box-shadow:none}
header.header .brand{display:flex;align-items:center;gap:9px;flex:0 0 auto;min-width:0}
header.header .brand .logo{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#009d81,#00245a);font-size:20px;box-shadow:none}
header.header .brand b{font-size:16px;color:#fff;white-space:nowrap;letter-spacing:-.3px}
header.header .brand i{color:#a6d8de}
.header-workspace{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}
.header-workspace.hidden{display:none!important}
.header-workspace .media-filters{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;width:auto;max-width:none;margin:0;padding:0;background:none;border:0;box-shadow:none;border-radius:0}
.header-workspace .media-filters :is(input,select){display:block;min-width:0;max-width:100%;width:auto;min-height:38px;height:38px;margin:0!important;padding:7px 12px!important;flex:0 1 auto;border-radius:10px;color:#e7f5f7;font-size:12px;background-color:#142531;border:1px solid #3a5a615e;box-shadow:none;line-height:1.2;
 --kort-width:100%;--kort-height:38px;--kort-control-padding:7px 12px;--kort-margin:0px;--kort-radius:10px;--rgb-radio:10px;--kort-dark-surface:#142531;--rgb-superficie:#142531;--kort-dark-text:#e7f5f7;--kort-intensity:.42;--_kort-intensity:.42;--kort-input-bajada:0px;--kort-sink:0px;--kort-sink-scale:1;--kort-scale:1;--kort-lift:0px;--kort-shadow-opacity:.1}
.header-workspace .media-filters :is(input,select).rgb-panel{max-width:100%;transform:none!important}
.header-workspace .media-filters :is(input,select).rgb-panel:hover{box-shadow:none}
.header-workspace .media-filters #q{flex:1 1 210px;min-width:95px}
.header-workspace .media-filters #type{flex:0 1 150px}
.header-workspace .media-filters #album{flex:0 1 185px}
.header-workspace .media-filters #sort{flex:0 1 137px}
.header-workspace .media-filters #statusFilter:not(.hidden){flex:0 1 126px}
.header-workspace .intro-actions{display:flex;align-items:center;flex:0 0 auto;gap:3px;width:auto}
.header-workspace .intro-actions button,header.header .header-actions button{display:grid!important;place-items:center;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;padding:6px!important;margin:0!important;border:1px solid #507b7755!important;border-radius:10px!important;background-color:#152530!important;color:#d3eeeb!important;box-shadow:none!important;transform:none!important;font-size:18px!important;--kort-width:36px;--kort-height:36px;--kort-button-margin:0px;--kort-button-padding:6px;--kort-button-radius:10px;--kort-dark-surface:#152530;--kort-dark-text:#d3eeeb;--kort-margin:0px;--kort-intensity:.55;--kort-lift:0px;--kort-scale:1}
.header-workspace .intro-actions button.hidden,header.header .header-actions button.hidden{display:none!important}
.header-workspace .intro-actions button:hover,header.header .header-actions button:hover{background:#193c3c!important;color:#d2fff5!important}
header.header .header-actions{display:flex;align-items:center;gap:5px;margin:0;flex:0 0 auto}
header.header .header-actions.hidden{display:none!important}
.header-workspace .intro-actions button .i-svg svg,header.header .header-actions button .i-svg svg{width:17px;height:17px}
#uploadLabel{border-color:#3e998a!important;background-color:#12493f!important}
/* No hay segundo título, segundo buscador, separadores ni paneles en el contenido. */
main{max-width:none!important;margin:0!important;padding:12px clamp(10px,1.5vw,25px) 38px!important}
#library{margin:0;padding:0}
.library-status{margin:0;padding:0;min-height:0}
#loading{padding:0 0 5px;font-size:11px}
/* Miniaturas sobre el mismo fondo de la página, nunca sobre tarjetas */
.files{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:10px;align-items:start;padding:0;margin:0;width:100%;max-width:100%}
.media-tile,.file.media-tile,.media-tile .tile-picture,.media-tile .tile-preview,.media-tile .tile-preview:where(:hover,:focus-visible){border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;background-image:none!important;transform:none!important}
.media-tile{aspect-ratio:1/1;overflow:visible}
.media-tile .tile-preview{overflow:hidden}
.media-tile .tile-preview img{width:100%;height:100%;object-fit:contain;background:none!important;box-shadow:none!important;filter:none}
.media-tile--document .tile-preview,.media-tile.tile-no-preview .tile-preview{background:transparent!important;background-image:none!important;color:#85a8b3!important}
.media-tile.tile-no-preview .tile-preview .i-svg svg{width:34px;height:34px;opacity:.6}
/* Overlay únicamente cuando se solicita. Se superpone a la imagen; no ocupa espacio. */
.media-tile .tile-overlay{border-radius:0 0 5px 5px;padding:24px 5px 5px;background:linear-gradient(0deg,rgba(3,10,14,.95),rgba(3,10,14,.58) 65%,transparent);box-shadow:none}
.media-tile .tile-name{font-size:11px}
.media-tile .tile-actions .icon-action{font-size:0!important;background:#ffffff1a!important}
.media-tile .tile-actions .icon-action:hover{background:#009d81!important}
.media-tile:has(.tile-select input:checked){outline:2px solid #56dcc6;outline-offset:2px}
#bulkBar.hidden{display:none!important}
#bulkBar{margin-bottom:9px}
nav{margin-top:17px}
/* Monitor intermedio: barra de búsqueda en la parte inferior del MISMO header */
@media(max-width:1100px){
 header.header{display:grid;grid-template-columns:1fr auto;column-gap:10px;row-gap:8px;}
 header.header .brand{grid-column:1;grid-row:1}
 header.header .header-actions{grid-column:2;grid-row:1;justify-content:flex-end}
 .header-workspace{grid-column:1/-1;grid-row:2;min-width:0;}
 .header-workspace .media-filters #q{flex:1 1 180px}
 .files{grid-template-columns:repeat(auto-fill,minmax(124px,1fr))}
}
@media(max-width:650px){
 header.header{padding:8px 10px;row-gap:8px}
 header.header .brand .logo{width:30px;height:30px;font-size:17px}
 header.header .brand b{font-size:15px}
 .header-workspace{flex-wrap:wrap;gap:6px}
 .header-workspace .media-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;width:100%;flex-basis:100%}
 .header-workspace .media-filters #q{grid-column:1/-1;width:100%}
 .header-workspace .media-filters #type,.header-workspace .media-filters #album,.header-workspace .media-filters #sort{width:100%;min-width:0;max-width:100%}
 .header-workspace .media-filters #statusFilter:not(.hidden){grid-column:1/-1;min-width:0;width:100%;max-width:100%}
 .header-workspace .media-filters :is(input,select){height:36px;min-height:36px;padding:7px 8px!important;font-size:11px;--kort-height:36px;--kort-control-padding:7px 8px}
 .header-workspace .intro-actions{margin-left:auto;gap:5px}
 .header-workspace .intro-actions:has(> button:not(.hidden)){width:100%;justify-content:flex-end}
 .header-workspace .intro-actions button,header.header .header-actions button{height:32px!important;min-height:32px!important;width:32px!important;min-width:32px!important;max-width:32px!important;--kort-height:32px;--kort-width:32px}
 main{padding:9px 8px 30px!important}
 .files{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .media-tile .tile-name{font-size:9px}
 .tile-overlay{padding:16px 2px 3px}
 .tile-actions .icon-action{width:22px!important;min-width:22px!important;height:22px!important;min-height:22px!important;padding:3px!important}
}
@media(max-width:350px){.files{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.media-tile,.media-tile *{transition:none!important}}
