/* Approved Uploader product UI.
   The shell intentionally behaves like a consumer/creator product rather than an admin dashboard. */

:root{
  --product-bg:#edf3f9;
  --product-surface:#ffffff;
  --product-surface-soft:#f4f8fc;
  --product-ink:#0d2850;
  --product-muted:#667b96;
  --product-line:#d1deeb;
  --product-brand:#1681f2;
  --product-brand-deep:#0b5fc7;
  --product-navy:#0a2f68;
  --product-cyan:#22c6df;
  --product-blue-soft:#edf6ff;
  --product-green:#13a667;
  --product-green-soft:#e8fbf0;
  --product-orange:#eb761d;
  --product-orange-soft:#fff1e4;
  --product-shadow:0 14px 34px rgba(28,68,113,.09);
  --product-shadow-soft:0 8px 22px rgba(28,68,113,.065);
  --product-radius:18px;
}
:root[data-theme="dark"]{
  --product-bg:#071522;
  --product-surface:#0c2031;
  --product-surface-soft:#10293c;
  --product-ink:#edf6ff;
  --product-muted:#92a8bc;
  --product-line:#213e53;
  --product-brand:#2c9bf6;
  --product-brand-deep:#67b9f7;
  --product-navy:#b8ddff;
  --product-cyan:#2ad1d0;
  --product-blue-soft:#102f48;
  --product-green:#5dd4a0;
  --product-green-soft:#10392d;
  --product-orange:#ffad67;
  --product-orange-soft:#3b2a1e;
  --product-shadow:0 16px 38px rgba(0,0,0,.24);
  --product-shadow-soft:0 10px 28px rgba(0,0,0,.14);
}

*{box-sizing:border-box}
html,body{min-height:100%;background:var(--product-bg)!important}
body.app-page{
  margin:0;
  overflow-x:hidden;
  color:var(--product-ink);
  background:
    radial-gradient(circle at 74% 3%,rgba(30,136,255,.08),transparent 24%),
    linear-gradient(180deg,#f7faff 0,var(--product-bg) 24%,var(--product-bg) 100%)!important;
}
:root[data-theme="dark"] body.app-page{
  background:
    radial-gradient(circle at 76% 0,rgba(31,142,240,.13),transparent 25%),
    var(--product-bg)!important;
}
:root:not([data-theme="dark"]) body.app-page{
  background:
    radial-gradient(circle at 72% 0,rgba(32,137,235,.09),transparent 26%),
    linear-gradient(180deg,#f8fbff 0,#eef4fa 21%,var(--product-bg) 100%)!important;
}

@media(min-width:900px){body.app-page{zoom:1!important}}

.app-layout{
  --sidebar-desktop-width:224px;
  display:grid!important;
  min-height:100vh;
  align-items:start!important;
  background:transparent!important;
}
.app-main{min-width:0;width:100%;position:relative}
@media(min-width:761px){
  html[dir="rtl"] .app-layout{
    direction:ltr;
    grid-template-columns:minmax(0,1fr) var(--sidebar-desktop-width)!important;
  }
  html[dir="ltr"] .app-layout{
    direction:ltr;
    grid-template-columns:var(--sidebar-desktop-width) minmax(0,1fr)!important;
  }
  html[dir="rtl"] .site-sidebar{grid-column:2;grid-row:1;direction:rtl}
  html[dir="rtl"] .app-main{grid-column:1;grid-row:1;direction:rtl}
  html[dir="ltr"] .site-sidebar{grid-column:1;grid-row:1;direction:ltr}
  html[dir="ltr"] .app-main{grid-column:2;grid-row:1;direction:ltr}
  .app-layout.is-sidebar-collapsed{--sidebar-desktop-width:72px}

  .site-sidebar{
    position:sticky!important;
    top:0!important;
    align-self:start!important;
    width:var(--sidebar-desktop-width)!important;
    height:100vh!important;
    height:100dvh!important;
    max-height:100dvh!important;
    overflow-y:auto!important;
    overflow-x:visible!important;
    z-index:40;
    padding:22px 14px 18px!important;
    gap:20px!important;
    background:color-mix(in srgb,var(--product-surface) 97%,transparent)!important;
    border:0!important;
    border-inline-start:1px solid var(--product-line)!important;
    box-shadow:-8px 0 28px rgba(27,67,111,.025)!important;
    backdrop-filter:blur(16px);
    scrollbar-width:thin;
  }
  html[dir="ltr"] .site-sidebar{
    border-inline-start:0!important;
    border-inline-end:1px solid var(--product-line)!important;
    box-shadow:8px 0 28px rgba(27,67,111,.025)!important;
  }
  :root[data-theme="dark"] .site-sidebar{background:rgba(8,25,39,.95)!important}

  .site-sidebar .app-nav{min-height:0;overflow:visible}
  .sidebar-collapse-toggle{
    display:grid!important;
    place-items:center!important;
    position:static!important;
    inset:auto!important;
    top:auto!important;
    align-self:flex-end!important;
    flex:0 0 auto!important;
    width:40px!important;
    height:40px!important;
    margin:-6px 2px 0!important;
    padding:0!important;
    border:0!important;
    border-radius:11px!important;
    background:transparent!important;
    color:#496887!important;
    box-shadow:none!important;
    cursor:pointer!important;
    transition:background .16s ease,color .16s ease!important;
  }
  .sidebar-collapse-toggle:hover{
    background:var(--product-blue-soft)!important;
    color:var(--product-brand-deep)!important;
  }
  .sidebar-collapse-toggle:focus-visible{
    outline:3px solid color-mix(in srgb,var(--product-brand) 24%,transparent)!important;
    outline-offset:2px!important;
  }
  .sidebar-collapse-toggle svg,
  html[dir="rtl"] .sidebar-collapse-toggle svg,
  html[dir="ltr"] .sidebar-collapse-toggle svg,
  html[dir="rtl"] .app-layout.is-sidebar-collapsed .sidebar-collapse-toggle svg,
  html[dir="ltr"] .app-layout.is-sidebar-collapsed .sidebar-collapse-toggle svg{
    width:22px!important;
    height:22px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2.2!important;
    stroke-linecap:round!important;
    transform:none!important;
  }
  .app-layout.is-sidebar-collapsed .sidebar-collapse-toggle{
    align-self:center!important;
    margin:-6px 0 0!important;
  }
}

/* Brand */
.brand-block{
  min-height:56px;
  padding:4px 6px!important;
  gap:11px!important;
  align-items:center!important;
}
.brand-mark{
  width:48px!important;
  height:48px!important;
  flex:none;
  display:grid!important;
  place-items:center!important;
  padding:4px!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#1a8cff,#0c4eab)!important;
  box-shadow:0 9px 20px rgba(22,129,242,.2)!important;
}
.brand-logo-image{display:block;width:100%;height:100%;object-fit:contain}
.brand-copy{display:grid;min-width:0;gap:2px}
.brand-copy strong{
  color:var(--product-ink)!important;
  font-size:1.18rem!important;
  letter-spacing:-.035em;
}
.brand-copy small{
  max-width:135px;
  color:var(--product-muted)!important;
  font-size:.58rem!important;
  line-height:1.5;
}
.app-layout.is-sidebar-collapsed .brand-block{justify-content:center!important}
.app-layout.is-sidebar-collapsed .brand-mark{width:44px!important;height:44px!important;padding:3px!important}
.app-layout.is-sidebar-collapsed .brand-copy{display:none!important}

/* Navigation */
.app-nav-inner{display:block!important;padding:0!important}
.app-nav-section{display:grid!important;gap:4px!important}
.app-nav-link{
  min-height:47px!important;
  padding:9px 12px!important;
  border-radius:12px!important;
  gap:11px!important;
  color:#60738f!important;
  font-size:.8rem!important;
  font-weight:760!important;
  text-decoration:none!important;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}
.app-nav-link .nav-icon{width:20px!important;height:20px!important;color:#4d6e98!important}
.app-nav-link:hover{background:#f6f9fd!important;color:var(--product-navy)!important}
:root:not([data-theme="dark"]) .app-nav-link:hover{
  background:#edf4fb!important;
  color:#123c6f!important;
}
.app-nav-link.is-active{
  background:linear-gradient(90deg,#ddebff,#eaf4ff)!important;
  color:#0c69d7!important;
  box-shadow:none!important;
}
html[dir="rtl"] .app-nav-link.is-active,
html[dir="ltr"] .app-nav-link.is-active{box-shadow:none!important}
.app-nav-link.is-active .nav-icon{color:#0c69d7!important}
.app-layout.is-sidebar-collapsed .app-nav-link{
  justify-content:center!important;
  padding-inline:0!important;
}
.app-layout.is-sidebar-collapsed .app-nav-link>span{display:none!important}

/* Header: edge-to-edge and sticky, following the viewport while page content scrolls. */
.site-header{
  position:sticky!important;
  top:0!important;
  z-index:35!important;
  width:100%!important;
  margin:0!important;
  background:color-mix(in srgb,var(--product-surface) 97%,transparent)!important;
  border:0!important;
  border-bottom:1px solid var(--product-line)!important;
  border-radius:0!important;
  box-shadow:none!important;
  backdrop-filter:blur(16px);
  overflow:visible!important;
}
.header-inner{
  width:100%!important;
  min-height:66px!important;
  padding:8px 16px!important;
  gap:18px!important;
}
.header-heading{display:grid!important;gap:3px!important}
.header-kicker{display:none!important}
.header-heading strong{
  color:var(--product-ink)!important;
  font-size:1.08rem!important;
  font-weight:800!important;
  line-height:1.45!important;
}
.header-description{
  color:var(--product-muted)!important;
  font-size:.72rem!important;
  font-weight:650;
  line-height:1.65;
}
.user-actions{gap:9px!important}
.header-user{
  min-height:40px!important;
  padding:3px 6px!important;
  gap:8px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  color:var(--product-ink)!important;
}
.header-user:hover{background:var(--product-surface-soft)!important;border-color:var(--product-line)!important}
.header-avatar{
  width:36px!important;height:36px!important;border-radius:50%!important;
  background:linear-gradient(145deg,#3d55f7,#2b93f5)!important;
  color:#fff!important;box-shadow:none!important;
}
.username{font-size:.76rem!important;font-weight:800!important}
.header-logout{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  min-height:38px!important;
  padding:6px 10px!important;
  border:0!important;
  background:var(--product-surface-soft)!important;
  color:#536985!important;
  box-shadow:none!important;
}
.header-logout .ui-icon{width:16px;height:16px}
.header-logout:hover{background:#eef4fb!important;color:var(--product-navy)!important}
.workspace-switcher-button{
  min-height:40px!important;
  padding:5px 10px!important;
  border:1px solid var(--product-line)!important;
  border-radius:11px!important;
  background:var(--product-surface)!important;
  box-shadow:none!important;
}

/* Shared page sizing and form language */
.dashboard-shell,
.downloader-shell,.publish-shell,.transfer-shell,.channels-page-shell,.team-shell,.settings-shell{
  width:min(1600px,calc(100% - 28px))!important;
  margin:18px auto 54px!important;
  gap:14px!important;
}
.panel,.page-intro{
  background:var(--product-surface)!important;
  border:1px solid var(--product-line)!important;
  border-radius:var(--product-radius)!important;
  box-shadow:none!important;
}
:root:not([data-theme="dark"]) .panel,
:root:not([data-theme="dark"]) .page-intro{
  border-color:#cfdeec!important;
  box-shadow:0 7px 20px rgba(28,68,113,.065)!important;
}
:root:not([data-theme="dark"]) .site-header{
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(247,250,253,.98))!important;
  border-bottom-color:#cedbea!important;
  box-shadow:0 3px 14px rgba(28,68,113,.055)!important;
}
@media(min-width:761px){
  :root:not([data-theme="dark"]) .site-sidebar{
    background:linear-gradient(180deg,#fbfdff 0,#f5f9fd 100%)!important;
    border-color:#cfdeec!important;
    box-shadow:0 0 24px rgba(28,68,113,.055)!important;
  }
}
:root:not([data-theme="dark"]) .header-logout{
  background:#f0f5fa!important;
  color:#4f6580!important;
}
:root:not([data-theme="dark"]) .header-logout:hover{
  background:#e4eef8!important;
  color:var(--product-navy)!important;
}
.button{border-radius:11px!important;font-weight:800}
.button-primary{
  background:linear-gradient(135deg,#1687f6,#0e72e4)!important;
  border-color:#147ce9!important;color:#fff!important;box-shadow:none!important;
}
.button-primary:hover{filter:none!important;background:linear-gradient(135deg,#0e78e7,#075dbd)!important}
.button-ghost,.button-secondary-dark{
  background:#fff!important;border-color:var(--product-line)!important;color:#126bc8!important;
}
input[type="text"],input[type="password"],input[type="url"],input[type="search"],input[type="datetime-local"],textarea,select{
  border-color:var(--product-line)!important;
  background:var(--product-surface-soft)!important;
  color:var(--product-ink)!important;
}

/* Approved home composition */
.home-shell{max-width:1600px!important}
.home-hero{
  position:relative;
  min-height:230px;
  overflow:hidden;
  display:grid!important;
  grid-template-columns:minmax(0,1.45fr) minmax(250px,.55fr);
  align-items:center;
  gap:22px;
  padding:28px 30px!important;
  background:
    radial-gradient(circle at 16% 14%,rgba(61,176,255,.2),transparent 24%),
    radial-gradient(circle at 2% 88%,rgba(59,207,244,.16),transparent 27%),
    linear-gradient(120deg,#f7fbff 0,#eef7ff 48%,#ffffff 100%)!important;
  box-shadow:var(--product-shadow)!important;
}
:root[data-theme="dark"] .home-hero{
  background:
    radial-gradient(circle at 17% 18%,rgba(42,153,235,.2),transparent 26%),
    linear-gradient(120deg,#0f2b42,#0c2031 55%,#0c2031)!important;
}
.home-hero::after{
  content:"";
  position:absolute;
  width:340px;height:340px;
  inset-inline-start:-120px;
  top:-165px;
  border-radius:50%;
  background:rgba(255,255,255,.42);
  pointer-events:none;
}
:root[data-theme="dark"] .home-hero::after{background:rgba(44,155,240,.12)}
.home-hero-copy{position:relative;z-index:3;display:grid;align-content:center;gap:8px}
.home-hero-kicker{
  display:none;
  color:var(--product-brand);font-size:.68rem;font-weight:900;letter-spacing:.02em
}
.home-hero h1{
  margin:0!important;
  color:#0a2450!important;
  font-size:2.2rem!important;
  line-height:1.45!important;
  letter-spacing:-.04em;
}
:root[data-theme="dark"] .home-hero h1{color:var(--product-ink)!important}
.home-hero-copy>p{
  margin:0 0 13px!important;
  color:var(--product-muted)!important;
  font-size:.9rem!important;
  line-height:1.9!important;
}
.home-url-form{max-width:850px;margin:0}
.home-url-row{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:7px!important;
  padding:5px!important;
  border:1px solid var(--product-line)!important;
  border-radius:13px!important;
  background:var(--product-surface)!important;
  box-shadow:0 7px 22px rgba(29,83,139,.07)!important;
}
.home-url-row:focus-within{
  border-color:#1988f3!important;
  box-shadow:0 0 0 3px rgba(25,136,243,.09),0 8px 25px rgba(29,83,139,.08)!important;
}
.home-url-row input[type="url"]{
  min-height:46px!important;
  border:0!important;
  background:transparent!important;
  color:var(--product-ink)!important;
  box-shadow:none!important;
  direction:ltr;text-align:left;
}
.home-url-row .downloader-link-icon{
  color:var(--product-navy)!important;width:36px!important;font-size:1.15rem!important
}
.home-url-row .downloader-resolve-button{
  min-width:142px!important;min-height:45px!important;margin:0!important
}
.home-hero .downloader-notice{grid-column:1/-1;margin:2px 0 0!important}
.home-hero-art{
  position:relative;
  z-index:2;
  min-height:175px;
  display:grid;
  place-items:center;
}
.hero-cloud{
  position:relative;z-index:3;
  width:158px;height:158px;
  display:grid;place-items:center;
  border-radius:42px;
  background:radial-gradient(circle at 36% 27%,#51c6ff 0,#148af8 38%,#0a54bd 76%);
  box-shadow:0 26px 45px rgba(25,105,195,.22);
  transform:rotate(-3deg);
}
.hero-cloud img{width:138px;height:138px;object-fit:contain;filter:drop-shadow(0 9px 14px rgba(0,46,108,.18))}
.hero-orbit{
  position:absolute;
  border:2px dashed rgba(30,145,240,.2);
  border-radius:50%;
}
.hero-orbit-one{width:250px;height:150px;transform:rotate(-12deg)}
.hero-orbit-two{width:225px;height:185px;transform:rotate(17deg)}
.hero-float{
  position:absolute;z-index:4;
  width:44px;height:44px;
  display:grid;place-items:center;
  border:1px solid #d7e6f7;
  border-radius:13px;
  background:#fff;
  color:#1681f2;
  box-shadow:0 10px 23px rgba(26,86,145,.1);
}
.hero-float .ui-icon{width:21px;height:21px}
.hero-float-video{top:10px;inset-inline-start:32px;color:#1d9bf0}
.hero-float-image{top:22px;inset-inline-end:22px;color:#2574ec}
.hero-float-link{bottom:8px;inset-inline-end:4px;color:#0d83ec}

/* Main actions */
.home-task-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
}
.home-task-card{
  min-height:142px!important;
  padding:18px 18px 15px!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:start!important;
  gap:12px!important;
  border:1px solid var(--product-line)!important;
  border-radius:16px!important;
  text-decoration:none!important;
  box-shadow:none!important;
  transition:transform .17s ease,box-shadow .17s ease,border-color .17s ease;
}
.home-task-card:hover{transform:translateY(-2px);box-shadow:var(--product-shadow-soft)!important}
.task-download{background:linear-gradient(135deg,#edf6ff,#f7fbff)!important;border-color:#d6e8fb!important}
.task-publish{background:linear-gradient(135deg,#fff1e3,#fff8f2)!important;border-color:#fae0c7!important}
.task-transfer{background:linear-gradient(135deg,#e8fbf0,#f5fff9)!important;border-color:#cfefdd!important}
:root[data-theme="dark"] .task-download{background:#102f48!important}
:root[data-theme="dark"] .task-publish{background:#38281c!important}
:root[data-theme="dark"] .task-transfer{background:#10362a!important}
.home-task-icon{
  width:54px!important;height:54px!important;
  display:grid!important;place-items:center!important;
  border-radius:15px!important;
  background:#fff!important;
  box-shadow:0 8px 18px rgba(26,70,116,.06);
  font-size:1.25rem!important;
}
.task-download .home-task-icon{color:#147ceb!important;background:#e3f0ff!important}
.task-publish .home-task-icon{color:#f07b18!important;background:#ffe7cb!important}
.task-transfer .home-task-icon{color:#0a9a63!important;background:#d9f8e5!important}
.home-task-copy{display:grid!important;gap:5px!important;min-width:0}
.home-task-copy strong{color:#112a50!important;font-size:1rem!important}
:root[data-theme="dark"] .home-task-copy strong{color:var(--product-ink)!important}
.home-task-copy small{min-height:38px;color:#71849e!important;font-size:.7rem!important;line-height:1.7!important}
.home-task-link{
  align-self:end;
  margin-top:5px;
  color:inherit;
  font-size:.72rem;
  font-weight:900;
}
.task-download .home-task-link{color:#0e78e7}
.task-publish .home-task-link{color:#e36a0b}
.task-transfer .home-task-link{color:#0b9360}

/* Platform panel */
.home-platform-panel{
  padding:16px 18px 14px!important;
  box-shadow:var(--product-shadow-soft)!important;
}
.home-section-heading{
  min-height:34px;
  margin:0 0 11px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}
.home-section-heading>div{display:flex;align-items:center;gap:8px}
.home-section-heading h2{margin:0;color:#0c2852!important;font-size:.98rem!important}
:root[data-theme="dark"] .home-section-heading h2{color:var(--product-ink)!important}
.home-section-heading p{margin:2px 0 0;color:var(--product-muted);font-size:.63rem}
.home-section-link{
  color:#1280ed!important;
  text-decoration:none!important;
  font-size:.68rem!important;
  font-weight:850!important;
  white-space:nowrap;
}
.home-platform-grid{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:repeat(11,minmax(0,1fr))!important;
  gap:8px!important;
}
.home-platform-grid .platform-logo-link{
  min-width:0!important;
  min-height:70px!important;
  padding:8px 4px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  border:1px solid #e4ecf5!important;
  border-radius:11px!important;
  background:#fbfdff!important;
  box-shadow:none!important;
  font-size:.56rem!important;
  color:#59708f!important;
  white-space:nowrap;
}
.home-platform-grid .platform-logo-link:hover{
  border-color:#c8def4!important;
  background:#f4f9ff!important;
  transform:translateY(-1px);
}
:root:not([data-theme="dark"]) .home-platform-grid .platform-logo-link{
  border-color:#d6e2ee!important;
  background:#f7fafd!important;
  color:#526b89!important;
}
:root:not([data-theme="dark"]) .home-platform-grid .platform-logo-link:hover{
  border-color:#b9d0e6!important;
  background:#eaf3fb!important;
  color:#173b66!important;
}
.home-platform-grid .platform-logo-link img{
  width:27px!important;height:27px!important;
  object-fit:contain!important;padding:1px!important;border-radius:7px!important
}
.home-platform-grid .platform-logo-link>span{
  max-width:100%;overflow:hidden;text-overflow:ellipsis
}

/* Resolved download is one cohesive work surface. */
.downloader-workspace{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(350px,.95fr)!important;
  gap:0!important;
  overflow:hidden!important;
  border:1px solid var(--product-line)!important;
  border-radius:18px!important;
  background:var(--product-surface)!important;
  box-shadow:var(--product-shadow-soft)!important;
}
.downloader-workspace[hidden]{display:none!important}
.downloader-preview-panel,.downloader-options-panel{
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;padding:18px!important;min-width:0!important;
}
html[dir="rtl"] .downloader-options-panel{border-right:1px solid var(--product-line)!important}
html[dir="ltr"] .downloader-options-panel{border-left:1px solid var(--product-line)!important}

/* Activity panel */
.home-activity-panel{
  padding:16px 18px 13px!important;
  box-shadow:var(--product-shadow-soft)!important;
}
.home-activity-panel .downloader-history-heading{margin-bottom:9px!important}
.home-activity-panel .downloader-history-table-head{
  min-height:34px!important;
  border-radius:9px!important;
  background:#f7fafe!important;
  color:#7690ae!important;
}
:root:not([data-theme="dark"]) .home-activity-panel .downloader-history-table-head{
  background:#edf4fa!important;
  color:#5f7896!important;
}
.home-activity-panel .downloader-history-list>article{
  background:transparent!important;
  border-bottom:1px solid #e7eef6!important;
}
.home-activity-panel .downloader-history-list>article:hover{
  background:#fbfdff!important;border-radius:9px!important
}
:root[data-theme="dark"] .app-nav-link{
  color:var(--product-muted)!important;
}
:root[data-theme="dark"] .app-nav-link .nav-icon{
  color:#8aa6c1!important;
}
:root[data-theme="dark"] .app-nav-link:hover{
  background:var(--product-surface-soft)!important;
  color:var(--product-ink)!important;
}
:root[data-theme="dark"] .app-nav-link:hover .nav-icon{
  color:var(--product-brand-deep)!important;
}
:root[data-theme="dark"] .app-nav-link.is-active{
  background:var(--product-blue-soft)!important;
  color:var(--product-brand-deep)!important;
}
:root[data-theme="dark"] .app-nav-link.is-active .nav-icon{
  color:var(--product-brand-deep)!important;
}
:root[data-theme="dark"] .header-logout{
  background:var(--product-surface-soft)!important;
  color:var(--product-muted)!important;
}
:root[data-theme="dark"] .header-logout:hover{
  background:#16364d!important;
  color:var(--product-ink)!important;
}
:root[data-theme="dark"] .button-ghost,
:root[data-theme="dark"] .button-secondary-dark{
  background:var(--product-surface)!important;
  color:var(--product-brand-deep)!important;
}
:root[data-theme="dark"] .home-task-copy small{
  color:var(--product-muted)!important;
}
:root[data-theme="dark"] .home-platform-grid .platform-logo-link{
  border-color:var(--product-line)!important;
  background:var(--product-surface-soft)!important;
  color:var(--product-muted)!important;
}
:root[data-theme="dark"] .home-platform-grid .platform-logo-link:hover{
  border-color:#315c78!important;
  background:#143249!important;
  color:var(--product-ink)!important;
}
:root[data-theme="dark"] .home-activity-panel .downloader-history-table-head{
  background:var(--product-surface-soft)!important;
  color:#a6bdd1!important;
}
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article{
  border-bottom-color:var(--product-line)!important;
}
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article:hover{
  background:#122d42!important;
  color:var(--product-ink)!important;
}
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article:hover h3,
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article:hover .job-title-link{
  color:var(--product-ink)!important;
}
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article:hover small,
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article:hover .download-row-source,
:root[data-theme="dark"] .home-activity-panel .downloader-history-list>article:hover .download-row-progress span{
  color:#a9c0d4!important;
}

/* Other product pages keep the same visual language. */
.downloader-heading,.publish-heading,.transfer-heading,.channels-heading,.team-heading,.settings-heading,.page-heading{padding:0!important}
.downloader-title-icon,.publish-title-icon,.transfer-title-icon,.channels-title-icon,.team-title-icon,.settings-title-icon{
  width:40px!important;height:40px!important;border-radius:12px!important;
  background:var(--product-blue-soft)!important;color:var(--product-brand)!important;
}
.downloader-title-copy h1,.publish-title-copy h1,.transfer-title-copy h1,.channels-title-copy h1,.team-title-copy h1,.settings-title-copy h1{
  color:var(--product-ink)!important;font-size:1.45rem!important;
}
.downloader-title-copy p,.publish-title-copy p,.transfer-title-copy p,.channels-title-copy p,.team-title-copy p,.settings-title-copy p{
  color:var(--product-muted)!important;font-size:.76rem!important;
}
.publish-shell .publisher-grid{grid-template-columns:minmax(0,1.55fr) minmax(290px,.72fr)!important;gap:14px!important}
.publish-composer-card,.publish-side-card,.publish-history-panel,
.transfer-resolver,.transfer-preview-panel,.transfer-config-panel,.transfer-status-panel,
.channels-list-panel,.service-bots-panel,.team-card,.team-members-panel,.settings-account-card,.settings-panel{
  box-shadow:none!important;border-radius:16px!important
}
.publish-composer-card{padding:20px!important}
.publish-shell .composer-section{margin-top:17px!important;padding-top:17px!important;border-top-color:var(--product-line)!important}
.publish-shell .selection-card,.transfer-destination-card,.transfer-format-row,.transfer-mode-button,
.channel-card-details,.service-bot-card,.settings-preference-choice,.settings-language-choice{
  background:var(--product-surface-soft)!important;border-color:var(--product-line)!important
}
.publish-shell .selection-card:has(input:checked),.transfer-destination-card:has(input:checked),.transfer-mode-button.is-selected,
.settings-preference-choice.is-selected,.settings-language-choice.is-selected{
  background:var(--product-blue-soft)!important;border-color:var(--product-brand)!important
}
.transfer-resolver{padding:18px!important}
.transfer-workspace{
  overflow:hidden!important;gap:0!important;border:1px solid var(--product-line)!important;border-radius:18px!important;
  background:var(--product-surface)!important
}
.transfer-preview-panel,.transfer-config-panel{border:0!important;border-radius:0!important;background:transparent!important}
html[dir="rtl"] .transfer-config-panel{border-right:1px solid var(--product-line)!important}
html[dir="ltr"] .transfer-config-panel{border-left:1px solid var(--product-line)!important}
.channels-page-shell{grid-auto-flow:row}
.channels-list-panel{order:1}.channels-stats{order:2}.service-bots-panel{order:3}
.channel-card{background:var(--product-surface)!important;border-color:var(--product-line)!important;box-shadow:none!important}
.channels-stats,.team-stats{gap:8px!important}
.channel-stat-card,.team-stat-card{
  box-shadow:none!important;background:var(--product-surface-soft)!important;border-color:var(--product-line)!important
}

/* Responsiveness */
@media(max-width:1180px){
  .home-platform-grid{grid-template-columns:repeat(8,minmax(0,1fr))!important}
  .dashboard-shell,.downloader-shell,.publish-shell,.transfer-shell,.channels-page-shell,.team-shell,.settings-shell{
    width:calc(100% - 24px)!important;
  }
}
@media(max-width:980px){
  .home-hero{grid-template-columns:minmax(0,1.3fr) minmax(210px,.7fr);padding:24px!important}
  .hero-cloud{width:136px;height:136px}.hero-cloud img{width:118px;height:118px}
  .home-platform-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  .publish-shell .publisher-grid{grid-template-columns:1fr!important}
}
@media(max-width:760px){
  body.app-page{padding-bottom:72px}
  .app-layout{display:block!important}
  .app-main{width:100%!important}

  .site-sidebar{
    position:fixed!important;
    z-index:60!important;
    inset:auto 0 0!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    padding:0!important;
    overflow:visible!important;
    background:color-mix(in srgb,var(--product-surface) 98%,transparent)!important;
    border:0!important;
    border-top:1px solid var(--product-line)!important;
    box-shadow:0 -9px 28px rgba(20,54,88,.09)!important;
    backdrop-filter:blur(16px);
  }
  .site-sidebar>.brand-block,.site-sidebar>.sidebar-collapse-toggle{display:none!important}
  .app-nav-inner{padding:5px 6px 7px!important}
  .app-nav-primary{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:2px!important;
  }
  .app-nav-primary .app-nav-link{
    min-height:56px!important;
    padding:5px 2px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:3px!important;
    border-radius:10px!important;
    font-size:.55rem!important;
  }
  .app-nav-primary .app-nav-link .nav-icon{width:18px!important;height:18px!important}
  .app-nav-desktop-only{display:none!important}

  .site-header{
    position:sticky!important;
    top:0!important;
    width:100%!important;
    margin:0!important;
    border-radius:0!important;
    border-inline:0!important;
    border-top:0!important;
    border-bottom:1px solid var(--product-line)!important;
  }
  .header-inner{min-height:56px!important;padding:6px 9px!important}
  .header-description{display:none!important}
  .header-heading strong{font-size:.9rem!important}
  .header-user{padding:0!important;border:0!important}
  .header-user .username{display:none!important}
  .header-avatar{width:35px!important;height:35px!important}
  .user-actions{min-width:0!important}
  .user-actions form{display:none!important}
  .workspace-switcher-wrap{flex:1;min-width:0!important}
  .workspace-switcher-button{width:100%!important;min-width:0!important}
  .workspace-switcher-copy small{display:none!important}
  .workspace-switcher-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  .dashboard-shell,.downloader-shell,.publish-shell,.transfer-shell,.channels-page-shell,.team-shell,.settings-shell{
    width:calc(100% - 16px)!important;
    margin:12px auto 22px!important;
    gap:10px!important;
  }

  .home-hero{
    min-height:0!important;
    grid-template-columns:1fr!important;
    padding:18px 14px 15px!important;
    gap:14px!important;
  }
  .home-hero-copy{text-align:center;justify-items:stretch}
  .home-hero h1{font-size:1.52rem!important;text-align:center}
  .home-hero-copy>p{font-size:.75rem!important;text-align:center;margin-bottom:6px!important}
  .home-hero-art{display:none!important}
  .home-url-row{grid-template-columns:auto minmax(0,1fr)!important}
  .home-url-row .downloader-resolve-button{
    grid-column:1/-1!important;width:100%!important;min-width:0!important
  }

  .home-task-grid{grid-template-columns:1fr!important;gap:8px!important}
  .home-task-card{min-height:90px!important;padding:12px!important;align-items:center!important}
  .home-task-icon{width:44px!important;height:44px!important}
  .home-task-copy small{min-height:0!important}
  .home-task-link{margin-top:1px!important}

  .home-platform-panel,.home-activity-panel{padding:13px!important}
  .home-section-heading{align-items:flex-start!important}
  .home-section-heading p{display:none}
  .home-section-link{font-size:.62rem!important}
  .home-platform-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}
  .home-platform-grid .platform-logo-link{min-height:62px!important;font-size:.52rem!important}
  .home-platform-grid .platform-logo-link img{width:24px!important;height:24px!important}

  .downloader-workspace,.transfer-workspace{
    grid-template-columns:1fr!important;
    display:grid!important;
    border-radius:15px!important;
  }
  .downloader-workspace[hidden],.transfer-workspace[hidden]{display:none!important}
  .downloader-preview-panel,.downloader-options-panel,.transfer-preview-panel,.transfer-config-panel{
    padding:13px!important;min-width:0!important
  }
  html[dir="rtl"] .downloader-options-panel,html[dir="ltr"] .downloader-options-panel,
  html[dir="rtl"] .transfer-config-panel,html[dir="ltr"] .transfer-config-panel{
    border-inline:0!important;border-top:1px solid var(--product-line)!important;
  }
  .channels-stats,.team-stats{grid-template-columns:1fr!important}
}
@media(max-width:430px){
  .app-nav-primary .app-nav-link{font-size:.5rem!important}
  .home-platform-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .home-section-heading{gap:7px!important}
}


/* Page hierarchy: the global header owns each page title/description. */
.downloads-panel-actions{
  display:flex;
  justify-content:flex-start;
  margin-bottom:10px;
}
.channels-list-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.channels-list-actions .channels-add-button{
  flex:0 0 auto;
  min-height:38px!important;
  padding:7px 12px!important;
}
@media(max-width:760px){
  .downloads-panel-actions .button{width:100%}
  .channels-list-actions{width:100%;justify-content:flex-end}
  .channels-list-actions .channels-list-hint{display:none!important}
}


/* Shared confirmation dialog: replaces browser-native confirm() popups. */
.app-confirm-dialog{
  width:min(440px,calc(100% - 28px));
  max-width:440px;
  padding:0;
  border:0;
  border-radius:20px;
  background:var(--product-surface);
  color:var(--product-ink);
  box-shadow:0 24px 70px rgba(9,35,67,.24);
  overflow:hidden;
}
.app-confirm-dialog::backdrop{
  background:rgba(8,22,38,.5);
  backdrop-filter:blur(4px);
}
.app-confirm-shell{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  gap:14px;
  padding:22px 22px 18px;
}
.app-confirm-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  align-self:start;
  border-radius:15px;
  background:var(--product-blue-soft);
  color:var(--product-brand-deep);
  font-size:1.3rem;
  font-weight:900;
  line-height:1;
}
.app-confirm-dialog.is-danger .app-confirm-icon{
  background:#fff0f1;
  color:#c93f4c;
}
.app-confirm-copy{min-width:0;padding-top:2px}
.app-confirm-copy h2{
  margin:0 0 7px;
  color:var(--product-ink);
  font-size:1rem;
  line-height:1.55;
}
.app-confirm-copy p{
  margin:0;
  color:var(--product-muted);
  font-size:.76rem;
  line-height:1.9;
}
.app-confirm-actions{
  grid-column:1/-1;
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:5px;
  padding-top:15px;
  border-top:1px solid var(--product-line);
}
.app-confirm-actions .button{
  min-width:92px;
  min-height:39px;
  margin:0;
}
.app-confirm-submit{
  border:1px solid color-mix(in srgb,var(--product-brand) 36%,var(--product-line));
  background:var(--product-brand);
  color:#fff;
}
.app-confirm-submit:hover{
  background:var(--product-brand-deep);
  color:#fff;
}
.app-confirm-dialog.is-danger .app-confirm-submit{
  border-color:#d74956;
  background:#d74956;
  color:#fff;
}
.app-confirm-dialog.is-danger .app-confirm-submit:hover{
  border-color:#bd3441;
  background:#bd3441;
}
:root[data-theme="dark"] .app-confirm-dialog{
  background:#0d2437;
  box-shadow:0 28px 80px rgba(0,0,0,.48);
}
:root[data-theme="dark"] .app-confirm-dialog::backdrop{
  background:rgba(1,8,15,.68);
}
:root[data-theme="dark"] .app-confirm-dialog.is-danger .app-confirm-icon{
  background:#3b222a;
  color:#ffadb5;
}
:root[data-theme="dark"] .app-confirm-dialog.is-danger .app-confirm-submit{
  border-color:#b94b58;
  background:#a93d4a;
}
:root[data-theme="dark"] .app-confirm-dialog.is-danger .app-confirm-submit:hover{
  border-color:#d25c69;
  background:#bd4855;
}
@media(max-width:520px){
  .app-confirm-shell{
    grid-template-columns:42px minmax(0,1fr);
    gap:11px;
    padding:18px 16px 15px;
  }
  .app-confirm-icon{width:42px;height:42px;border-radius:13px}
  .app-confirm-actions{display:grid;grid-template-columns:1fr 1fr}
  .app-confirm-actions .button{width:100%;min-width:0}
}
