
:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#20252c;background:#f5f7f9}
*{box-sizing:border-box}body{margin:0;min-height:100vh;display:flex;background:#f5f7f9}
.sidebar{width:240px;min-height:100vh;background:#171b22;color:#fff;padding:28px 18px;display:flex;flex-direction:column}
.brand{padding:0 10px 28px}.brand-main{font-size:18px;font-weight:800}.brand-sub{margin-top:5px;font-size:13px;color:#a9b0ba}
nav{display:grid;gap:6px}.nav-item{border:0;border-radius:8px;padding:12px 14px;background:transparent;color:#d8dde5;text-align:left;font-size:14px}
.nav-item.active{background:#292f39;color:#fff;font-weight:700}.nav-item.disabled{opacity:.42}.sidebar-footer{margin-top:auto;padding:16px 10px 0;color:#7f8895;font-size:12px}
.main{flex:1;padding:34px 40px 50px;overflow-x:auto}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:26px}
h1{margin:0;font-size:28px}.topbar p{margin:7px 0 0;color:#747d88;font-size:14px}
.primary,.secondary{border-radius:8px;padding:11px 17px;font-weight:700}.primary{border:0;background:#262d36;color:#fff}.secondary{border:1px solid #dce1e6;background:#fff;color:#343b44}
.summary{display:grid;grid-template-columns:repeat(3,minmax(150px,220px));gap:14px;margin-bottom:22px}.summary-card,.panel{background:#fff;border:1px solid #e7eaee;border-radius:12px}
.summary-card{padding:18px 20px}.summary-card span{color:#767f89;font-size:13px}.summary-card strong{display:block;margin-top:9px;font-size:27px}
.panel{overflow:hidden}.toolbar{display:flex;padding:16px;border-bottom:1px solid #eceff2}.toolbar input{margin-left:auto;width:260px;min-height:38px;border:1px solid #dfe3e8;border-radius:8px;padding:9px 12px}
.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;min-width:980px}th,td{padding:15px 18px;border-bottom:1px solid #eef0f3;text-align:left}th{font-size:12px;color:#727b85;background:#fafbfc}td{font-size:14px}
.device-link{border:0;background:transparent;padding:0;text-align:left;cursor:pointer}.device-name{display:block;font-weight:700;color:#20252c}.device-code{display:block;margin-top:3px;color:#9299a2;font-size:11px}
.status{display:inline-flex;align-items:center;gap:7px;font-weight:700;font-size:13px}.status-dot{width:8px;height:8px;border-radius:50%;background:currentColor}.status.online{color:#287a4f}.status.offline{color:#c24646}
.small-action{border:1px solid #d7dce2;background:#fff;border-radius:7px;padding:8px 11px;font-weight:700;cursor:pointer}.small-action:hover{background:#f5f7f9}
.modal-backdrop{position:fixed;inset:0;background:rgba(17,22,29,.46);display:grid;place-items:center;padding:20px;z-index:20}.modal-backdrop.hidden{display:none}
.modal{width:min(560px,100%);background:#fff;border-radius:14px;padding:24px;box-shadow:0 24px 70px rgba(15,23,42,.18)}
.modal-header{display:flex;justify-content:space-between;gap:18px;margin-bottom:20px}.modal-header h2{margin:0}.modal-header p{margin:6px 0 0;color:#7a838e}.icon-button{border:0;background:transparent;font-size:28px;color:#707985;cursor:pointer}
#registerForm{display:grid;gap:15px}#registerForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#registerForm input,#registerForm select{min-height:42px;border:1px solid #dce1e6;border-radius:8px;padding:10px 12px;font:inherit;background:#fff}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.form-message{min-height:18px;font-size:13px}
.status-grid{display:grid;grid-template-columns:160px 1fr;gap:12px 18px;margin:0}.status-grid dt{color:#77808b}.status-grid dd{margin:0;font-weight:700}

.status.disabled{color:#8b6f47}.small-action:disabled{opacity:.42;cursor:not-allowed;background:#f5f7f9}

.hidden{display:none!important}
.file-button{cursor:pointer}
.content-toolbar{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #eceff2;color:#747d88;font-size:13px}
.content-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;padding:18px}
.content-card{border:1px solid #e5e8ec;border-radius:10px;padding:14px;display:grid;grid-template-columns:56px 1fr auto;align-items:center;gap:12px;background:#fff}
.content-icon{width:56px;height:48px;border-radius:8px;background:#f2f4f7;display:grid;place-items:center;font-size:12px;font-weight:800;color:#68717d}
.content-meta{min-width:0;display:grid;gap:4px}.content-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-meta span{font-size:12px;color:#808893}.hash-text{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.empty-card{padding:34px;text-align:center;color:#818995}
#sendForm{display:grid;gap:15px}#sendForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}#sendForm select{min-height:42px;border:1px solid #dce1e6;border-radius:8px;padding:10px 12px;background:#fff}

.modal-wide{width:min(980px,calc(100vw - 40px))}
.playlist-list{display:grid}
.playlist-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px 18px;border-bottom:1px solid #eef0f3}
.playlist-row:last-child{border-bottom:0}.playlist-row>div:first-child{display:grid;gap:4px}.playlist-row span{font-size:12px;color:#808893}
.playlist-actions{display:flex;gap:8px}
#playlistForm,#applyPlaylistForm{display:grid;gap:16px}#playlistForm>label,#applyPlaylistForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#playlistForm input,#playlistForm select,#applyPlaylistForm select{min-height:40px;border:1px solid #dce1e6;border-radius:8px;padding:9px 11px;background:#fff}
.playlist-settings{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.playlist-settings label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#505965}
.playlist-builder{display:grid;grid-template-columns:1fr 1.15fr;gap:16px}.playlist-builder h3{font-size:14px;margin:0 0 8px}
.builder-list{border:1px solid #e1e5e9;border-radius:10px;min-height:260px;max-height:390px;overflow:auto;background:#fafbfc}
.builder-item{display:flex;align-items:center;gap:10px;padding:11px 12px;border-bottom:1px solid #eceff2;background:#fff}.builder-item:last-child{border-bottom:0}
.builder-item>div:first-child{display:grid;gap:3px}.builder-item span{font-size:11px;color:#858d97}.builder-item.selected{align-items:flex-start}.grow{flex:1;display:grid;gap:6px}
.order-num{width:24px;height:24px;border-radius:50%;background:#eef1f4;display:grid!important;place-items:center;font-size:11px;font-weight:800}
.builder-buttons{display:flex!important;gap:4px}.tiny-btn{border:1px solid #d7dce2;background:#fff;border-radius:6px;min-width:28px;height:28px;cursor:pointer}.tiny-btn:disabled{opacity:.35}
.duration-label{display:flex!important;align-items:center;gap:6px;font-size:11px!important;font-weight:500!important;color:#68717d!important}.duration-input{width:70px;min-height:30px!important;padding:4px 7px!important}
.video-full{font-size:11px;color:#68717d}.builder-empty{padding:28px;text-align:center;color:#9299a2;font-size:13px}
@media(max-width:900px){.playlist-builder{grid-template-columns:1fr}.playlist-settings{grid-template-columns:1fr}}

.target-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.target-toolbar label{display:grid;gap:6px;font-size:13px;font-weight:700;color:#505965}
.target-toolbar select{min-height:40px;border:1px solid #dce1e6;border-radius:8px;padding:9px 11px;background:#fff}
.target-actions{display:flex;align-items:center;gap:8px}.target-actions strong{margin-left:auto;font-size:13px;color:#59626d}
.device-select-list{border:1px solid #e1e5e9;border-radius:10px;max-height:360px;overflow:auto;background:#fafbfc}
.device-choice{display:flex!important;grid-template-columns:none!important;align-items:center;gap:12px!important;padding:12px 14px;border-bottom:1px solid #eceff2;background:#fff;cursor:pointer}
.device-choice:last-child{border-bottom:0}.device-choice input{width:16px!important;height:16px!important;min-height:auto!important}
.device-choice div{display:grid;gap:3px}.device-choice strong{font-size:13px}.device-choice span{font-size:11px;color:#808893}
.deployment-counts{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:16px}
.deployment-counts>div{border:1px solid #e5e8ec;border-radius:9px;padding:12px;background:#fafbfc}.deployment-counts span{display:block;font-size:11px;color:#7c8590}.deployment-counts strong{display:block;margin-top:5px;font-size:20px}
.deployment-targets{border:1px solid #e1e5e9;border-radius:10px;max-height:420px;overflow:auto}
.deployment-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 14px;border-bottom:1px solid #eef0f3}.deployment-row:last-child{border-bottom:0}.deployment-row>div{display:grid;gap:3px}.deployment-row span{font-size:11px;color:#808893}
.deployment-status{font-weight:800!important;font-size:12px!important}.deployment-status.completed{color:#287a4f}.deployment-status.failed{color:#a13d3d}.deployment-status.pending{color:#7d8792}.deployment-status.delivered{color:#8a681d}
@media(max-width:800px){.target-toolbar{grid-template-columns:1fr}.deployment-counts{grid-template-columns:repeat(2,1fr)}}

.test-mode-box{margin-top:18px;padding:14px;border:1px dashed #d7dce2;border-radius:9px;background:#fafbfc}
.test-mode-box label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700}
.test-mode-box small{display:block;margin-top:6px;color:#7b848f}
.sync-hint{margin-bottom:14px;padding:10px 12px;border-radius:8px;background:#f6f8fa;color:#66707b;font-size:13px}

.jobs-toolbar{display:flex;gap:10px;padding:16px;border-bottom:1px solid #eceff2}
.jobs-toolbar select{min-height:38px;border:1px solid #dfe3e8;border-radius:8px;padding:8px 12px;background:#fff}
.jobs-table td,.jobs-table th{white-space:nowrap}
.job-id-short{margin-top:3px;font-size:10px;color:#9aa1aa;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.count-completed{color:#287a4f;font-weight:800}.count-failed{color:#a13d3d;font-weight:800}
.job-payload-summary{margin-bottom:14px;padding:11px 13px;border-radius:8px;background:#f6f8fa;color:#59626d;font-size:13px}
.row-result{color:#287a4f!important}.row-error{color:#a13d3d!important}

.settings-tabs{display:flex;gap:6px;margin-bottom:14px}
.settings-tab{border:1px solid #dce1e6;background:#fff;border-radius:8px;padding:9px 16px;font-weight:700;color:#606a75;cursor:pointer}
.settings-tab.active{background:#292f39;color:#fff;border-color:#292f39}
.settings-panel-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:18px;border-bottom:1px solid #eceff2}
.settings-panel-header h2{margin:0;font-size:18px}.settings-panel-header p{margin:5px 0 0;color:#7d8691;font-size:12px}
.settings-filter{padding:14px 18px;border-bottom:1px solid #eceff2}
.settings-filter select{min-height:38px;border:1px solid #dfe3e8;border-radius:8px;padding:8px 12px;background:#fff;min-width:240px}
.settings-list{display:grid}
.settings-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;padding:14px 18px;border-bottom:1px solid #eef0f3}
.settings-row:last-child{border-bottom:0}
.settings-row-main{display:grid;gap:4px}.settings-row-main strong{font-size:14px}.settings-row-main span{font-size:11px;color:#818995}
.admin-status{padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}
.admin-status.active{background:#e8f5ee;color:#287a4f}.admin-status.inactive{background:#f0f2f4;color:#7c858f}
.toggle-label{display:flex!important;align-items:center;gap:8px!important;font-weight:700!important}
.toggle-label input{width:16px!important;height:16px!important;min-height:auto!important}
#organizationForm,#locationForm{display:grid;gap:15px}
#organizationForm label,#locationForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#organizationForm input,#locationForm input,#locationForm select{min-height:42px;border:1px solid #dce1e6;border-radius:8px;padding:10px 12px;background:#fff;font:inherit}
@media(max-width:700px){.settings-row{grid-template-columns:1fr auto}.settings-row .secondary{grid-column:1/-1}.settings-panel-header{flex-direction:column}}

.row-actions{display:flex;gap:6px;justify-content:flex-end}
#deviceManageForm,#replaceDeviceForm{display:grid;gap:15px}
#deviceManageForm label,#replaceDeviceForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#deviceManageForm input,#deviceManageForm select,#replaceDeviceForm input{min-height:42px;border:1px solid #dce1e6;border-radius:8px;padding:10px 12px;background:#fff;font:inherit}
.split-actions{justify-content:space-between}.split-actions>div{display:flex;gap:8px}
.danger-button{border:1px solid #d9aaaa;background:#fff5f5;color:#a13d3d;border-radius:8px;padding:10px 15px;font-weight:800;cursor:pointer}
.danger-button:hover{background:#ffeaea}.danger-button:disabled{opacity:.5;cursor:not-allowed}
.replace-warning{padding:12px 14px;border-radius:9px;background:#fff8e7;color:#785f25;font-size:12px;line-height:1.55}
@media(max-width:650px){.split-actions{flex-direction:column;gap:12px}.split-actions>div{justify-content:flex-end;flex-wrap:wrap}}

.content-card.rich-card{grid-template-columns:120px minmax(0,1fr);align-items:start}
.content-thumb-button{border:0;background:transparent;padding:0;cursor:pointer;width:120px}
.content-thumb{width:120px;height:84px;border-radius:9px;object-fit:cover;background:#eef1f4}
.video-thumb{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#4f5863;gap:5px}
.video-thumb span{font-size:24px}.video-thumb small{font-size:11px;font-weight:800}
.content-card-actions{grid-column:1/-1;display:flex;gap:7px;justify-content:flex-end;padding-top:2px}
.danger-mini{border:1px solid #e1bcbc;background:#fff6f6;color:#a13d3d;border-radius:7px;padding:8px 11px;font-weight:700;cursor:pointer}
.danger-mini:hover{background:#ffecec}
.content-preview-body{display:grid;place-items:center;min-height:300px;background:#12161c;border-radius:10px;overflow:hidden}
.content-preview-image{max-width:100%;max-height:70vh;object-fit:contain}
.content-preview-video{width:100%;max-height:70vh;background:#000}
@media(max-width:640px){
  .content-card.rich-card{grid-template-columns:90px minmax(0,1fr)}
  .content-thumb-button,.content-thumb{width:90px;height:64px}
}

.device-playlist-section{margin-top:20px;border-top:1px solid #e7eaee;padding-top:18px}
.device-section-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}
.device-section-header h3{margin:0;font-size:16px}.device-section-header p{margin:5px 0 0;color:#7a838e;font-size:12px}
.device-section-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.current-playlist-body{display:grid;gap:12px}
.playlist-device-settings{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.playlist-device-settings>div{padding:11px 12px;border:1px solid #e5e8ec;border-radius:8px;background:#fafbfc}
.playlist-device-settings span{display:block;font-size:11px;color:#808893}.playlist-device-settings strong{display:block;margin-top:4px;font-size:13px}
.device-playlist-items{border:1px solid #e1e5e9;border-radius:9px;overflow:hidden}
.device-playlist-item{display:flex;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #eef0f3}.device-playlist-item:last-child{border-bottom:0}
.device-playlist-item .grow{display:grid;gap:3px}.device-playlist-item .grow span{font-size:11px;color:#818995}
.shared-playlist-warning{padding:11px 13px;border-radius:8px;background:#fff8e7;color:#785f25;font-size:12px;line-height:1.55}
#devicePlaylistPickerForm{display:grid;gap:15px}#devicePlaylistPickerForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#devicePlaylistPickerForm select{min-height:42px;border:1px solid #dce1e6;border-radius:8px;padding:10px 12px;background:#fff}
@media(max-width:700px){.device-section-header{flex-direction:column}.playlist-device-settings{grid-template-columns:1fr}}

.schedule-list{display:grid}
.schedule-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid #eef0f3}
.schedule-row:last-child{border-bottom:0}.schedule-main{display:grid;gap:5px}.schedule-main>span{font-size:12px;color:#808893}
.schedule-title-line{display:flex;align-items:center;gap:9px}
#scheduleForm,#applyScheduleForm{display:grid;gap:16px}#scheduleForm>label,#applyScheduleForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#scheduleForm input,#scheduleForm select,#applyScheduleForm select{min-height:40px;border:1px solid #dce1e6;border-radius:8px;padding:9px 11px;background:#fff}
.field-title{margin-bottom:8px;font-size:13px;font-weight:700;color:#505965}
.weekday-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.weekday-grid label{display:flex;align-items:center;justify-content:center;gap:5px;padding:9px 5px;border:1px solid #dfe3e8;border-radius:8px;background:#fafbfc;font-size:12px;font-weight:700}
.weekday-grid input{min-height:auto!important;width:15px!important;height:15px!important}
.time-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.time-pair label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
.schedule-help{padding:11px 13px;border-radius:8px;background:#f6f8fa;color:#68717d;font-size:12px;line-height:1.55}
@media(max-width:700px){.schedule-row{align-items:flex-start;flex-direction:column}.weekday-grid{grid-template-columns:repeat(4,1fr)}.time-pair{grid-template-columns:1fr}}

.summary{grid-template-columns:repeat(3,minmax(150px,220px)) 1fr}
.summary-card-disabled{grid-column:4;justify-self:end;width:220px}
@media(max-width:1100px){
  .summary{grid-template-columns:repeat(2,minmax(150px,220px))}
  .summary-card-disabled{grid-column:auto;justify-self:stretch;width:auto}
}

.wake-status-box{margin-top:12px;padding:11px 13px;border:1px solid #e1e5e9;border-radius:8px;background:#fafbfc;display:grid;grid-template-columns:auto 1fr;gap:4px 10px;align-items:center}
.wake-status-box span{font-size:12px;color:#737d88}.wake-status-box strong{font-size:12px}.wake-status-box small{grid-column:1/-1;color:#8a929c;font-size:11px}
.wake-connected{color:#287a4f}.wake-disconnected{color:#8a681d}

.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.summary-card,.summary-card-disabled{width:auto;min-width:0;grid-column:auto;justify-self:stretch}
.device-toolbar{display:flex;align-items:center;gap:10px}
.device-toolbar select{min-height:38px;min-width:180px;border:1px solid #dfe3e8;border-radius:8px;padding:8px 12px;background:#fff}
.device-selection-actions{display:flex;align-items:center;gap:8px}
.device-selection-actions strong{font-size:12px;color:#69737e;white-space:nowrap}
.check-col{width:42px;text-align:center}
.check-col input,.device-select-checkbox{width:16px;height:16px}
.device-row{cursor:pointer}.device-row:hover{background:#fafbfc}
#bulkPlaylistForm,#devicePlaylistPickerForm{display:grid;gap:15px}
#bulkPlaylistForm label,#devicePlaylistPickerForm label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#505965}
#bulkPlaylistForm select,#devicePlaylistPickerForm select{min-height:42px;border:1px solid #dce1e6;border-radius:8px;padding:10px 12px;background:#fff}
.bulk-playlist-picker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}
@media(max-width:700px){.bulk-playlist-picker-grid{grid-template-columns:1fr}}
@media(max-width:1100px){.summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.summary{grid-template-columns:1fr}.device-toolbar{flex-wrap:wrap}.device-toolbar #searchInput{width:100%;margin-left:0}}

.bulk-current-hint{
  margin:6px 0 0;
  padding:8px 10px;
  border-radius:7px;
  background:#f6f8fa;
  color:#59626d;
  font-size:12px;
  font-weight:700;
}

.device-screen-body{
  min-height:320px;
  display:grid;
  place-items:center;
  border-radius:10px;
  overflow:hidden;
  background:#11161d;
}
.device-screen-image{
  display:block;
  max-width:100%;
  max-height:72vh;
  object-fit:contain;
}

 .modal-device-detail{width:min(860px,calc(100vw - 40px))}
.device-detail-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start}
.device-status-column{min-width:0}
.device-detail-grid .status-grid{grid-template-columns:135px minmax(0,1fr);gap:10px 14px}
.device-detail-grid .current-playlist-body{max-height:430px;overflow:auto}
.device-detail-grid .device-section-header{margin-bottom:12px}

.group-filter-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.group-view-switch{display:flex;gap:6px}
.group-mode-btn{
  min-height:38px;
  padding:8px 15px;
  border:1px solid #d9dee4;
  border-radius:8px;
  background:#fff;
  color:#56606b;
  font-weight:800;
  cursor:pointer
}
.group-mode-btn.active{
  background:#292f39;
  color:#fff;
  border-color:#292f39
}
.group-button-bar{
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap
}
.group-select-btn{
  min-height:36px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 12px;
  border:1px solid #dce1e6;
  border-radius:999px;
  background:#fff;
  color:#525c67;
  font-weight:700;
  cursor:pointer
}
.group-select-btn span{
  min-width:20px;
  height:20px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#eef1f4;
  color:#6b7480;
  font-size:11px
}
.group-select-btn.active{
  background:#eef2f6;
  border-color:#8e99a6;
  color:#222a33
}
.group-select-btn.active span{
  background:#292f39;
  color:#fff
}
.group-empty,
.group-prompt{
  color:#8a929c;
  font-size:12px
}
.group-prompt{
  text-align:center;
  padding:28px!important
}
.device-toolbar{
  position:relative;
  flex-wrap:wrap
}
.device-toolbar #searchInput{
  margin-left:auto
}
@media(max-width:900px){
  .group-button-bar{width:100%;order:3}
}

.group-summary-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.group-context-bar{
  display:flex;
  align-items:center;
  gap:12px;
}
.group-context-bar strong{font-size:14px}
.group-device-controls{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
.group-summary-list{
  display:grid;
}
.group-summary-row{
  display:grid;
  grid-template-columns:minmax(240px,1.1fr) minmax(300px,1.5fr) auto;
  gap:18px;
  align-items:center;
  padding:16px 18px;
  border-bottom:1px solid #eef0f3;
  background:#fff;
}
.group-summary-row:last-child{border-bottom:0}
.group-summary-name{
  display:grid;
  gap:4px;
  cursor:pointer;
}
.group-summary-name strong{font-size:14px}
.group-summary-name strong span{color:#6e7782;font-weight:700}
.group-summary-name small,
.group-summary-device small{
  color:#818995;
  font-size:11px;
}
.group-summary-device{
  display:grid;
  gap:4px;
}
.group-summary-action{
  display:flex;
  justify-content:flex-end;
}
#groupSearchInput{
  min-height:38px;
  width:260px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
}
@media(max-width:850px){
  .group-summary-row{grid-template-columns:1fr}
  .group-summary-action{justify-content:flex-start}
  .group-device-controls{width:100%;margin-left:0;flex-wrap:wrap}
}

.device-view-switch{
  display:flex;
  align-items:center;
  gap:10px;
}
.view-toggle-btn{
  min-height:38px;
  padding:8px 15px;
  border:1px solid #d9dee4;
  border-radius:8px;
  background:#fff;
  color:#56606b;
  font-weight:800;
  cursor:pointer;
}
.view-toggle-btn.active{
  background:#292f39;
  border-color:#292f39;
  color:#fff;
}
.device-view-label{
  font-size:12px;
  color:#7a838e;
  font-weight:700;
}
.group-table-row{
  background:#fff;
}
.group-name-link{
  border:0;
  padding:0;
  background:transparent;
  color:#202832;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.group-name-link:hover{
  text-decoration:underline;
}
.group-name-link span{
  color:#68727d;
  font-weight:700;
}
.group-status-summary{
  margin-top:4px;
  color:#818995;
  font-size:11px;
}
.group-context-bar{
  display:flex;
  align-items:center;
  gap:12px;
}
.group-device-controls{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
#groupSearchInput{
  min-height:38px;
  width:260px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  margin-left:auto;
}
@media(max-width:900px){
  .group-device-controls{
    width:100%;
    margin-left:0;
    flex-wrap:wrap;
  }
  #groupSearchInput{
    width:100%;
    margin-left:0;
  }
}

/* v0.14.2: compact 9-column device table with Playlist between Device and Status */
#deviceTableWrap table{
  width:100%;
  table-layout:fixed;
}
#deviceTableWrap th:nth-child(1),
#deviceTableWrap td:nth-child(1){width:42px}
#deviceTableWrap th:nth-child(2),
#deviceTableWrap td:nth-child(2){width:16%}
#deviceTableWrap th:nth-child(3),
#deviceTableWrap td:nth-child(3){width:10%}
#deviceTableWrap th:nth-child(4),
#deviceTableWrap td:nth-child(4){width:19%}
#deviceTableWrap th:nth-child(5),
#deviceTableWrap td:nth-child(5){width:16%}
#deviceTableWrap th:nth-child(6),
#deviceTableWrap td:nth-child(6){width:10%}
#deviceTableWrap th:nth-child(7),
#deviceTableWrap td:nth-child(7){width:9%}
#deviceTableWrap th:nth-child(8),
#deviceTableWrap td:nth-child(8){width:12%}
#deviceTableWrap th:nth-child(9),
#deviceTableWrap td:nth-child(9){width:8%}

#deviceTableWrap th,
#deviceTableWrap td{
  overflow:hidden;
  text-overflow:ellipsis;
}
.playlist-cell{
  white-space:nowrap;
  color:#525c67;
  font-size:12px;
}

.content-library-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.content-view-switch{
  display:flex;
  gap:6px;
}
.content-mode-btn{
  min-height:38px;
  padding:8px 14px;
  border:1px solid #d9dee4;
  border-radius:8px;
  background:#fff;
  color:#56606b;
  font-weight:800;
  cursor:pointer;
}
.content-mode-btn.active{
  background:#292f39;
  color:#fff;
  border-color:#292f39;
}
#contentSearchInput{
  min-height:38px;
  min-width:220px;
  margin-left:auto;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
}
.content-group-bar{
  display:flex;
  align-items:center;
  gap:7px;
  padding:12px 16px;
  border-bottom:1px solid #eceff2;
  flex-wrap:wrap;
}
.content-group-btn{
  min-height:34px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 11px;
  border:1px solid #dce1e6;
  border-radius:999px;
  background:#fff;
  font-weight:700;
  cursor:pointer;
}
.content-group-btn span{
  min-width:20px;
  height:20px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#eef1f4;
  font-size:11px;
}
.content-group-btn.active{
  background:#eef2f6;
  border-color:#8e99a6;
}
.content-group-btn.active span{
  background:#292f39;
  color:#fff;
}
.content-upload-form{
  display:grid;
  gap:15px;
}
.content-upload-form>label{
  display:grid;
  gap:7px;
  font-size:13px;
  font-weight:700;
  color:#505965;
}
.content-upload-form select{
  min-height:42px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:10px 12px;
  background:#fff;
}
.upload-select-button{
  display:inline-flex!important;
  width:max-content;
  align-items:center;
}
.upload-selection-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
}
.upload-selection-toolbar strong{
  margin-left:auto;
  font-size:12px;
  color:#69737e;
}
.upload-select-all{
  display:flex!important;
  align-items:center;
  gap:7px!important;
}
.selected-upload-files{
  border:1px solid #e1e5e9;
  border-radius:9px;
  max-height:320px;
  overflow:auto;
}
.selected-upload-row{
  display:grid!important;
  grid-template-columns:20px minmax(0,1fr);
  align-items:center;
  gap:10px!important;
  padding:11px 13px;
  border-bottom:1px solid #eef0f3;
  cursor:pointer;
}
.selected-upload-row:last-child{
  border-bottom:0;
}
.selected-upload-row div{
  display:grid;
  gap:3px;
}
.selected-upload-row span{
  font-size:11px;
  color:#818995;
}
@media(max-width:700px){
  #contentSearchInput{
    width:100%;
    margin-left:0;
  }
  .upload-selection-toolbar{
    flex-wrap:wrap;
  }
}

.content-library-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:420px;
}
.content-group-sidebar{
  border-right:1px solid #e5e8ec;
  background:#fafbfc;
  min-width:0;
}
.content-group-sidebar-title{
  padding:14px 16px 10px;
  color:#7b8490;
  font-size:11px;
  font-weight:800;
}
.content-group-list{
  display:grid;
  padding:0 8px 12px;
  gap:3px;
  max-height:640px;
  overflow:auto;
}
.content-group-list-btn{
  width:100%;
  min-height:40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:7px;
  background:transparent;
  padding:8px 10px;
  text-align:left;
  color:#535d68;
  font-weight:700;
  cursor:pointer;
}
.content-group-list-btn:hover{
  background:#eef1f4;
}
.content-group-list-btn.active{
  background:#292f39;
  color:#fff;
}
.content-group-list-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.content-group-list-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}
.content-group-list-btn.active .content-group-list-count{
  background:#fff;
  color:#292f39;
}
.content-library-main{
  min-width:0;
  padding:14px;
}
.content-selection-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.content-selection-actions strong{
  font-size:12px;
  color:#69737e;
  white-space:nowrap;
}
.content-card.rich-card{
  position:relative;
}
.content-card.rich-card.selected{
  outline:2px solid #7d8894;
  outline-offset:-2px;
}
.content-select-box{
  position:absolute;
  top:9px;
  left:9px;
  z-index:3;
  width:24px;
  height:24px;
  display:grid!important;
  place-items:center;
  border-radius:6px;
  background:rgba(255,255,255,.92);
  box-shadow:0 1px 4px rgba(0,0,0,.12);
}
.content-select-checkbox{
  width:16px;
  height:16px;
}
@media(max-width:820px){
  .content-library-layout{
    grid-template-columns:1fr;
  }
  .content-group-sidebar{
    border-right:0;
    border-bottom:1px solid #e5e8ec;
  }
  .content-group-list{
    display:flex;
    overflow-x:auto;
    overflow-y:hidden;
  }
  .content-group-list-btn{
    width:auto;
    min-width:150px;
  }
}

.playlist-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid #e5e8ec;
}
#playlistSearchInput{
  min-height:38px;
  min-width:220px;
  margin-left:auto;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
}
.playlist-library-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:420px;
}
.playlist-group-sidebar{
  border-right:1px solid #e5e8ec;
  background:#fafbfc;
}
.playlist-group-sidebar-title{
  padding:14px 16px 10px;
  color:#7b8490;
  font-size:11px;
  font-weight:800;
}
.playlist-group-list{
  display:grid;
  padding:0 8px 12px;
  gap:3px;
  max-height:640px;
  overflow:auto;
}
.playlist-group-list-btn{
  width:100%;
  min-height:40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  border:0;
  border-radius:7px;
  background:transparent;
  padding:8px 10px;
  text-align:left;
  color:#535d68;
  font-weight:700;
  cursor:pointer;
}
.playlist-group-list-btn:hover{background:#eef1f4}
.playlist-group-list-btn.active{background:#292f39;color:#fff}
.playlist-group-list-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.playlist-group-list-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}
.playlist-group-list-btn.active .playlist-group-list-count{
  background:#fff;
  color:#292f39;
}
.playlist-library-main{
  min-width:0;
  padding:14px;
}
#playlistGroupSelect{
  min-height:40px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
@media(max-width:820px){
  .playlist-library-layout{grid-template-columns:1fr}
  .playlist-group-sidebar{border-right:0;border-bottom:1px solid #e5e8ec}
  .playlist-group-list{display:flex;overflow-x:auto;overflow-y:hidden}
  .playlist-group-list-btn{width:auto;min-width:150px}
  #playlistSearchInput{width:100%;margin-left:0}
}

/* v0.16.1 - Playlist add/edit compact modal */
#playlistEditorBackdrop .modal{
  width:min(1180px,calc(100vw - 32px));
  max-height:min(800px,calc(100vh - 28px));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
#playlistEditorBackdrop .modal-header{
  flex:0 0 auto;
  padding-bottom:10px;
}
#playlistEditorBackdrop form{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  display:grid;
  grid-template-columns:1fr 220px 1fr 1fr 1fr;
  gap:10px 14px;
  align-content:start;
}
#playlistEditorBackdrop form > label:nth-of-type(1){
  grid-column:1 / span 3;
}
#playlistEditorBackdrop form > label:nth-of-type(2){
  grid-column:4 / span 2;
}
#playlistEditorBackdrop form > .playlist-options,
#playlistEditorBackdrop .playlist-option-grid{
  grid-column:1 / -1;
}
#playlistEditorBackdrop .playlist-builder{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1.1fr;
  gap:18px;
  min-height:0;
}
#playlistEditorBackdrop #playlistContentLibrary,
#playlistEditorBackdrop #playlistSelectedItems{
  max-height:330px;
  overflow:auto;
}
#playlistEditorBackdrop .builder-item{
  padding:9px 12px;
}
#playlistEditorBackdrop .modal-actions{
  grid-column:1 / -1;
  position:sticky;
  bottom:0;
  background:#fff;
  padding-top:10px;
  margin-top:2px;
}
#playlistEditorBackdrop .form-message{
  grid-column:1 / -1;
}

/* fallback if editor structure is not grouped by playlist-builder class */
#playlistEditorBackdrop .builder-columns{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1.1fr;
  gap:18px;
}
#playlistEditorBackdrop .builder-column{
  min-width:0;
}

/* Apply modal compact */
#applyPlaylistBackdrop .modal{
  max-height:min(760px,calc(100vh - 32px));
  overflow:auto;
}
#applyPlaylistBackdrop .device-select-list{
  max-height:320px;
  overflow:auto;
}


/* v0.16.2 - 전체보기 선택 상태 통일 */
#contentAllViewBtn.active,
#playlistAllViewBtn.active{
  background:#292f39 !important;
  border-color:#292f39 !important;
  color:#fff !important;
}

/* 그룹 보기 상태에서는 전체보기 버튼이 일반 흰 배경 */
#contentAllViewBtn:not(.active),
#playlistAllViewBtn:not(.active){
  background:#fff;
  color:#56606b;
}

/* v0.16.5 - shared target picker pattern: left groups / right devices */
.apply-target-modal{
  width:min(980px,calc(100vw - 32px));
  max-height:min(780px,calc(100vh - 28px));
  overflow:hidden;
}
#applyPlaylistForm{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.apply-target-layout{
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  min-height:420px;
  max-height:560px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}
.apply-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.apply-group-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}
#applyGroupSearchInput{
  min-height:38px;
  width:100%;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.apply-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}
.apply-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
.apply-group-btn:hover{
  background:#eef1f4;
}
.apply-group-btn.active{
  background:#292f39;
  color:#fff;
}
.apply-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.apply-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}
.apply-group-btn.active .apply-group-count{
  background:#fff;
  color:#292f39;
}
.apply-group-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.apply-device-pane{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}
.apply-device-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:end;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #e7eaee;
}
.apply-device-toolbar>label{
  display:grid;
  gap:6px;
  min-width:180px;
  font-size:12px;
  font-weight:700;
  color:#59636e;
}
.apply-device-toolbar select{
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.apply-selection-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.apply-selection-actions strong{
  min-width:70px;
  text-align:right;
  color:#69737e;
  font-size:12px;
}
#applyDeviceList{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
#applyPlaylistForm>.modal-actions{
  padding-top:12px;
}
@media(max-width:760px){
  .apply-target-layout{
    grid-template-columns:1fr;
    max-height:none;
    overflow:auto;
  }
  .apply-group-sidebar{
    border-right:0;
    border-bottom:1px solid #e1e5e9;
    max-height:230px;
  }
  .apply-device-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .apply-selection-actions{
    margin-left:0;
    justify-content:flex-start;
  }
}

/* v0.16.6 - Playlist add/edit: left group list + right editor */
.playlist-editor-modal{
  width:min(1180px,calc(100vw - 32px));
  max-height:min(800px,calc(100vh - 28px));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
#playlistForm{
  min-height:0;
  display:flex;
  flex-direction:column;
}
.playlist-editor-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}
.playlist-editor-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.playlist-editor-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}
#playlistGroupSearchInput{
  min-height:38px;
  width:100%;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.playlist-editor-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}
.playlist-editor-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
.playlist-editor-group-btn:hover{
  background:#eef1f4;
}
.playlist-editor-group-btn.active{
  background:#292f39;
  color:#fff;
}
.playlist-editor-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.playlist-editor-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}
.playlist-editor-group-btn.active .playlist-editor-group-count{
  background:#fff;
  color:#292f39;
}
.playlist-editor-group-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.playlist-editor-main{
  min-width:0;
  min-height:0;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}
.playlist-editor-fields{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(220px,1.4fr) repeat(3,minmax(150px,.7fr));
  gap:10px 12px;
}
.playlist-editor-fields label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:#505965;
}
.playlist-editor-fields input,
.playlist-editor-fields select{
  min-height:40px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.playlist-editor-main .playlist-builder{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.playlist-builder-column{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.playlist-builder-column h3{
  margin:0 0 8px;
}
.playlist-builder-heading{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.playlist-builder-heading h3{
  margin:0;
}
#playlistLibraryGroupHint{
  color:#7a838e;
  font-size:11px;
}
#playlistEditorBackdrop #playlistContentLibrary,
#playlistEditorBackdrop #playlistSelectedItems{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
}
.playlist-editor-actions{
  flex:0 0 auto;
  padding-top:12px;
}
@media(max-width:850px){
  .playlist-editor-layout{
    grid-template-columns:1fr;
    overflow:auto;
  }
  .playlist-editor-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
  .playlist-editor-fields{
    grid-template-columns:1fr 1fr;
  }
  .playlist-editor-main .playlist-builder{
    grid-template-columns:1fr;
  }
}


/* v0.16.7 - playlist editor layout regression fix
   Override legacy v0.16.1 #playlistEditorBackdrop form grid rules. */
#playlistEditorBackdrop #playlistForm{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:0;
  align-content:normal;
}

#playlistEditorBackdrop #playlistForm > .playlist-editor-layout{
  flex:1 1 auto;
  min-height:0;
  width:100%;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
}

#playlistEditorBackdrop .playlist-editor-main{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
}

#playlistEditorBackdrop .playlist-editor-main .playlist-builder{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

#playlistEditorBackdrop #playlistForm > .playlist-editor-actions{
  position:static;
  grid-column:auto;
  flex:0 0 auto;
  margin-top:0;
  padding-top:12px;
  background:#fff;
}

#playlistEditorBackdrop .playlist-editor-main > .form-message{
  grid-column:auto;
}

@media(max-width:850px){
  #playlistEditorBackdrop #playlistForm > .playlist-editor-layout{
    grid-template-columns:1fr;
  }
  #playlistEditorBackdrop .playlist-editor-main .playlist-builder{
    grid-template-columns:1fr;
  }
}


/* v0.16.8 - Playlist editor fixed vertical size */
#playlistEditorBackdrop .playlist-editor-modal{
  height:780px;
  max-height:calc(100vh - 24px);
}

#playlistEditorBackdrop .playlist-editor-modal > .modal-header{
  flex:0 0 auto;
}

#playlistEditorBackdrop #playlistForm{
  flex:1 1 auto;
  min-height:0;
}

#playlistEditorBackdrop .playlist-editor-layout{
  flex:1 1 auto;
  min-height:0;
}

#playlistEditorBackdrop .playlist-editor-group-sidebar,
#playlistEditorBackdrop .playlist-editor-main{
  min-height:0;
}

#playlistEditorBackdrop .playlist-editor-group-list,
#playlistEditorBackdrop #playlistContentLibrary,
#playlistEditorBackdrop #playlistSelectedItems{
  min-height:0;
  overflow:auto;
}

#playlistEditorBackdrop .playlist-editor-actions{
  flex:0 0 auto;
}


/* v0.16.9 - Content upload / transfer fixed-height sidebar popups */
#contentUploadBackdrop .content-upload-modal,
#sendBackdrop .content-transfer-modal{
  height:780px;
  max-height:calc(100vh - 24px);
  width:min(980px,calc(100vw - 32px));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* Upload */
.content-upload-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}
.content-upload-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.content-upload-sidebar-title,
.content-transfer-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}
#contentUploadGroupSearchInput,
#sendGroupSearchInput{
  min-height:38px;
  width:100%;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.content-upload-group-list,
.content-transfer-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}
.content-upload-group-btn,
.content-transfer-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
.content-upload-group-btn:hover,
.content-transfer-group-btn:hover{
  background:#eef1f4;
}
.content-upload-group-btn.active,
.content-transfer-group-btn.active{
  background:#292f39;
  color:#fff;
}
.content-upload-group-name,
.content-transfer-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.content-transfer-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}
.content-transfer-group-btn.active .content-transfer-group-count{
  background:#fff;
  color:#292f39;
}
.content-upload-group-native,
.content-transfer-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.content-upload-main{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:14px;
  gap:12px;
}
.content-upload-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.content-upload-toolbar .upload-selection-toolbar{
  margin-left:auto;
}
#contentUploadBackdrop #selectedUploadFiles{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
  border:1px solid #e6e9ed;
  border-radius:8px;
}
.content-upload-actions{
  flex:0 0 auto;
  padding-top:12px;
}

/* Transfer */
#sendForm{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.content-transfer-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}
.content-transfer-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.content-transfer-main{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}
.content-transfer-toolbar{
  flex:0 0 auto;
  padding:12px 14px;
  border-bottom:1px solid #e7eaee;
}
.content-transfer-toolbar label{
  display:grid;
  gap:6px;
  max-width:260px;
  font-size:12px;
  font-weight:700;
  color:#59636e;
}
.content-transfer-toolbar select{
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
.content-transfer-device-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.content-transfer-device-choice{
  cursor:pointer;
}
.content-transfer-actions{
  flex:0 0 auto;
  padding-top:12px;
}

@media(max-width:760px){
  .content-upload-layout,
  .content-transfer-layout{
    grid-template-columns:1fr;
    overflow:auto;
  }
  .content-upload-group-sidebar,
  .content-transfer-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
}


/* v0.17.0 - fixed left navigation */
.sidebar{
  position:sticky;
  top:0;
  align-self:flex-start;
  height:100vh;
  min-height:100vh;
  overflow-y:auto;
  flex:0 0 240px;
}
.main{
  min-width:0;
}

/* Device Add / Manage popup: left group list + right details, fixed height */
#addBackdrop .device-add-modal,
#deviceManageBackdrop .device-manage-modal{
  width:min(980px,calc(100vw - 32px));
  height:780px;
  max-height:calc(100vh - 24px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

#registerForm,
#deviceManageForm{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.device-add-layout,
.device-manage-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.device-popup-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.device-popup-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#addGroupSearchInput,
#manageGroupSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.device-popup-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.device-popup-group-btn{
  width:100%;
  min-height:39px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.device-popup-group-btn:hover{
  background:#eef1f4;
}

.device-popup-group-btn.active{
  background:#292f39;
  color:#fff;
}

.device-popup-group-name{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.device-popup-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.device-popup-main{
  min-width:0;
  min-height:0;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:16px;
  overflow:auto;
}

.device-popup-fields{
  display:grid;
  gap:14px;
  align-content:start;
}

.device-popup-fields label{
  display:grid;
  gap:7px;
  color:#505965;
  font-size:13px;
  font-weight:700;
}

.device-popup-fields input,
.device-popup-fields select{
  min-height:42px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:10px 12px;
  background:#fff;
  font:inherit;
}

.device-popup-help{
  padding:12px 14px;
  border-radius:8px;
  background:#f7f8fa;
  color:#747d88;
  font-size:12px;
  line-height:1.6;
}

.device-manage-actions-panel{
  display:grid;
  gap:10px;
  margin-top:auto;
}

.device-manage-actions-panel>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:5px 12px;
  align-items:center;
  padding:14px;
  border:1px solid #e7eaee;
  border-radius:9px;
}

.device-manage-actions-panel strong{
  grid-column:1;
}

.device-manage-actions-panel span{
  grid-column:1;
  color:#7b8490;
  font-size:12px;
}

.device-manage-actions-panel button{
  grid-column:2;
  grid-row:1 / span 2;
}

.device-popup-actions{
  flex:0 0 auto;
  padding-top:12px;
}

@media(max-width:760px){
  .sidebar{
    position:static;
    height:auto;
    min-height:100vh;
  }
  .device-add-layout,
  .device-manage-layout{
    grid-template-columns:1fr;
    overflow:auto;
  }
  .device-popup-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
}


/* v0.18.0 - Scheduled playlist transfer */
.scheduled-transfer-toolbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:12px;
}

.scheduled-transfer-table .table-sub{
  display:block;
  margin-top:4px;
  color:#7a838e;
  font-size:11px;
}

.scheduled-status{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  background:#eef1f4;
  color:#56606a;
  font-size:11px;
  font-weight:800;
}

.scheduled-status.scheduled{
  background:#e8eef7;
  color:#344b6a;
}

.scheduled-status.running{
  background:#f4efe2;
  color:#745f22;
}

.scheduled-status.executed,
.scheduled-status.completed{
  background:#e9f3ec;
  color:#356245;
}

.scheduled-status.failed{
  background:#f9e9e9;
  color:#8a3d3d;
}

.scheduled-status.cancelled{
  background:#eeeeee;
  color:#777;
}

.scheduled-transfer-modal{
  width:min(1080px,calc(100vw - 32px));
  height:780px;
  max-height:calc(100vh - 24px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

#scheduledTransferForm{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.scheduled-transfer-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.scheduled-transfer-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.scheduled-transfer-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#scheduledTransferGroupSearchInput{
  min-height:38px;
  width:100%;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.scheduled-transfer-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.scheduled-transfer-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.scheduled-transfer-group-btn:hover{
  background:#eef1f4;
}

.scheduled-transfer-group-btn.active{
  background:#292f39;
  color:#fff;
}

.scheduled-transfer-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.scheduled-transfer-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}

.scheduled-transfer-group-btn.active .scheduled-transfer-group-count{
  background:#fff;
  color:#292f39;
}

.scheduled-transfer-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.scheduled-transfer-main{
  min-width:0;
  min-height:0;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}

.scheduled-transfer-fields{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 12px;
}

.scheduled-transfer-fields label{
  display:grid;
  gap:6px;
  color:#505965;
  font-size:12px;
  font-weight:700;
}

.scheduled-transfer-fields input,
.scheduled-transfer-fields select{
  min-height:40px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
  font:inherit;
}

.scheduled-transfer-device-toolbar{
  flex:0 0 auto;
  display:flex;
  gap:8px;
  align-items:center;
}

.scheduled-transfer-device-toolbar strong{
  margin-left:auto;
  color:#69737e;
  font-size:12px;
}

.scheduled-transfer-device-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  border:1px solid #e6e9ed;
  border-radius:8px;
}

.scheduled-transfer-actions{
  flex:0 0 auto;
  padding-top:12px;
}

@media(max-width:760px){
  .scheduled-transfer-layout{
    grid-template-columns:1fr;
    overflow:auto;
  }
  .scheduled-transfer-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
  .scheduled-transfer-fields{
    grid-template-columns:1fr;
  }
}
\n\n/* v0.18.1 - Scheduled transfer diagnostics */\n.scheduled-transfer-toolbar{align-items:center;gap:12px;}\n\n\n\n\n.scheduled-transfer-toolbar-actions{margin-left:auto;display:flex;gap:8px;}\n

/* v0.18.3 - 예약 전송 운영 UI */
.scheduled-transfer-toolbar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin-bottom:12px;
}

.scheduled-transfer-toolbar-actions{
  display:flex;
  gap:8px;
}


/* v0.18.4 - scheduled transfer history retention */
.scheduled-transfer-history-note{
  margin:0 0 10px;
  color:#7a838e;
  font-size:12px;
}


/* v0.19.0 - Events */
.event-toolbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:10px;
}

.event-history-note{
  margin:0 0 10px;
  color:#7a838e;
  font-size:12px;
}

.event-table .table-sub{
  display:block;
  margin-top:4px;
  color:#7a838e;
  font-size:11px;
}

.event-status{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  background:#eef1f4;
  color:#56606a;
  font-size:11px;
  font-weight:800;
}

.event-status.scheduled{
  background:#e8eef7;
  color:#344b6a;
}

.event-status.active,
.event-status.ending{
  background:#f4efe2;
  color:#745f22;
}

.event-status.completed{
  background:#e9f3ec;
  color:#356245;
}

.event-status.failed{
  background:#f9e9e9;
  color:#8a3d3d;
}

.event-status.cancelled{
  background:#eeeeee;
  color:#777;
}

.event-modal{
  width:min(1080px,calc(100vw - 32px));
  height:780px;
  max-height:calc(100vh - 24px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

#eventForm{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.event-layout{
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.event-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.event-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#eventGroupSearchInput{
  min-height:38px;
  width:100%;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.event-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.event-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.event-group-btn:hover{
  background:#eef1f4;
}

.event-group-btn.active{
  background:#292f39;
  color:#fff;
}

.event-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.event-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}

.event-group-btn.active .event-group-count{
  background:#fff;
  color:#292f39;
}

.event-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.event-main{
  min-width:0;
  min-height:0;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}

.event-fields{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px 12px;
}

.event-fields label{
  display:grid;
  gap:6px;
  color:#505965;
  font-size:12px;
  font-weight:700;
}

.event-fields input,
.event-fields select{
  min-height:40px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
  font:inherit;
}

.event-device-toolbar{
  flex:0 0 auto;
  display:flex;
  gap:8px;
  align-items:center;
}

.event-device-toolbar strong{
  margin-left:auto;
  color:#69737e;
  font-size:12px;
}

.event-device-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  border:1px solid #e6e9ed;
  border-radius:8px;
}

.event-actions{
  flex:0 0 auto;
  padding-top:12px;
}

@media(max-width:760px){
  .event-layout{
    grid-template-columns:1fr;
    overflow:auto;
  }
  .event-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
  .event-fields{
    grid-template-columns:1fr;
  }
}


/* v0.19.1 - Schedule device-first management */
.schedule-device-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:500px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.schedule-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.schedule-group-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#scheduleGroupSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.schedule-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.schedule-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.schedule-group-btn:hover{
  background:#eef1f4;
}

.schedule-group-btn.active{
  background:#292f39;
  color:#fff;
}

.schedule-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.schedule-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}

.schedule-group-btn.active .schedule-group-count{
  background:#fff;
  color:#292f39;
}

.schedule-group-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.schedule-device-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.schedule-device-toolbar{
  display:flex;
  align-items:end;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #e7eaee;
}

.schedule-device-toolbar>label{
  display:grid;
  gap:6px;
  min-width:180px;
  color:#59636e;
  font-size:12px;
  font-weight:700;
}

.schedule-device-toolbar select{
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.schedule-device-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
}

.schedule-device-actions strong{
  min-width:70px;
  text-align:right;
  color:#69737e;
  font-size:12px;
}

.schedule-device-table-wrap{
  flex:1 1 auto;
  min-height:0;
}

.schedule-device-table tbody tr.selected{
  background:#f6f8fa;
}

.schedule-assigned-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 7px;
  margin-right:7px;
  border-radius:999px;
  background:#e9f3ec;
  color:#356245;
  font-size:11px;
  font-weight:800;
}

.schedule-name-text{
  font-size:12px;
  color:#4e5964;
}

.schedule-none{
  color:#929aa4;
  font-size:12px;
}

.schedule-profile-panel{
  margin-top:16px;
}

.schedule-apply-modal{
  width:min(520px,calc(100vw - 32px));
}

.schedule-apply-summary{
  padding:11px 12px;
  border-radius:8px;
  background:#f6f8fa;
  color:#66717c;
  font-size:12px;
}

#bulkScheduleSelect{
  width:100%;
  min-height:42px;
}

@media(max-width:800px){
  .schedule-device-layout{
    grid-template-columns:1fr;
  }
  .schedule-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
  .schedule-device-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .schedule-device-actions{
    margin-left:0;
    justify-content:flex-start;
  }
}


/* v0.19.3 - direct device schedule */
.schedule-direct-modal{
  width:min(760px,calc(100vw - 32px));
}

.schedule-direct-modal #scheduleForm{
  display:grid;
  gap:18px;
}

.schedule-direct-modal .weekday-grid{
  margin-top:8px;
}

.schedule-direct-modal .time-pair{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.schedule-direct-modal .time-pair label{
  display:grid;
  gap:7px;
}

@media(max-width:640px){
  .schedule-direct-modal .time-pair{
    grid-template-columns:1fr;
  }
}


/* v0.19.6 - Device menu unified left-group / right-content layout */
.device-library-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:520px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.device-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.device-group-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#groupSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.device-sidebar-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.device-sidebar-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.device-sidebar-group-btn:hover{
  background:#eef1f4;
}

.device-sidebar-group-btn.active{
  background:#292f39;
  color:#fff;
}

.device-sidebar-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.device-sidebar-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}

.device-sidebar-group-btn.active .device-sidebar-group-count{
  background:#fff;
  color:#292f39;
}

.device-library-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.device-sidebar-toolbar{
  min-height:68px;
  padding:12px 14px;
  border-bottom:1px solid #e7eaee;
  display:flex;
  align-items:center;
  gap:14px;
}

.device-current-group{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.device-current-group strong{
  font-size:14px;
}

#deviceCurrentGroupCount{
  color:#7a838e;
  font-size:12px;
}

.device-sidebar-toolbar .group-device-controls{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
}

.device-sidebar-toolbar #searchInput{
  min-width:220px;
}

.device-sidebar-toolbar .device-selection-actions{
  display:flex;
  align-items:center;
  gap:7px;
}

#deviceTableWrap{
  flex:1 1 auto;
  min-height:0;
}

@media(max-width:800px){
  .device-library-layout{
    grid-template-columns:1fr;
  }

  .device-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }

  .device-sidebar-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .device-sidebar-toolbar .group-device-controls{
    margin-left:0;
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }

  .device-sidebar-toolbar #searchInput{
    min-width:0;
    width:100%;
  }
}


/* v0.20.0 weekly events */
.event-kind{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap;background:#eef1f4;color:#5f6873}.event-kind.weekly{background:#e9f3ec;color:#356245}.event-kind.period{background:#e8eef7;color:#344b6a}.event-mode-fields{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;padding:12px;border:1px solid #e6e9ed;border-radius:9px;background:#fafbfc}#weeklyEventFields>div:first-child{grid-column:1/-1}.event-exclude-check{grid-column:1/-1;margin:4px 0 0}@media(max-width:760px){.event-mode-fields{grid-template-columns:1fr}}


/* v0.20.1 - weekly Player restart in Device Schedule */
.schedule-section-divider{
  height:1px;
  background:#e5e8ec;
  margin:4px 0;
}

.schedule-restart-section{
  display:grid;
  gap:12px;
}

.schedule-subsection-title{
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.schedule-subsection-title strong{
  display:block;
  font-size:14px;
}

.schedule-subsection-title span{
  display:block;
  margin-top:4px;
  color:#7a838e;
  font-size:11px;
}

.restart-schedule-controls{
  display:grid;
  gap:12px;
  padding:12px;
  border:1px solid #e6e9ed;
  border-radius:9px;
  background:#fafbfc;
}

.restart-schedule-controls.disabled-section{
  opacity:.58;
}

.restart-schedule-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.restart-schedule-grid label{
  display:grid;
  gap:6px;
  font-size:12px;
  font-weight:700;
  color:#555f69;
}

.restart-schedule-grid select{
  min-height:40px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.schedule-cell-stack{
  display:grid;
  gap:5px;
}

.restart-schedule-line{
  color:#66717c;
  font-size:11px;
}

@media(max-width:640px){
  .restart-schedule-grid{
    grid-template-columns:1fr;
  }
}

.event-library-layout{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:520px;border:1px solid #e1e5e9;border-radius:10px;overflow:hidden}
.event-page-group-sidebar{min-width:0;padding:12px;background:#fafbfc;border-right:1px solid #e1e5e9;display:flex;flex-direction:column;gap:9px}
.event-page-sidebar-title{color:#727c87;font-size:11px;font-weight:800}
#eventPageGroupSearchInput{width:100%;min-height:38px;border:1px solid #dce1e6;border-radius:8px;padding:8px 10px;background:#fff}
.event-page-group-list{min-height:0;overflow:auto;display:grid;align-content:start;gap:3px}
.event-page-group-btn{width:100%;min-height:39px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#505a65;text-align:left;font-weight:700;cursor:pointer}
.event-page-group-btn:hover{background:#eef1f4}.event-page-group-btn.active{background:#292f39;color:#fff}
.event-page-group-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event-page-group-count{min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:#e9edf1;color:#606a75;font-size:11px}.event-page-group-btn.active .event-page-group-count{background:#fff;color:#292f39}
.event-page-main{min-width:0;display:flex;flex-direction:column;background:#fff}.event-page-main .event-toolbar{min-height:58px;padding:10px 14px;border-bottom:1px solid #e7eaee;align-items:center}.event-current-group{display:flex;align-items:center;gap:8px}#eventCurrentGroupCount{color:#7a838e;font-size:12px}.event-row-actions{display:flex;gap:6px;justify-content:flex-end;white-space:nowrap}
@media(max-width:800px){.event-library-layout{grid-template-columns:1fr}.event-page-group-sidebar{max-height:220px;border-right:0;border-bottom:1px solid #e1e5e9}}


/* v0.20.3 - Event editor: Group | Device | Settings */
#eventBackdrop .event-modal{
  width:min(1080px,calc(100vw - 32px));
  height:780px;
  max-height:calc(100vh - 24px);
}

#eventBackdrop .event-layout-3col{
  grid-template-columns:220px 330px minmax(0,1fr);
  min-height:0;
}

#eventBackdrop .event-group-sidebar{
  border-right:1px solid #e1e5e9;
}

.event-device-column,
.event-settings-column{
  min-width:0;
  min-height:0;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:hidden;
  background:#fff;
}

.event-device-column{
  border-right:1px solid #e1e5e9;
}

.event-column-title{
  flex:0 0 auto;
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

.event-location-field{
  flex:0 0 auto;
  display:grid;
  gap:6px;
  color:#59636e;
  font-size:12px;
  font-weight:700;
}

.event-location-field select{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

#eventBackdrop .event-device-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

#eventBackdrop .event-device-toolbar .secondary{
  padding-left:10px;
  padding-right:10px;
}

#eventBackdrop .event-device-toolbar strong{
  margin-left:auto;
  min-width:58px;
  text-align:right;
  font-size:11px;
}

#eventBackdrop .event-device-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}

#eventBackdrop .event-settings-column{
  overflow:auto;
}

#eventBackdrop .event-settings-column .event-fields{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}

#eventBackdrop .event-settings-column .event-mode-fields{
  grid-column:auto;
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  padding:10px;
}

#eventBackdrop .event-settings-column #weeklyEventFields>div:first-child,
#eventBackdrop .event-settings-column .event-exclude-check{
  grid-column:auto;
}

#eventBackdrop .event-settings-column .weekday-grid{
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:4px;
}

#eventBackdrop .event-settings-column .weekday-grid label{
  min-width:0;
  padding:7px 3px;
}

#eventBackdrop .event-actions{
  flex:0 0 auto;
}

@media(max-width:900px){
  #eventBackdrop .event-layout-3col{
    grid-template-columns:190px 280px minmax(320px,1fr);
    overflow:auto;
  }
}

@media(max-width:700px){
  #eventBackdrop .event-layout-3col{
    grid-template-columns:1fr;
    overflow:auto;
  }

  #eventBackdrop .event-group-sidebar,
  #eventBackdrop .event-device-column{
    max-height:240px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
}

.event-toolbar-compact,.scheduled-transfer-toolbar-compact{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.event-toolbar-copy,.scheduled-transfer-toolbar-copy{min-width:0;display:grid;gap:4px}
.event-toolbar-compact .event-history-note,.scheduled-transfer-toolbar-compact .scheduled-transfer-history-note{margin:0;color:#7a838e;font-size:11px;line-height:1.35}
.scheduled-transfer-toolbar-compact{padding:10px 14px;border-bottom:1px solid #e7eaee}
.scheduled-transfer-toolbar-copy strong{font-size:14px}
.event-toolbar-compact>button,.scheduled-transfer-toolbar-compact>button{flex:0 0 auto}
.event-row-actions,.scheduled-transfer-table .table-actions{gap:5px}


/* v0.20.5 - Scheduled Transfer page sidebar */
.scheduled-transfer-library-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:520px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.scheduled-transfer-page-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.scheduled-transfer-page-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#scheduledTransferPageGroupSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.scheduled-transfer-page-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.scheduled-transfer-page-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}

.scheduled-transfer-page-group-btn:hover{
  background:#eef1f4;
}

.scheduled-transfer-page-group-btn.active{
  background:#292f39;
  color:#fff;
}

.scheduled-transfer-page-group-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.scheduled-transfer-page-group-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}

.scheduled-transfer-page-group-btn.active .scheduled-transfer-page-group-count{
  background:#fff;
  color:#292f39;
}

.scheduled-transfer-page-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.scheduled-transfer-current-group{
  display:flex;
  align-items:center;
  gap:8px;
}

.scheduled-transfer-current-group strong{
  font-size:14px;
}

#scheduledTransferCurrentGroupCount{
  color:#7a838e;
  font-size:12px;
}

@media(max-width:800px){
  .scheduled-transfer-library-layout{
    grid-template-columns:1fr;
  }

  .scheduled-transfer-page-group-sidebar{
    max-height:220px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
}


/* v0.20.6 - Device toolbar and balanced columns */
.device-action-toolbar{
  min-height:64px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid #e7eaee;
}

.device-action-left{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.device-action-left #selectedDeviceBulkCount{
  min-width:64px;
  color:#69737e;
  font-size:12px;
  text-align:center;
}

.device-sidebar-toolbar .group-device-controls{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
}

.device-sidebar-toolbar #searchInput{
  min-width:240px;
}

#refreshDevicesBtn{
  flex:0 0 auto;
  white-space:nowrap;
}

.device-main-table{
  width:100%;
  min-width:980px;
  table-layout:fixed;
}

.device-main-table .device-col-check{
  width:42px;
}

.device-main-table .device-col-main{
  width:auto;
}

.device-main-table .device-col-status{
  width:128px;
}

.device-main-table .device-col-version{
  width:104px;
}

.device-main-table .device-col-sync{
  width:118px;
}

.device-main-table .device-col-manage{
  width:72px;
}

.device-main-table th,
.device-main-table td{
  overflow:hidden;
  text-overflow:ellipsis;
}

.device-main-table th:nth-child(2),
.device-main-table th:nth-child(3),
.device-main-table th:nth-child(4),
.device-main-table td:nth-child(2),
.device-main-table td:nth-child(3),
.device-main-table td:nth-child(4){
  width:calc((100% - 464px) / 3);
}

.device-main-table .device-nowrap,
.device-main-table td:nth-child(5),
.device-main-table td:nth-child(6),
.device-main-table td:nth-child(7),
.device-main-table td:nth-child(8){
  white-space:nowrap;
}

.device-main-table .check-col,
.device-main-table td.check-col{
  width:42px;
  min-width:42px;
  max-width:42px;
  padding-left:8px;
  padding-right:8px;
}

.device-main-table .status{
  white-space:nowrap;
}

@media(max-width:800px){
  .device-action-toolbar{
    align-items:flex-start;
  }

  .device-sidebar-toolbar .group-device-controls{
    width:100%;
    flex-direction:row;
  }

  .device-sidebar-toolbar #searchInput{
    flex:1 1 auto;
    min-width:0;
  }
}


/* v0.20.7 - Group Settings */
.group-settings-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:520px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
}

.group-settings-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}

.group-settings-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#settingsGroupSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.group-settings-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}

.group-settings-btn{
  width:100%;
  min-height:46px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  cursor:pointer;
}

.group-settings-btn:hover{
  background:#eef1f4;
}

.group-settings-btn.active{
  background:#292f39;
  color:#fff;
}

.group-settings-btn-main{
  min-width:0;
  display:grid;
  gap:2px;
}

.group-settings-btn-main strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}

.group-settings-btn-main small{
  opacity:.72;
  font-size:10px;
}

.group-settings-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
  font-weight:700;
}

.group-settings-btn.active .group-settings-count{
  background:#fff;
  color:#292f39;
}

.group-settings-main{
  min-width:0;
  background:#fff;
}

.group-settings-header{
  min-height:82px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid #e7eaee;
}

.group-settings-header>div:first-child{
  min-width:0;
}

.group-settings-current{
  display:flex;
  align-items:center;
  gap:8px;
}

.group-settings-current strong{
  font-size:16px;
}

#settingsSelectedGroupMeta{
  color:#7a838e;
  font-size:11px;
}

.group-settings-header p{
  margin:5px 0 0;
  color:#7a838e;
  font-size:11px;
}

.group-settings-header-actions{
  flex:0 0 auto;
  display:flex;
  gap:7px;
}

.group-settings-content{
  margin:0;
  border:0;
  border-radius:0;
  box-shadow:none;
}

.group-settings-content-header{
  border-bottom:1px solid #edf0f3;
}

@media(max-width:800px){
  .group-settings-layout{
    grid-template-columns:1fr;
  }

  .group-settings-sidebar{
    max-height:230px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }

  .group-settings-header{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v0.20.10 - Scheduled transfer compact actions / row job view */
.scheduled-transfer-table .reuse-scheduled-transfer{
  padding:6px 10px;
  border-radius:7px;
  font-size:12px;
  line-height:1.2;
}
.scheduled-transfer-table .scheduled-job-row{
  cursor:pointer;
}
.scheduled-transfer-table .scheduled-job-row:hover td{
  background:#fafbfc;
}

/* v0.20.11 - Scheduled transfer compact rows / fitted columns */
.scheduled-transfer-table{
  min-width:0;
  table-layout:fixed;
}
.scheduled-transfer-table th,
.scheduled-transfer-table td{
  padding:10px 12px;
  font-size:12px;
  line-height:1.25;
  vertical-align:middle;
}
.scheduled-transfer-table td strong{
  font-size:12px;
  line-height:1.25;
}
.scheduled-transfer-table .table-sub{
  display:inline;
  margin-left:6px;
  font-size:11px;
  line-height:1.25;
  white-space:nowrap;
}
.scheduled-transfer-table th:nth-child(1),
.scheduled-transfer-table td:nth-child(1){width:24%;}
.scheduled-transfer-table th:nth-child(2),
.scheduled-transfer-table td:nth-child(2){width:25%;}
.scheduled-transfer-table th:nth-child(3),
.scheduled-transfer-table td:nth-child(3){width:22%;white-space:nowrap;}
.scheduled-transfer-table th:nth-child(4),
.scheduled-transfer-table td:nth-child(4){width:8%;white-space:nowrap;}
.scheduled-transfer-table th:nth-child(5),
.scheduled-transfer-table td:nth-child(5){width:11%;white-space:nowrap;}
.scheduled-transfer-table th:nth-child(6),
.scheduled-transfer-table td:nth-child(6){width:10%;white-space:nowrap;text-align:right;}
.scheduled-transfer-table .table-actions{
  justify-content:flex-end;
}
.scheduled-transfer-table .reuse-scheduled-transfer,
.scheduled-transfer-table .cancel-scheduled-transfer{
  padding:5px 8px;
  min-height:28px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}
@media(max-width:1100px){
  .scheduled-transfer-table th,
  .scheduled-transfer-table td{padding-left:9px;padding-right:9px;}
  .scheduled-transfer-table .table-sub{display:none;}
}

/* v0.20.12 - Event table density aligned with scheduled transfers */
.event-table{
  min-width:0;
  table-layout:fixed;
}
.event-table th,
.event-table td{
  padding:10px 10px;
  font-size:12px;
  line-height:1.25;
  vertical-align:middle;
}
.event-table td strong{
  font-size:12px;
  line-height:1.25;
}
.event-table .table-sub{
  display:inline;
  margin:0 0 0 6px;
  font-size:11px;
  line-height:1.25;
  white-space:nowrap;
}
.event-table th:nth-child(1),
.event-table td:nth-child(1){width:7%;white-space:nowrap;}
.event-table th:nth-child(2),
.event-table td:nth-child(2){width:14%;}
.event-table th:nth-child(3),
.event-table td:nth-child(3){width:17%;}
.event-table th:nth-child(4),
.event-table td:nth-child(4){width:19%;}
.event-table th:nth-child(5),
.event-table td:nth-child(5){width:6%;white-space:nowrap;}
.event-table th:nth-child(6),
.event-table td:nth-child(6){width:13%;}
.event-table th:nth-child(7),
.event-table td:nth-child(7){width:9%;white-space:nowrap;}
.event-table th:nth-child(8),
.event-table td:nth-child(8){width:15%;text-align:right;}
.event-cell-line{
  display:block;
  white-space:nowrap;
}
.event-cell-subline{
  margin-top:2px;
  color:#7a838e;
  font-size:11px;
}
.event-row-actions{
  justify-content:flex-end;
  flex-wrap:wrap;
  row-gap:4px;
}
.event-table .reuse-event,
.event-table .edit-event,
.event-table .cancel-event{
  padding:5px 8px;
  min-height:28px;
  border-radius:7px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}
.event-table .event-kind,
.event-table .event-status{
  min-height:22px;
  padding:2px 7px;
  font-size:11px;
  line-height:1.15;
}
@media(max-width:1100px){
  .event-table th,
  .event-table td{padding-left:8px;padding-right:8px;}
  .event-table .table-sub{display:none;}
  .event-cell-line{white-space:normal;}
}

/* v0.20.13 - Event table horizontal spacing / right action alignment */
.event-table th:nth-child(1),
.event-table td:nth-child(1){width:7%;}
.event-table th:nth-child(2),
.event-table td:nth-child(2){width:16%;}
.event-table th:nth-child(3),
.event-table td:nth-child(3){width:17%;}
.event-table th:nth-child(4),
.event-table td:nth-child(4){width:20%;}
.event-table th:nth-child(5),
.event-table td:nth-child(5){width:7%;}
.event-table th:nth-child(6),
.event-table td:nth-child(6){width:13%;}
.event-table th:nth-child(7),
.event-table td:nth-child(7){width:8%;}
.event-table th:nth-child(8),
.event-table td:nth-child(8){width:12%;padding-right:14px;text-align:right;white-space:nowrap;}
/* Keep the final action cell as a true table cell. Flex on TD compressed/overlapped status/actions. */
.event-table td.event-row-actions{
  display:table-cell;
  text-align:right;
  white-space:nowrap;
}
.event-table td.event-row-actions button+button{margin-left:5px;}
.event-table .reuse-event{
  padding:5px 8px;
  min-height:28px;
  font-size:11px;
  line-height:1.15;
}
@media(max-width:1100px){
  .event-table th:nth-child(2),.event-table td:nth-child(2){width:17%;}
  .event-table th:nth-child(3),.event-table td:nth-child(3){width:16%;}
  .event-table th:nth-child(4),.event-table td:nth-child(4){width:20%;}
  .event-table th:nth-child(8),.event-table td:nth-child(8){width:12%;}
}


/* v0.20.14 - Event playlist subline / centered metadata columns */
.event-table .table-sub{
  display:block;
  margin:2px 0 0;
  font-size:11px;
  line-height:1.2;
  white-space:normal;
}
.event-table th:nth-child(1),
.event-table td:nth-child(1),
.event-table th:nth-child(5),
.event-table td:nth-child(5),
.event-table th:nth-child(7),
.event-table td:nth-child(7),
.event-table th:nth-child(8),
.event-table td:nth-child(8){
  text-align:center;
}
.event-table td:nth-child(1),
.event-table td:nth-child(5),
.event-table td:nth-child(7),
.event-table td:nth-child(8){
  vertical-align:middle;
}
.event-table td:nth-child(1) .event-kind,
.event-table td:nth-child(7) .event-status{
  margin:0 auto;
}
.event-table td.event-row-actions{
  text-align:center;
}
.event-table td.event-row-actions button+button{
  margin-left:0;
  margin-top:4px;
}
.event-table td.event-row-actions .reuse-event{
  margin:0 auto;
}
@media(min-width:1101px){
  .event-table td.event-row-actions .reuse-event{display:inline-flex;}
}


/* v0.20.15 - Scheduled transfer centered target/status/reuse */
.scheduled-transfer-table th:nth-child(4),
.scheduled-transfer-table td:nth-child(4),
.scheduled-transfer-table th:nth-child(5),
.scheduled-transfer-table td:nth-child(5),
.scheduled-transfer-table th:nth-child(6),
.scheduled-transfer-table td:nth-child(6){
  text-align:center;
}
.scheduled-transfer-table td:nth-child(5) .scheduled-status{
  margin:0 auto;
}
.scheduled-transfer-table .table-actions{
  justify-content:center;
}
.scheduled-transfer-table .table-actions .reuse-scheduled-transfer,
.scheduled-transfer-table .table-actions .cancel-scheduled-transfer{
  margin:0 auto;
}


/* v0.20.17 - Schedule table compact layout / centered online status */
.schedule-device-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.schedule-device-table th,
.schedule-device-table td{
  padding:10px 10px;
  font-size:12px;
  line-height:1.25;
  vertical-align:middle;
}
.schedule-device-table td strong{
  font-size:12px;
  line-height:1.25;
}
.schedule-device-table th:nth-child(1),
.schedule-device-table td:nth-child(1){width:6%;text-align:center;}
.schedule-device-table th:nth-child(2),
.schedule-device-table td:nth-child(2){width:18%;}
.schedule-device-table th:nth-child(3),
.schedule-device-table td:nth-child(3){width:24%;}
.schedule-device-table th:nth-child(4),
.schedule-device-table td:nth-child(4){width:37%;}
.schedule-device-table th:nth-child(5),
.schedule-device-table td:nth-child(5){width:15%;text-align:center;}
.schedule-device-table .schedule-status-cell .status{
  justify-content:center;
  font-size:12px;
}
.schedule-device-table .schedule-cell-stack{
  min-width:0;
}
.schedule-device-table .schedule-name-text,
.schedule-device-table .restart-schedule-line{
  font-size:11px;
  line-height:1.25;
}
.schedule-device-table-wrap{
  overflow-x:hidden;
}
@media(max-width:1100px){
  .schedule-device-table th,
  .schedule-device-table td{padding-left:8px;padding-right:8px;}
  .schedule-device-table th:nth-child(2),
  .schedule-device-table td:nth-child(2){width:17%;}
  .schedule-device-table th:nth-child(3),
  .schedule-device-table td:nth-child(3){width:23%;}
  .schedule-device-table th:nth-child(4),
  .schedule-device-table td:nth-child(4){width:39%;}
  .schedule-device-table th:nth-child(5),
  .schedule-device-table td:nth-child(5){width:15%;}
}


/* v0.20.18 - Playlist list typography/actions aligned with Event table */
.playlist-row{
  padding:10px 12px;
  min-height:0;
}
.playlist-row>div:first-child{
  gap:2px;
}
.playlist-row>div:first-child>strong{
  font-size:12px;
  line-height:1.25;
}
.playlist-row>div:first-child>span{
  font-size:11px;
  line-height:1.25;
}
.playlist-actions{
  gap:5px;
  flex:0 0 auto;
}
.playlist-actions .edit-playlist,
.playlist-actions .apply-playlist,
.playlist-actions .delete-playlist{
  padding:5px 8px;
  min-height:28px;
  border-radius:7px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}


/* v0.20.19 - Playlist editor popup content typography reduced */
#playlistEditorBackdrop .playlist-builder-column h3,
#playlistEditorBackdrop .playlist-builder-heading h3{
  font-size:14px;
  line-height:1.2;
}
#playlistEditorBackdrop .builder-item{
  padding:10px 12px;
}
#playlistEditorBackdrop .builder-item > div:first-child,
#playlistEditorBackdrop .grow{
  gap:4px;
}
#playlistEditorBackdrop .builder-item strong,
#playlistEditorBackdrop .grow strong{
  font-size:14px;
  line-height:1.2;
  font-weight:700;
}
#playlistEditorBackdrop .builder-item span{
  font-size:11px;
  line-height:1.2;
}
#playlistEditorBackdrop .builder-item .small-action{
  padding:5px 10px;
  min-height:28px;
  font-size:12px;
  line-height:1.15;
}
#playlistEditorBackdrop .order-num{
  font-size:11px;
}
#playlistEditorBackdrop .duration-label,
#playlistEditorBackdrop .video-full{
  font-size:11px !important;
  line-height:1.2;
}
#playlistEditorBackdrop .duration-input{
  min-height:28px !important;
  font-size:12px;
}
#playlistEditorBackdrop .builder-empty{
  font-size:12px;
}


/* v0.20.20 - Playlist editor library/order content text non-bold */
#playlistEditorBackdrop .builder-item strong,
#playlistEditorBackdrop .grow strong{
  font-weight:400;
}


/* v0.20.21 - Device table density / centered status-edit / fitted width */
.device-main-table{
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.device-main-table th,
.device-main-table td{
  padding:10px 10px;
  font-size:12px;
  line-height:1.25;
  vertical-align:middle;
}
.device-main-table .device-name{
  font-size:12px;
  line-height:1.25;
  font-weight:700;
  white-space:normal;
  overflow-wrap:anywhere;
}
.device-main-table .device-code{
  margin-top:3px;
  font-size:11px;
  line-height:1.2;
}
.device-main-table .playlist-cell{
  font-size:12px;
  line-height:1.25;
  white-space:normal;
  overflow-wrap:anywhere;
}
/* Checkbox / subgroup / device / playlist / status / version / sync / edit = 100% */
.device-main-table .device-col-check{width:4%;}
.device-main-table col:nth-child(2){width:18%;}
.device-main-table col:nth-child(3){width:18%;}
.device-main-table col:nth-child(4){width:21%;}
.device-main-table .device-col-status{width:12%;}
.device-main-table .device-col-version{width:10%;}
.device-main-table .device-col-sync{width:10%;}
.device-main-table .device-col-manage{width:7%;}
.device-main-table th:nth-child(2),
.device-main-table td:nth-child(2),
.device-main-table th:nth-child(3),
.device-main-table td:nth-child(3),
.device-main-table th:nth-child(4),
.device-main-table td:nth-child(4){
  width:auto;
}
.device-main-table th:nth-child(5),
.device-main-table td:nth-child(5),
.device-main-table th:nth-child(8),
.device-main-table td:nth-child(8){
  text-align:center;
}
.device-main-table td:nth-child(5) .status{
  justify-content:center;
  font-size:12px;
}
.device-main-table td:nth-child(8) .manage-device-btn{
  padding:5px 8px;
  min-height:28px;
  border-radius:7px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}
.device-main-table .check-col,
.device-main-table td.check-col{
  width:4%;
  min-width:0;
  max-width:none;
  padding-left:8px;
  padding-right:8px;
  text-align:center;
}
.device-sidebar-toolbar{
  min-height:58px;
  padding:10px 14px;
}
.device-sidebar-toolbar #searchInput{
  min-width:0;
  width:min(320px,32vw);
}
.device-sidebar-toolbar .group-device-controls{
  min-width:0;
}
#deviceTableWrap{
  overflow-x:hidden;
}
/* Device detail: use concise status information and unified playlist action wording. */
#changeDevicePlaylistBtn{
  white-space:nowrap;
}
@media(max-width:1100px){
  .device-main-table th,
  .device-main-table td{padding-left:8px;padding-right:8px;}
  .device-sidebar-toolbar #searchInput{width:min(260px,28vw);}
}


/* v0.20.22 - device header cleanup and 3 summary cards */
.summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.summary-card{min-width:0;width:auto}
.summary-card span{display:inline-flex;align-items:center;gap:7px}
.summary-card-online span,.summary-card-online strong{color:#287a4f}
.summary-card-offline span,.summary-card-offline strong{color:#c24646}
.summary-card-online span::before,.summary-card-offline span::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:currentColor}
.summary-card-total span::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:#8a939d}
.device-action-toolbar{justify-content:flex-end}
.device-action-left{margin-left:auto}
@media(max-width:1100px){.summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.summary{grid-template-columns:1fr}}


/* v0.20.24 - Bulk apply group/playlist picker and compact device status detail */
#devicesView > .summary{display:none;}
.device-action-toolbar{
  min-height:54px;
  padding:8px 14px;
  align-items:center;
  justify-content:space-between;
}
.device-inline-summary{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:18px;
  color:#68727d;
  font-size:12px;
  line-height:1.2;
  white-space:nowrap;
}
.device-inline-stat{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:600;
}
.device-inline-stat strong{
  color:inherit;
  font-size:12px;
  font-weight:800;
}
.device-inline-stat.total{color:#59636f;}
.device-inline-stat.online{color:#287a4f;}
.device-inline-stat.offline{color:#c24646;}
.device-inline-stat .status-dot{
  width:7px;
  height:7px;
}
.device-action-left{
  margin-left:auto;
  flex:0 0 auto;
}
@media(max-width:760px){
  .device-action-toolbar{align-items:center;flex-wrap:wrap;}
  .device-inline-summary{gap:12px;flex-wrap:wrap;}
  .device-action-left{margin-left:auto;}
}


/* v0.20.25 - Device search matches content search; playlist apply beside refresh */
#contentSearchInput,
.device-sidebar-toolbar #searchInput{
  width:min(396px,32vw);
  min-width:220px;
  min-height:38px;
  height:38px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
}
.device-sidebar-toolbar .group-device-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  flex-wrap:nowrap;
}
.device-sidebar-toolbar #refreshDevicesBtn,
.device-sidebar-toolbar #bulkPlaylistApplyBtn{
  min-height:38px;
  height:38px;
  padding:8px 12px;
  white-space:nowrap;
}
.device-action-toolbar{
  justify-content:flex-start;
}
@media(max-width:1100px){
  #contentSearchInput,
  .device-sidebar-toolbar #searchInput{
    width:min(320px,28vw);
    min-width:200px;
  }
}
@media(max-width:800px){
  .device-sidebar-toolbar .group-device-controls{
    width:100%;
    flex-wrap:wrap;
  }
  #contentSearchInput,
  .device-sidebar-toolbar #searchInput{
    width:100%;
    min-width:0;
    flex:1 1 100%;
  }
}

/* v0.20.26 - list-style playlist picker + unified search inputs */
#bulkPlaylistBackdrop .modal,
#devicePlaylistPickerBackdrop .modal{
  width:min(820px,calc(100vw - 40px));
}
.playlist-picker-list-layout{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  min-height:330px;
  max-height:460px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.playlist-picker-pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.playlist-picker-groups-pane{
  border-right:1px solid #e1e5e9;
  background:#fafbfc;
}
.playlist-picker-title{
  flex:0 0 auto;
  padding:13px 16px 10px;
  color:#727c87;
  font-size:12px;
  font-weight:800;
  border-bottom:1px solid #e9ecef;
}
.playlist-picker-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:8px;
}
.playlist-picker-row{
  width:100%;
  min-height:52px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#20252c;
  text-align:left;
  cursor:pointer;
}
.playlist-picker-row.group-row{
  min-height:44px;
  padding:8px 10px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:700;
}
.playlist-picker-row.group-row:hover,
.playlist-picker-row.playlist-row-choice:hover{
  background:#f2f4f7;
}
.playlist-picker-row.group-row.active{
  background:#292f39;
  color:#fff;
}
.playlist-picker-count{
  min-width:24px;
  height:24px;
  padding:0 7px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
  font-weight:800;
}
.playlist-picker-row.group-row.active .playlist-picker-count{
  background:#fff;
  color:#292f39;
}
.playlist-picker-row.playlist-row-choice{
  padding:10px 14px;
  display:grid;
  gap:4px;
  border-bottom:1px solid #eef0f3;
  border-radius:0;
}
.playlist-picker-row.playlist-row-choice:last-child{
  border-bottom:0;
}
.playlist-picker-row.playlist-row-choice.active{
  background:#f3f6f9;
  box-shadow:inset 3px 0 0 #292f39;
}
.playlist-picker-row-main{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:700;
}
.playlist-picker-meta{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#7a838e;
  font-size:11px;
  font-weight:400;
}
.playlist-picker-empty{
  padding:24px 14px;
  color:#9299a2;
  font-size:12px;
  text-align:center;
}
@media(max-width:700px){
  .playlist-picker-list-layout{
    grid-template-columns:1fr;
    max-height:520px;
  }
  .playlist-picker-groups-pane{
    max-height:190px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
}

/* Match device/content search box exactly to playlist search. */
#playlistSearchInput,
#contentSearchInput,
.device-sidebar-toolbar #searchInput{
  width:396px;
  max-width:100%;
  min-width:220px;
  min-height:38px;
  height:38px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
  font-size:14px;
  line-height:1.2;
}
@media(max-width:1100px){
  #playlistSearchInput,
  #contentSearchInput,
  .device-sidebar-toolbar #searchInput{
    width:320px;
  }
}
@media(max-width:800px){
  #playlistSearchInput,
  #contentSearchInput,
  .device-sidebar-toolbar #searchInput{
    width:100%;
    min-width:0;
  }
}


/* v0.20.27 - Common pagination */
.common-page-hidden{display:none!important}
.common-pagination{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:9px 10px;
  border-top:1px solid #eef0f3;
  background:#fff;
}
.common-page-btn{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#7f8893;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.common-page-btn:hover:not(:disabled){background:#f1f4f7;color:#343b44}
.common-page-btn.active{background:#eef1ff;color:#4d55d8}
.common-page-btn:disabled{opacity:.38;cursor:default}
.device-group-sidebar>.common-pagination,
.content-group-sidebar>.common-pagination,
.playlist-group-sidebar>.common-pagination,
.schedule-group-sidebar>.common-pagination,
.event-page-group-sidebar>.common-pagination,
.scheduled-transfer-page-group-sidebar>.common-pagination,
.event-group-sidebar>.common-pagination,
.scheduled-transfer-group-sidebar>.common-pagination,
.device-popup-group-sidebar>.common-pagination,
.content-transfer-group-sidebar>.common-pagination,
.playlist-editor-group-sidebar>.common-pagination,
.apply-group-sidebar>.common-pagination,
.content-upload-group-sidebar>.common-pagination{
  margin-top:auto;
}
@media(max-width:700px){
  .common-pagination{gap:3px;padding-left:5px;padding-right:5px}
  .common-page-btn{width:30px;height:30px;font-size:12px}
}


/* v0.20.28 - Device checkbox cleanup / simplified status modal */
.device-main-table .check-col{
  font-size:0 !important;
  color:transparent !important;
}
.device-main-table .check-col::before,
.device-main-table .check-col::after{
  content:none !important;
}
.device-main-table .check-col input{
  font-size:initial;
}
.modal-device-detail{
  width:min(980px,calc(100vw - 40px));
}
#statusContent{
  font-size:14px;
  line-height:1.4;
}
#statusContent .sync-hint{
  font-size:14px;
  line-height:1.45;
}
.status-summary-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(220px,.72fr);
  gap:28px;
  align-items:start;
}
.status-summary-layout .status-grid{
  grid-template-columns:150px minmax(0,1fr);
  gap:12px 18px;
  font-size:14px;
}
.status-summary-layout .status-grid dt,
.status-summary-layout .status-grid dd{
  font-size:14px;
}
.status-playlist-card{
  padding:16px 18px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  background:#fafbfc;
  display:grid;
  gap:8px;
}
.status-playlist-card span{
  color:#77808b;
  font-size:14px;
}
.status-playlist-card strong{
  font-size:14px;
  line-height:1.4;
  word-break:break-word;
}
.wake-status-box span,
.wake-status-box strong{
  font-size:14px;
}
.wake-status-box small{
  font-size:12px;
}
.device-status-actions{
  align-items:center;
}
@media(max-width:760px){
  .status-summary-layout{grid-template-columns:1fr;}
}


/* v0.20.29 - device status playlist files and header screen action */
.modal-device-detail{
  max-height:calc(100vh - 32px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.device-status-header{
  align-items:flex-start;
  flex:0 0 auto;
}
.device-screen-header-action{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
  color:#7a838e;
  font-size:12px;
  white-space:nowrap;
}
.device-screen-header-action .secondary{
  padding:7px 10px;
  min-height:30px;
  font-size:11px;
  line-height:1.15;
}
.device-detail-grid{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
.device-status-column{
  min-height:0;
}
.status-summary-layout{
  min-height:0;
}
.status-playlist-card{
  min-height:0;
  max-height:360px;
  overflow:hidden;
  grid-template-rows:auto auto minmax(0,1fr);
}
.status-playlist-files{
  margin-top:4px;
  min-height:0;
  max-height:245px;
  overflow-y:auto;
  border-top:1px solid #e5e8ec;
}
.status-playlist-file-row{
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:8px;
  align-items:center;
  padding:7px 2px;
  border-bottom:1px solid #eceff2;
  font-size:12px;
}
.status-playlist-file-row:last-child{border-bottom:0;}
.status-playlist-file-index{
  color:#8a929c;
  text-align:center;
  font-size:11px;
}
.status-playlist-file-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#343b44;
}
.status-playlist-files-empty{
  padding:12px 2px;
  color:#8a929c;
  font-size:12px;
}
.device-status-actions{
  flex:0 0 auto;
}
@media(max-width:760px){
  .device-screen-header-action{align-items:flex-end;flex-direction:column;gap:5px;white-space:normal;text-align:right;}
  .status-playlist-card{max-height:260px;}
  .status-playlist-files{max-height:150px;}
}


/* v0.20.31 - Content card/list view switch */
.content-view-switch{
  display:flex;
  align-items:center;
  gap:4px;
  margin-left:auto;
}
.content-mode-btn{
  width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #d9dee4;
  border-radius:8px;
  background:#fff;
  color:#56606b;
  font-size:18px;
  line-height:1;
  font-weight:800;
  cursor:pointer;
}
.content-mode-btn.active{
  background:#292f39;
  color:#fff;
  border-color:#292f39;
}
.content-library-toolbar #contentSearchInput{
  margin-left:0;
}
.content-grid.content-list-view{
  display:grid;
  grid-template-columns:1fr;
  gap:0;
  padding:0;
  background:#fff;
}
.content-grid.content-list-view .content-card.rich-card{
  min-height:66px;
  grid-template-columns:36px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 14px;
  border:0;
  border-bottom:1px solid #eef0f3;
  border-radius:0;
  outline-offset:-1px;
}
.content-grid.content-list-view .content-card.rich-card:last-child{
  border-bottom:0;
}
.content-grid.content-list-view .content-select-box{
  position:static;
  width:24px;
  height:24px;
  grid-column:1;
  grid-row:1;
  box-shadow:none;
  background:transparent;
}
.content-grid.content-list-view .content-thumb-button{
  display:none;
}
.content-grid.content-list-view .content-meta{
  grid-column:2;
  grid-row:1;
  display:grid;
  grid-template-columns:minmax(220px,1.6fr) minmax(190px,1fr) minmax(190px,1fr);
  align-items:center;
  gap:14px;
}
.content-grid.content-list-view .content-meta strong,
.content-grid.content-list-view .content-meta span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.content-grid.content-list-view .content-meta strong{
  font-size:12px;
}
.content-grid.content-list-view .content-meta span{
  font-size:11px;
}
.content-grid.content-list-view .content-card-actions{
  grid-column:3;
  grid-row:1;
  display:flex;
  gap:5px;
  justify-content:flex-end;
  padding:0;
  white-space:nowrap;
}
.content-grid.content-list-view .content-card-actions .small-action,
.content-grid.content-list-view .content-card-actions .danger-mini{
  min-height:28px;
  padding:5px 8px;
  font-size:11px;
  line-height:1.15;
}
@media(max-width:1050px){
  .content-grid.content-list-view .content-meta{
    grid-template-columns:minmax(180px,1.4fr) minmax(150px,1fr);
  }
  .content-grid.content-list-view .hash-text{display:none;}
}
@media(max-width:800px){
  .content-view-switch{margin-left:0;}
  .content-grid.content-list-view .content-card.rich-card{
    grid-template-columns:32px minmax(0,1fr);
  }
  .content-grid.content-list-view .content-meta{
    grid-template-columns:1fr;
    gap:2px;
  }
  .content-grid.content-list-view .content-card-actions{
    grid-column:2;
    grid-row:2;
    justify-content:flex-start;
    margin-top:6px;
  }
}


/* v0.20.33 - Content all/group list and bulk copy/move actions */
.content-selection-actions{
  gap:6px;
}
.content-selection-actions .secondary,
.content-selection-actions .danger-button{
  min-height:34px;
  padding:6px 10px;
  font-size:12px;
  border-radius:7px;
}
.content-group-action-modal{
  width:min(520px,calc(100vw - 40px));
}
.content-action-group-list{
  display:grid;
  gap:4px;
  max-height:420px;
  overflow:auto;
  padding:4px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  background:#fafbfc;
}
.content-action-group-btn{
  width:100%;
  min-height:40px;
  border:0;
  border-radius:7px;
  padding:8px 12px;
  background:transparent;
  color:#535d68;
  text-align:left;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.content-action-group-btn:hover{background:#eef1f4;}
.content-action-group-btn.active{
  background:#292f39;
  color:#fff;
}


/* v0.20.34 - Content selection actions / rename */
.content-selection-actions{
  order:0;
  flex:0 0 auto;
}
.content-view-switch{
  order:1;
  flex:0 0 auto;
}
.content-library-toolbar #contentSearchInput{order:2;}
.content-library-toolbar #refreshContentsBtn{order:3;}
.content-selection-actions .secondary:not(:disabled){
  background:#262d36;
  border-color:#262d36;
  color:#fff;
}
.content-selection-actions .secondary:not(:disabled):hover{
  background:#171b22;
}
.content-card-actions .rename-content{
  min-height:28px;
  padding:5px 8px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}


/* v0.20.35 - content action placement and unified preview/rename buttons */
.content-selection-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
}
.content-view-switch{
  margin-left:0;
}
.content-card-actions .preview-content,
.content-card-actions .rename-content{
  min-height:28px;
  padding:5px 8px;
  border-radius:7px;
  font-size:11px;
  line-height:1.15;
  white-space:nowrap;
}
@media(max-width:800px){
  .content-selection-actions{margin-left:0;}
}


/* v0.20.36 - Playlist all/group navigation, card/list views, bulk apply/delete */
.playlist-toolbar-v2036{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid #e7eaee;
  flex-wrap:wrap;
}
.playlist-bulk-actions,
.playlist-toolbar-right,
.playlist-view-switch{
  display:flex;
  align-items:center;
  gap:8px;
}
.playlist-toolbar-right{margin-left:auto;min-width:0;}
.playlist-view-switch .secondary{
  min-height:38px;
  padding:8px 12px;
  font-size:12px;
}
.playlist-view-switch .secondary.active{
  background:#292f39;
  color:#fff;
  border-color:#292f39;
}
#applySelectedPlaylistBtn,
#deleteSelectedPlaylistsBtn{
  min-height:38px;
  padding:8px 13px;
  font-size:12px;
  border-radius:8px;
  white-space:nowrap;
}
#deleteSelectedPlaylistsBtn{
  border:1px solid #e7b9b9;
  background:#fff;
  color:#a13d3d;
}
#deleteSelectedPlaylistsBtn:disabled,
#applySelectedPlaylistBtn:disabled{opacity:.42;cursor:not-allowed;}

.playlist-list.playlist-card-mode{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  padding:14px;
  align-content:start;
}
.playlist-list.playlist-card-mode .rich-playlist-card{
  position:relative;
  min-width:0;
  display:grid;
  grid-template-columns:132px minmax(0,1fr);
  grid-template-rows:auto auto;
  gap:10px 14px;
  padding:14px;
  border:1px solid #e5e8ec;
  border-radius:10px;
  background:#fff;
}
.playlist-list.playlist-card-mode .rich-playlist-card.selected{
  border-color:#292f39;
  box-shadow:0 0 0 1px #292f39 inset;
}
.playlist-select-box{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:6px;
  background:rgba(255,255,255,.94);
}
.playlist-select-checkbox{width:16px;height:16px;margin:0;}
.playlist-card-visual{
  grid-row:1 / span 2;
  min-width:0;
}
.playlist-card-thumb,
.playlist-card-placeholder{
  display:block;
  width:132px;
  height:96px;
  border-radius:8px;
  object-fit:cover;
  background:#f1f3f5;
}
.playlist-card-placeholder{
  display:grid;
  place-items:center;
  align-content:center;
  gap:3px;
  color:#76808a;
}
.playlist-card-placeholder span{font-size:20px;}
.playlist-card-placeholder small{font-size:9px;font-weight:800;}
.playlist-card-main{
  min-width:0;
  display:grid;
  align-content:start;
  gap:4px;
  padding-right:2px;
}
.playlist-card-main strong{
  font-size:13px;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.playlist-card-main span{
  font-size:11px;
  line-height:1.25;
  color:#7b8590;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.playlist-list .playlist-actions{
  display:flex;
  justify-content:flex-end;
  gap:6px;
}
.playlist-list .playlist-actions .secondary{
  padding:5px 8px;
  min-height:28px;
  border-radius:7px;
  font-size:11px;
  line-height:1.15;
}

.playlist-list.playlist-list-mode{
  display:block;
  padding:0;
}
.playlist-list.playlist-list-mode .rich-playlist-card{
  position:relative;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  border-bottom:1px solid #eef0f3;
  background:#fff;
}
.playlist-list.playlist-list-mode .rich-playlist-card.selected{background:#f7f8fa;}
.playlist-list.playlist-list-mode .playlist-select-box{
  position:static;
  width:24px;
  height:24px;
  justify-self:center;
}
.playlist-list.playlist-list-mode .playlist-card-visual{display:none;}
.playlist-list.playlist-list-mode .playlist-card-main{
  display:grid;
  grid-template-columns:minmax(180px,1.3fr) minmax(160px,1fr) minmax(100px,.7fr);
  gap:12px;
  align-items:center;
}
.playlist-list.playlist-list-mode .playlist-card-main strong,
.playlist-list.playlist-list-mode .playlist-card-main span{
  font-size:12px;
  white-space:nowrap;
}
.playlist-list.playlist-list-mode .playlist-actions{justify-content:flex-end;}

.playlist-preview-modal{max-height:calc(100vh - 32px);display:flex;flex-direction:column;}
.playlist-preview-body{min-height:0;display:grid;gap:12px;overflow:hidden;}
.playlist-preview-items{max-height:420px;overflow:auto;}

@media(max-width:1280px){
  .playlist-list.playlist-card-mode{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:900px){
  .playlist-toolbar-right{width:100%;margin-left:0;flex-wrap:wrap;}
  #playlistSearchInput{flex:1 1 260px;}
  .playlist-list.playlist-card-mode{grid-template-columns:1fr;}
  .playlist-list.playlist-list-mode .playlist-card-main{grid-template-columns:1fr;gap:3px;}
}


/* v0.20.37 - playlist editor filename typography one step smaller */
#playlistEditorBackdrop .builder-item strong,
#playlistEditorBackdrop .grow strong{
  font-size:13px;
  line-height:1.2;
  font-weight:400;
}


/* v0.20.38 - Content UX aligned with Playlist */
.content-library-layout{
  grid-template-columns:300px minmax(0,1fr);
}
.content-library-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  padding:12px 14px;
  flex-wrap:wrap;
}
.content-view-switch{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}
.content-view-switch .secondary{
  min-height:38px;
  padding:8px 12px;
  font-size:12px;
  border-radius:8px;
  white-space:nowrap;
}
.content-view-switch .secondary.active{
  background:#292f39;
  color:#fff;
  border-color:#292f39;
}
.content-library-toolbar #contentSearchInput{
  width:396px;
  min-width:220px;
  min-height:38px;
  margin-left:0;
  font-size:14px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
}
.content-sidebar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px 10px 10px;
  border-bottom:1px solid #e7eaee;
  flex-wrap:nowrap;
}
.content-sidebar-actions .secondary,
.content-sidebar-actions .danger-mini{
  min-height:38px;
  padding:8px 10px;
  font-size:12px;
  border-radius:8px;
  white-space:nowrap;
}
.content-sidebar-actions .secondary:not(:disabled){
  background:#262d36;
  border-color:#262d36;
  color:#fff;
}
.content-sidebar-actions .secondary:not(:disabled):hover{
  background:#171b22;
}
.content-sidebar-actions .danger-mini{
  border:1px solid #e7b9b9;
  background:#fff;
  color:#a13d3d;
}
.content-sidebar-actions .danger-mini:disabled,
.content-sidebar-actions .secondary:disabled{
  opacity:.42;
  cursor:not-allowed;
}
/* Match playlist list mode structure more closely */
.content-grid.content-list-view{
  display:block;
  padding:0;
  background:#fff;
}
.content-grid.content-list-view .content-card.rich-card{
  position:relative;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-height:0;
  padding:10px 14px;
  border:0;
  border-bottom:1px solid #eef0f3;
  border-radius:0;
  background:#fff;
}
.content-grid.content-list-view .content-card.rich-card.selected{background:#f7f8fa;}
.content-grid.content-list-view .content-select-box{
  position:static;
  width:24px;
  height:24px;
  grid-column:1;
  grid-row:1;
  justify-self:center;
  box-shadow:none;
  background:transparent;
}
.content-grid.content-list-view .content-thumb-button{display:none;}
.content-grid.content-list-view .content-meta{
  grid-column:2;
  grid-row:1;
  display:grid;
  grid-template-columns:minmax(180px,1.3fr) minmax(160px,1fr) minmax(100px,.7fr);
  gap:12px;
  align-items:center;
}
.content-grid.content-list-view .content-meta strong,
.content-grid.content-list-view .content-meta span{
  font-size:12px;
  white-space:nowrap;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.content-grid.content-list-view .content-card-actions{
  grid-column:3;
  grid-row:1;
  display:flex;
  gap:8px;
  justify-content:flex-end;
  padding:0;
  white-space:nowrap;
}
@media(max-width:1000px){
  .content-library-layout{grid-template-columns:260px minmax(0,1fr);}
  .content-sidebar-actions{flex-wrap:wrap;}
  .content-grid.content-list-view .content-meta{grid-template-columns:1fr;gap:3px;}
}
@media(max-width:800px){
  .content-library-layout{grid-template-columns:1fr;}
  .content-group-sidebar{border-right:0;border-bottom:1px solid #e5e8ec;}
  .content-view-switch{margin-left:0;}
  .content-library-toolbar #contentSearchInput{width:100%;flex:1 1 260px;}
  .content-grid.content-list-view .content-card.rich-card{grid-template-columns:32px minmax(0,1fr);}
  .content-grid.content-list-view .content-card-actions{grid-column:2;grid-row:2;justify-content:flex-start;margin-top:6px;}
}


/* v0.20.40 - Content selection actions moved to view toolbar row */
.content-library-toolbar{
  justify-content:flex-start;
  flex-wrap:wrap;
}
.content-toolbar-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.content-toolbar-actions .secondary,
.content-toolbar-actions .danger-mini{
  min-height:38px;
  padding:8px 12px;
  font-size:12px;
  border-radius:8px;
  white-space:nowrap;
}
.content-toolbar-actions .secondary:not(:disabled){
  background:#262d36;
  border-color:#262d36;
  color:#fff;
}
.content-toolbar-actions .secondary:not(:disabled):hover{
  background:#171b22;
}
.content-toolbar-actions .danger-mini{
  border:1px solid #e7b9b9;
  background:#fff;
  color:#a13d3d;
}
.content-toolbar-actions .danger-mini:disabled,
.content-toolbar-actions .secondary:disabled{
  opacity:.42;
  cursor:not-allowed;
}
.content-library-toolbar .content-view-switch{
  margin-left:0;
}
.content-library-toolbar #contentSearchInput{
  margin-left:auto;
}
@media(max-width:900px){
  .content-library-toolbar #contentSearchInput{
    width:100%;
    flex:1 1 100%;
    margin-left:0;
  }
}


/* v0.20.41 - Device/content top toolbars unified with playlist UI */
.device-action-toolbar{
  min-height:58px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:nowrap;
}
.device-action-controls{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  flex-wrap:nowrap;
}
.device-action-controls #searchInput{
  width:min(396px,32vw);
  min-width:220px;
  height:38px;
  min-height:38px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
}
.device-action-controls #refreshDevicesBtn,
.device-action-controls #bulkPlaylistApplyBtn{
  height:38px;
  min-height:38px;
  padding:8px 12px;
  font-size:12px;
  white-space:nowrap;
}
.device-sidebar-toolbar-minimal{
  display:none;
}
.content-library-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:nowrap;
}
.content-toolbar-actions{
  margin-right:auto;
}
.content-toolbar-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}
.content-toolbar-right .content-view-switch{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:0;
  flex:0 0 auto;
}
.content-toolbar-right #contentSearchInput{
  margin-left:0;
}
/* Match playlist view-switch button sizing and selected state. */
.content-view-switch .secondary{
  height:38px;
  min-height:38px;
  padding:8px 12px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.content-view-switch .secondary.active{
  background:#262d36;
  border-color:#262d36;
  color:#fff;
}
@media(max-width:1000px){
  .device-action-toolbar,
  .content-library-toolbar{flex-wrap:wrap;}
  .device-action-controls,
  .content-toolbar-right{width:100%;}
  .device-action-controls #searchInput,
  .content-toolbar-right #contentSearchInput{flex:1 1 260px;width:auto;min-width:0;}
}


/* v0.20.42 - Align content bulk actions to the left like playlist toolbar */
.content-library-toolbar .content-selection-actions.content-toolbar-actions{
  margin-left:0;
  margin-right:auto;
  justify-content:flex-start;
}


/* v0.20.43 - Schedule simplified top action row */
.schedule-setup-toolbar{
  min-height:64px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  border-bottom:1px solid #e7eaee;
  background:#fff;
}
.schedule-setup-toolbar #openBulkScheduleApplyBtn{
  flex:0 0 auto;
}


/* v0.20.44 - Schedule search + selection-aware apply button */
.schedule-setup-toolbar{
  justify-content:flex-end;
  gap:8px;
}
.schedule-setup-toolbar #scheduleDeviceSearchInput{
  width:396px;
  min-width:220px;
  height:38px;
  min-height:38px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  color:#20252c;
  font-size:14px;
  line-height:1.2;
}
.schedule-setup-toolbar #openBulkScheduleApplyBtn{
  min-height:38px;
  padding:8px 13px;
  border-radius:8px;
  font-size:12px;
  white-space:nowrap;
}
.schedule-setup-toolbar #openBulkScheduleApplyBtn:disabled{
  opacity:.42;
  cursor:not-allowed;
}
@media(max-width:760px){
  .schedule-setup-toolbar{flex-wrap:wrap;}
  .schedule-setup-toolbar #scheduleDeviceSearchInput{width:100%;min-width:0;}
}


/* v0.20.45 - Schedule delete action */
.schedule-setup-toolbar{justify-content:space-between;}
.schedule-setup-toolbar-right{margin-left:auto;display:flex;align-items:center;gap:8px;}
#clearSelectedSchedulesBtn{min-height:38px;padding:8px 13px;border-radius:8px;font-size:12px;white-space:nowrap;border:1px solid #e7b9b9;background:#fff;color:#a13d3d;}
#clearSelectedSchedulesBtn:disabled{opacity:.42;cursor:not-allowed;}
@media(max-width:760px){.schedule-setup-toolbar-right{width:100%;margin-left:0;}.schedule-setup-toolbar-right #scheduleDeviceSearchInput{flex:1 1 auto;width:auto;}}

/* v0.20.46 - Compact 24-hour Device Schedule modal */
.schedule-direct-modal-compact{
  width:min(980px,calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  padding:20px;
}
.schedule-direct-modal-compact .schedule-modal-header{
  margin-bottom:14px;
}
.schedule-direct-modal-compact #scheduleForm{
  display:grid;
  gap:12px;
}
.schedule-config-card{
  border:1px solid #e1e5e9;
  border-radius:10px;
  padding:14px 16px;
  background:#fff;
}
.schedule-config-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.schedule-config-title-row>strong,
.schedule-config-title-row>div>strong{
  font-size:14px;
}
.schedule-config-title-row>div>span{
  margin-left:5px;
  color:#6f7883;
  font-size:12px;
}
.schedule-select-all-btn{
  min-height:34px;
  padding:6px 12px;
  font-size:12px;
}
.schedule-weekday-grid{
  grid-template-columns:repeat(7,minmax(54px,1fr));
  margin-top:0!important;
  gap:8px;
}
.schedule-weekday-grid label{
  min-height:38px;
  padding:7px 8px;
  background:#fff;
}
.schedule-time-pair-24h{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:end;
  gap:14px;
  max-width:700px;
  margin:0 auto;
}
.schedule-time-field{
  display:grid;
  gap:6px;
  color:#505965;
  font-size:12px;
  font-weight:700;
}
.schedule-time-combo{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  border:1px solid #dce1e6;
  border-radius:9px;
  background:#fff;
  overflow:visible;
}
.schedule-time-combo select{
  min-width:0;
  height:44px;
  padding:0 12px;
  border:0;
  background:#fff;
  font-size:18px;
  font-weight:700;
  text-align:center;
  appearance:auto;
}
.schedule-time-colon{
  font-size:18px;
  font-weight:700;
}
.schedule-time-separator{
  align-self:end;
  padding-bottom:12px;
  font-size:18px;
  color:#5a636d;
}
.schedule-switch-label{
  display:inline-flex!important;
  align-items:center;
  gap:8px!important;
  color:#5f6873;
  font-size:12px!important;
  font-weight:700!important;
  cursor:pointer;
}
.schedule-switch-label input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.schedule-switch-ui{
  position:relative;
  width:42px;
  height:24px;
  border-radius:999px;
  background:#c9ced4;
  transition:.18s ease;
  flex:0 0 auto;
}
.schedule-switch-ui::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.18);
  transition:.18s ease;
}
.schedule-switch-label input:checked + .schedule-switch-ui{
  background:#262d36;
}
.schedule-switch-label input:checked + .schedule-switch-ui::after{
  transform:translateX(18px);
}
.schedule-restart-compact{
  display:block;
}
.schedule-restart-inline{
  display:grid;
  grid-template-columns:auto auto minmax(150px,190px) minmax(110px,140px) minmax(220px,1fr);
  align-items:center;
  gap:12px;
}
.schedule-restart-inline>strong{
  white-space:nowrap;
  font-size:14px;
}
.schedule-restart-inline select{
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:7px 10px;
  background:#fff;
  font-size:12px;
}
.schedule-restart-inline select:disabled{
  background:#f5f7f9;
  color:#9aa1aa;
}
.schedule-restart-description{
  color:#7a838e;
  font-size:11px;
  line-height:1.35;
}
.schedule-modal-actions{
  margin-top:2px;
  padding-top:10px;
  border-top:1px solid #eef0f3;
}
.schedule-direct-modal-compact .form-message{
  min-height:0;
}
@media(max-width:760px){
  .schedule-time-pair-24h{
    grid-template-columns:1fr;
  }
  .schedule-time-separator{display:none;}
  .schedule-restart-inline{
    grid-template-columns:1fr 1fr;
  }
  .schedule-restart-description{
    grid-column:1/-1;
  }
}


/* v0.20.47 - Compact 24h time dropdown: show about 10 items, then scroll */
.compact-time-select{
  position:relative;
  min-width:0;
  width:100%;
}
.compact-time-native{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
.compact-time-trigger{
  width:100%;
  height:44px;
  padding:0 12px;
  border:0;
  border-radius:8px;
  background:#fff;
  color:#20252c;
  font:inherit;
  font-size:18px;
  font-weight:700;
  text-align:center;
  cursor:pointer;
}
.compact-time-trigger::after{
  content:"⌄";
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-52%);
  color:#20252c;
  font-size:13px;
}
.compact-time-select:has(.compact-time-native:disabled) .compact-time-trigger{
  opacity:.45;
  cursor:not-allowed;
  background:#f5f7f9;
}
.compact-time-menu{
  position:absolute;
  left:0;
  top:calc(100% + 4px);
  z-index:100;
  width:100%;
  max-height:320px; /* 10 items x 32px */
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid #d7dce2;
  border-radius:8px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.14);
}
.compact-time-option{
  display:block;
  width:100%;
  height:32px;
  padding:0 8px;
  border:0;
  background:#fff;
  color:#20252c;
  font-size:14px;
  text-align:center;
  cursor:pointer;
}
.compact-time-option:hover{background:#f2f4f7;}
.compact-time-option.active{background:#2c333d;color:#fff;font-weight:700;}
.schedule-restart-inline .compact-time-select{
  width:118px;
  flex:0 0 118px;
  border:1px solid #dce1e6;
  border-radius:9px;
}
.schedule-restart-inline .compact-time-trigger{font-size:15px;}


/* v0.20.48 - Event editor layout aligned to requested add-event screen */
#eventBackdrop .event-modal{
  width:min(1320px,calc(100vw - 20px));
  height:840px;
  max-height:calc(100vh - 18px);
}

#eventBackdrop #eventForm{
  gap:12px;
}

#eventBackdrop .event-top-form{
  display:grid;
  gap:10px;
}

#eventBackdrop .event-top-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(240px,.65fr);
  gap:12px;
}

#eventBackdrop .event-top-grid label,
#eventBackdrop .event-mode-bar label{
  display:grid;
  gap:6px;
  color:#505965;
  font-size:12px;
  font-weight:700;
}

#eventBackdrop .event-top-grid input,
#eventBackdrop .event-top-grid select,
#eventBackdrop .event-mode-bar input,
#eventBackdrop .event-mode-bar select{
  min-height:42px;
  border:1px solid #dce1e6;
  border-radius:10px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
}

#eventBackdrop .event-name-field{min-width:0;}

#eventBackdrop .event-mode-bar{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:10px 12px;
  border:1px solid #e3e7eb;
  border-radius:10px;
  background:#fafbfc;
}

#eventBackdrop .event-mode-bar #eventReturnPlaylistLabel{
  grid-column:1 / -1;
}

#eventBackdrop .event-weekly-bar{
  grid-template-columns:minmax(320px,1.45fr) repeat(2,minmax(180px,.7fr));
  align-items:start;
}

#eventBackdrop .event-weekday-wrap{
  display:grid;
  gap:7px;
}

#eventBackdrop .event-weekly-bar .event-exclude-check{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:-2px;
}

#eventBackdrop .event-layout-4col{
  grid-template-columns:280px 360px 270px minmax(0,1fr);
  min-height:0;
}

#eventBackdrop .event-target-sidebar,
#eventBackdrop .event-device-column,
#eventBackdrop .event-content-group-sidebar,
#eventBackdrop .event-content-library-column{
  min-width:0;
  min-height:0;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#fff;
  overflow:hidden;
}

#eventBackdrop .event-target-sidebar,
#eventBackdrop .event-device-column,
#eventBackdrop .event-content-group-sidebar{
  border-right:1px solid #e1e5e9;
}

#eventBackdrop .event-target-sidebar #eventGroupSearchInput{
  min-height:38px;
  width:100%;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

#eventBackdrop .event-content-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:4px;
}

#eventBackdrop .event-content-group-btn{
  width:100%;
  min-height:40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
#eventBackdrop .event-content-group-btn:hover{background:#eef1f4;}
#eventBackdrop .event-content-group-btn.active{background:#292f39;color:#fff;}
#eventBackdrop .event-content-group-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#eventBackdrop .event-content-group-count{min-width:24px;height:24px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:#e9edf1;color:#606a75;font-size:11px;}
#eventBackdrop .event-content-group-btn.active .event-content-group-count{background:#fff;color:#292f39;}

#eventBackdrop .event-content-library-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:2px;
}

#eventBackdrop .event-content-library-titles{
  display:grid;
  gap:2px;
}

#eventBackdrop .event-content-library-titles strong{
  font-size:14px;
}

#eventBackdrop #eventContentLibraryHint{
  color:#7a838e;
  font-size:12px;
}

#eventBackdrop .event-selected-count{
  color:#55606b;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

#eventBackdrop .event-selected-content-list{
  flex:0 0 auto;
  min-height:110px;
  max-height:190px;
  background:#fff;
}

#eventBackdrop .event-content-library-list{
  flex:1 1 auto;
  min-height:0;
  background:#fafbfc;
}

#eventBackdrop .event-selected-content-list .builder-item,
#eventBackdrop .event-content-library-list .builder-item{
  align-items:flex-start;
}

#eventBackdrop .event-selected-content-list .builder-item strong,
#eventBackdrop .event-content-library-list .builder-item strong{
  display:block;
  font-size:14px;
  line-height:1.35;
  word-break:break-all;
}

#eventBackdrop .event-selected-content-list .builder-item span,
#eventBackdrop .event-content-library-list .builder-item span{
  font-size:11px;
  color:#7a838e;
}

#eventBackdrop .event-selected-content-list .builder-buttons{
  margin-left:auto;
}

#eventBackdrop .event-selected-content-list .duration-input{
  width:64px;
  min-height:28px;
  border:1px solid #dce1e6;
  border-radius:7px;
  padding:4px 6px;
}

#eventBackdrop .event-content-library-list .small-action,
#eventBackdrop .event-content-library-list .secondary{
  margin-left:auto;
}

#eventBackdrop #eventMessage{
  flex:0 0 auto;
  margin-top:-2px;
}

@media(max-width:1180px){
  #eventBackdrop .event-layout-4col{
    grid-template-columns:240px 320px 220px minmax(300px,1fr);
  }
}

@media(max-width:980px){
  #eventBackdrop .event-top-grid,
  #eventBackdrop .event-mode-bar{
    grid-template-columns:1fr;
  }
  #eventBackdrop .event-layout-4col{
    grid-template-columns:1fr 1fr;
  }
  #eventBackdrop .event-content-group-sidebar{
    border-right:0;
  }
}

@media(max-width:720px){
  #eventBackdrop .event-layout-4col{
    grid-template-columns:1fr;
    overflow:auto;
  }
  #eventBackdrop .event-target-sidebar,
  #eventBackdrop .event-device-column,
  #eventBackdrop .event-content-group-sidebar{
    border-right:0;
    border-bottom:1px solid #e1e5e9;
    max-height:260px;
  }
}


/* v0.20.49 - Event time controls and subgroup persistence */
#eventBackdrop .event-period-bar{
  grid-template-columns:minmax(0,1.6fr) minmax(280px,.8fr);
  align-items:start;
}
#eventBackdrop .event-period-time-wrap{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:12px;
  align-items:end;
}
#eventBackdrop .event-time-field,
#eventBackdrop .event-return-wrap{
  display:grid;
  gap:8px;
}
#eventBackdrop .event-time-field > span,
#eventBackdrop .event-time-field-title{
  color:#505965;
  font-size:12px;
  font-weight:700;
}
#eventBackdrop .event-date-time-combo{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(190px,.95fr);
  gap:10px;
  align-items:center;
}
#eventBackdrop .event-date-time-combo input[type="date"]{
  min-height:42px;
  border:1px solid #dce1e6;
  border-radius:10px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
}
#eventBackdrop .event-time-combo,
#eventBackdrop .event-weekly-time-pair .schedule-time-combo{
  min-height:42px;
  padding:0 8px;
  border:1px solid #dce1e6;
  border-radius:10px;
  background:#fff;
}
#eventBackdrop .event-time-combo .compact-time-trigger,
#eventBackdrop .event-weekly-time-pair .compact-time-trigger{
  height:40px;
  font-size:16px;
  border-radius:8px;
}
#eventBackdrop .event-time-separator{
  align-self:center;
  color:#66717c;
  font-size:22px;
}
#eventBackdrop .event-return-wrap{
  min-width:0;
}
#eventBackdrop .event-return-wrap #eventReturnPlaylistLabel.hidden{display:none;}
#eventBackdrop .event-return-wrap #eventReturnPlaylistLabel{display:grid;}
#eventBackdrop .event-weekly-bar{
  grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr);
  align-items:start;
}
#eventBackdrop .event-weekly-time-wrap,
#eventBackdrop .event-weekday-wrap{
  display:grid;
  gap:8px;
  padding:10px;
  border:1px solid #e6e9ed;
  border-radius:10px;
  background:#fff;
}
#eventBackdrop .event-weekly-time-pair{
  gap:10px;
}
#eventBackdrop .event-weekly-bar .event-exclude-check{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:2px;
}
@media(max-width:1100px){
  #eventBackdrop .event-period-bar,
  #eventBackdrop .event-weekly-bar{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  #eventBackdrop .event-period-time-wrap,
  #eventBackdrop .event-date-time-combo{
    grid-template-columns:1fr;
  }
  #eventBackdrop .event-time-separator{display:none;}
}


/* v0.20.50 - Event target context and stable period/weekly row height */
#eventBackdrop .event-period-bar,
#eventBackdrop .event-weekly-bar{
  min-height:148px;
  box-sizing:border-box;
}
#eventBackdrop #eventLocationList{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}
#eventBackdrop #eventLocationList.hidden{display:none;}
#eventBackdrop #eventGroupSearchInput.hidden,
#eventBackdrop #eventGroupList.hidden,
#eventBackdrop #eventLocationField.hidden{display:none;}
@media(min-width:1101px){
  #eventBackdrop .event-period-bar,
  #eventBackdrop .event-weekly-bar{
    height:148px;
    min-height:148px;
    max-height:148px;
  }
}


/* v0.20.51 - Weekly event uses playlist group/list chooser */
#eventBackdrop .event-selected-content-list .builder-item .order-num{flex:0 0 28px;}
#eventBackdrop .event-content-library-list .builder-item.selected{border-color:#cfd6dd;background:#f8fafc;}
#eventBackdrop .event-weekly-time-wrap{display:grid;align-content:start;}
#eventBackdrop .event-weekly-time-pair{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:end;}
#eventBackdrop .event-weekly-time-pair .schedule-time-field{min-width:0;}
#eventBackdrop .event-content-library-titles strong{word-break:keep-all;}
@media(max-width:760px){
  #eventBackdrop .event-weekly-time-pair{grid-template-columns:1fr;}
}


/* v0.20.52 - Fix weekly event top layout */
#eventBackdrop .event-top-form{
  gap:12px;
}

#eventBackdrop .event-period-bar,
#eventBackdrop .event-weekly-bar{
  height:auto;
  min-height:0;
  max-height:none;
  align-items:stretch;
}

#eventBackdrop .event-period-bar{
  grid-template-columns:minmax(0,1.5fr) minmax(320px,.85fr);
}

#eventBackdrop .event-weekly-bar{
  grid-template-columns:minmax(0,1.15fr) minmax(420px,1.45fr);
  gap:14px;
}

#eventBackdrop .event-weekly-time-wrap,
#eventBackdrop .event-weekday-wrap{
  min-height:116px;
  height:100%;
  align-content:start;
}

#eventBackdrop .event-weekly-time-wrap{
  grid-template-rows:auto 1fr;
}

#eventBackdrop .event-weekday-wrap{
  grid-template-rows:auto 1fr;
}

#eventBackdrop .event-weekly-time-pair{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:end;
  gap:12px;
}

#eventBackdrop .event-weekly-time-pair .schedule-time-field{
  display:grid;
  gap:8px;
}

#eventBackdrop .event-weekly-time-pair .schedule-time-field > span{
  color:#505965;
  font-size:12px;
  font-weight:700;
}

#eventBackdrop .event-weekly-time-pair .schedule-time-separator{
  align-self:center;
  font-size:22px;
  color:#68727d;
}

#eventBackdrop .event-weekly-bar .event-exclude-check{
  grid-column:1 / -1;
  margin-top:0;
}

@media(min-width:1101px){
  #eventBackdrop .event-period-bar,
  #eventBackdrop .event-weekly-bar{
    height:auto;
    min-height:0;
    max-height:none;
  }
}

@media(max-width:1180px){
  #eventBackdrop .event-weekly-bar{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  #eventBackdrop .event-weekly-time-wrap,
  #eventBackdrop .event-weekday-wrap{
    min-height:0;
  }
  #eventBackdrop .event-weekly-time-pair{
    grid-template-columns:1fr;
  }
  #eventBackdrop .event-weekly-time-pair .schedule-time-separator{
    display:none;
  }
}


/* v0.20.53 - Improve weekly playlist selection visibility */
#eventBackdrop .event-modal{
  width:min(1420px,calc(100vw - 20px));
}

#eventBackdrop .event-layout-4col{
  grid-template-columns:250px 320px 230px minmax(520px,1fr);
}

#eventBackdrop .event-selected-content-list{
  min-height:150px;
  max-height:280px;
  overflow:auto;
}

#eventBackdrop .weekly-playlist-selected-card{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fafc;
  border-bottom:1px solid #e6ebf0;
}

#eventBackdrop .weekly-playlist-selected-actions,
#eventBackdrop .weekly-playlist-row-actions{
  display:flex;
  gap:6px;
  margin-left:auto;
  align-items:center;
  flex-shrink:0;
}

#eventBackdrop .weekly-playlist-preview-list{
  display:grid;
  gap:0;
  background:#fff;
}

#eventBackdrop .weekly-playlist-preview-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px 12px;
  border-top:1px solid #eef1f4;
}

#eventBackdrop .weekly-playlist-preview-row .order-num{
  flex:0 0 24px;
  height:24px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#edf1f5;
  color:#55616d;
  font-size:11px;
  font-weight:800;
}

#eventBackdrop .weekly-playlist-preview-row strong{
  display:block;
  line-height:1.35;
}

#eventBackdrop .weekly-playlist-preview-more{
  padding:8px 12px 12px;
  color:#6f7a86;
  font-size:12px;
  font-weight:700;
}

#eventBackdrop .event-content-library-column .builder-item{
  align-items:flex-start;
}

#eventBackdrop .event-content-library-list .builder-item .grow,
#eventBackdrop .event-selected-content-list .builder-item .grow{
  min-width:0;
}

#eventBackdrop .event-content-library-list .builder-item strong,
#eventBackdrop .event-selected-content-list .builder-item strong{
  word-break:keep-all;
  overflow-wrap:anywhere;
}

@media(max-width:1260px){
  #eventBackdrop .event-layout-4col{
    grid-template-columns:220px 300px 210px minmax(420px,1fr);
  }
}


/* v0.20.54 - Fix weekly event panel layout cause */
/* Root cause: the desktop weekly layout was being forced into a single-column layout by a broad max-width:1180px rule,
   and the exclude checkbox was spanning the full grid width. This caused the weekly panel to stack awkwardly. */
#eventBackdrop .event-weekly-bar{
  grid-template-columns:minmax(330px,360px) minmax(520px,1fr);
  grid-auto-rows:auto;
  align-items:start;
  gap:14px;
}

#eventBackdrop .event-weekly-time-wrap{
  min-height:118px;
}

#eventBackdrop .event-weekday-wrap{
  min-height:118px;
  width:100%;
}

#eventBackdrop .event-weekly-bar .event-exclude-check{
  grid-column:1;
  align-self:start;
  justify-self:start;
  margin:4px 0 0;
  padding-left:2px;
}

#eventBackdrop .event-weekly-time-pair{
  width:100%;
}

#eventBackdrop .event-weekly-time-wrap .schedule-time-field .schedule-time-combo{
  width:100%;
}

/* keep 2-column weekly layout on common desktop widths; stack only on narrower tablet/mobile widths */
@media(max-width:1180px){
  #eventBackdrop .event-weekly-bar{
    grid-template-columns:minmax(300px,340px) minmax(0,1fr);
  }
}

@media(max-width:900px){
  #eventBackdrop .event-weekly-bar{
    grid-template-columns:1fr;
  }
  #eventBackdrop .event-weekly-bar .event-exclude-check{
    grid-column:1;
  }
}


/* v0.20.55 - Final weekly event row fix: override legacy first-child full-span rule */
/* Legacy rule #weeklyEventFields>div:first-child{grid-column:1/-1} forced the operating-time card to span the full row. */
#eventBackdrop #weeklyEventFields.event-weekly-bar{
  display:grid;
  grid-template-columns:minmax(360px,0.9fr) minmax(560px,1.4fr);
  grid-template-rows:auto auto;
  gap:14px;
  align-items:start;
}

#eventBackdrop #weeklyEventFields.event-weekly-bar > .event-weekly-time-wrap:first-child{
  grid-column:1 !important;
  grid-row:1;
  width:100%;
  min-width:0;
}

#eventBackdrop #weeklyEventFields.event-weekly-bar > .event-weekday-wrap{
  grid-column:2 !important;
  grid-row:1;
  width:100%;
  min-width:0;
}

#eventBackdrop #weeklyEventFields.event-weekly-bar > .event-exclude-check{
  grid-column:1 / -1 !important;
  grid-row:2;
  margin:0;
  padding:2px 2px 0;
  justify-self:start;
}

#eventBackdrop #weeklyEventFields .event-weekly-time-wrap,
#eventBackdrop #weeklyEventFields .event-weekday-wrap{
  min-height:118px;
  box-sizing:border-box;
}

#eventBackdrop #weeklyEventFields .event-weekly-time-pair{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:end;
  gap:12px;
}

#eventBackdrop #weeklyEventFields .weekday-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(58px,1fr));
  gap:8px;
}

#eventBackdrop #weeklyEventFields .weekday-grid label{
  min-width:0;
  min-height:72px;
}

@media(max-width:1050px){
  #eventBackdrop #weeklyEventFields.event-weekly-bar{
    grid-template-columns:minmax(320px,.85fr) minmax(480px,1.25fr);
  }
  #eventBackdrop #weeklyEventFields .weekday-grid{
    grid-template-columns:repeat(7,minmax(50px,1fr));
    gap:6px;
  }
}

@media(max-width:860px){
  #eventBackdrop #weeklyEventFields.event-weekly-bar{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto;
  }
  #eventBackdrop #weeklyEventFields.event-weekly-bar > .event-weekly-time-wrap:first-child,
  #eventBackdrop #weeklyEventFields.event-weekly-bar > .event-weekday-wrap,
  #eventBackdrop #weeklyEventFields.event-weekly-bar > .event-exclude-check{
    grid-column:1 !important;
    grid-row:auto;
  }
}


/* v0.20.56 - Weekly event row compact layout and exclude row relocation */
#eventBackdrop .event-top-form{
  gap:10px;
}

#eventBackdrop .event-period-bar,
#eventBackdrop .event-weekly-bar{
  height:auto;
  min-height:120px;
  max-height:none;
  box-sizing:border-box;
}

#eventBackdrop .event-weekly-bar{
  grid-template-columns:minmax(0,640px) minmax(0,1fr);
  gap:16px;
  align-items:stretch;
}

#eventBackdrop .event-weekly-time-wrap,
#eventBackdrop .event-weekday-wrap{
  min-height:120px;
  padding:14px 16px;
  border:1px solid #e3e7eb;
  border-radius:14px;
  background:#fafbfc;
}

#eventBackdrop .event-weekly-time-wrap{
  display:flex;
  align-items:center;
}

#eventBackdrop .event-weekly-time-pair{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:12px;
  align-items:end;
}

#eventBackdrop .event-weekly-time-pair .schedule-time-field{
  display:grid;
  gap:8px;
}

#eventBackdrop .event-weekday-wrap{
  display:grid;
  align-content:start;
  gap:10px;
}

#eventBackdrop .event-weekday-wrap .weekday-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(70px,1fr));
  gap:8px;
}

#eventBackdrop .event-weekly-bar .event-exclude-check{
  display:none;
}

#eventBackdrop .event-bottom-inline{
  display:flex;
  align-items:center;
  min-height:34px;
  padding:0 2px;
  margin-top:-2px;
}

#eventBackdrop .event-bottom-inline.hidden{
  display:none;
}

#eventBackdrop .event-exclude-check-bottom{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#2f3944;
  font-weight:700;
  white-space:nowrap;
}

#eventBackdrop .event-exclude-check-bottom input{
  width:16px;
  height:16px;
}

@media(max-width:1180px){
  #eventBackdrop .event-weekly-bar{
    grid-template-columns:1fr;
  }
}

@media(max-width:820px){
  #eventBackdrop .event-weekday-wrap .weekday-grid{
    grid-template-columns:repeat(4,minmax(70px,1fr));
  }
}


/* v0.20.57 - Weekly weekday checkbox and day label on one line */
#eventBackdrop #weeklyEventFields .event-weekday-wrap{
  min-height:82px !important;
  padding:10px 12px !important;
  gap:8px !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid{
  display:grid !important;
  grid-template-columns:repeat(7,minmax(64px,1fr)) !important;
  gap:8px !important;
  align-items:center !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid label{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  min-width:0 !important;
  min-height:42px !important;
  height:42px !important;
  padding:7px 9px !important;
  white-space:nowrap !important;
  box-sizing:border-box;
}
#eventBackdrop #weeklyEventFields .weekday-grid label input{
  flex:0 0 16px !important;
  width:16px !important;
  height:16px !important;
  min-height:16px !important;
  margin:0 !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid label span{
  display:inline-block !important;
  line-height:16px !important;
  white-space:nowrap !important;
}
#eventBackdrop .event-weekly-time-wrap{
  min-height:82px !important;
  padding:10px 12px !important;
}
#eventBackdrop .event-weekly-bar{
  min-height:96px !important;
}
@media(max-width:820px){
  #eventBackdrop #weeklyEventFields .weekday-grid{
    grid-template-columns:repeat(4,minmax(72px,1fr)) !important;
  }
}


/* v0.20.58 - Fixed return mode + tighter weekly event row */
#eventBackdrop .event-period-bar{
  grid-template-columns:1fr !important;
  min-height:92px !important;
  padding:8px 10px !important;
}
#eventBackdrop .event-period-time-wrap{
  gap:10px !important;
}
#eventBackdrop .event-weekly-bar{
  grid-template-columns:minmax(470px,520px) minmax(0,1fr) !important;
  gap:10px !important;
  min-height:88px !important;
  padding:8px 10px !important;
  align-items:stretch !important;
}
#eventBackdrop .event-weekly-time-wrap,
#eventBackdrop #weeklyEventFields .event-weekday-wrap{
  min-height:72px !important;
  height:72px !important;
  padding:8px 10px !important;
  border-radius:10px !important;
  box-sizing:border-box !important;
}
#eventBackdrop .event-weekly-time-wrap{
  display:flex !important;
  align-items:center !important;
}
#eventBackdrop .event-weekly-time-pair{
  gap:8px !important;
  align-items:end !important;
}
#eventBackdrop .event-weekly-time-pair .schedule-time-field{
  gap:4px !important;
}
#eventBackdrop .event-weekly-time-pair .schedule-time-field > span,
#eventBackdrop #weeklyEventFields .event-weekday-wrap > .field-title{
  height:18px !important;
  line-height:18px !important;
  margin:0 !important;
  padding:0 !important;
  font-size:12px !important;
  font-weight:700 !important;
  color:#505965 !important;
  box-sizing:border-box !important;
}
#eventBackdrop .event-weekly-time-pair .schedule-time-combo{
  min-height:36px !important;
  height:36px !important;
}
#eventBackdrop .event-weekly-time-pair .compact-time-trigger{
  height:34px !important;
  font-size:15px !important;
}
#eventBackdrop #weeklyEventFields .event-weekday-wrap{
  display:grid !important;
  grid-template-rows:18px 36px !important;
  gap:4px !important;
  align-content:start !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid{
  grid-template-columns:repeat(7,minmax(58px,1fr)) !important;
  gap:6px !important;
  height:36px !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid label{
  height:36px !important;
  min-height:36px !important;
  padding:5px 7px !important;
  gap:5px !important;
  border-radius:8px !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid label input{
  width:15px !important;
  height:15px !important;
  min-height:15px !important;
  flex-basis:15px !important;
}
#eventBackdrop #weeklyEventFields .weekday-grid label span{
  line-height:15px !important;
  font-size:12px !important;
}
#eventBackdrop .event-bottom-inline{
  min-height:28px !important;
  margin-top:-4px !important;
  padding:0 2px !important;
}
@media(max-width:1000px){
  #eventBackdrop .event-weekly-bar{grid-template-columns:1fr !important;}
  #eventBackdrop .event-weekly-time-wrap,
  #eventBackdrop #weeklyEventFields .event-weekday-wrap{height:auto !important;min-height:72px !important;}
}


/* v0.20.59 - Narrow event modal; content library width/typography matches device list */
#eventBackdrop .event-modal{
  width:min(1160px,calc(100vw - 20px)) !important;
}

#eventBackdrop .event-layout-4col{
  grid-template-columns:220px 320px 220px 320px !important;
  justify-content:center;
}

#eventBackdrop .event-device-column,
#eventBackdrop .event-content-library-column{
  width:320px;
  max-width:320px;
  box-sizing:border-box;
}

#eventBackdrop .event-content-library-list .builder-item,
#eventBackdrop .event-selected-content-list .builder-item{
  padding:12px 14px !important;
  gap:12px !important;
}

#eventBackdrop .event-content-library-list .builder-item strong,
#eventBackdrop .event-selected-content-list .builder-item strong,
#eventBackdrop .weekly-playlist-preview-row strong{
  font-size:13px !important;
  line-height:1.35 !important;
  font-weight:700 !important;
}

#eventBackdrop .event-content-library-list .builder-item span,
#eventBackdrop .event-selected-content-list .builder-item span,
#eventBackdrop .weekly-playlist-preview-row span{
  font-size:11px !important;
  line-height:1.3 !important;
}

#eventBackdrop .event-content-library-column .small-action,
#eventBackdrop .event-content-library-column .secondary{
  flex:0 0 auto;
}

@media(max-width:1180px){
  #eventBackdrop .event-modal{
    width:calc(100vw - 16px) !important;
  }
  #eventBackdrop .event-layout-4col{
    grid-template-columns:200px minmax(280px,1fr) 200px minmax(280px,1fr) !important;
    overflow-x:auto;
  }
  #eventBackdrop .event-device-column,
  #eventBackdrop .event-content-library-column{
    width:auto;
    max-width:none;
  }
}


/* v0.20.61 - Swap available/added areas; compact list height */
#eventBackdrop .event-content-library-list{
  flex:0 0 auto !important;
  min-height:112px !important;
  height:112px !important;
  max-height:112px !important;
  overflow-y:auto !important;
}
#eventBackdrop .event-selected-content-list{
  flex:1 1 auto !important;
  min-height:90px !important;
  max-height:none !important;
  overflow-y:auto !important;
}
#eventBackdrop .event-content-library-column{
  gap:8px !important;
}
#eventBackdrop .event-content-library-list .builder-item,
#eventBackdrop .event-selected-content-list .builder-item{
  padding-top:9px !important;
  padding-bottom:9px !important;
}


/* v0.20.62 - Match period/weekly row height and improve selected content rows */
#eventBackdrop .event-period-bar,
#eventBackdrop .event-weekly-bar{
  min-height:88px !important;
  height:88px !important;
  max-height:88px !important;
  padding:7px 9px !important;
  box-sizing:border-box !important;
}

#eventBackdrop .event-weekly-bar{
  align-items:stretch !important;
  margin-bottom:0 !important;
}

#eventBackdrop .event-weekly-time-wrap,
#eventBackdrop #weeklyEventFields .event-weekday-wrap{
  min-height:72px !important;
  height:72px !important;
  max-height:72px !important;
  padding:7px 9px !important;
  box-sizing:border-box !important;
}

#eventBackdrop .event-top-form{
  gap:8px !important;
}

#eventBackdrop #weeklyEventFields{
  margin-bottom:0 !important;
}

#eventBackdrop .event-content-library-column{
  gap:6px !important;
}

/* Selected/added content: keep text and controls readable in 320px column */
#eventBackdrop .event-selected-content-list .builder-item{
  display:grid !important;
  grid-template-columns:28px minmax(0,1fr) auto !important;
  grid-template-areas:
    "order info actions" !important;
  align-items:start !important;
  gap:8px !important;
  padding:8px 10px !important;
}

#eventBackdrop .event-selected-content-list .builder-item > .order-num{
  grid-area:order !important;
  align-self:start !important;
}

#eventBackdrop .event-selected-content-list .builder-item > .grow{
  grid-area:info !important;
  min-width:0 !important;
  display:grid !important;
  gap:5px !important;
}

#eventBackdrop .event-selected-content-list .builder-item > .builder-buttons{
  grid-area:actions !important;
  display:flex !important;
  gap:4px !important;
  align-items:center !important;
  margin-left:0 !important;
  white-space:nowrap !important;
}

#eventBackdrop .event-selected-content-list .builder-item strong{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  word-break:normal !important;
}

#eventBackdrop .event-selected-content-list .duration-label{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:5px !important;
  white-space:nowrap !important;
  font-size:11px !important;
  line-height:28px !important;
}

#eventBackdrop .event-selected-content-list .duration-input{
  width:58px !important;
  min-width:58px !important;
  height:28px !important;
  min-height:28px !important;
  padding:3px 6px !important;
  font-size:12px !important;
}

#eventBackdrop .event-selected-content-list .tiny-btn{
  width:30px !important;
  min-width:30px !important;
  height:30px !important;
}

#eventBackdrop .event-selected-content-list .video-full{
  white-space:nowrap !important;
  line-height:28px !important;
}

@media(max-width:1000px){
  #eventBackdrop .event-period-bar,
  #eventBackdrop .event-weekly-bar{
    height:auto !important;
    max-height:none !important;
    min-height:88px !important;
  }
}


/* v0.20.63 - Weekly event: show selected playlist only, hide included files */
#eventBackdrop #weeklyEventFields:not(.hidden) ~ #eventPlaylist + *{}
#eventBackdrop .weekly-playlist-selected-card{
  min-height:62px;
}
#eventBackdrop .weekly-playlist-preview-list,
#eventBackdrop .weekly-playlist-preview-row,
#eventBackdrop .weekly-playlist-preview-more{
  display:none !important;
}


/* v0.20.65 - Keep added weekly playlists on white background */
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card,
#eventBackdrop .event-selected-content-list .builder-item.selected.weekly-playlist-selected-card{
  background:#fff !important;
  border:1px solid #e7eaee;
  border-radius:12px;
  box-shadow:none;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card + .weekly-playlist-selected-card{
  margin-top:10px;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card .order-num{
  background:#f1f4f7;
  color:#54606c;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card .tiny-btn{
  background:#fff;
}


/* v0.20.66 - Weekly selected playlists match period selected-content rows */
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card{
  display:grid !important;
  grid-template-columns:34px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  min-height:64px !important;
  margin:0 !important;
  padding:10px 12px !important;
  border:0 !important;
  border-bottom:1px solid #eceff2 !important;
  border-radius:0 !important;
  background:#fff !important;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card:last-child{
  border-bottom:0 !important;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card + .weekly-playlist-selected-card{
  margin-top:0 !important;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card .grow{
  min-width:0;
  gap:4px;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card strong{
  font-size:13px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-card span{
  font-size:11px !important;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-actions{
  display:flex !important;
  gap:5px !important;
  align-items:center !important;
}
#eventBackdrop .event-selected-content-list .weekly-playlist-selected-actions .tiny-btn{
  width:30px !important;
  min-width:30px !important;
  height:30px !important;
}


/* v0.20.67 - Unify Device / Content / Playlist group sidebars */
.content-library-layout,
.playlist-library-layout{
  grid-template-columns:220px minmax(0,1fr) !important;
}
.content-group-sidebar,
.playlist-group-sidebar{
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.content-group-sidebar-title,
.playlist-group-sidebar-title{
  padding:0;
  color:#727c87;
  font-size:11px;
  font-weight:800;
}
#contentGroupSearchInput,
#playlistSidebarGroupSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
  font:inherit;
}
.content-group-list,
.playlist-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
  padding:0;
  max-height:640px;
}
@media(max-width:800px){
  .content-library-layout,
  .playlist-library-layout{grid-template-columns:1fr !important;}
  .content-group-sidebar,
  .playlist-group-sidebar{border-right:0;border-bottom:1px solid #e1e5e9;}
}


/* v0.20.68 - Unify group search text size */
#groupSearchInput,
#contentGroupSearchInput,
#playlistSidebarGroupSearchInput{
  font-family:inherit !important;
  font-size:13.3333px !important;
  font-weight:400 !important;
  line-height:normal !important;
}
#contentGroupSearchInput::placeholder,
#playlistSidebarGroupSearchInput::placeholder,
#groupSearchInput::placeholder{
  font:inherit;
}


/* v0.20.69 - Device/Schedule panel divider style unified with Playlist */
.device-library-layout,
.schedule-device-layout{
  border:0 !important;
  border-radius:0 !important;
  overflow:hidden;
}

/* The toolbar already provides the single divider line, matching Playlist. */
.device-action-toolbar,
.schedule-setup-toolbar,
.playlist-toolbar-v2036{
  border-bottom:1px solid #e7eaee !important;
}

/* Keep only the vertical divider between group sidebar and content/table. */
.device-group-sidebar,
.schedule-group-sidebar{
  border-top:0 !important;
  border-bottom:0 !important;
  border-left:0 !important;
  border-right:1px solid #e1e5e9 !important;
}

/* Avoid extra top rules from inner table wrappers. */
.device-library-main,
.schedule-device-main,
#deviceTableWrap,
.schedule-device-table-wrap{
  border-top:0 !important;
}


/* v0.20.70 - Device toolbar height and search font unified with Content */
.device-action-toolbar{
  min-height:auto !important;
  padding:12px 14px !important;
  gap:16px !important;
}

.device-action-controls #searchInput{
  width:396px !important;
  min-width:220px !important;
  min-height:38px !important;
  height:38px !important;
  padding:8px 12px !important;
  border:1px solid #dfe3e8 !important;
  border-radius:8px !important;
  background:#fff !important;
  font-size:14px !important;
  font-weight:400 !important;
  line-height:1.4 !important;
  font-family:inherit !important;
}

.device-action-controls #searchInput::placeholder{
  font-size:14px !important;
  font-weight:400 !important;
  line-height:1.4 !important;
  color:#7b8591;
}

@media(max-width:1000px){
  .device-action-controls #searchInput{
    width:auto !important;
    flex:1 1 260px;
    min-width:0 !important;
  }
}


/* v0.20.71 - Content toolbar and card/list style aligned to Playlist */
.content-library-toolbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:12px 14px !important;
  border-bottom:1px solid #e7eaee !important;
  flex-wrap:wrap !important;
}
.content-toolbar-actions,
.content-selection-actions.content-toolbar-actions{
  margin-right:auto !important;
}
.content-toolbar-right,
.content-library-toolbar .content-toolbar-right{
  margin-left:auto !important;
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}
.content-toolbar-right .content-view-switch,
.content-view-switch{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  margin-left:0 !important;
}
.content-view-switch .secondary{
  min-height:38px !important;
  height:38px !important;
  padding:8px 12px !important;
  font-size:12px !important;
  font-weight:700 !important;
  border-radius:8px !important;
  white-space:nowrap !important;
}
.content-view-switch .secondary.active{
  background:#292f39 !important;
  color:#fff !important;
  border-color:#292f39 !important;
}
.content-toolbar-right #contentSearchInput{
  width:396px !important;
  min-width:220px !important;
  max-width:100% !important;
  min-height:38px !important;
  height:38px !important;
  padding:8px 12px !important;
  margin-left:0 !important;
  border:1px solid #dfe3e8 !important;
  border-radius:8px !important;
  background:#fff !important;
  font-size:14px !important;
  line-height:1.2 !important;
}

.content-grid.content-card-view{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
  padding:14px !important;
  align-content:start;
}
.content-grid.content-card-view .content-card.rich-card{
  position:relative;
  min-width:0;
  display:grid !important;
  grid-template-columns:132px minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  align-items:start !important;
  gap:10px 14px !important;
  padding:14px !important;
  border:1px solid #e5e8ec !important;
  border-radius:10px !important;
  background:#fff !important;
  outline:none !important;
}
.content-grid.content-card-view .content-card.rich-card.selected{
  border-color:#292f39 !important;
  box-shadow:0 0 0 1px #292f39 inset !important;
  outline:none !important;
}
.content-grid.content-card-view .content-select-box{
  position:absolute !important;
  top:12px !important;
  left:12px !important;
  z-index:2 !important;
  width:24px !important;
  height:24px !important;
  display:grid !important;
  place-items:center !important;
  border-radius:6px !important;
  background:rgba(255,255,255,.94) !important;
  box-shadow:none !important;
}
.content-grid.content-card-view .content-thumb-button{
  grid-row:1 / span 2 !important;
  width:132px !important;
  min-width:132px !important;
  align-self:start !important;
}
.content-grid.content-card-view .content-thumb{
  display:block;
  width:132px !important;
  height:96px !important;
  border-radius:8px !important;
  object-fit:cover;
  background:#f1f3f5 !important;
}
.content-grid.content-card-view .video-thumb{
  display:grid !important;
  place-items:center !important;
  align-content:center !important;
  gap:3px !important;
  color:#76808a !important;
}
.content-grid.content-card-view .video-thumb span{font-size:20px !important;}
.content-grid.content-card-view .video-thumb small{font-size:9px !important;font-weight:800 !important;}
.content-grid.content-card-view .content-meta{
  min-width:0;
  display:grid !important;
  align-content:start !important;
  gap:4px !important;
  padding-right:2px !important;
}
.content-grid.content-card-view .content-meta strong{
  font-size:13px !important;
  line-height:1.25 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.content-grid.content-card-view .content-meta span{
  font-size:11px !important;
  line-height:1.25 !important;
  color:#7b8590 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.content-grid.content-card-view .content-card-actions{
  grid-column:2 !important;
  grid-row:2 !important;
  display:flex !important;
  justify-content:flex-end !important;
  gap:6px !important;
  padding:0 !important;
}
.content-grid.content-card-view .content-card-actions .small-action,
.content-grid.content-list-view .content-card-actions .small-action{
  padding:5px 8px !important;
  min-height:28px !important;
  border-radius:7px !important;
  font-size:11px !important;
  line-height:1.15 !important;
}
.content-grid.content-list-view{
  display:block !important;
  padding:0 !important;
}
.content-grid.content-list-view .content-card.rich-card{
  position:relative;
  display:grid !important;
  grid-template-columns:42px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:12px !important;
  padding:10px 14px !important;
  border:0 !important;
  border-bottom:1px solid #eef0f3 !important;
  border-radius:0 !important;
  background:#fff !important;
  outline:none !important;
}
.content-grid.content-list-view .content-card.rich-card.selected{
  background:#f7f8fa !important;
  box-shadow:none !important;
}
.content-grid.content-list-view .content-select-box{
  position:static !important;
  width:24px !important;
  height:24px !important;
  justify-self:center !important;
  background:transparent !important;
}
.content-grid.content-list-view .content-meta{
  display:grid !important;
  grid-template-columns:minmax(180px,1.3fr) minmax(160px,1fr) minmax(100px,.7fr) !important;
  gap:12px !important;
  align-items:center !important;
}
.content-grid.content-list-view .content-meta strong,
.content-grid.content-list-view .content-meta span{
  font-size:12px !important;
  white-space:nowrap !important;
  min-width:0 !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.content-grid.content-list-view .content-thumb-button{display:none !important;}
.content-grid.content-list-view .content-card-actions{
  display:flex !important;
  justify-content:flex-end !important;
  gap:6px !important;
  padding:0 !important;
  white-space:nowrap !important;
}
@media(max-width:1280px){
  .content-grid.content-card-view{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
}
@media(max-width:900px){
  .content-toolbar-right{width:100% !important;margin-left:0 !important;}
  .content-toolbar-right #contentSearchInput{flex:1 1 260px !important;width:auto !important;}
  .content-grid.content-card-view{grid-template-columns:1fr !important;}
  .content-grid.content-list-view .content-meta{grid-template-columns:1fr !important;gap:3px !important;}
}


/* v0.20.72 - Brand text updated to TOVIAN PULSE PLAYER with red PULSE accent */
.brand-main{font-size:18px;font-weight:800;letter-spacing:.01em;display:flex;flex-wrap:wrap;gap:.28em;align-items:baseline;}
.brand-accent{color:#d64242;}


/* v0.20.73 - Brand font one step smaller and keep on one line */
.brand-main{
  font-size:16px !important;
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  gap:.24em !important;
}


/* v0.20.74 - Sidebar brand with logo + title/subtitle layout */
.brand{padding:0 8px 24px !important;}
.brand-row{display:flex;align-items:center;gap:12px;min-width:0;}
.brand-logo{width:56px;height:56px;border-radius:14px;object-fit:cover;flex:0 0 56px;display:block;}
.brand-text{min-width:0;display:grid;gap:3px;}
.brand-main{font-size:15px !important;line-height:1.15 !important;display:block !important;white-space:nowrap !important;flex-wrap:nowrap !important;letter-spacing:0 !important;}
.brand-sub{margin-top:0 !important;font-size:12px !important;line-height:1.2 !important;color:#a9b0ba;}
.brand-accent{color:#e14646 !important;}


/* v0.20.76 - Transparent brand icon and title rename */
.brand-logo{background:transparent !important; border:none !important; box-shadow:none !important; padding:0 !important; object-fit:contain !important;}


/* v0.20.77 - Apply approved brand preview: transparent icon + Tovian Pulse Player / Cloud Manager */
.brand{padding:0 8px 24px !important;}
.brand-row{display:flex !important;align-items:center !important;gap:12px !important;min-width:0 !important;}
.brand-logo{width:56px !important;height:56px !important;flex:0 0 56px !important;border:none !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;padding:0 !important;object-fit:contain !important;}
.brand-text{min-width:0 !important;display:grid !important;gap:4px !important;}
.brand-main{font-size:16px !important;font-weight:800 !important;line-height:1.1 !important;letter-spacing:0 !important;display:block !important;white-space:nowrap !important;color:#f2f4f7 !important;}
.brand-sub{margin-top:0 !important;font-size:12px !important;line-height:1.2 !important;color:#b6bdc7 !important;}
.brand-accent{color:#ef4a4a !important;}


/* v0.20.78 - Clean logo corners and tighten brand layout */
.brand{padding:0 6px 24px !important; overflow:hidden;}
.brand-row{display:flex !important;align-items:center !important;gap:8px !important;min-width:0 !important;}
.brand-logo{width:46px !important;height:46px !important;flex:0 0 46px !important;border:none !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;padding:0 !important;object-fit:contain !important;}
.brand-text{min-width:0 !important;display:grid !important;gap:2px !important;}
.brand-main{font-size:14px !important;font-weight:800 !important;line-height:1.1 !important;letter-spacing:-0.01em !important;display:block !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;color:#f2f4f7 !important;}
.brand-sub{margin-top:0 !important;font-size:11px !important;line-height:1.15 !important;color:#b6bdc7 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.brand-accent{color:#ef4a4a !important;}


/* v0.20.79 - Clean logo with white inner icon and natural outer edge */
.brand-row{gap:7px !important;}
.brand-logo{width:48px !important;height:48px !important;flex:0 0 48px !important;object-fit:contain !important;}
.brand-main{font-size:14px !important;line-height:1.08 !important;}
.brand-sub{font-size:11px !important;line-height:1.12 !important;}


/* v0.20.80 - Use full combined brand image */
.brand{padding:2px 6px 22px !important; overflow:hidden !important;}
.brand-full-logo{display:block; width:100%; max-width:220px; height:auto; object-fit:contain; background:transparent !important;}
/* Hide old split-brand elements if any remain */
.brand-row,.brand-logo,.brand-text,.brand-main,.brand-sub{ }


/* v0.20.81 - Match Device checkbox/subgroup spacing & style to Schedule table */
.device-main-table .device-col-check{width:6% !important;}
.device-main-table col:nth-child(2){width:18% !important;}
.device-main-table col:nth-child(3){width:18% !important;}
.device-main-table col:nth-child(4){width:19% !important;}
.device-main-table .device-col-status{width:12% !important;}
.device-main-table .device-col-version{width:10% !important;}
.device-main-table .device-col-sync{width:10% !important;}
.device-main-table .device-col-manage{width:7% !important;}
.device-main-table th:nth-child(1),
.device-main-table td:nth-child(1){width:6% !important; text-align:center !important;}
.device-main-table .check-col,
.device-main-table td.check-col{
  width:6% !important;
  min-width:0 !important;
  max-width:none !important;
  padding-left:10px !important;
  padding-right:10px !important;
  text-align:center !important;
  vertical-align:middle !important;
}
.device-main-table .check-col input,
.device-main-table .device-select-checkbox{
  display:block !important;
  margin:0 auto !important;
  width:16px !important;
  height:16px !important;
  appearance:auto;
}
.device-main-table th:nth-child(2),
.device-main-table td:nth-child(2){
  padding-left:10px !important;
  padding-right:10px !important;
}


/* v0.20.82 - Event datetime separator centering + unified date font size */
#eventBackdrop .event-date-time-combo input[type="date"]{
  min-height:44px !important;
  height:44px !important;
  font-size:18px !important;
  font-weight:700 !important;
  line-height:1 !important;
  color:#20252c !important;
}
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-date-and-time-value,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-text,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-year-field,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-month-field,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-day-field{
  font-size:18px !important;
  font-weight:700 !important;
  color:#20252c !important;
}
#eventBackdrop .event-period-time-wrap{
  align-items:end !important;
}
#eventBackdrop .event-time-separator,
#eventBackdrop .event-weekly-time-pair .schedule-time-separator{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:end !important;
  min-height:44px !important;
  padding:0 2px !important;
  margin:0 !important;
  line-height:1 !important;
  transform:translateY(0) !important;
}
#eventBackdrop .event-weekly-time-pair{
  align-items:end !important;
}
@media(max-width:1100px){
  #eventBackdrop .event-time-separator,
  #eventBackdrop .event-weekly-time-pair .schedule-time-separator{
    min-height:42px !important;
  }
}


/* v0.20.83 - Fine-tune event date text, message alignment, and available-list height */
#eventBackdrop .event-date-time-combo input[type="date"]{
  font-size:17px !important;
}
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-date-and-time-value,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-text,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-year-field,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-month-field,
#eventBackdrop .event-date-time-combo input[type="date"]::-webkit-datetime-edit-day-field{
  font-size:17px !important;
}
#eventBackdrop #eventMessage{
  text-align:right !important;
  align-self:stretch !important;
}
#eventBackdrop .event-content-library-list{
  min-height:148px !important;
  height:148px !important;
  max-height:148px !important;
}
#eventBackdrop .event-selected-content-list{
  min-height:104px !important;
}


/* v0.20.84 - Restore library height and set added-list to about two rows */
#eventBackdrop .event-content-library-list{
  flex:0 0 112px !important;
  min-height:112px !important;
  height:112px !important;
  max-height:112px !important;
  overflow-y:auto !important;
}
#eventBackdrop .event-selected-content-list{
  flex:0 0 142px !important;
  min-height:142px !important;
  height:142px !important;
  max-height:142px !important;
  overflow-y:auto !important;
}


/* v0.20.85 - Scheduled Transfer editor aligned with Event editor base layout */
#scheduledTransferBackdrop .scheduled-transfer-modal{
  width:min(1160px,calc(100vw - 20px));
  height:820px;
  max-height:calc(100vh - 18px);
}
#scheduledTransferBackdrop #scheduledTransferForm{
  gap:10px;
}
#scheduledTransferBackdrop .scheduled-transfer-top-form{
  display:grid;
  gap:10px;
}
#scheduledTransferBackdrop .scheduled-transfer-top-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);
  gap:12px;
}
#scheduledTransferBackdrop .scheduled-transfer-option-bar{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:10px 12px;
  border:1px solid #e3e7eb;
  border-radius:10px;
  background:#fafbfc;
}
#scheduledTransferBackdrop .scheduled-transfer-top-grid label,
#scheduledTransferBackdrop .scheduled-transfer-option-bar label{
  display:grid;
  gap:6px;
  color:#505965;
  font-size:12px;
  font-weight:700;
}
#scheduledTransferBackdrop .scheduled-transfer-top-grid input,
#scheduledTransferBackdrop .scheduled-transfer-option-bar select{
  min-height:42px;
  border:1px solid #dce1e6;
  border-radius:10px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
}
#scheduledTransferBackdrop .scheduled-transfer-layout-4col{
  grid-template-columns:220px 320px 220px 320px !important;
  justify-content:center;
  min-height:0;
}
#scheduledTransferBackdrop .scheduled-transfer-target-sidebar,
#scheduledTransferBackdrop .scheduled-transfer-device-column,
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-sidebar,
#scheduledTransferBackdrop .scheduled-transfer-playlist-column{
  min-width:0;
  min-height:0;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  background:#fff;
  overflow:hidden;
}
#scheduledTransferBackdrop .scheduled-transfer-target-sidebar,
#scheduledTransferBackdrop .scheduled-transfer-device-column,
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-sidebar{
  border-right:1px solid #e1e5e9;
}
#scheduledTransferBackdrop .scheduled-transfer-location-field{
  display:grid;
  gap:6px;
  color:#59636e;
  font-size:12px;
  font-weight:700;
}
#scheduledTransferBackdrop .scheduled-transfer-location-field select{
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}
#scheduledTransferBackdrop .scheduled-transfer-column-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}
#scheduledTransferBackdrop .scheduled-transfer-device-column .scheduled-transfer-device-list{
  flex:1 1 auto;
  min-height:0;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:4px;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-btn{
  width:100%;
  min-height:40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-btn:hover{background:#eef1f4;}
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-btn.active{background:#292f39;color:#fff;}
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-count{
  min-width:24px;
  height:24px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-group-btn.active .scheduled-transfer-playlist-group-count{background:#fff;color:#292f39;}
#scheduledTransferBackdrop .scheduled-transfer-playlist-column{
  width:320px;
  max-width:320px;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-head>div{display:grid;gap:2px;min-width:0;}
#scheduledTransferBackdrop .scheduled-transfer-playlist-head strong{font-size:14px;}
#scheduledTransferBackdrop #scheduledTransferPlaylistGroupHint{font-size:12px;color:#7a838e;}
#scheduledTransferBackdrop #scheduledTransferSelectedPlaylistCount{font-size:12px;color:#55606b;font-weight:800;white-space:nowrap;}
#scheduledTransferBackdrop .scheduled-transfer-playlist-list{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  background:#fafbfc;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-list .builder-item{
  padding:10px 12px;
  gap:10px;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-list .builder-item strong{
  font-size:13px;
  line-height:1.35;
}
#scheduledTransferBackdrop .scheduled-transfer-playlist-list .builder-item span{font-size:11px;line-height:1.3;}
#scheduledTransferBackdrop #scheduledTransferMessage{
  text-align:right;
  flex:0 0 auto;
}
#scheduledTransferBackdrop .scheduled-transfer-actions{
  padding-top:0;
}
@media(max-width:1180px){
  #scheduledTransferBackdrop .scheduled-transfer-modal{width:calc(100vw - 16px);}
  #scheduledTransferBackdrop .scheduled-transfer-layout-4col{
    grid-template-columns:200px minmax(280px,1fr) 200px minmax(280px,1fr) !important;
    overflow-x:auto;
  }
  #scheduledTransferBackdrop .scheduled-transfer-playlist-column{width:auto;max-width:none;}
}
@media(max-width:900px){
  #scheduledTransferBackdrop .scheduled-transfer-top-grid,
  #scheduledTransferBackdrop .scheduled-transfer-option-bar{grid-template-columns:1fr;}
  #scheduledTransferBackdrop .scheduled-transfer-layout-4col{grid-template-columns:1fr 1fr !important;}
}
@media(max-width:700px){
  #scheduledTransferBackdrop .scheduled-transfer-layout-4col{grid-template-columns:1fr !important;overflow:auto;}
}


/* v0.20.86 - Scheduled transfer 24h datetime + event-style target context */
#scheduledTransferBackdrop .scheduled-transfer-date-time-combo{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(180px,.85fr);
  gap:10px;
  align-items:center;
}
#scheduledTransferBackdrop .scheduled-transfer-date-time-combo input[type="date"]{
  min-height:42px;
  height:42px;
  border:1px solid #dce1e6;
  border-radius:10px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
  font-size:16px;
  font-weight:700;
  color:#20252c;
}
#scheduledTransferBackdrop .scheduled-transfer-time-combo{
  min-height:42px;
  height:42px;
  padding:0 8px;
  border:1px solid #dce1e6;
  border-radius:10px;
  background:#fff;
}
#scheduledTransferBackdrop .scheduled-transfer-time-combo .compact-time-trigger{
  height:40px;
  font-size:16px;
}
#scheduledTransferBackdrop #scheduledTransferLocationList{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}
#scheduledTransferBackdrop #scheduledTransferLocationList.hidden,
#scheduledTransferBackdrop #scheduledTransferGroupSearchInput.hidden,
#scheduledTransferBackdrop #scheduledTransferGroupList.hidden,
#scheduledTransferBackdrop #scheduledTransferLocationField.hidden{
  display:none !important;
}
@media(max-width:760px){
  #scheduledTransferBackdrop .scheduled-transfer-date-time-combo{grid-template-columns:1fr;}
}


/* v0.20.87 - Scheduled transfer header typography matches Events */
.scheduled-transfer-current-group{
  font-size:inherit !important;
}
.scheduled-transfer-current-group strong{
  font-size:inherit !important;
  font-weight:700 !important;
  line-height:inherit !important;
}
#scheduledTransferCurrentGroupCount{
  font-size:12px !important;
  line-height:inherit !important;
}
.scheduled-transfer-toolbar-compact .scheduled-transfer-history-note{
  font-size:11px !important;
  line-height:1.35 !important;
}


/* v0.20.88 - Device edit: Group move selector */
.device-group-move-panel{
  display:grid;
  gap:9px;
  padding:12px;
  border:1px solid #e1e5e9;
  border-radius:10px;
  background:#fafbfc;
}
.device-group-move-title{
  font-size:13px;
  font-weight:800;
  color:#343b44;
}
.device-group-move-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  min-height:150px;
  max-height:190px;
  border:1px solid #e1e5e9;
  border-radius:9px;
  overflow:hidden;
  background:#fff;
}
.device-group-move-pane{
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.device-group-move-pane + .device-group-move-pane{
  border-left:1px solid #e1e5e9;
}
.device-group-move-label{
  flex:0 0 auto;
  padding:9px 11px;
  border-bottom:1px solid #e7eaee;
  color:#727c87;
  font-size:11px;
  font-weight:800;
  background:#fafbfc;
}
.device-group-move-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:6px;
  display:grid;
  align-content:start;
  gap:3px;
}
.device-group-move-btn{
  width:100%;
  min-height:36px;
  padding:7px 9px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  font:inherit;
  font-size:12px;
  font-weight:700;
  text-align:left;
  cursor:pointer;
}
.device-group-move-btn:hover{
  background:#eef1f4;
}
.device-group-move-btn.active{
  background:#292f39;
  color:#fff;
}
@media(max-width:700px){
  .device-group-move-grid{
    grid-template-columns:1fr;
    max-height:none;
  }
  .device-group-move-pane + .device-group-move-pane{
    border-left:0;
    border-top:1px solid #e1e5e9;
  }
  .device-group-move-list{
    max-height:150px;
  }
}


/* v0.20.89 - Sortable table headers */
th.sortable-header{
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
}
th.sortable-header::after{
  content:"↕";
  display:inline-block;
  margin-left:5px;
  color:#a0a8b2;
  font-size:10px;
  line-height:1;
  vertical-align:middle;
}
th.sortable-header.sort-active[data-sort-dir="asc"]::after{
  content:"↑";
  color:#505a65;
}
th.sortable-header.sort-active[data-sort-dir="desc"]::after{
  content:"↓";
  color:#505a65;
}
th.sortable-header:hover{
  color:#343b44;
}
th.sortable-header:focus-visible{
  outline:2px solid #7f8b98;
  outline-offset:-2px;
}


/* v0.20.90 - List-mode column headers + sorting for Content / Playlist */
.list-column-header{
  display:none;
  align-items:center;
  gap:12px;
  min-height:38px;
  padding:8px 14px;
  border-bottom:1px solid #e1e5e9;
  background:#fafbfc;
  color:#727b85;
  font-size:12px;
  font-weight:700;
}
.content-grid.content-list-view .content-list-header,
.playlist-list.playlist-list-mode .playlist-list-header{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
}
.content-list-header-meta,
.playlist-list-header-meta{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(180px,1.3fr) minmax(160px,1fr) minmax(100px,.7fr);
  gap:12px;
  align-items:center;
}
.sortable-list-header{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:#727b85;
  font:inherit;
  font-weight:700;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
}
.sortable-list-header::after{
  content:"↕";
  color:#a0a8b2;
  font-size:10px;
  line-height:1;
}
.sortable-list-header.sort-active[data-sort-dir="asc"]::after{content:"↑";color:#505a65;}
.sortable-list-header.sort-active[data-sort-dir="desc"]::after{content:"↓";color:#505a65;}
.sortable-list-header:hover{color:#343b44;}
.sortable-list-header:focus-visible{outline:2px solid #7f8b98;outline-offset:2px;border-radius:3px;}
.list-header-spacer{width:24px;}
.list-header-action{
  min-width:54px;
  text-align:center;
  white-space:nowrap;
}
@media(max-width:900px){
  .content-list-header-meta,
  .playlist-list-header-meta{grid-template-columns:1fr;gap:3px;}
  .content-grid.content-list-view .content-list-header,
  .playlist-list.playlist-list-mode .playlist-list-header{align-items:start;}
}


/* v0.20.91 - Select-all checkbox for Content/Playlist list headers */
.list-header-select-all{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  justify-self:center;
  align-self:center;
  cursor:pointer;
}
.list-header-select-all input{
  width:16px;
  height:16px;
  margin:0;
  cursor:pointer;
}

/* v0.20.94 - Device status merged into Edit */
.device-manage-header{
  align-items:center;
}
.device-manage-header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}
.device-manage-header-actions>span{
  color:#7a838e;
  font-size:12px;
  white-space:nowrap;
}
.device-manage-header-actions .icon-button{
  margin-left:2px;
}
.device-manage-status-panel{
  border:1px solid #e1e5e9;
  border-radius:10px;
  padding:12px;
  background:#fff;
}
.device-manage-status-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.device-manage-status-title-row strong{
  font-size:13px;
  color:#343b44;
}
.device-manage-status-title-row span{
  color:#7b8490;
  font-size:11px;
}
.device-manage-status-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid #dfe4e9;
  border-radius:8px;
  overflow:hidden;
}
.device-manage-status-grid>div{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(90px,auto) 1fr;
  gap:10px;
  align-items:center;
  min-height:36px;
  padding:7px 10px;
  border-bottom:1px solid #e7eaee;
}
.device-manage-status-grid>div:nth-child(odd){
  border-right:1px solid #e7eaee;
}
.device-manage-status-grid>div:nth-last-child(-n+2){
  border-bottom:0;
}
.device-manage-status-grid span{
  color:#7b8490;
  font-size:12px;
}
.device-manage-status-grid strong{
  color:#2f3740;
  font-size:12px;
  text-align:right;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:760px){
  .device-manage-header-actions>span{display:none;}
  .device-manage-status-grid{grid-template-columns:1fr;}
  .device-manage-status-grid>div:nth-child(odd){border-right:0;}
  .device-manage-status-grid>div:nth-last-child(-n+2){border-bottom:1px solid #e7eaee;}
  .device-manage-status-grid>div:last-child{border-bottom:0;}
}


/* v0.20.95 - Device edit simplified: group move owns group/subgroup, status separated in footer */
#deviceManageBackdrop .device-manage-modal{
  width:min(980px,calc(100vw - 32px));
}
.device-manage-layout.device-manage-layout-single{
  display:block;
  border:0;
  border-radius:0;
  overflow:visible;
}
.device-manage-hidden-controls{
  display:none!important;
}
#deviceManageBackdrop .device-popup-main{
  height:100%;
  padding:0;
  gap:14px;
  overflow:auto;
}
#deviceManageBackdrop .device-popup-fields{
  padding:0 2px;
}
#deviceManageBackdrop .device-group-move-panel{
  margin-top:0;
}
#deviceManageBackdrop .device-manage-actions-panel{
  margin-top:0;
}
.device-manage-footer{
  flex:0 0 auto;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding-top:12px;
}
.device-manage-status-footer{
  flex:0 1 640px;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.device-manage-status-footer .device-manage-status-title-row{
  margin:0 0 7px;
}
.device-manage-footer .device-popup-actions{
  flex:0 0 auto;
  margin:0;
  padding:0;
  align-self:flex-end;
}
@media(max-width:760px){
  .device-manage-footer{
    align-items:stretch;
    flex-direction:column;
  }
  .device-manage-status-footer{
    flex:0 0 auto;
  }
  .device-manage-footer .device-popup-actions{
    align-self:flex-end;
  }
}


/* v0.20.96 - sidebar menu icons and Group Settings position */
.nav-item{display:flex;align-items:center;gap:10px;cursor:pointer}
.nav-icon{width:19px;height:19px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 19px}
.nav-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-item>span:last-child{min-width:0;white-space:nowrap}


/* v0.20.98 - Group Settings table-style group list */
.group-settings-layout{
  grid-template-columns:480px minmax(0,1fr);
}
.group-settings-sidebar{
  padding:12px 14px;
}
.group-settings-list-header{
  display:grid;
  grid-template-columns:34px minmax(150px,1fr) 76px 82px;
  align-items:center;
  min-height:34px;
  padding:0 8px;
  border-top:1px solid #e7eaee;
  border-bottom:1px solid #e1e5e9;
  color:#737d88;
  font-size:11px;
  font-weight:800;
  text-align:center;
}
.group-settings-list-header span:nth-child(2){
  text-align:left;
}
.group-settings-btn{
  grid-template-columns:34px minmax(150px,1fr) 76px 82px;
  gap:0;
  min-height:52px;
  padding:6px 8px;
  border-radius:7px;
}
.group-settings-select-box{
  display:grid;
  place-items:center;
}
.group-settings-select-box input{
  width:16px;
  height:16px;
  margin:0;
  pointer-events:none;
}
.group-settings-btn-main{
  padding-right:8px;
}
.group-settings-count{
  justify-self:center;
}
.group-settings-device-count{
  justify-self:center;
}
#organizationDefaultLocationField{
  display:grid;
  gap:7px;
}
.field-hint{
  color:#7b8490;
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}
@media(max-width:1050px){
  .group-settings-layout{
    grid-template-columns:410px minmax(0,1fr);
  }
  .group-settings-list-header,
  .group-settings-btn{
    grid-template-columns:32px minmax(120px,1fr) 66px 72px;
  }
}
@media(max-width:800px){
  .group-settings-layout{
    grid-template-columns:1fr;
  }
}


/* v0.20.99 - Group Settings sortable multi-select delete */
.group-settings-sidebar-actions{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
#deleteSelectedSettingsGroupsBtn:disabled{
  opacity:.38;
  cursor:default;
}
.group-settings-list-header{
  grid-template-columns:34px minmax(150px,1fr) 76px 82px;
}
.group-settings-sort-header{
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:800;
  text-align:left;
  cursor:pointer;
  white-space:nowrap;
}
.group-settings-sort-header:hover{
  color:#343b44;
}
.group-settings-sort-mark{
  display:inline-block;
  margin-left:4px;
  color:#9aa3ad;
  font-size:10px;
}
.group-settings-btn{
  grid-template-columns:34px minmax(150px,1fr) 76px 82px;
}
.group-settings-select-box{
  width:100%;
  min-height:32px;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.group-settings-select-box input{
  width:16px;
  height:16px;
  margin:0;
  cursor:pointer;
  pointer-events:auto;
}
.group-settings-btn.active .group-settings-select-box input{
  accent-color:#fff;
}

/* v0.21.00 - Group/Subgroup settings unified actions and simplified active status */
.group-settings-sidebar-actions,
.group-settings-content-toolbar{
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.group-settings-action-buttons{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.group-settings-header-compact{
  min-height:auto;
  padding:16px 18px 12px;
}
.group-settings-header-compact .group-settings-current{
  margin-bottom:2px;
}
.group-settings-content{
  padding:0 18px 18px;
}
.group-settings-content-heading{
  border-bottom:0;
  padding:6px 0 10px;
}
.group-settings-content-heading h2{
  margin:0;
}
.group-settings-content-heading p{
  margin:6px 0 0;
  color:#7a838e;
  font-size:11px;
}
#settingsLocationSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
  margin-bottom:10px;
}
.location-settings-list-header{
  display:grid;
  grid-template-columns:34px minmax(180px,1fr) 120px 92px;
  align-items:center;
  min-height:34px;
  padding:0 8px;
  border-top:1px solid #e7eaee;
  border-bottom:1px solid #e1e5e9;
  color:#737d88;
  font-size:11px;
  font-weight:800;
  text-align:center;
}
.location-settings-list-header span:nth-child(2),
.location-settings-list-header button:nth-child(2){
  text-align:left;
}
.location-settings-list{
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:3px;
}
.location-settings-row{
  width:100%;
  min-height:52px;
  display:grid;
  grid-template-columns:34px minmax(180px,1fr) 120px 92px;
  align-items:center;
  gap:0;
  padding:6px 8px;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  cursor:pointer;
}
.location-settings-row:hover{
  background:#eef1f4;
}
.location-settings-row.active{
  background:#292f39;
  color:#fff;
}
.location-settings-main{
  min-width:0;
  padding-right:8px;
}
.location-settings-main strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
}
.location-settings-code{
  color:#7a838e;
  font-size:11px;
  text-align:center;
}
.location-settings-row.active .location-settings-code{
  color:rgba(255,255,255,.8);
}
.location-settings-row .group-settings-count{
  justify-self:center;
}
.location-settings-row.active .group-settings-count{
  background:#fff;
  color:#292f39;
}
#deleteSelectedLocationsBtn:disabled,
#editSelectedLocationBtn:disabled,
#editSelectedGroupBtn:disabled{
  opacity:.38;
  cursor:default;
}
#deleteSelectedLocationsBtn:disabled:hover,
#editSelectedLocationBtn:disabled:hover,
#editSelectedGroupBtn:disabled:hover{
  transform:none;
}
@media(max-width:1050px){
  .location-settings-list-header,
  .location-settings-row{
    grid-template-columns:32px minmax(120px,1fr) 102px 78px;
  }
}
@media(max-width:800px){
  .group-settings-sidebar-actions,
  .group-settings-content-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .group-settings-action-buttons{
    width:100%;
    justify-content:flex-start;
  }
  .location-settings-list-header,
  .location-settings-row{
    grid-template-columns:32px minmax(120px,1fr) 92px 70px;
  }
}

/* v0.21.01 - Group/Subgroup unified fixed-width layout */
.group-settings-layout{
  grid-template-columns:480px 480px;
  justify-content:flex-start;
  align-items:start;
}
.group-settings-sidebar,
.group-settings-main{
  width:480px;
  max-width:100%;
}
.group-settings-header-compact{
  display:none;
}
.group-settings-content{
  padding:12px 14px;
}
.group-settings-content-heading{
  padding:0;
  margin-bottom:6px;
}
.group-settings-content-heading p{
  display:none;
}
#locationsPanel.group-settings-content{
  display:flex;
  flex-direction:column;
  gap:0;
}
@media(max-width:1050px){
  .group-settings-layout{
    grid-template-columns:410px 410px;
  }
  .group-settings-sidebar,
  .group-settings-main{
    width:410px;
  }
}
@media(max-width:800px){
  .group-settings-layout{
    grid-template-columns:1fr;
  }
  .group-settings-sidebar,
  .group-settings-main{
    width:auto;
  }
  .group-settings-main{
    border-top:1px solid #e1e5e9;
  }
}

/* v0.21.02 - Group/Subgroup toolbar placement and border alignment */
#settingsView > .panel,
#settingsView .panel{
  width:fit-content;
  max-width:100%;
}
.group-settings-layout{
  width:fit-content;
  max-width:100%;
}
.group-settings-sidebar{
  display:flex;
  flex-direction:column;
}
.group-settings-sidebar-title{
  order:0;
  margin:0 0 6px;
  color:#1f2733;
  font-size:16px;
  font-weight:800;
  line-height:1.2;
}
.group-settings-sidebar-actions{
  order:1;
  margin:0 0 12px;
}
#settingsGroupSearchInput{
  order:2;
}
.group-settings-list-header{
  order:3;
}
#settingsGroupList{
  order:4;
}
#locationsPanel.group-settings-content{
  width:480px;
  max-width:100%;
}
.group-settings-content-heading{
  order:0;
  padding:0;
  margin:0 0 6px;
}
.group-settings-content-heading h2{
  font-size:16px;
  font-weight:800;
  line-height:1.2;
  color:#1f2733;
}
.group-settings-content-toolbar{
  order:1;
  margin:0 0 12px;
}
#settingsLocationSearchInput{
  order:2;
}
.location-settings-list-header{
  order:3;
}
#locationRows{
  order:4;
}
.group-settings-sidebar,
.group-settings-main{
  align-self:start;
}
@media(max-width:1050px){
  #locationsPanel.group-settings-content{
    width:410px;
  }
}
@media(max-width:800px){
  #settingsView > .panel,
  #settingsView .panel,
  .group-settings-layout{
    width:100%;
  }
  #locationsPanel.group-settings-content{
    width:auto;
  }
}

/* v0.21.03 - Group/Subgroup pagination bottom + denser list rows */
.group-settings-sidebar > .common-pagination,
#locationsPanel.group-settings-content > .common-pagination{
  order:5;
  margin-top:8px;
}

.group-settings-list,
.location-settings-list{
  gap:2px;
}

.group-settings-btn,
.location-settings-row{
  min-height:46px;
  padding:4px 8px;
  border-radius:6px;
}

.group-settings-btn-main strong,
.location-settings-main strong{
  font-size:12px;
  line-height:1.2;
}

.group-settings-btn-main span,
.location-settings-code{
  font-size:10px;
  line-height:1.2;
}

.group-settings-count,
.group-settings-device-count,
.location-settings-row .group-settings-count{
  width:28px;
  height:28px;
  min-width:28px;
  font-size:12px;
}

@media(max-width:1050px){
  .group-settings-btn,
  .location-settings-row{
    min-height:44px;
    padding:4px 7px;
  }
}


/* v0.21.04 - Group/Subgroup row height unified */
.group-settings-list,
.location-settings-list{
  gap:2px !important;
}

.group-settings-btn,
.location-settings-row{
  box-sizing:border-box;
  height:40px !important;
  min-height:40px !important;
  max-height:40px !important;
  padding:3px 8px !important;
  margin:0 !important;
  border-radius:6px;
  align-items:center;
}

.group-settings-select-box{
  min-height:0 !important;
  height:100%;
}

.group-settings-btn-main,
.location-settings-main{
  display:flex;
  align-items:center;
  min-height:0;
  height:100%;
}

.group-settings-btn-main strong,
.location-settings-main strong{
  font-size:12px !important;
  line-height:1.2 !important;
  margin:0;
}

.location-settings-code{
  font-size:10px !important;
  line-height:1.2 !important;
}

.group-settings-count,
.group-settings-device-count,
.location-settings-row .group-settings-count{
  width:24px !important;
  height:24px !important;
  min-width:24px !important;
  min-height:24px !important;
  padding:0 !important;
  font-size:11px !important;
}

.group-settings-list-header,
.location-settings-list-header{
  min-height:34px;
  height:34px;
  box-sizing:border-box;
}

@media(max-width:1050px){
  .group-settings-btn,
  .location-settings-row{
    height:40px !important;
    min-height:40px !important;
    max-height:40px !important;
    padding:3px 7px !important;
  }
}


/* v0.21.05 - Match Group/Subgroup list spacing to Playlist group list */
.group-settings-list,
.location-settings-list{
  gap:3px !important;
}

/* Match Playlist group row vertical metrics exactly */
.group-settings-btn,
.location-settings-row{
  box-sizing:content-box !important;
  height:auto !important;
  min-height:40px !important;
  max-height:none !important;
  padding:8px 10px !important;
  margin:0 !important;
  border-radius:7px !important;
  align-items:center !important;
}

.group-settings-select-box{
  min-height:0 !important;
  height:auto !important;
}

.group-settings-btn-main,
.location-settings-main{
  min-height:0 !important;
  height:auto !important;
  display:block !important;
}

.group-settings-btn-main strong,
.location-settings-main strong{
  font-size:inherit !important;
  line-height:normal !important;
  margin:0 !important;
  font-weight:700 !important;
}

.location-settings-code{
  font-size:11px !important;
  line-height:normal !important;
}

/* Match Playlist group count badge */
.group-settings-count,
.group-settings-device-count,
.location-settings-row .group-settings-count{
  width:auto !important;
  min-width:22px !important;
  height:22px !important;
  min-height:22px !important;
  padding:0 6px !important;
  font-size:11px !important;
}

/* Keep selected and normal rows identical in height */
.group-settings-btn.active,
.location-settings-row.active{
  min-height:40px !important;
  padding:8px 10px !important;
}

/* Header spacing also uses the same Group/Subgroup baseline */
.group-settings-list-header,
.location-settings-list-header{
  min-height:34px !important;
  height:34px !important;
  box-sizing:border-box !important;
}

@media(max-width:1050px){
  .group-settings-btn,
  .location-settings-row,
  .group-settings-btn.active,
  .location-settings-row.active{
    min-height:40px !important;
    padding:8px 10px !important;
  }
}


/* v0.21.06 - Correct Group/Subgroup row metrics to match Playlist group list */
.group-settings-list,
.location-settings-list{
  gap:3px !important;
}

.group-settings-btn,
.location-settings-row{
  width:100% !important;
  min-height:40px !important;
  height:auto !important;
  max-height:none !important;
  display:grid !important;
  align-items:center !important;
  gap:0 !important;
  padding:8px 10px !important;
  margin:0 !important;
  border:0 !important;
  border-radius:7px !important;
  box-sizing:border-box !important;
  font-weight:700 !important;
}

.group-settings-select-box{
  min-height:0 !important;
  height:auto !important;
}

.group-settings-btn-main,
.location-settings-main{
  min-height:0 !important;
  height:auto !important;
}

.group-settings-btn-main strong,
.location-settings-main strong{
  font-size:13px !important;
  line-height:normal !important;
  font-weight:700 !important;
  margin:0 !important;
}

.location-settings-code{
  font-size:11px !important;
  line-height:normal !important;
}

.group-settings-count,
.group-settings-device-count,
.location-settings-row .group-settings-count{
  min-width:22px !important;
  width:auto !important;
  height:22px !important;
  min-height:22px !important;
  padding:0 6px !important;
  font-size:11px !important;
  box-sizing:border-box !important;
}

.group-settings-btn.active,
.location-settings-row.active{
  min-height:40px !important;
  height:auto !important;
  padding:8px 10px !important;
}

.group-settings-sidebar,
.group-settings-main,
#locationsPanel.group-settings-content{
  overflow-x:hidden !important;
}

.sidebar-footer{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.sidebar-footer-brand{
  font-size:11px;
  color:#9aa3ad;
}

/* v0.21.07 - Group/Subgroup vertical spacing matched exactly */
.group-settings-sidebar,
#locationsPanel.group-settings-content{
  gap:0 !important;
}

.group-settings-sidebar-title,
.group-settings-content-heading{
  margin:0 0 6px !important;
  padding:0 !important;
}

.group-settings-sidebar-actions,
.group-settings-content-toolbar{
  margin:0 0 12px !important;
  min-height:40px !important;
}

#settingsGroupSearchInput,
#settingsLocationSearchInput{
  min-height:38px !important;
  margin:0 0 10px !important;
  box-sizing:border-box !important;
}

.group-settings-list-header,
.location-settings-list-header{
  margin:0 !important;
  min-height:34px !important;
  height:34px !important;
  box-sizing:border-box !important;
}

/* Keep the list page size at 10 rows; pagination remains directly below each list. */
.group-settings-sidebar > .common-pagination,
#locationsPanel.group-settings-content > .common-pagination{
  order:5;
  margin-top:8px !important;
}


/* v0.21.08 - Fix pagination visibility override for Group/Subgroup rows
   v0.21.06+ added display:grid !important to these rows after
   .common-page-hidden{display:none!important}, so the later rule won. */
.group-settings-btn.common-page-hidden,
.location-settings-row.common-page-hidden{
  display:none !important;
}


/* v0.21.09 - Event Group/Subgroup integrated tree */
.event-library-layout{
  grid-template-columns:300px minmax(0,1fr);
}

.event-page-group-sidebar{
  width:300px;
  box-sizing:border-box;
}

.event-page-group-list{
  overflow-x:hidden;
}

.event-page-tree-node{
  min-width:0;
  display:block;
}

.event-page-tree-group-btn{
  grid-template-columns:18px minmax(0,1fr) auto !important;
}

.event-page-tree-arrow{
  width:18px;
  display:grid;
  place-items:center;
  color:#6f7883;
  font-size:18px;
  line-height:1;
}

.event-page-tree-arrow-empty{
  visibility:hidden;
}

.event-page-group-name,
.event-page-subgroup-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.event-page-subgroup-list{
  display:grid;
  gap:2px;
  padding:2px 0 4px 24px;
}

.event-page-subgroup-btn{
  width:100%;
  min-height:36px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
}

.event-page-subgroup-btn:hover{
  background:#eef1f4;
}

.event-page-subgroup-btn.active{
  background:#292f39;
  color:#fff;
}

.event-page-subgroup-btn.active .event-page-group-count{
  background:#fff;
  color:#292f39;
}

.event-page-subgroup-empty{
  padding:8px 10px;
  color:#9aa3ad;
  font-size:11px;
  white-space:nowrap;
}

@media(max-width:900px){
  .event-library-layout{
    grid-template-columns:260px minmax(0,1fr);
  }
  .event-page-group-sidebar{
    width:260px;
  }
}

@media(max-width:800px){
  .event-page-group-sidebar{
    width:auto;
  }
}


/* v0.21.10 - Event tree width refinement */
.event-library-layout{
  grid-template-columns:252px minmax(0,1fr);
}
.event-page-group-sidebar{
  width:252px;
}
@media(max-width:900px){
  .event-library-layout{
    grid-template-columns:232px minmax(0,1fr);
  }
  .event-page-group-sidebar{
    width:232px;
  }
}


/* v0.21.11 - Event editor: 4 stages (Device / Group / Library / Added items) */
#eventBackdrop .event-target-controls-hidden{
  display:none !important;
}

#eventBackdrop .event-layout-assets-4col{
  grid-template-columns:320px 220px 320px 320px !important;
  justify-content:center;
}

#eventBackdrop .event-device-column,
#eventBackdrop .event-content-group-sidebar,
#eventBackdrop .event-content-library-column,
#eventBackdrop .event-added-items-column{
  min-width:0;
  min-height:0;
  padding:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#fff;
  overflow:hidden;
  box-sizing:border-box;
}

#eventBackdrop .event-device-column,
#eventBackdrop .event-content-group-sidebar,
#eventBackdrop .event-content-library-column{
  border-right:1px solid #e1e5e9;
}

#eventBackdrop .event-device-column,
#eventBackdrop .event-content-library-column,
#eventBackdrop .event-added-items-column{
  width:320px;
  max-width:320px;
}

#eventBackdrop .event-content-library-list,
#eventBackdrop .event-selected-content-list{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
}

#eventBackdrop .event-added-items-column .event-selected-content-list{
  background:#fff;
}

#eventBackdrop .event-added-items-column .event-content-library-head{
  min-height:42px;
}

#eventBackdrop .event-content-library-column .event-content-library-head{
  min-height:42px;
}

@media(max-width:1180px){
  #eventBackdrop .event-layout-assets-4col{
    grid-template-columns:minmax(280px,1fr) 200px minmax(280px,1fr) minmax(280px,1fr) !important;
    overflow-x:auto;
  }
  #eventBackdrop .event-device-column,
  #eventBackdrop .event-content-library-column,
  #eventBackdrop .event-added-items-column{
    width:auto;
    max-width:none;
  }
}

@media(max-width:980px){
  #eventBackdrop .event-layout-assets-4col{
    grid-template-columns:1fr 1fr !important;
  }
  #eventBackdrop .event-content-group-sidebar{
    border-right:1px solid #e1e5e9;
  }
  #eventBackdrop .event-content-library-column{
    border-top:1px solid #e1e5e9;
  }
  #eventBackdrop .event-added-items-column{
    border-top:1px solid #e1e5e9;
  }
}

@media(max-width:720px){
  #eventBackdrop .event-layout-assets-4col{
    grid-template-columns:1fr !important;
    overflow:auto;
  }
  #eventBackdrop .event-device-column,
  #eventBackdrop .event-content-group-sidebar,
  #eventBackdrop .event-content-library-column,
  #eventBackdrop .event-added-items-column{
    border-right:0;
    border-bottom:1px solid #e1e5e9;
    max-height:280px;
  }
}


/* v0.21.12 - Event editor 4-column typography/spacing normalization */
.event-modal{
  width:min(1240px,calc(100vw - 24px)) !important;
}

#eventBackdrop .event-layout-assets-4col{
  grid-template-columns:300px 210px 330px 330px !important;
  justify-content:center;
  overflow:hidden;
}

/* All 4 column titles use one visual system */
#eventBackdrop .event-column-title,
#eventBackdrop .event-content-library-titles strong,
#eventBackdrop #eventAddedColumnTitle{
  margin:0;
  color:#2b333d;
  font-size:14px !important;
  font-weight:800 !important;
  line-height:1.3 !important;
}

#eventBackdrop .event-content-library-head{
  min-height:42px;
  align-items:flex-start;
}

#eventBackdrop .event-content-library-titles{
  min-width:0;
  gap:3px;
}

#eventBackdrop #eventContentLibraryHint,
#eventBackdrop #eventAddedColumnHint,
#eventBackdrop .event-selected-count{
  font-size:11px !important;
  line-height:1.3 !important;
}

#eventBackdrop .event-selected-count{
  padding-top:2px;
}

/* Match vertical rhythm in all four columns */
#eventBackdrop .event-device-column,
#eventBackdrop .event-content-group-sidebar,
#eventBackdrop .event-content-library-column,
#eventBackdrop .event-added-items-column{
  padding:12px !important;
  gap:10px !important;
}

/* Device list: prevent clipping/overflow and keep typography consistent */
#eventBackdrop .event-device-list{
  width:100%;
  min-width:0;
  max-width:none;
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden;
}

#eventBackdrop .event-device-list .device-choice{
  width:100%;
  min-width:0;
  min-height:62px;
  box-sizing:border-box;
  padding:10px 12px !important;
  gap:10px !important;
}

#eventBackdrop .event-device-list .device-choice input{
  flex:0 0 16px;
  margin:0;
}

#eventBackdrop .event-device-list .device-choice > div{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  gap:3px;
}

#eventBackdrop .event-device-list .device-choice strong,
#eventBackdrop .event-device-list .device-choice span{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#eventBackdrop .event-device-list .device-choice strong{
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.35 !important;
}

#eventBackdrop .event-device-list .device-choice span{
  font-size:11px !important;
  line-height:1.35 !important;
}

/* Content/playlist group list */
#eventBackdrop .event-content-group-btn{
  min-height:40px;
  padding:8px 10px;
  border-radius:7px;
  font-size:13px;
  line-height:1.3;
}

#eventBackdrop .event-content-group-name{
  font-size:13px;
  line-height:1.3;
}

/* Library + Added items use same row typography */
#eventBackdrop .event-content-library-list .builder-item,
#eventBackdrop .event-selected-content-list .builder-item{
  min-width:0;
  min-height:58px;
  padding:10px 12px;
  box-sizing:border-box;
  align-items:center !important;
  gap:10px;
}

#eventBackdrop .event-content-library-list .builder-item > div:first-child,
#eventBackdrop .event-selected-content-list .builder-item .grow{
  min-width:0;
  overflow:hidden;
}

#eventBackdrop .event-content-library-list .builder-item strong,
#eventBackdrop .event-selected-content-list .builder-item strong{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  word-break:normal !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.35 !important;
}

#eventBackdrop .event-content-library-list .builder-item span,
#eventBackdrop .event-selected-content-list .builder-item span,
#eventBackdrop .event-selected-content-list .duration-label{
  font-size:11px !important;
  line-height:1.35 !important;
}

#eventBackdrop .event-content-library-list .small-action,
#eventBackdrop .event-content-library-list .secondary{
  flex:0 0 auto;
  min-width:58px;
}

#eventBackdrop .event-added-items-column .builder-buttons{
  flex:0 0 auto;
}

/* Keep column widths stable and prevent old media rules from shrinking them too early */
@media(max-width:1280px){
  .event-modal{
    width:calc(100vw - 20px) !important;
  }
  #eventBackdrop .event-layout-assets-4col{
    grid-template-columns:minmax(270px,1.15fr) minmax(190px,.8fr) minmax(290px,1.2fr) minmax(290px,1.2fr) !important;
    overflow-x:auto;
  }
  #eventBackdrop .event-device-column,
  #eventBackdrop .event-content-library-column,
  #eventBackdrop .event-added-items-column{
    width:auto !important;
    max-width:none !important;
  }
}

@media(max-width:980px){
  #eventBackdrop .event-layout-assets-4col{
    grid-template-columns:1fr 1fr !important;
  }
}

/* v0.21.13 - Device / Scheduled Transfer Group-Subgroup trees */
.device-library-layout,.scheduled-transfer-library-layout{grid-template-columns:252px minmax(0,1fr);}
.device-group-sidebar,.scheduled-transfer-page-group-sidebar{width:252px;box-sizing:border-box;}
.device-sidebar-group-list,.scheduled-transfer-page-group-list{overflow-x:hidden;}
.device-tree-node,.scheduled-transfer-tree-node{min-width:0;display:block;}
.device-tree-group-btn,.scheduled-transfer-tree-group-btn{grid-template-columns:18px minmax(0,1fr) auto!important;}
.device-tree-arrow,.scheduled-transfer-tree-arrow{width:18px;display:grid;place-items:center;color:#6f7883;font-size:18px;line-height:1;}
.device-tree-arrow-empty,.scheduled-transfer-tree-arrow-empty{visibility:hidden;}
.device-sidebar-group-name,.device-tree-subgroup-name,.scheduled-transfer-page-group-name,.scheduled-transfer-tree-subgroup-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.device-tree-subgroup-list,.scheduled-transfer-tree-subgroup-list{display:grid;gap:2px;padding:2px 0 4px 24px;}
.device-tree-subgroup-btn,.scheduled-transfer-tree-subgroup-btn{width:100%;min-height:36px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px 10px;border:0;border-radius:7px;background:transparent;color:#505a65;text-align:left;font-weight:700;cursor:pointer;box-sizing:border-box;}
.device-tree-subgroup-btn:hover,.scheduled-transfer-tree-subgroup-btn:hover{background:#eef1f4;}
.device-tree-subgroup-btn.active,.scheduled-transfer-tree-subgroup-btn.active{background:#292f39;color:#fff;}
.device-tree-subgroup-btn.active .device-sidebar-group-count,.scheduled-transfer-tree-subgroup-btn.active .scheduled-transfer-page-group-count{background:#fff;color:#292f39;}
.device-tree-subgroup-empty,.scheduled-transfer-tree-subgroup-empty{padding:8px 10px;color:#9aa3ad;font-size:11px;white-space:nowrap;}
@media(max-width:900px){.device-library-layout,.scheduled-transfer-library-layout{grid-template-columns:232px minmax(0,1fr);}.device-group-sidebar,.scheduled-transfer-page-group-sidebar{width:232px;}}
@media(max-width:800px){.device-group-sidebar,.scheduled-transfer-page-group-sidebar{width:auto;}}


/* v0.21.14 - Schedule Group/Subgroup integrated tree */
.schedule-device-layout{
  grid-template-columns:252px minmax(0,1fr) !important;
}

.schedule-group-sidebar{
  width:252px;
  box-sizing:border-box;
}

.schedule-group-list{
  overflow-x:hidden;
}

.schedule-tree-node{
  min-width:0;
  display:block;
}

.schedule-tree-group-btn{
  grid-template-columns:18px minmax(0,1fr) auto !important;
}

.schedule-tree-arrow{
  width:18px;
  display:grid;
  place-items:center;
  color:#6f7883;
  font-size:18px;
  line-height:1;
}

.schedule-tree-arrow-empty{
  visibility:hidden;
}

.schedule-group-name,
.schedule-tree-subgroup-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.schedule-tree-subgroup-list{
  display:grid;
  gap:2px;
  padding:2px 0 4px 24px;
}

.schedule-tree-subgroup-btn{
  width:100%;
  min-height:36px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
}

.schedule-tree-subgroup-btn:hover{
  background:#eef1f4;
}

.schedule-tree-subgroup-btn.active{
  background:#292f39;
  color:#fff;
}

.schedule-tree-subgroup-btn.active .schedule-group-count{
  background:#fff;
  color:#292f39;
}

.schedule-tree-subgroup-empty{
  padding:8px 10px;
  color:#9aa3ad;
  font-size:11px;
  white-space:nowrap;
}

@media(max-width:900px){
  .schedule-device-layout{
    grid-template-columns:232px minmax(0,1fr) !important;
  }
  .schedule-group-sidebar{
    width:232px;
  }
}

@media(max-width:800px){
  .schedule-device-layout{
    grid-template-columns:1fr !important;
  }
  .schedule-group-sidebar{
    width:auto;
  }
}


/* v0.21.15 - Content / Playlist group sidebar width = 252px */
.content-library-layout{
  grid-template-columns:252px minmax(0,1fr) !important;
}
.content-group-sidebar{
  width:252px !important;
  box-sizing:border-box;
}

.playlist-library-layout{
  grid-template-columns:252px minmax(0,1fr) !important;
}
.playlist-group-sidebar{
  width:252px !important;
  box-sizing:border-box;
}

@media(max-width:900px){
  .content-library-layout,
  .playlist-library-layout{
    grid-template-columns:232px minmax(0,1fr) !important;
  }
  .content-group-sidebar,
  .playlist-group-sidebar{
    width:232px !important;
  }
}

@media(max-width:800px){
  .content-library-layout,
  .playlist-library-layout{
    grid-template-columns:1fr !important;
  }
  .content-group-sidebar,
  .playlist-group-sidebar{
    width:auto !important;
  }
}


/* v0.21.16 - Schedule toolbar integrated like Event */
.schedule-device-layout{
  align-items:stretch;
}
.schedule-device-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}
.schedule-main-toolbar{
  min-height:64px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-bottom:1px solid #e7eaee;
  background:#fff;
}
.schedule-toolbar-copy{
  min-width:0;
  display:grid;
  gap:4px;
}
.schedule-current-group{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.schedule-current-group strong{
  font-size:16px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#scheduleCurrentGroupCount{
  color:#7a838e;
  font-size:12px;
  white-space:nowrap;
}
.schedule-toolbar-note{
  color:#7a838e;
  font-size:11px;
  line-height:1.35;
}
.schedule-main-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
}
.schedule-main-actions #scheduleDeviceSearchInput{
  width:300px;
  min-width:200px;
  height:38px;
  min-height:38px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  color:#20252c;
  font-size:14px;
  line-height:1.2;
}
.schedule-main-actions #clearSelectedSchedulesBtn,
.schedule-main-actions #openBulkScheduleApplyBtn{
  min-height:38px;
  padding:8px 13px;
  border-radius:8px;
  font-size:12px;
  white-space:nowrap;
}
.schedule-main-actions #clearSelectedSchedulesBtn{
  border:1px solid #e7b9b9;
  background:#fff;
  color:#a13d3d;
}
.schedule-main-actions #clearSelectedSchedulesBtn:disabled,
.schedule-main-actions #openBulkScheduleApplyBtn:disabled{
  opacity:.42;
  cursor:not-allowed;
}
/* Old outer schedule toolbar is no longer used */
.schedule-setup-toolbar{display:none!important;}
@media(max-width:980px){
  .schedule-main-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .schedule-main-actions{
    width:100%;
  }
  .schedule-main-actions #scheduleDeviceSearchInput{
    flex:1 1 auto;
    width:auto;
    min-width:0;
  }
}
@media(max-width:700px){
  .schedule-main-actions{
    flex-wrap:wrap;
  }
  .schedule-main-actions #scheduleDeviceSearchInput{
    flex:1 1 100%;
  }
}


/* v0.21.17 - Device header/summary unified layout */
.device-status-summary-row{
  min-height:52px;
  display:flex;
  align-items:center;
  padding:10px 18px;
  border-bottom:1px solid #e7eaee;
  background:#fff;
  box-sizing:border-box;
}

.device-status-summary-row .device-inline-summary{
  display:flex;
  align-items:center;
  gap:18px;
  min-width:0;
  font-size:14px;
  line-height:1.25;
  white-space:nowrap;
}

.device-status-summary-row .device-inline-stat{
  font-size:14px;
  font-weight:700;
}

.device-status-summary-row .device-inline-stat strong{
  font-size:14px;
  font-weight:800;
}

.device-status-summary-row .status-dot{
  width:8px;
  height:8px;
}

.device-action-toolbar-separated{
  min-height:54px !important;
  padding:8px 14px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  border-bottom:1px solid #e7eaee;
  background:#fff;
}

.device-action-toolbar-separated .device-action-controls{
  margin-left:auto;
}

@media(max-width:800px){
  .device-status-summary-row{
    align-items:flex-start;
  }
  .device-status-summary-row .device-inline-summary{
    flex-wrap:wrap;
    gap:10px 14px;
  }
  .device-action-toolbar-separated{
    align-items:stretch !important;
  }
  .device-action-toolbar-separated .device-action-controls{
    width:100%;
    flex-wrap:wrap;
  }
}


/* v0.21.18 - Device page toolbar unified like Events */
.device-page-toolbar{
  min-height:64px;
  padding:10px 14px;
  border-bottom:1px solid #e7eaee;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:#fff;
}

.device-page-toolbar-compact{
  min-height:64px;
}

.device-toolbar-copy{
  min-width:0;
  display:grid;
  gap:4px;
}

.device-page-toolbar .device-current-group{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
}

.device-page-toolbar .device-current-group strong{
  font-size:14px;
  font-weight:800;
}

.device-page-toolbar #deviceCurrentGroupCount{
  color:#7a838e;
  font-size:12px;
  font-weight:700;
}

.device-page-toolbar .device-inline-summary{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:18px;
  color:#68727d;
  font-size:11px;
  line-height:1.35;
  white-space:nowrap;
}

.device-page-toolbar .device-inline-stat{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:600;
}

.device-page-toolbar .device-inline-stat strong{
  color:inherit;
  font-size:12px;
  font-weight:800;
}

.device-page-toolbar .device-inline-stat.total{color:#59636f;}
.device-page-toolbar .device-inline-stat.online{color:#287a4f;}
.device-page-toolbar .device-inline-stat.offline{color:#c24646;}
.device-page-toolbar .device-inline-stat .status-dot{width:7px;height:7px;}

.device-page-toolbar .device-toolbar-controls{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  flex-wrap:nowrap;
}

.device-page-toolbar #searchInput{
  width:min(396px,32vw);
  min-width:220px;
  min-height:38px;
  height:38px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  padding:8px 12px;
  background:#fff;
  font:inherit;
}

.device-page-toolbar #refreshDevicesBtn,
.device-page-toolbar #bulkPlaylistApplyBtn{
  min-height:38px;
  height:38px;
  padding:8px 12px;
  white-space:nowrap;
  flex:0 0 auto;
}

@media(max-width:1100px){
  .device-page-toolbar #searchInput{
    width:min(320px,28vw);
    min-width:200px;
  }
}

@media(max-width:800px){
  .device-page-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .device-page-toolbar .device-inline-summary{
    gap:12px;
    flex-wrap:wrap;
    white-space:normal;
  }

  .device-page-toolbar .device-toolbar-controls{
    width:100%;
    margin-left:0;
    flex-wrap:wrap;
  }

  .device-page-toolbar #searchInput{
    width:100%;
    min-width:0;
    flex:1 1 100%;
  }
}


/* v0.21.19 - Content search + selection actions aligned on the right */
.content-library-toolbar{
  flex-wrap:nowrap !important;
}

.content-library-toolbar > .content-view-switch{
  flex:0 0 auto;
}

.content-library-toolbar .content-toolbar-right-actions{
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  min-width:0 !important;
}

.content-library-toolbar .content-toolbar-right-actions #contentSearchInput{
  margin:0 !important;
}

.content-library-toolbar .content-toolbar-right-actions .content-toolbar-actions{
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex:0 0 auto;
}

@media(max-width:1180px){
  .content-library-toolbar{
    flex-wrap:wrap !important;
  }
  .content-library-toolbar .content-toolbar-right-actions{
    width:100%;
    flex-wrap:wrap !important;
  }
  .content-library-toolbar .content-toolbar-right-actions #contentSearchInput{
    flex:1 1 260px !important;
    width:auto !important;
    min-width:220px !important;
  }
}

@media(max-width:800px){
  .content-library-toolbar .content-toolbar-right-actions{
    align-items:stretch !important;
  }
  .content-library-toolbar .content-toolbar-right-actions .content-toolbar-actions{
    flex-wrap:wrap !important;
  }
}


/* v0.21.20 - Content page integrated layout like Events */
.content-library-layout{
  grid-template-columns:252px minmax(0,1fr) !important;
}

.content-group-sidebar{
  width:252px !important;
  box-sizing:border-box;
}

.content-library-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.content-page-toolbar{
  min-height:64px;
  padding:10px 14px;
  border-bottom:1px solid #e7eaee;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:#fff;
}

.content-toolbar-copy{
  min-width:0;
  display:grid;
  gap:4px;
}

.content-current-group{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
}

.content-current-group strong{
  font-size:14px;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
}

#contentCurrentGroupCount{
  color:#7a838e;
  font-size:12px;
}

.content-toolbar-note{
  color:#7a838e;
  font-size:11px;
  line-height:1.35;
}

.content-toolbar-unified-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  flex-wrap:nowrap;
}

.content-toolbar-unified-actions .content-view-switch,
.content-toolbar-unified-actions .content-selection-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.content-toolbar-unified-actions #contentSearchInput{
  width:min(340px,26vw);
  min-width:220px;
  min-height:38px;
  height:38px;
  margin:0;
}

.content-toolbar-unified-actions button{
  white-space:nowrap;
}

@media(max-width:1200px){
  .content-page-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .content-toolbar-unified-actions{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .content-toolbar-unified-actions #contentSearchInput{
    flex:1 1 260px;
    width:auto;
  }
}

@media(max-width:900px){
  .content-library-layout{
    grid-template-columns:232px minmax(0,1fr) !important;
  }
  .content-group-sidebar{
    width:232px !important;
  }
}

@media(max-width:800px){
  .content-library-layout{
    grid-template-columns:1fr !important;
  }
  .content-group-sidebar{
    width:auto !important;
  }
}


/* v0.21.21 - Content toolbar single-line cleanup */
.content-page-toolbar{
  min-height:60px;
  align-items:center;
}
.content-toolbar-copy{
  display:flex;
  align-items:center;
  gap:8px;
}
.content-current-group{
  min-width:0;
}
.content-toolbar-unified-actions{
  flex-wrap:nowrap !important;
}
.content-toolbar-unified-actions #contentSearchInput{
  width:min(360px,27vw);
}
@media(max-width:1200px){
  .content-page-toolbar{
    flex-direction:row;
    align-items:center;
  }
  .content-toolbar-unified-actions{
    width:auto;
    margin-left:auto;
    flex-wrap:wrap !important;
    justify-content:flex-end;
  }
}
@media(max-width:900px){
  .content-page-toolbar{
    flex-direction:column;
    align-items:stretch;
  }
  .content-toolbar-unified-actions{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }
}

/* v0.21.22 - Playlist integrated toolbar like Content */
.playlist-library-layout{
  align-items:stretch;
}

.playlist-library-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.playlist-page-toolbar{
  min-height:60px;
  padding:10px 14px;
  border-bottom:1px solid #e7eaee;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:#fff;
}

.playlist-toolbar-copy{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}

.playlist-current-group{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  white-space:nowrap;
}

.playlist-current-group strong{
  font-size:14px;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
}

#playlistCurrentGroupCount{
  color:#7a838e;
  font-size:12px;
}

.playlist-toolbar-unified-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
  flex-wrap:nowrap;
}

.playlist-toolbar-unified-actions #playlistSearchInput{
  width:min(340px,26vw);
  min-width:220px;
  min-height:38px;
  height:38px;
  margin:0;
}

.playlist-toolbar-unified-actions .playlist-view-switch{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}

.playlist-toolbar-unified-actions button{
  white-space:nowrap;
}

#applySelectedPlaylistBtn,
#deleteSelectedPlaylistsBtn{
  min-height:38px;
  padding:8px 13px;
  font-size:12px;
  border-radius:8px;
  white-space:nowrap;
}

#deleteSelectedPlaylistsBtn{
  border:1px solid #e7b9b9;
  background:#fff;
  color:#a13d3d;
}

@media(max-width:1200px){
  .playlist-page-toolbar{
    flex-direction:row;
    align-items:center;
  }

  .playlist-toolbar-unified-actions{
    width:auto;
    margin-left:auto;
    flex-wrap:wrap;
    justify-content:flex-end;
  }

  .playlist-toolbar-unified-actions #playlistSearchInput{
    flex:1 1 260px;
    width:auto;
  }
}

@media(max-width:900px){
  .playlist-page-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .playlist-toolbar-unified-actions{
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }
}


/* v0.21.23 - Content/Playlist integrated toolbar height aligned to Event */
.content-page-toolbar,
.playlist-page-toolbar{
  min-height:64px !important;
  padding:8px 14px !important;
  box-sizing:border-box;
  align-items:center !important;
}

.content-toolbar-copy,
.playlist-toolbar-copy{
  min-height:36px;
  display:flex;
  align-items:center;
  gap:8px;
}

.content-toolbar-unified-actions,
.playlist-toolbar-unified-actions{
  align-items:center;
  gap:8px;
}

.content-toolbar-unified-actions #contentSearchInput,
.playlist-toolbar-unified-actions #playlistSearchInput{
  min-height:36px;
  height:36px;
}

.content-toolbar-unified-actions .secondary,
.content-toolbar-unified-actions .danger-mini,
.playlist-toolbar-unified-actions .secondary,
.playlist-toolbar-unified-actions .danger-mini,
#applySelectedPlaylistBtn,
#deleteSelectedPlaylistsBtn{
  min-height:36px;
  height:36px;
  padding-top:7px;
  padding-bottom:7px;
}


/* v0.21.24 - Force exact Event toolbar height for Content / Playlist */
@media(min-width:901px){
  .content-page-toolbar,
  .playlist-page-toolbar{
    height:64px !important;
    min-height:64px !important;
    max-height:64px !important;
    padding:0 14px !important;
    box-sizing:border-box !important;
    align-items:center !important;
    overflow:hidden !important;
  }

  .content-toolbar-copy,
  .playlist-toolbar-copy{
    height:38px !important;
    min-height:38px !important;
    display:flex !important;
    align-items:center !important;
  }

  .content-toolbar-unified-actions,
  .playlist-toolbar-unified-actions{
    height:38px !important;
    min-height:38px !important;
    align-items:center !important;
    flex-wrap:nowrap !important;
  }

  .content-toolbar-unified-actions #contentSearchInput,
  .playlist-toolbar-unified-actions #playlistSearchInput,
  .content-toolbar-unified-actions button,
  .playlist-toolbar-unified-actions button,
  #applySelectedPlaylistBtn,
  #deleteSelectedPlaylistsBtn{
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    box-sizing:border-box !important;
  }
}

/* On narrow screens allow wrapping instead of clipping */
@media(max-width:900px){
  .content-page-toolbar,
  .playlist-page-toolbar{
    height:auto !important;
    max-height:none !important;
    min-height:64px !important;
    padding:10px 14px !important;
    overflow:visible !important;
  }
}


/* v0.21.25 - Content/Playlist toolbar matched back to Event toolbar structure */
@media(min-width:901px){
  .content-page-toolbar,
  .playlist-page-toolbar{
    min-height:64px !important;
    height:auto !important;
    max-height:none !important;
    padding:10px 14px !important;
    border-bottom:1px solid #e7eaee !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:16px !important;
    box-sizing:border-box !important;
    overflow:visible !important;
    background:#fff !important;
  }

  .content-toolbar-copy,
  .playlist-toolbar-copy{
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    display:grid !important;
    gap:4px !important;
    align-content:center !important;
    flex:1 1 auto !important;
  }

  .content-current-group,
  .playlist-current-group{
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    white-space:nowrap !important;
  }

  .content-current-group strong,
  .playlist-current-group strong{
    font-size:14px !important;
    line-height:1.2 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  #contentCurrentGroupCount,
  #playlistCurrentGroupCount{
    color:#7a838e !important;
    font-size:12px !important;
    line-height:1.2 !important;
    flex:0 0 auto !important;
  }

  .content-toolbar-unified-actions,
  .playlist-toolbar-unified-actions{
    margin-left:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    flex:0 1 auto !important;
  }

  .content-toolbar-unified-actions .content-view-switch,
  .content-toolbar-unified-actions .content-selection-actions,
  .playlist-toolbar-unified-actions .playlist-view-switch{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex:0 0 auto !important;
  }

  .content-toolbar-unified-actions #contentSearchInput,
  .playlist-toolbar-unified-actions #playlistSearchInput{
    width:min(340px,26vw) !important;
    min-width:220px !important;
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  .content-toolbar-unified-actions button,
  .playlist-toolbar-unified-actions button,
  #applySelectedPlaylistBtn,
  #deleteSelectedPlaylistsBtn{
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
  }
}

@media(max-width:900px){
  .content-page-toolbar,
  .playlist-page-toolbar{
    min-height:64px !important;
    height:auto !important;
    max-height:none !important;
    padding:10px 14px !important;
    overflow:visible !important;
  }
}


/* v0.21.26 - Remove inherited main-area padding so Content/Playlist match Event */
.content-library-main,
.playlist-library-main{
  padding:0 !important;
}

/* Use the same top toolbar spacing model as Event */
.content-page-toolbar,
.playlist-page-toolbar{
  min-height:64px !important;
  padding:10px 14px !important;
  margin:0 !important;
  border-bottom:1px solid #e7eaee !important;
  box-sizing:content-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  background:#fff !important;
}

.content-toolbar-copy,
.playlist-toolbar-copy{
  min-width:0 !important;
  display:grid !important;
  gap:4px !important;
  align-content:center !important;
}

.content-toolbar-unified-actions,
.playlist-toolbar-unified-actions{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  margin-left:auto !important;
  flex-wrap:nowrap !important;
}

.content-toolbar-unified-actions #contentSearchInput,
.playlist-toolbar-unified-actions #playlistSearchInput,
.content-toolbar-unified-actions button,
.playlist-toolbar-unified-actions button,
#applySelectedPlaylistBtn,
#deleteSelectedPlaylistsBtn{
  height:38px !important;
  min-height:38px !important;
  max-height:38px !important;
  box-sizing:border-box !important;
}

/* Keep list/card content spacing independent below the toolbar */
.content-grid.content-card-view,
.playlist-list.playlist-card-mode{
  margin:0 !important;
}

@media(max-width:900px){
  .content-page-toolbar,
  .playlist-page-toolbar{
    box-sizing:border-box !important;
    min-height:64px !important;
    height:auto !important;
    padding:10px 14px !important;
    flex-wrap:wrap !important;
  }
}


/* v0.21.27 - Match Content/Playlist top toolbar vertical spacing to Event exactly */
.content-library-main .content-page-toolbar,
.playlist-library-main .playlist-page-toolbar{
  min-height:58px !important;
  height:auto !important;
  max-height:none !important;
  padding:10px 14px !important;
  margin:0 !important;
  border-bottom:1px solid #e7eaee !important;
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  overflow:visible !important;
  background:#fff !important;
}

.content-library-main .content-toolbar-copy,
.playlist-library-main .playlist-toolbar-copy{
  min-width:0 !important;
  min-height:0 !important;
  height:auto !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  align-content:normal !important;
  flex:1 1 auto !important;
}

.content-library-main .content-current-group,
.playlist-library-main .playlist-current-group{
  min-width:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  white-space:nowrap !important;
  line-height:1.2 !important;
}

.content-library-main .content-toolbar-unified-actions,
.playlist-library-main .playlist-toolbar-unified-actions{
  min-width:0 !important;
  min-height:0 !important;
  height:auto !important;
  margin-left:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
  flex:0 1 auto !important;
}

.content-library-main .content-toolbar-unified-actions #contentSearchInput,
.playlist-library-main .playlist-toolbar-unified-actions #playlistSearchInput,
.content-library-main .content-toolbar-unified-actions button,
.playlist-library-main .playlist-toolbar-unified-actions button,
.content-library-main #applySelectedPlaylistBtn,
.playlist-library-main #applySelectedPlaylistBtn,
.content-library-main #deleteSelectedPlaylistsBtn,
.playlist-library-main #deleteSelectedPlaylistsBtn{
  height:38px !important;
  min-height:38px !important;
  max-height:38px !important;
  box-sizing:border-box !important;
}

#contentCards,
#playlistList{
  margin-top:0 !important;
}

@media(max-width:900px){
  .content-library-main .content-page-toolbar,
  .playlist-library-main .playlist-page-toolbar{
    min-height:58px !important;
    padding:10px 14px !important;
    box-sizing:border-box !important;
    flex-wrap:wrap !important;
  }
}


/* v0.21.28 - 2px final vertical calibration against Event */
@media(min-width:901px){
  .content-library-main .content-page-toolbar,
  .playlist-library-main .playlist-page-toolbar{
    min-height:60px !important;
    height:60px !important;
    max-height:60px !important;
    padding:10px 14px !important;
    box-sizing:border-box !important;
  }
}


/* v0.21.29 - Exact Event toolbar typography/padding match for Content / Playlist */
@media(min-width:901px){
  .content-library-main .content-page-toolbar,
  .playlist-library-main .playlist-page-toolbar{
    min-height:58px !important;
    height:58px !important;
    max-height:58px !important;
    padding:10px 14px !important;
    margin:0 !important;
    border-bottom:1px solid #e7eaee !important;
    box-sizing:border-box !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:16px !important;
    background:#fff !important;
    overflow:hidden !important;
  }

  .content-library-main .content-toolbar-copy,
  .playlist-library-main .playlist-toolbar-copy{
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    display:grid !important;
    gap:4px !important;
    align-content:center !important;
    flex:1 1 auto !important;
  }

  .content-library-main .content-current-group,
  .playlist-library-main .playlist-current-group{
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    white-space:nowrap !important;
    line-height:1.2 !important;
  }

  .content-library-main .content-current-group strong,
  .playlist-library-main .playlist-current-group strong{
    font-size:14px !important;
    line-height:1.2 !important;
    font-weight:800 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  #contentCurrentGroupCount,
  #playlistCurrentGroupCount{
    color:#7a838e !important;
    font-size:12px !important;
    line-height:1.2 !important;
    flex:0 0 auto !important;
  }

  .content-library-main .content-toolbar-unified-actions,
  .playlist-library-main .playlist-toolbar-unified-actions{
    margin-left:auto !important;
    min-width:0 !important;
    min-height:38px !important;
    height:38px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    flex:0 1 auto !important;
  }

  .content-library-main .content-toolbar-unified-actions .content-view-switch,
  .content-library-main .content-toolbar-unified-actions .content-selection-actions,
  .playlist-library-main .playlist-toolbar-unified-actions .playlist-view-switch{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    flex:0 0 auto !important;
    height:38px !important;
  }

  .content-library-main .content-toolbar-unified-actions #contentSearchInput,
  .playlist-library-main .playlist-toolbar-unified-actions #playlistSearchInput{
    width:min(340px,26vw) !important;
    min-width:220px !important;
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    margin:0 !important;
    padding:8px 12px !important;
    box-sizing:border-box !important;
    font-size:14px !important;
    line-height:1.2 !important;
  }

  .content-library-main .content-toolbar-unified-actions #contentSearchInput::placeholder,
  .playlist-library-main .playlist-toolbar-unified-actions #playlistSearchInput::placeholder{
    font-size:14px !important;
    line-height:1.2 !important;
  }

  .content-library-main .content-toolbar-unified-actions button,
  .playlist-library-main .playlist-toolbar-unified-actions button,
  .content-library-main #applySelectedPlaylistBtn,
  .playlist-library-main #applySelectedPlaylistBtn,
  .content-library-main #deleteSelectedPlaylistsBtn,
  .playlist-library-main #deleteSelectedPlaylistsBtn{
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    padding-top:8px !important;
    padding-bottom:8px !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    font-size:14px !important;
    line-height:1.2 !important;
  }
}

@media(max-width:900px){
  .content-library-main .content-page-toolbar,
  .playlist-library-main .playlist-page-toolbar{
    min-height:58px !important;
    height:auto !important;
    max-height:none !important;
    padding:10px 14px !important;
    box-sizing:border-box !important;
    overflow:visible !important;
    flex-wrap:wrap !important;
  }

  .content-library-main .content-toolbar-unified-actions,
  .playlist-library-main .playlist-toolbar-unified-actions{
    height:auto !important;
    min-height:0 !important;
    flex-wrap:wrap !important;
  }
}

/* v0.21.30 - Group Settings integrated tree + event-style toolbar */
.settings-tree-layout{
  display:grid;
  grid-template-columns:252px minmax(0,1fr);
  min-height:520px;
  overflow:hidden;
}

.settings-tree-sidebar{
  width:252px;
  min-width:0;
  padding:12px;
  background:#fafbfc;
  border-right:1px solid #e1e5e9;
  display:flex;
  flex-direction:column;
  gap:9px;
  box-sizing:border-box;
}

.settings-tree-sidebar-title{
  color:#727c87;
  font-size:11px;
  font-weight:800;
}

#settingsTreeSearchInput{
  width:100%;
  min-height:38px;
  border:1px solid #dce1e6;
  border-radius:8px;
  padding:8px 10px;
  background:#fff;
}

.settings-tree-list{
  min-height:0;
  overflow:auto;
  overflow-x:hidden;
  display:grid;
  align-content:start;
  gap:3px;
}

.settings-tree-node{
  min-width:0;
  display:block;
}

.settings-tree-group-btn{
  width:100%;
  min-height:39px;
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
}

.settings-tree-group-btn:hover,
.settings-tree-subgroup-btn:hover{
  background:#eef1f4;
}

.settings-tree-group-btn.active,
.settings-tree-subgroup-btn.active{
  background:#292f39;
  color:#fff;
}

.settings-tree-arrow{
  width:18px;
  display:grid;
  place-items:center;
  color:#6f7883;
  font-size:18px;
  line-height:1;
}

.settings-tree-group-btn.active .settings-tree-arrow{
  color:#fff;
}

.settings-tree-name,
.settings-tree-subgroup-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.settings-tree-count{
  min-width:22px;
  height:22px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#e9edf1;
  color:#606a75;
  font-size:11px;
}

.settings-tree-group-btn.active .settings-tree-count{
  background:#fff;
  color:#292f39;
}

.settings-tree-subgroup-list{
  display:grid;
  gap:2px;
  padding:2px 0 4px 24px;
}

.settings-tree-subgroup-btn{
  width:100%;
  min-height:36px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:center;
  padding:7px 10px;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#505a65;
  text-align:left;
  font-weight:700;
  cursor:pointer;
  box-sizing:border-box;
}

.settings-tree-subgroup-empty{
  padding:8px 10px;
  color:#9aa3ad;
  font-size:11px;
  white-space:nowrap;
}

.settings-tree-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.settings-tree-toolbar{
  min-height:58px;
  padding:10px 14px;
  border-bottom:1px solid #e7eaee;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:#fff;
  box-sizing:border-box;
}

.settings-tree-toolbar-copy{
  min-width:0;
  display:grid;
  gap:4px;
}

.settings-tree-current{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.settings-tree-current strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:14px;
  font-weight:800;
}

#settingsTreeCurrentMeta{
  flex:0 0 auto;
  color:#7a838e;
  font-size:12px;
}

.settings-tree-hint{
  color:#7a838e;
  font-size:11px;
  line-height:1.35;
}

.settings-tree-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:nowrap;
}

.settings-tree-actions button{
  min-height:38px;
  height:38px;
  white-space:nowrap;
}

.settings-tree-detail{
  flex:1 1 auto;
  min-height:0;
  padding:18px;
  background:#fff;
}

.settings-tree-detail-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.settings-tree-detail-grid>div{
  min-width:0;
  padding:14px 16px;
  border:1px solid #e5e8ec;
  border-radius:9px;
  background:#fafbfc;
}

.settings-tree-detail-grid span{
  display:block;
  color:#808893;
  font-size:11px;
}

.settings-tree-detail-grid strong{
  display:block;
  margin-top:5px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#343b44;
  font-size:14px;
}

@media(max-width:1000px){
  .settings-tree-layout{
    grid-template-columns:232px minmax(0,1fr);
  }
  .settings-tree-sidebar{
    width:232px;
  }
  .settings-tree-actions{
    flex-wrap:wrap;
  }
  .settings-tree-detail-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:800px){
  .settings-tree-layout{
    grid-template-columns:1fr;
  }
  .settings-tree-sidebar{
    width:auto;
    max-height:280px;
    border-right:0;
    border-bottom:1px solid #e1e5e9;
  }
  .settings-tree-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .settings-tree-actions{
    margin-left:0;
    justify-content:flex-start;
  }
}


/* v0.21.31 - Group Settings: group-only left list + subgroup list on right */
.settings-tree-group-btn.settings-tree-group-only{
  grid-template-columns:minmax(0,1fr) auto !important;
}

.settings-tree-detail{
  padding:0 !important;
}

.settings-subgroup-list-panel{
  min-height:100%;
  display:flex;
  flex-direction:column;
  background:#fff;
}

.settings-subgroup-list-header{
  min-height:50px;
  padding:10px 14px;
  border-bottom:1px solid #e7eaee;
  background:#fafbfc;
  display:grid;
  grid-template-columns:minmax(220px,1fr) minmax(360px,1.4fr);
  align-items:center;
  gap:18px;
}

.settings-subgroup-list-header>div:first-child{
  min-width:0;
  display:flex;
  align-items:center;
  gap:8px;
}

.settings-subgroup-list-header strong{
  font-size:12px;
  color:#59636e;
  white-space:nowrap;
}

.settings-subgroup-list-header>div:first-child span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  color:#8a929c;
}

.settings-subgroup-columns{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 120px 80px;
  gap:12px;
  color:#727b85;
  font-size:11px;
  font-weight:800;
}

.settings-subgroup-columns span:last-child{
  text-align:right;
}

.settings-subgroup-list{
  min-height:0;
  overflow:auto;
}

.settings-subgroup-row{
  width:100%;
  min-height:48px;
  padding:8px 14px;
  border:0;
  border-bottom:1px solid #eef0f3;
  background:#fff;
  color:#4f5964;
  display:grid;
  grid-template-columns:minmax(180px,1fr) 120px 80px;
  align-items:center;
  gap:12px;
  text-align:left;
  cursor:pointer;
}

.settings-subgroup-row:hover{
  background:#f7f9fb;
}

.settings-subgroup-row.active{
  background:#eef2f6;
}

.settings-subgroup-row-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:700;
  color:#343b44;
}

.settings-subgroup-row-code{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  color:#7b8490;
}

.settings-subgroup-row-count{
  text-align:right;
  font-size:12px;
  color:#69737e;
}

@media(max-width:900px){
  .settings-subgroup-list-header{
    grid-template-columns:1fr;
    gap:7px;
  }
  .settings-subgroup-columns{
    display:none;
  }
  .settings-subgroup-row{
    grid-template-columns:minmax(0,1fr) 90px 60px;
  }
}


/* v0.21.32 - Group settings subgroup list/search refinement */
.settings-tree-main{
  width:100%;
  min-width:0;
  overflow:hidden;
}

.settings-tree-detail,
.settings-subgroup-list-panel{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}

.settings-tree-actions{
  min-width:0;
}

.settings-subgroup-search{
  width:220px;
  min-width:180px;
  height:38px;
  min-height:38px;
  margin:0;
  padding:8px 12px;
  border:1px solid #dfe3e8;
  border-radius:8px;
  background:#fff;
  box-sizing:border-box;
  font:inherit;
}

.settings-subgroup-columns,
.settings-subgroup-row{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  grid-template-columns:minmax(180px,1fr) 120px 80px !important;
}

.settings-subgroup-columns>span:first-child{
  visibility:hidden;
}

.settings-subgroup-row.active{
  width:100%;
  max-width:100%;
}

@media(max-width:1100px){
  .settings-subgroup-search{
    width:180px;
    min-width:150px;
  }
}

@media(max-width:900px){
  .settings-subgroup-search{
    width:min(100%,260px);
    min-width:0;
  }
  .settings-subgroup-columns,
  .settings-subgroup-row{
    grid-template-columns:minmax(0,1fr) 90px 60px !important;
  }
}


/* v0.21.34 - Group Settings pagination + long subgroup name ellipsis */
.settings-tree-sidebar > .common-pagination{
  flex:0 0 auto;
  margin-top:auto;
}

.settings-subgroup-list-panel > .settings-subgroup-pagination{
  flex:0 0 auto;
  margin-top:auto;
}

.settings-subgroup-row{
  grid-template-columns:minmax(0,1fr) 120px 80px !important;
  min-width:0;
}

.settings-subgroup-row-name{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

.settings-tree-current{
  min-width:0;
  max-width:100%;
  overflow:hidden;
}

#settingsTreeCurrentTitle{
  display:block;
  min-width:0;
  max-width:min(520px,38vw);
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

@media(max-width:900px){
  .settings-subgroup-row{
    grid-template-columns:minmax(0,1fr) 90px 60px !important;
  }
  #settingsTreeCurrentTitle{
    max-width:100%;
  }
}


/* v0.21.35 - signed-in user footer */
.sidebar-auth-user{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px;padding-bottom:9px;border-bottom:1px solid rgba(255,255,255,.08);font-size:11px;color:#aab2be}
.sidebar-auth-user.hidden{display:none!important}
.sidebar-auth-user span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-auth-user button{flex:0 0 auto;border:0;background:transparent;color:#aab2be;padding:0;font:inherit;cursor:pointer}
.sidebar-auth-user button:hover{color:#fff;text-decoration:underline}


/* v0.21.37 - Auth Step 2A: signed-in account context display */
.sidebar-auth-user{align-items:flex-start}
.sidebar-auth-identity{min-width:0;display:grid;gap:2px}
.sidebar-auth-identity span,.sidebar-auth-identity small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-auth-identity small{font-size:10px;color:#7f8895;line-height:1.25}
.sidebar-auth-user button{margin-top:1px}
