/* Desktop shell and product workspace. Mobile keeps its existing navigation. */
.desktop-nav-products,
.desktop-add-label,
.desktop-upgrade,
.queue-status-filter { display: none; }

.queue-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 16px;
  background: #F1EEFF;
  color: #6346F5;
}
.queue-empty-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 24px;
  padding: 0 16px;
  border: 1px solid #6346F5;
  border-radius: 8px;
  background: #6346F5;
  color: #fff;
  font: 500 14px/1.4 var(--font-family);
  cursor: pointer;
  transition: background 200ms ease;
}
.queue-empty-add > span { font-size: 22px; font-weight: 400; }
.queue-empty-add:hover { background: #5438DE; }
.queue-empty-add:disabled { opacity: .55; cursor: wait; }
.queue-empty-add:focus-visible { outline: 2px solid #6346F5; outline-offset: 4px; }

@media (min-width: 1024px) {
  :root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg: #FAFAFF;
    --text: #14182D;
    --hint: #858BA3;
    --border: #E9EAF3;
    --primary: #6346F5;
    --primary-soft: #F1EEFF;
  }
  body { background: var(--bg); }
  .mobile-install-guide[data-desktop] .mobile-install-guide-card { border-radius: 12px; box-shadow: none; }
  .mobile-install-guide[data-desktop] #install-guide-now { width: 100%; min-height: 40px; margin-top: 16px; font-size: 14px; box-shadow: none; }
  #bottom-bar-main {
    width: 240px;
    max-width: 240px;
    padding: 0 16px 24px;
    border-right: 1px solid var(--border);
    background: #fff;
    overflow-y: auto;
  }
  #bottom-bar-main .desktop-sidebar-brand {
    flex: 0 0 72px;
    min-height: 72px;
    gap: 8px;
    padding: 0 8px;
    font-size: 21px;
    font-weight: 700;
  }
  #bottom-bar-main .desktop-sidebar-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: none;
  }
  #bottom-bar-main .tab-nav { gap: 8px; margin: 32px 0 24px; }
  #bottom-bar-main .nav-tab {
    height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    color: var(--hint);
    transition: color 200ms ease, background 200ms ease;
  }
  #bottom-bar-main .nav-tab:hover { background: #F7F7FC; color: var(--text); }
  #bottom-bar-main .nav-tab.active { padding: 0 16px; background: #F1EEFF; color: #6346F5; }
  #bottom-bar-main .nav-tab:active { transform: none; }
  #bottom-bar-main .nav-tab-icon-wrap,
  #bottom-bar-main .nav-tab-icon { width: 19px; height: 19px; }
  #bottom-bar-main .nav-tab .nav-tab-label {
    margin-left: 16px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
  }
  .mobile-nav-home { display: none; }
  .desktop-nav-products { display: inline; }
  #bottom-bar-main .nav-tab-badge { font-size: 9px; box-shadow: none; }
  #bottom-bar-main .desktop-upgrade {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 64px;
    margin-top: auto;
    padding: 16px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #FAF9FF;
    color: var(--primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 200ms ease;
  }
  .desktop-upgrade > svg { flex-shrink: 0; }
  .desktop-upgrade > span:nth-child(2) { display: grid; flex: 1; gap: 4px; }
  .desktop-upgrade strong { font-size: 13px; font-weight: 600; }
  .desktop-upgrade small { font-size: 11px; color: var(--hint); }
  #bottom-bar-main .desktop-upgrade:hover { background: #F1EEFF; }
  #bottom-bar-main .desktop-install-badge {
    min-height: 40px;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hint);
    box-shadow: none;
  }
  #bottom-bar-main .desktop-install-badge:hover { background: #F7F7FC; transform: none; box-shadow: none; }
  .desktop-install-icon { width: 24px; height: 24px; background: none; color: inherit; box-shadow: none; }
  .desktop-install-copy strong { font-weight: 500; }
  .desktop-install-copy small { display: none; }

  #app-top-header {
    display: flex;
    left: 240px;
    width: calc(100% - 240px);
    max-width: none;
    height: 72px;
    margin: 0;
    padding: 0 40px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #app-top-header .app-top-actions {
    justify-content: flex-end;
    gap: 16px;
    width: auto;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
  }
  #credits-floating-pill {
    flex: none;
    min-height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hint);
    font-size: 12px;
    font-weight: 500;
  }
  #app-top-notifications,
  #app-top-avatar { width: 32px; height: 32px; flex-basis: 32px; box-shadow: none; color: var(--hint); }
  #app-top-avatar { background: #F1EEFF; color: var(--primary); font-size: 12px; }
  #app-top-notifications:hover { background: #F7F7FC; }
  #notifications-panel {
    top: calc(100% + 20px);
    right: 0;
    bottom: auto;
    left: auto;
    width: 352px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: none;
  }
  .screen,
  :is(#screen-queue, #screen-generated, #screen-published, #screen-profile, #screen-channels, #screen-scene, #screen-details, #screen-text) {
    width: calc(100% - 240px);
    max-width: none;
    margin: 72px 0 0 240px;
    padding: 32px 40px;
  }
  .screen.active,
  :is(#screen-queue, #screen-generated, #screen-published, #screen-profile, #screen-channels, #screen-scene, #screen-details, #screen-text).active {
    height: calc(100dvh - 72px);
    border: 0;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
  }
  #screen-queue.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px) auto;
    grid-template-rows: auto auto auto auto 1fr;
    align-content: start;
    column-gap: 16px;
  }
  #screen-queue::before {
    content: '';
    grid-column: 1 / -1;
    grid-row: 3;
    height: 1px;
    margin-top: -1px;
    background: var(--border);
    pointer-events: none;
  }
  #screen-queue > .q-header,
  #screen-queue > .sel-bar,
  #screen-queue > .queue-skeleton,
  #screen-queue > .cards-wrap,
  #screen-queue > .empty-state { grid-column: 1 / -1; min-width: 0; }
  #screen-queue .q-header {
    grid-row: 1;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 32px;
    padding: 0;
    background: transparent;
  }
  #screen-queue .q-heading { width: auto; min-width: 0; text-align: left; }
  #screen-queue .queue-heading-icon { display: none; }
  #screen-queue .q-header .q-title { font-size: 30px; font-weight: 600; line-height: 1.2; letter-spacing: -.9px; }
  #screen-queue .q-header .q-subtitle { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--hint); }
  #screen-queue .nav-add-product-slot { flex: 0 0 auto; width: auto; }
  #screen-queue #add-product-btn {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    transform: none;
    transition: background 200ms ease;
  }
  #screen-queue #add-product-btn:hover { background: #5438DE; }
  #screen-queue #add-product-btn::before { content: '+'; font-size: 22px; font-weight: 400; }
  #screen-queue #add-product-btn .add-product-icon,
  #screen-queue #add-product-btn .add-product-label { display: none; }
  #screen-queue #add-product-btn .desktop-add-label { display: inline; }
  #screen-queue #add-product-btn.is-loading::before,
  #screen-queue #add-product-btn.is-loading .desktop-add-label { display: none; }
  #screen-queue #add-product-btn.is-loading .add-product-label { display: inline; }

  #screen-queue .tab-area {
    grid-column: 1;
    grid-row: 2;
    align-self: stretch;
    min-width: 0;
    margin: 0;
    padding: 0;
  }
  #screen-queue .tabs-scroll { height: 56px; gap: 24px; padding: 0; }
  #screen-queue .tab-pill {
    height: 56px;
    gap: 8px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--hint);
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    transition: color 200ms ease, border-color 200ms ease;
  }
  #screen-queue .tab-pill:hover:not(.active) { background: transparent; color: var(--text); }
  #screen-queue .tab-pill.active { border-color: var(--primary); background: transparent; color: var(--primary); box-shadow: none; }
  #screen-queue .tab-icon,
  #screen-queue .tab-dot { display: none; }
  #screen-queue .tab-badge,
  #screen-queue .tab-pill:not(.active) .tab-badge { min-width: 0; padding: 0; background: none; color: inherit; font-size: 12px; font-weight: 400; }
  #screen-queue .sticky-zone {
    grid-column: 2;
    grid-row: 2;
    position: static !important;
    display: block;
    align-self: start;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #screen-queue .search-wrap { min-width: 0; height: 40px; margin: 0; padding: 0; }
  #screen-queue .search-input {
    width: calc(100% - 48px);
    height: 40px;
    padding: 0 32px 0 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--text);
    font-size: 13px;
    transition: border-color 200ms ease;
  }
  #screen-queue .search-input::placeholder { color: var(--hint); }
  #screen-queue .search-input:focus { border-color: var(--primary); box-shadow: none; }
  #screen-queue .search-icon { left: 12px; width: 18px; height: 18px; color: var(--hint); }
  #screen-queue .search-icon svg { width: 18px; height: 18px; }
  #screen-queue .search-clear { right: 52px; width: 24px; height: 24px; }
  .queue-status-filter {
    position: absolute;
    inset: 0 0 auto auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--hint);
  }
  .queue-status-filter svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; pointer-events: none; }
  .queue-status-filter select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .queue-status-filter.has-filter { background: var(--primary-soft); color: var(--primary); border-color: #DAD2FF; }
  .queue-status-filter:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
  #screen-queue .product-toolbar {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    justify-content: flex-end;
    gap: 16px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
  }
  #screen-queue .product-count { max-width: 120px; color: var(--hint); font-size: 13px; font-weight: 400; }
  #screen-queue .select-toggle-new {
    min-height: 32px;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
  }
  #screen-queue .select-toggle-new[aria-pressed='true'] { background: var(--primary-soft); color: var(--primary); border-color: #DAD2FF; }
  #screen-queue .select-toggle-new svg { width: 16px; height: 16px; }
  #screen-queue .sel-bar { grid-row: 4; margin: 0; padding: 8px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  #screen-queue #queue-empty,
  #screen-queue #no-results {
    grid-row: 5;
    align-self: center;
    width: 100%;
    margin: 0;
    padding: 48px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  #screen-queue .es-title { margin: 0; color: var(--text); font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.4px; }
  #screen-queue .es-sub { max-width: 360px; margin: 8px auto 0; color: var(--hint); font-size: 14px; line-height: 1.6; }
  #cards-container.cards-wrap[style*='display: block'] { gap: 16px; padding: 16px 0 32px; align-content: start; }
  #cards-container .product-card { margin: 0; border-color: var(--border); border-radius: 12px; background: #fff; box-shadow: none; }
  #cards-container .product-card:hover { border-color: #DAD2FF; transform: none; box-shadow: none; }
  #cards-container .product-card.selected { border-color: var(--primary); background: #F8F6FF; }
  #cards-container .card-title { font-size: 15px; font-weight: 600; }
  #cards-container .card-price { font-size: 18px; font-weight: 600; }
  #cards-container .card-inner { border-radius: 12px; }
  #cards-container .card-thumb { border-radius: 8px; }
  #cards-container .card-action-btn:not(.action-regenerate),
  #cards-container .action-regenerate { border-radius: 8px; font-weight: 500; }
  .bottom-bar-multi { left: 240px; bottom: 24px; max-width: 600px; transition: transform 200ms ease, opacity 200ms ease; }
  .multi-bar-inner { padding: 8px; gap: 8px; border-color: var(--border); border-radius: 12px; background: #fff; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .multi-bar-btn { border-radius: 8px; font-weight: 500; }
  body:has(#bottom-bar-multi.visible) #screen-queue { padding-bottom: 104px; }
  #screen-queue :is(button, input):focus-visible,
  #bottom-bar-main :is(button, a):focus-visible,
  #app-top-header button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  #screen-queue.active { grid-template-columns: minmax(0, 1fr) 200px auto; column-gap: 12px; }
  #screen-queue .product-toolbar { gap: 8px; }
  #screen-queue .product-count { max-width: 88px; font-size: 12px; }
  #screen-queue .tabs-scroll { gap: 16px; }
  #screen-queue .tab-pill { font-size: 13px; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .queue-empty-add { transition: none; }
  #screen-queue *, #bottom-bar-main *, #app-top-header * { transition-duration: 0ms !important; }
}
