:root{
  --bg:#050a14;
  --bg2:#09111f;
  --panel:#0d1628;
  --panel2:#111c31;
  --panel3:#172237;
  --line:rgba(148,163,184,.22);
  --line2:rgba(148,163,184,.34);
  --text:#f8fafc;
  --muted:#9fb0c7;
  --muted2:#718096;
  --blue:#4f8cff;
  --cyan:#37d5ff;
  --green:#22c55e;
  --yellow:#f59e0b;
  --red:#ef4444;
  --violet:#8b5cf6;
  --radius:18px;
  --shadow:0 22px 70px rgba(0,0,0,.36);
  --topbar-h:64px;
  --header-h:92px;
  --toolbar-h:64px;
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;line-height:1.45}
body.member-editor-page{overflow:auto;background:radial-gradient(circle at 18% 12%,rgba(79,140,255,.18),transparent 26%),radial-gradient(circle at 82% 20%,rgba(55,213,255,.11),transparent 28%),linear-gradient(180deg,#050a14 0%,#08111f 100%)}
body.has-playlist{overflow:hidden}
a{color:#a9c7ff;text-decoration:none}a:hover{text-decoration:underline}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{margin:0 0 4px;color:#9bb6e9;text-transform:uppercase;font-weight:800;letter-spacing:.14em;font-size:11px}.fineprint{margin-top:10px;color:var(--muted2);font-size:12px}.app-shell{min-height:100vh}.member-topbar{height:var(--topbar-h);display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 26px;border-bottom:1px solid var(--line);background:rgba(5,10,20,.86);backdrop-filter:blur(18px);position:sticky;top:0;z-index:60}.member-brand{display:flex;align-items:center;gap:12px;color:var(--text);min-width:260px}.member-brand:hover{text-decoration:none}.member-brand-mark{width:40px;height:40px;border-radius:14px;background:linear-gradient(135deg,#6ee7b7,#93c5fd);color:#05111f;display:grid;place-items:center;font-weight:900}.member-brand strong{display:block}.member-brand small{display:block;color:var(--muted);font-size:12px}.member-nav{display:flex;align-items:center;gap:8px;flex:1;justify-content:center}.member-nav a{color:#cbd5e1;padding:9px 14px;border-radius:999px}.member-nav a:hover,.member-nav a.active{background:rgba(79,140,255,.18);color:#fff;text-decoration:none;box-shadow:inset 0 0 0 1px rgba(147,197,253,.35)}.member-account-links{display:flex;align-items:center;gap:14px}.member-account-links a{color:#dbeafe}.member-email{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:9px 14px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid var(--line);font-weight:800}.import-launcher{max-width:1180px;margin:0 auto;padding:54px 22px 64px}.import-hero-card{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:end;margin-bottom:22px;padding:28px;border:1px solid var(--line);border-radius:30px;background:linear-gradient(145deg,rgba(13,22,40,.9),rgba(10,17,31,.72));box-shadow:var(--shadow)}.import-hero-copy h1{font-size:clamp(42px,7vw,78px);line-height:.9;margin:0 0 14px;letter-spacing:-.06em}.lead{font-size:18px;color:#c8d5e8;margin:0;max-width:820px}.import-pill-row{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.import-pill-row span{padding:8px 11px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid var(--line);color:#dbeafe;font-size:13px}.import-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.import-card{background:rgba(13,22,40,.86);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 16px 40px rgba(0,0,0,.18)}.import-card-wide{grid-column:span 2}.import-card h2{margin:10px 0 8px;font-size:24px}.import-card p{margin:0 0 18px;color:#b6c5dc}.card-icon{width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,#4f8cff,#22c55e);display:grid;place-items:center;font-weight:900}.xtream-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px}.label{display:block;font-weight:800;margin:0 0 8px;color:#dbeafe}.input{width:100%;min-height:42px;border:1px solid var(--line);background:#07101f;color:#f8fafc;border-radius:13px;padding:0 13px;outline:none;font:inherit}.input:focus{border-color:#68a8ff;box-shadow:0 0 0 3px rgba(79,140,255,.18)}.file-input{padding:10px;height:auto}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:0 15px;border-radius:13px;border:1px solid var(--line2);background:rgba(255,255,255,.09);color:#fff;font-weight:850;cursor:pointer;font:inherit;text-decoration:none;white-space:nowrap}.btn:hover{transform:translateY(-1px);text-decoration:none;background:rgba(255,255,255,.13)}.btn.primary{background:linear-gradient(135deg,#357aff,#4f8cff);border-color:rgba(147,197,253,.38)}.btn.gradient{background:linear-gradient(135deg,#6366f1,#357aff 52%,#22c55e);border:0;box-shadow:0 12px 30px rgba(79,140,255,.25)}.btn.secondary{background:rgba(148,163,184,.12)}.btn.ghost{background:transparent}.btn.danger{background:rgba(239,68,68,.92);border-color:rgba(248,113,113,.4)}.btn.wide{width:100%;margin-top:12px}.compact-btn{min-height:36px;padding:0 12px;border-radius:11px}.new-badge{font-size:11px;border-radius:999px;background:rgba(255,255,255,.22);padding:3px 8px}.note{min-height:20px;margin-top:10px;color:#cbd5e1}.note.warn{color:#fecaca}.note.ok{color:#bbf7d0}body.has-playlist .import-launcher{display:none}.editor-app{display:none}body.has-playlist .editor-app{display:grid;grid-template-columns:300px minmax(0,1fr) 320px;grid-template-rows:var(--header-h) var(--toolbar-h) minmax(0,1fr);grid-template-areas:"header header header" "groups toolbar inspector" "groups channels inspector";height:calc(100vh - var(--topbar-h));overflow:hidden;padding:0 26px 20px;gap:0 14px}.workspace-header{grid-area:header;display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;padding:14px 0}.workspace-title{display:flex;align-items:center;gap:14px;min-width:0}.workspace-logo{width:56px;height:56px;border-radius:18px;background:linear-gradient(135deg,#1d4ed8,#67e8f9);display:grid;place-items:center;font-weight:1000;box-shadow:0 10px 28px rgba(37,99,235,.28)}.workspace-title h1{font-size:36px;line-height:1;margin:0;letter-spacing:-.045em;white-space:nowrap}.workspace-actions{display:flex;align-items:center;gap:10px;min-width:max-content}.workspace-toolbar{grid-area:toolbar;display:grid;grid-template-columns:minmax(260px,1fr) 190px 260px auto;gap:10px;align-items:center;padding:10px 12px;background:rgba(13,22,40,.9);border:1px solid var(--line);border-radius:20px 20px 0 0}.search-box{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:14px;background:#07101f;padding:0 12px}.search-box .input{border:0;background:transparent;padding:0}.groups-pane{grid-area:groups;display:flex;flex-direction:column;min-height:0;border:1px solid var(--line);border-radius:24px;background:rgba(13,22,40,.9);overflow:hidden}.pane-head{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 10px}.pane-head h2{margin:0;font-size:20px}.icon-btn{width:36px;height:36px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.08);color:#fff;font-size:22px;line-height:1;cursor:pointer}.kpi-strip{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 16px 12px}.kpi{padding:12px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.05)}.kpi strong{display:block;font-size:24px;line-height:1}.kpi span{display:block;color:var(--muted);font-size:12px;margin-top:4px}.groups-pane>.input{margin:0 16px 12px;width:calc(100% - 32px)}.group-list{flex:1;min-height:0;overflow:auto;padding:0 10px 10px}.group-list::-webkit-scrollbar,.table-wrap::-webkit-scrollbar{width:10px;height:10px}.group-list::-webkit-scrollbar-thumb,.table-wrap::-webkit-scrollbar-thumb{background:#334155;border-radius:999px}.group-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;margin:5px 0;border-radius:13px;color:#dbeafe;cursor:pointer;border:1px solid transparent}.group-item:hover{background:rgba(255,255,255,.06)}.group-item.active{background:rgba(79,140,255,.2);border-color:rgba(147,197,253,.46)}.group-name{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-count{color:var(--muted);font-size:12px}.group-hint{font-size:12px;color:var(--muted2);padding:10px;margin:8px 0;border:1px dashed var(--line);border-radius:14px}.groups-footer{border-top:1px solid var(--line);padding:12px 16px 16px;background:rgba(5,10,20,.44)}.quick-tools{display:grid;gap:8px;margin-top:8px}.channels-pane{grid-area:channels;display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid var(--line);border-top:0;border-radius:0 0 24px 24px;background:rgba(8,15,29,.9);overflow:hidden}.contextbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:50px;padding:9px 12px;border-bottom:1px solid var(--line);background:rgba(5,10,20,.62)}.context-left,.context-right{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.pill,.mini-badge{display:inline-flex;align-items:center;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid var(--line);padding:5px 9px;font-size:12px;color:#dbeafe}.pill.mini{padding:2px 6px;font-size:10px}.mini-badge.good{background:rgba(34,197,94,.16);border-color:rgba(34,197,94,.36);color:#bbf7d0}.mini-badge.warn{background:rgba(245,158,11,.13);border-color:rgba(245,158,11,.32);color:#fde68a}.bulk-action-bar,.table-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line);background:rgba(13,22,40,.58)}.bulk-left,.bulk-buttons,.table-controls-left,.table-controls-right{display:flex;align-items:center;gap:8px}.compact-input{min-height:36px;width:auto}.move-select{min-width:220px}.table-wrap{flex:1;min-height:0;overflow:auto}.table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.table thead th{position:sticky;top:0;z-index:5;text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#90a4c1;background:#0a1221;border-bottom:1px solid var(--line);padding:11px 12px}.table tbody td{border-bottom:1px solid rgba(148,163,184,.14);padding:10px 12px;vertical-align:middle}.table tbody tr:hover{background:rgba(79,140,255,.07)}.select-col{width:48px}.group-col{width:180px}.actions-col{width:110px}.url-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#a8c7ff}.row-badges{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}.actions{display:flex;gap:6px;flex-wrap:wrap}.btn-xs{min-height:28px;padding:0 9px;border-radius:9px;border:1px solid var(--line);background:rgba(255,255,255,.07);color:#fff;font-size:12px;font-weight:800;cursor:pointer}.btn-xs.danger{background:rgba(239,68,68,.16);border-color:rgba(239,68,68,.38);color:#fecaca}.empty-table{padding:28px!important;text-align:center}.inspector-pane{grid-area:inspector;display:flex;flex-direction:column;min-height:0;gap:12px;overflow:auto;padding-bottom:2px}.inspector-pane::-webkit-scrollbar{width:0}.inspector-card{border:1px solid var(--line);border-radius:22px;background:rgba(13,22,40,.9);padding:16px;box-shadow:0 12px 34px rgba(0,0,0,.12)}.score-card{text-align:center}.score-ring{--score:0;width:132px;height:132px;border-radius:50%;margin:10px auto 12px;display:grid;place-items:center;background:conic-gradient(#22c55e calc(var(--score)*1%),rgba(148,163,184,.18) 0);position:relative}.score-ring::after{content:"";position:absolute;inset:10px;border-radius:50%;background:#0d1628}.score-ring strong,.score-ring span{position:relative;z-index:1;display:block}.score-ring strong{font-size:34px;line-height:1}.score-ring span{font-size:12px;color:var(--muted);margin-top:38px;position:absolute}.metric-row{display:flex;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid rgba(148,163,184,.13);gap:10px}.metric-row:last-child{border-bottom:0}.metric-row span{color:#cbd5e1}.metric-row strong{font-size:18px}.metric-row.good strong{color:#86efac}.metric-row.warn strong{color:#fde68a}.metric-row.danger strong{color:#fca5a5}.tip-actions{display:grid;gap:8px;margin-top:12px}.floating-export{margin-top:auto;border:1px solid rgba(96,165,250,.32);border-radius:22px;background:linear-gradient(145deg,rgba(37,99,235,.18),rgba(13,22,40,.94));padding:14px;display:grid;gap:9px;box-shadow:0 18px 45px rgba(37,99,235,.12)}.floating-export strong,.floating-export span{display:block}.toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,18px);opacity:0;pointer-events:none;background:#0f172a;color:#fff;border:1px solid var(--line);border-radius:999px;padding:11px 16px;box-shadow:var(--shadow);z-index:120;transition:.18s ease}.toast.show{opacity:1;transform:translate(-50%,0)}.modalBackdrop{position:fixed;inset:0;background:rgba(2,6,23,.72);backdrop-filter:blur(10px);display:none;align-items:center;justify-content:center;padding:24px;z-index:110}.modalBackdrop.show{display:flex}.modalCard{width:min(720px,100%);max-height:min(86vh,780px);overflow:auto;border:1px solid var(--line);border-radius:24px;background:#0d1628;color:#fff;box-shadow:var(--shadow)}.modalCardWide{width:min(980px,100%)}.modalHead{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}.modalHead h3{margin:0}.modalBody{padding:20px}.modalLead{color:#cbd5e1}.stageList{display:grid;gap:10px;margin:16px 0}.stageItem{display:flex;gap:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.04)}.stageItem.active{border-color:#60a5fa}.stageItem.done{border-color:rgba(34,197,94,.55);background:rgba(34,197,94,.08)}.stageItem.error{border-color:rgba(239,68,68,.75);background:rgba(239,68,68,.11)}.stageDot{width:12px;height:12px;border-radius:50%;margin-top:5px;background:#64748b}.stageItem.active .stageDot{background:#60a5fa}.stageItem.done .stageDot{background:#22c55e}.stageItem.error .stageDot{background:#ef4444}.stageTitle{font-weight:900;margin:0 0 2px}.stageDesc{margin:0;color:#cbd5e1;font-size:13px}.modalProgress{height:10px;border-radius:999px;background:rgba(255,255,255,.09);overflow:hidden}.modalProgressBar{height:100%;width:0;background:linear-gradient(90deg,#6366f1,#22c55e);transition:width .25s ease}.modalFoot{display:flex;align-items:center;justify-content:space-between;margin-top:16px}.spinner{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.25);border-top-color:#fff;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.previewStats{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.previewTextarea{width:100%;height:55vh;background:#020617;color:#dbeafe;border:1px solid var(--line);border-radius:14px;padding:12px;font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}body:not(.has-playlist) .workspace-header,body:not(.has-playlist) .workspace-toolbar,body:not(.has-playlist) .groups-pane,body:not(.has-playlist) .channels-pane,body:not(.has-playlist) .inspector-pane{display:none!important}@media (max-width:1180px){body.has-playlist .editor-app{grid-template-columns:260px minmax(0,1fr);grid-template-areas:"header header" "toolbar toolbar" "groups channels";}.inspector-pane{display:none}.workspace-actions{gap:6px}.workspace-actions .btn{padding:0 10px}}@media (max-width:860px){body.has-playlist{overflow:auto}body.has-playlist .editor-app{height:auto;overflow:visible;display:block;padding:0 14px 20px}.member-topbar{position:relative;height:auto;padding:12px;flex-wrap:wrap}.member-nav{order:3;width:100%;overflow:auto;justify-content:flex-start}.workspace-header,.workspace-toolbar,.groups-pane,.channels-pane{margin:12px 0}.workspace-header{display:block}.workspace-actions{margin-top:12px;overflow:auto}.workspace-toolbar{display:grid;grid-template-columns:1fr}.groups-pane{max-height:360px}.channels-pane{height:70vh}.import-grid,.import-card-wide,.import-hero-card{display:block;grid-column:auto}.import-card{margin-bottom:14px}.xtream-grid{grid-template-columns:1fr}.bulk-action-bar,.table-controls{align-items:flex-start;flex-direction:column}.table{min-width:820px}}


/* ============================================================
   V6 DAILY-DRIVER WORKSPACE OVERRIDES
   Goal: laptop-friendly app layout, more rows, full-height groups,
   no competing nested scrolls, compact EPG readiness strip.
   ============================================================ */
:root{
  --topbar-h:58px;
  --v6-gap:10px;
}
html,body.member-editor-page{height:100%;overflow:hidden;background:#050914!important;}
.member-topbar{height:var(--topbar-h)!important;min-height:var(--topbar-h)!important;padding:0 26px!important;border-bottom:1px solid rgba(148,163,184,.16)!important;background:rgba(5,10,20,.96)!important;backdrop-filter:blur(16px);}
.member-brand-mark{width:40px!important;height:40px!important;border-radius:14px!important;}
.member-brand strong{font-size:15px}.member-brand small{font-size:12px}.member-nav a{height:36px!important;padding:0 14px!important}.member-account-links{gap:10px}.member-email{height:36px!important;padding:0 14px!important}

body.has-playlist .app-shell{height:100vh;overflow:hidden;}
body.has-playlist .import-launcher{display:none!important;}
body.has-playlist .editor-app{
  height:calc(100vh - var(--topbar-h));
  padding:10px 12px 12px!important;
  display:grid!important;
  grid-template-columns:330px minmax(0,1fr)!important;
  grid-template-rows:54px 46px 68px minmax(0,1fr)!important;
  grid-template-areas:
    "groups header"
    "groups toolbar"
    "groups inspector"
    "groups channels"!important;
  gap:var(--v6-gap)!important;
  overflow:hidden!important;
}

/* Compact command bar */
.workspace-header{grid-area:header!important;min-height:0!important;padding:0 12px!important;border-radius:18px!important;align-items:center!important;background:linear-gradient(90deg,rgba(15,23,42,.95),rgba(12,22,40,.78))!important;}
.workspace-title{gap:10px!important;min-width:0}.workspace-logo{width:38px!important;height:38px!important;border-radius:12px!important;font-size:14px!important}.workspace-title .eyebrow{display:none!important}.workspace-title h1{font-size:24px!important;letter-spacing:-.035em!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0!important}.workspace-actions{gap:8px!important}.workspace-actions .btn{height:36px!important;min-height:36px!important;padding:0 13px!important;border-radius:12px!important;font-size:14px!important}.new-badge{padding:3px 7px!important;font-size:10px!important}

/* Search / move toolbar */
.workspace-toolbar{grid-area:toolbar!important;grid-template-columns:minmax(230px,1fr) 180px 250px 62px!important;padding:6px 10px!important;border-radius:18px!important;min-height:0!important;background:rgba(8,15,29,.94)!important}.search-box{height:34px!important;border-radius:12px!important}.workspace-toolbar .input,.compact-input,.move-select{min-height:34px!important;height:34px!important;border-radius:12px!important;font-size:13px!important}.workspace-toolbar .btn{height:34px!important;min-height:34px!important;padding:0 12px!important;border-radius:12px!important}

/* Full-height left rail. Only the group list scrolls, with maximum useful height. */
.groups-pane{grid-area:groups!important;height:100%!important;min-height:0!important;border-radius:22px!important;background:rgba(9,16,31,.96)!important;box-shadow:0 24px 60px rgba(0,0,0,.20)!important;}
.pane-head{padding:12px 14px 8px!important}.pane-head .eyebrow{font-size:10px!important}.pane-head h2{font-size:18px!important}.icon-btn{width:34px!important;height:34px!important;border-radius:11px!important}.kpi-strip{padding:0 14px 9px!important;gap:7px!important}.kpi{padding:9px 10px!important;border-radius:13px!important}.kpi strong{font-size:22px!important}.kpi span{font-size:11px!important}.groups-pane>.input{margin:0 14px 8px!important;width:calc(100% - 28px)!important;height:34px!important;min-height:34px!important}.group-list{flex:1!important;min-height:0!important;overflow:auto!important;padding:0 8px 8px!important;scrollbar-width:thin;}.group-item{min-height:30px!important;padding:6px 10px!important;margin:3px 0!important;border-radius:10px!important}.group-name{font-size:13px!important}.group-count{font-size:11px!important}.group-hint{padding:8px!important;margin:5px 0!important;font-size:11px!important}.groups-footer{padding:9px 14px 12px!important}.groups-footer .btn{height:36px!important;min-height:36px!important;border-radius:12px!important;font-size:13px!important}.quick-tools{gap:7px!important;margin-top:7px!important}

/* EPG readiness is now a compact strip, not a third column stealing table space. */
.inspector-pane{grid-area:inspector!important;display:grid!important;grid-template-columns:190px minmax(0,1fr) 260px 230px!important;gap:10px!important;overflow:hidden!important;min-height:0!important;padding:0!important;}
.inspector-card{min-height:0!important;border-radius:18px!important;padding:10px 12px!important;background:rgba(9,16,31,.93)!important}.score-card{display:flex!important;align-items:center!important;gap:10px!important;text-align:left!important}.score-card .eyebrow{display:none!important}.score-ring{width:48px!important;height:48px!important;margin:0!important;flex:0 0 48px!important}.score-ring::after{inset:5px!important}.score-ring strong{font-size:15px!important}.score-ring span{display:none!important}.score-card .muted{font-size:11px!important;line-height:1.25!important;margin:0!important}.readiness-list{display:grid!important;grid-template-columns:repeat(7,minmax(72px,1fr))!important;gap:6px!important;align-content:center!important;overflow:hidden!important}.metric-row{display:block!important;padding:5px 7px!important;border:1px solid rgba(148,163,184,.14)!important;border-radius:11px!important;background:rgba(255,255,255,.035)!important}.metric-row span{display:block!important;font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.metric-row strong{font-size:17px!important;line-height:1.1!important}.inspector-card h3{font-size:13px!important;margin:0 0 4px!important}.inspector-card #readinessTip{font-size:11px!important;line-height:1.25!important;max-height:30px!important;overflow:hidden!important}.tip-actions{grid-template-columns:1fr 1fr!important;gap:6px!important;margin-top:6px!important}.tip-actions .btn{height:28px!important;min-height:28px!important;border-radius:10px!important;font-size:11px!important;padding:0 8px!important}.floating-export{margin:0!important;padding:10px!important;align-content:center!important;gap:7px!important;border-radius:18px!important}.floating-export strong{font-size:13px!important}.floating-export span{font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.floating-export .btn{height:28px!important;min-height:28px!important;border-radius:10px!important;font-size:11px!important;padding:0 8px!important}.floating-export #stickyCopyBtn{display:none!important}

/* Channel workspace: maximum row real estate. */
.channels-pane{grid-area:channels!important;height:100%!important;min-height:0!important;border:1px solid var(--line)!important;border-radius:22px!important;overflow:hidden!important;background:rgba(8,15,29,.95)!important;}
.contextbar{min-height:34px!important;height:34px!important;padding:4px 10px!important;overflow-x:auto!important;overflow-y:hidden!important;flex-wrap:nowrap!important}.context-left,.context-right{flex-wrap:nowrap!important;gap:5px!important}.contextbar .pill{height:23px!important;padding:0 8px!important;font-size:11px!important;white-space:nowrap}.contextbar button{height:24px!important;min-height:24px!important;padding:0 8px!important;border-radius:8px!important;font-size:11px!important;white-space:nowrap}.bulk-action-bar,.table-controls{min-height:36px!important;padding:5px 10px!important;gap:8px!important;flex-wrap:nowrap!important}.bulk-left,.bulk-buttons,.table-controls-left,.table-controls-right{gap:6px!important;white-space:nowrap}.bulk-action-bar strong{font-size:13px!important}.bulk-action-bar .input,.table-controls .input{height:30px!important;min-height:30px!important;border-radius:10px!important;font-size:12px!important}.bulk-action-bar .btn,.table-controls .btn{height:30px!important;min-height:30px!important;border-radius:10px!important;font-size:12px!important;padding:0 10px!important}.table-wrap{flex:1!important;min-height:0!important;overflow:auto!important;scrollbar-width:thin}.table{min-width:980px!important;table-layout:fixed!important}.select-col{width:42px!important}.group-col{width:240px!important}.actions-col{width:96px!important}.table thead th{padding:8px 10px!important;font-size:11px!important;top:0!important}.table tbody td{padding:7px 10px!important;font-size:13px!important;line-height:1.22!important}.table tbody td strong{font-size:14px!important}.row-badges{margin-top:4px!important;gap:4px!important}.mini-badge{font-size:10px!important;padding:2px 6px!important}.actions{gap:5px!important}.btn-xs{height:24px!important;min-height:24px!important;padding:0 7px!important;border-radius:8px!important;font-size:11px!important}.url-cell{max-width:1px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.table tbody tr{height:46px!important}.table tbody tr:hover{background:rgba(79,140,255,.10)!important}

/* Keep import page polished but simple. */
body:not(.has-playlist) .editor-app{display:none!important}

@media (max-width:1180px){
  body.has-playlist .editor-app{grid-template-columns:300px minmax(0,1fr)!important;grid-template-rows:52px 44px 64px minmax(0,1fr)!important;grid-template-areas:"groups header" "groups toolbar" "groups inspector" "groups channels"!important;}
  .inspector-pane{display:grid!important;grid-template-columns:150px minmax(0,1fr) 210px!important}.floating-export{display:none!important}.readiness-list{grid-template-columns:repeat(4,minmax(70px,1fr))!important}.workspace-actions .btn{padding:0 10px!important}.workspace-title h1{font-size:21px!important}.workspace-toolbar{grid-template-columns:minmax(190px,1fr) 160px 210px 58px!important}.group-col{width:220px!important}.table{min-width:900px!important}
}
@media (max-width:900px){
  html,body.member-editor-page{overflow:auto!important;height:auto!important}body.has-playlist .editor-app{height:auto!important;display:block!important;overflow:visible!important;padding:10px!important}.member-topbar{position:relative!important;height:auto!important;min-height:0!important;padding:10px!important;flex-wrap:wrap!important}.member-nav{order:3;width:100%;overflow:auto;justify-content:flex-start}.workspace-header,.workspace-toolbar,.groups-pane,.inspector-pane,.channels-pane{margin-bottom:10px!important}.workspace-header{height:auto!important;padding:12px!important}.workspace-actions{margin-top:10px;overflow:auto}.workspace-toolbar{display:grid!important;grid-template-columns:1fr!important}.groups-pane{height:380px!important}.inspector-pane{display:block!important}.inspector-card{margin-bottom:8px}.readiness-list{grid-template-columns:repeat(2,1fr)!important}.channels-pane{height:68vh!important}.table{min-width:850px!important}
}

/* --------------------------------------------------------------------------
   v7 UX hotfixes
   - import launcher scrolls normally before a playlist is loaded
   - editor uses a true app layout after import
   - groups rail gets full usable height
   - EPG readiness becomes a visible horizontal strip, not hidden/overlapped
   - channel table gets the maximum laptop space
-------------------------------------------------------------------------- */
html,
body.member-editor-page{
  min-height:100%;
}

body.member-editor-page:not(.has-playlist){
  overflow-y:auto !important;
  overflow-x:hidden !important;
  height:auto !important;
  min-height:100vh !important;
  padding-bottom:96px !important;
}
body.member-editor-page:not(.has-playlist) .app-shell,
body.member-editor-page:not(.has-playlist) .import-launcher,
body.member-editor-page:not(.has-playlist) .import-grid,
body.member-editor-page:not(.has-playlist) .import-card,
body.member-editor-page:not(.has-playlist) .import-card-wide{
  height:auto !important;
  min-height:0 !important;
  overflow:visible !important;
}
body.member-editor-page:not(.has-playlist) .editor-app{
  display:none !important;
}
body.member-editor-page:not(.has-playlist) .member-topbar{
  position:sticky !important;
  top:0 !important;
}

body.has-playlist.member-editor-page{
  overflow:hidden !important;
}
body.has-playlist .app-shell{
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}

/* Two-column laptop-first layout: full-height groups + wide editor. */
body.has-playlist .editor-app{
  display:grid !important;
  grid-template-columns:320px minmax(0,1fr) !important;
  grid-template-rows:58px 46px 82px minmax(0,1fr) !important;
  grid-template-areas:
    "groups header"
    "groups toolbar"
    "groups inspector"
    "groups channels" !important;
  height:calc(100vh - var(--topbar-h)) !important;
  min-height:0 !important;
  overflow:hidden !important;
  gap:10px !important;
  padding:10px 12px 12px !important;
}

body.has-playlist .workspace-header{
  grid-area:header !important;
  min-height:0 !important;
  height:58px !important;
  padding:8px 10px !important;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
  background:linear-gradient(90deg,rgba(13,22,40,.98),rgba(10,18,33,.78)) !important;
}
body.has-playlist .workspace-title{
  min-width:0 !important;
}
body.has-playlist .workspace-logo{
  width:38px !important;
  height:38px !important;
  border-radius:12px !important;
  font-size:13px !important;
  flex:0 0 38px !important;
}
body.has-playlist .workspace-title .eyebrow{
  display:none !important;
}
body.has-playlist .workspace-title h1{
  font-size:24px !important;
  line-height:1 !important;
  margin:0 !important;
  max-width:48vw !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
body.has-playlist .workspace-actions{
  gap:7px !important;
  min-width:0 !important;
  overflow-x:auto !important;
  scrollbar-width:none !important;
}
body.has-playlist .workspace-actions::-webkit-scrollbar{display:none}
body.has-playlist .workspace-actions .btn{
  height:36px !important;
  min-height:36px !important;
  padding:0 12px !important;
  border-radius:12px !important;
  font-size:13px !important;
}

body.has-playlist .workspace-toolbar{
  grid-area:toolbar !important;
  height:46px !important;
  min-height:0 !important;
  display:grid !important;
  grid-template-columns:minmax(260px,1fr) 180px minmax(200px,280px) 62px !important;
  gap:8px !important;
  align-items:center !important;
  padding:6px 10px !important;
  border:1px solid var(--line) !important;
  border-radius:16px !important;
  background:rgba(8,15,29,.95) !important;
}
body.has-playlist .workspace-toolbar .input,
body.has-playlist .workspace-toolbar .btn,
body.has-playlist .search-box{
  height:34px !important;
  min-height:34px !important;
  border-radius:12px !important;
  font-size:13px !important;
}

/* Groups rail: no tiny nested experience; one full-height rail with compact controls. */
body.has-playlist .groups-pane{
  grid-area:groups !important;
  height:100% !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  border-radius:22px !important;
  overflow:hidden !important;
}
body.has-playlist .pane-head{
  padding:12px 14px 8px !important;
  flex:0 0 auto !important;
}
body.has-playlist .pane-head h2{
  font-size:19px !important;
}
body.has-playlist .kpi-strip{
  padding:0 14px 8px !important;
  gap:7px !important;
  flex:0 0 auto !important;
}
body.has-playlist .kpi{
  padding:9px 10px !important;
  border-radius:13px !important;
}
body.has-playlist .kpi strong{
  font-size:22px !important;
}
body.has-playlist .kpi span{
  font-size:11px !important;
  margin-top:2px !important;
}
body.has-playlist .groups-pane > .input{
  flex:0 0 auto !important;
  height:34px !important;
  min-height:34px !important;
  margin:0 14px 8px !important;
  width:calc(100% - 28px) !important;
}
body.has-playlist .group-list{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow-y:auto !important;
  padding:0 8px 8px !important;
}
body.has-playlist .group-item{
  min-height:34px !important;
  padding:7px 9px !important;
  margin:3px 0 !important;
  border-radius:11px !important;
}
body.has-playlist .group-name{
  font-size:13px !important;
}
body.has-playlist .group-count{
  font-size:11px !important;
}
body.has-playlist .group-hint{
  padding:7px 9px !important;
  margin:5px 0 !important;
  font-size:11px !important;
}
body.has-playlist .groups-footer{
  flex:0 0 auto !important;
  padding:9px 14px 12px !important;
}
body.has-playlist .groups-footer .btn{
  height:34px !important;
  min-height:34px !important;
  border-radius:12px !important;
  font-size:13px !important;
}
body.has-playlist .quick-tools{
  gap:7px !important;
  margin-top:7px !important;
}

/* EPG readiness strip: always visible, never under the context/action row. */
body.has-playlist .inspector-pane{
  grid-area:inspector !important;
  display:grid !important;
  grid-template-columns:142px minmax(0,1fr) 250px !important;
  gap:8px !important;
  min-height:0 !important;
  height:82px !important;
  overflow:hidden !important;
}
body.has-playlist .inspector-card{
  min-height:0 !important;
  height:82px !important;
  margin:0 !important;
  padding:9px 11px !important;
  border-radius:16px !important;
  overflow:hidden !important;
  background:rgba(9,16,31,.96) !important;
}
body.has-playlist .score-card{
  display:flex !important;
  align-items:center !important;
  gap:9px !important;
  text-align:left !important;
}
body.has-playlist .score-card .eyebrow{display:none !important}
body.has-playlist .score-ring{
  width:46px !important;
  height:46px !important;
  margin:0 !important;
  flex:0 0 46px !important;
}
body.has-playlist .score-ring::after{inset:5px !important}
body.has-playlist .score-ring strong{font-size:14px !important}
body.has-playlist .score-ring span{display:none !important}
body.has-playlist #epgReadySummary{
  font-size:11px !important;
  line-height:1.2 !important;
  max-height:42px !important;
  overflow:hidden !important;
}
body.has-playlist .readiness-list{
  display:grid !important;
  grid-template-columns:repeat(7,minmax(72px,1fr)) !important;
  gap:6px !important;
  align-items:stretch !important;
  overflow:hidden !important;
}
body.has-playlist .metric-row{
  min-width:0 !important;
  display:block !important;
  padding:6px 7px !important;
  border-radius:11px !important;
  background:rgba(255,255,255,.04) !important;
}
body.has-playlist .metric-row span{
  display:block !important;
  font-size:10px !important;
  line-height:1.05 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.has-playlist .metric-row strong{
  display:block !important;
  margin-top:4px !important;
  font-size:18px !important;
  line-height:1 !important;
}
body.has-playlist .inspector-pane > .inspector-card:nth-child(3){
  display:block !important;
}
body.has-playlist .inspector-pane > .inspector-card:nth-child(3) h3{
  font-size:12px !important;
  margin:0 0 3px !important;
}
body.has-playlist #readinessTip{
  font-size:11px !important;
  line-height:1.2 !important;
  max-height:28px !important;
  overflow:hidden !important;
  margin:0 !important;
}
body.has-playlist .tip-actions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;
  gap:6px !important;
  margin-top:6px !important;
}
body.has-playlist .tip-actions .btn{
  height:25px !important;
  min-height:25px !important;
  padding:0 7px !important;
  border-radius:9px !important;
  font-size:10px !important;
}
body.has-playlist .floating-export{
  display:none !important;
}

/* Channel area: use remaining height for rows. */
body.has-playlist .channels-pane{
  grid-area:channels !important;
  height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
}
body.has-playlist .contextbar{
  flex:0 0 32px !important;
  height:32px !important;
  min-height:32px !important;
  padding:4px 10px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
body.has-playlist .contextbar .pill,
body.has-playlist .contextbar button{
  height:22px !important;
  min-height:22px !important;
  font-size:10.5px !important;
  padding:0 7px !important;
  border-radius:8px !important;
}
body.has-playlist .bulk-action-bar,
body.has-playlist .table-controls{
  flex:0 0 36px !important;
  min-height:36px !important;
  padding:4px 10px !important;
  gap:7px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scrollbar-width:none !important;
}
body.has-playlist .bulk-action-bar::-webkit-scrollbar,
body.has-playlist .table-controls::-webkit-scrollbar{display:none}
body.has-playlist .bulk-left,
body.has-playlist .bulk-buttons,
body.has-playlist .table-controls-left,
body.has-playlist .table-controls-right{
  flex-wrap:nowrap !important;
  white-space:nowrap !important;
  gap:6px !important;
}
body.has-playlist .bulk-action-bar .input,
body.has-playlist .table-controls .input,
body.has-playlist .bulk-action-bar .btn,
body.has-playlist .table-controls .btn{
  height:28px !important;
  min-height:28px !important;
  border-radius:9px !important;
  font-size:12px !important;
}
body.has-playlist .table-wrap{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:auto !important;
}
body.has-playlist .table{
  min-width:900px !important;
  table-layout:fixed !important;
}
body.has-playlist .table thead th{
  padding:7px 9px !important;
  height:30px !important;
  font-size:10.5px !important;
}
body.has-playlist .table tbody td{
  padding:6px 9px !important;
  font-size:13px !important;
  line-height:1.18 !important;
}
body.has-playlist .table tbody td strong{
  font-size:14px !important;
}
body.has-playlist .table tbody tr{
  height:43px !important;
}
body.has-playlist .row-badges{
  margin-top:3px !important;
}
body.has-playlist .btn-xs{
  height:22px !important;
  min-height:22px !important;
  font-size:10.5px !important;
  border-radius:8px !important;
}

@media (max-width:1180px){
  body.has-playlist .editor-app{
    grid-template-columns:286px minmax(0,1fr) !important;
    grid-template-rows:54px 44px 112px minmax(0,1fr) !important;
  }
  body.has-playlist .inspector-pane{
    height:112px !important;
    grid-template-columns:130px minmax(0,1fr) !important;
    grid-template-rows:52px 52px !important;
  }
  body.has-playlist .inspector-pane > .inspector-card:nth-child(3){
    grid-column:1 / -1 !important;
    height:52px !important;
  }
  body.has-playlist .readiness-list{
    grid-template-columns:repeat(4,minmax(70px,1fr)) !important;
  }
  body.has-playlist .workspace-title h1{font-size:21px !important}
}

@media (max-width:900px){
  body.member-editor-page,
  body.has-playlist.member-editor-page{
    overflow:auto !important;
    height:auto !important;
  }
  body.has-playlist .app-shell{height:auto !important;overflow:visible !important}
  body.has-playlist .editor-app{
    height:auto !important;
    min-height:0 !important;
    display:block !important;
    overflow:visible !important;
    padding:10px !important;
  }
  body.has-playlist .workspace-header,
  body.has-playlist .workspace-toolbar,
  body.has-playlist .groups-pane,
  body.has-playlist .inspector-pane,
  body.has-playlist .channels-pane{
    height:auto !important;
    margin-bottom:10px !important;
  }
  body.has-playlist .workspace-toolbar{grid-template-columns:1fr !important}
  body.has-playlist .groups-pane{height:360px !important}
  body.has-playlist .inspector-pane{display:block !important;overflow:visible !important}
  body.has-playlist .inspector-card{height:auto !important;margin-bottom:8px !important}
  body.has-playlist .readiness-list{grid-template-columns:repeat(2,1fr) !important}
  body.has-playlist .channels-pane{height:70vh !important}
}
.readiness-grid{
  grid-template-columns: 140px 1fr !important;
}

.recommended-card{
  grid-column: 1 / -1 !important;
  min-height: unset !important;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.recommended-card h3{
  margin: 0 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

.recommended-card p{
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

.recommended-card .btn,
.recommended-card button{
  margin-left: auto !important;
  white-space: nowrap !important;
}
/* =========================================
   IMPORT SCREEN SCROLL FIX
   Allow full-page scroll before playlist load
========================================= */

html,
body{
  overflow-x:hidden;
}

body:not(.has-playlist){
  overflow-y:auto !important;
  height:auto !important;
  min-height:100vh !important;
}

body:not(.has-playlist) .app-shell,
body:not(.has-playlist) .workspace-shell,
body:not(.has-playlist) .editor-shell,
body:not(.has-playlist) .member-editor-app,
body:not(.has-playlist) main{
  height:auto !important;
  min-height:100vh !important;
  overflow:visible !important;
}

body:not(.has-playlist) .import-screen,
body:not(.has-playlist) .import-shell,
body:not(.has-playlist) .import-grid{
  overflow:visible !important;
  height:auto !important;
  min-height:unset !important;
}

body:not(.has-playlist){
  padding-bottom:120px !important;
}
/* HARD FIX: upload/import screen must scroll */
html:has(body:not(.has-playlist)),
body:not(.has-playlist){
  height:auto !important;
  min-height:100% !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  position:static !important;
}

body:not(.has-playlist) *{
  max-height:none;
}

body:not(.has-playlist) .app,
body:not(.has-playlist) .app-shell,
body:not(.has-playlist) .member-app,
body:not(.has-playlist) .member-editor-app,
body:not(.has-playlist) .workspace,
body:not(.has-playlist) .workspace-shell,
body:not(.has-playlist) .editor-app,
body:not(.has-playlist) .editor-shell,
body:not(.has-playlist) .editor-layout,
body:not(.has-playlist) .import-screen,
body:not(.has-playlist) .import-shell,
body:not(.has-playlist) .import-grid,
body:not(.has-playlist) main{
  height:auto !important;
  min-height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  position:relative !important;
}

body:not(.has-playlist) .member-topbar,
body:not(.has-playlist) .account-topbar,
body:not(.has-playlist) .app-topbar{
  position:sticky !important;
  top:0 !important;
}

body:not(.has-playlist)::after{
  content:"";
  display:block;
  height:180px;
}


/* Live Now & Next EPG column */
.epg-col{width:360px!important}
.epg-live-cell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;min-width:0}
.epg-mini-box{height:42px;min-width:0;border:1px solid rgba(96,165,250,.28);border-radius:10px;background:rgba(37,99,235,.10);padding:5px 7px;overflow:hidden}
.epg-mini-box.empty{border-color:rgba(148,163,184,.18);background:rgba(148,163,184,.06)}
.epg-mini-label{display:block;font-size:9px;line-height:1.05;text-transform:uppercase;letter-spacing:.08em;color:#93c5fd;margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.epg-mini-box strong{display:block;font-size:11px!important;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e5efff}
body.has-playlist .table{min-width:1340px!important}
@media(max-width:860px){.epg-col{width:320px!important}.epg-live-cell{min-width:320px}}
