/* Original two-column dashboard, refined in blue with solid floating cards. */
:root {
  --ink: #1d2940;
  --muted: #6d7890;
  --line: #dbe5f6;
  --purple: #3169ed;
  --blue: #2975f4;
  --lavender: #f1f6ff;
  --shadow: 0 14px 35px rgb(20 37 69 / 16%);
}

body { color: var(--ink); }
:focus-visible { outline: 2px solid #2264dd; outline-offset: 2px; }

.dashboard-page {
  background:
    radial-gradient(circle at 7% 8%, #b9dcff 0, transparent 29%),
    radial-gradient(circle at 86% 82%, #a9caff 0, transparent 32%),
    linear-gradient(140deg, #438df5 0%, #4d79e8 46%, #285ad8 100%);
}
.dashboard-page > .topbar { box-shadow: 0 -9px 30px rgb(16 36 88 / 9%); }
.dashboard-page > main {
  background: rgb(245 249 255 / 93%);
  box-shadow: 0 27px 60px rgb(12 32 78 / 26%);
  padding: 23px;
}
.dashboard-page .app-shell { gap: 22px; }
.dashboard-page .workspace-panel {
  background: #fff;
  border: 1px solid #e6edfa;
  border-radius: 19px;
  box-shadow: 5px 7px 0 rgb(103 117 140 / 18%), 0 16px 34px rgb(48 70 105 / 10%);
}
.dashboard-page .create-panel, .dashboard-page .listings-panel { padding: 30px; }
.dashboard-page .panel-heading h1, .dashboard-page .listings-heading h2 {
  color: #1a2c4c;
  font-size: 29px;
  letter-spacing: -.045em;
}
.dashboard-page .panel-heading p, .dashboard-page .listings-heading p {
  color: #687997;
  font-size: 13px;
  margin-top: 8px;
}
.dashboard-page > .topbar .account-avatar {
  background: #326df0;
  box-shadow: 0 4px 10px rgb(18 59 156 / 20%);
}
.dashboard-page .title-with-count > span { background: #e8f0ff; color: #245dca; }
.dashboard-page .view-switch { background: #edf3fc; }
.dashboard-page .view-switch button.active { background: #2869e8; box-shadow: 0 4px 10px rgb(26 80 178 / 23%); }

/* Upload surfaces retain the original four-slot layout. */
.dashboard-page .product-grid { gap: 16px; margin-top: 24px; }
.dashboard-page .product-tile {
  background: #fff;
  border: 1px solid #dce7f7;
  border-radius: 15px;
  box-shadow: 3px 4px 0 rgb(103 117 140 / 15%);
}
.dashboard-page .product-tile.dragging { border-color: #3675ed; box-shadow: 4px 5px 0 rgb(18 57 135 / 26%); }
.dashboard-page .drop-zone {
  background: #fff;
  border-color: #a6c2f8;
  border-radius: 14px;
}
.dashboard-page .drop-zone:hover { background: #f3f8ff; border-color: #2770eb; }
.dashboard-page .upload-orb { background: #eaf1ff; color: #2767dc; }
.dashboard-page .upload-orb b { background: #2867e7; border-color: #eaf1ff; }
.dashboard-page .drop-zone strong { color: #1e2d47; }
.dashboard-page .drop-zone small { color: #7283a1; }
.dashboard-page .product-preview { background: #f2f5f9; }
.dashboard-page .photo-thumbnails button { background: #fff; border-color: #dbe6f6; }
.file-icon { background: #e9f1ff; color: #2c6bdd; }
.more-photos, .more-camera { color: #2c6bdd; border-color: #dce7f7; }
.dashboard-page .add-products-button {
  background: #edf4ff;
  color: #263b5c;
  border: 1px solid #e2ebfa;
  box-shadow: 2px 3px 0 rgb(21 34 55 / 11%);
}
.dashboard-page .add-products-button span { color: #286ce7; }
.dashboard-page .add-products-button:hover { background: #e5efff; }
.dashboard-page .generate-button, .confirm-count, .copy-listing, .primary-button {
  background: linear-gradient(100deg, #187bf7, #265fe3);
  box-shadow: 3px 4px 0 rgb(20 37 69 / 26%), 0 8px 20px rgb(34 91 205 / 20%);
}
.dashboard-page .generate-button:hover:not(:disabled) { box-shadow: 4px 6px 0 rgb(20 37 69 / 30%), 0 12px 23px rgb(34 91 205 / 20%); }
.dashboard-page .generate-button:disabled { box-shadow: none; }

/* Finished listings: hard white, readable, visibly lifted off the page. */
.dashboard-page .listing-tools { margin: 23px 0 18px; }
.dashboard-page .search-box, .dashboard-page .listing-tools select { border-color: #dbe6f6; }
.dashboard-page .listings-grid { gap: 16px; }
.dashboard-page .listing-card {
  background: #fff;
  border: 1px solid #e0e8f4;
  border-radius: 15px;
  padding: 9px;
  box-shadow: 3px 4px 0 rgb(103 117 140 / 27%), 0 10px 20px rgb(48 70 105 / 8%);
}
.dashboard-page .listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 6px 0 rgb(103 117 140 / 31%), 0 14px 24px rgb(48 70 105 / 12%);
}
.dashboard-page .listing-image, .dashboard-page .listing-image img { border-radius: 10px; }
.dashboard-page .listing-summary { padding: 12px 6px 6px; }
.dashboard-page .listing-summary h3 { color: #1d2d47; font-size: 13px; height: auto; min-height: 36px; -webkit-line-clamp: 2; }
.dashboard-page .listing-category { color: #71809a; }
.dashboard-page .status-pill { background: #e0f6eb; color: #126744; }
.dashboard-page .status-pill i { background: #27a772; }
.empty-listings > span { color: #286ce7; background: #e9f1ff; }

/* Keep the live progress treatment; shift its light and motion to blue. */
.dashboard-page .pending-card { border-color: #c8dafa; animation: none; }
.dashboard-page .pending-image {
  background: radial-gradient(circle at 25% 20%, #f6faff, transparent 42%), linear-gradient(135deg, #eaf3ff, #d9e9ff);
  animation: none;
}
.processing-grid { background-image: linear-gradient(rgb(46 98 190 / 14%) 1px, transparent 1px), linear-gradient(90deg, rgb(46 98 190 / 14%) 1px, transparent 1px); }
.processing-scan { background: linear-gradient(90deg, transparent, #328df1, #2862df, transparent); box-shadow: 0 0 9px rgb(40 98 223 / 38%); }
.loader-ring { border-top-color: #2267e6; border-right-color: #70a4f6; }
.loader-ring::after { border-color: rgb(64 116 212 / 30%); }
.ai-loader b, .dashboard-page .pending-percent, .pending-kicker { color: #2c61d3; }
.dashboard-page .pending-card .card-progress { background: #e6eeff; }
.dashboard-page .pending-card .card-progress span { background: linear-gradient(90deg, #47a0fb, #2365e8); }
.pending-dots i { background: #286ce7; }
.dashboard-page .pending-card.failed .card-progress span { background: var(--danger); }

/* Details and sign-in use the same restrained blue. */
.source-photos button:first-child, .source-photos button.active, .source-photos button.original-source.active { border-color: #2869e8; }
.detail-kicker { color: #2869e8; }
.detail-identity > div { background: #f1f6ff; }
.detail-keywords span { background: #eaf2ff; color: #536e9c; }
.count-dialog-icon { background: #eaf1ff; color: #2869e8; }
.count-dialog-icon b { color: #2869e8; }
.count-options button.active { background: #2869e8; border-color: #2869e8; box-shadow: 0 5px 11px rgb(30 88 198 / 24%); }
.auth-story { background: linear-gradient(150deg, #153a86, #2476ed); }
.auth-form input:focus { border-color: #2869e8; box-shadow: 0 0 0 3px #e8f0ff; }
.auth-switch a { color: #2869e8; }

/* Full-width workspace, without the browser-window frame. */
@media (min-width: 761px) {
  .dashboard-page { width: 100%; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; }
  .dashboard-page > .topbar, .dashboard-page > main { width: 100%; max-width: none; margin: 0; }
  .dashboard-page > .topbar { height: 72px; padding: 0 32px; border-radius: 0; box-shadow: 0 2px 12px rgb(33 59 107 / 10%); }
  .dashboard-page > .topbar::before { display: none; }
  .dashboard-page > main { height: calc(100dvh - 72px); padding: 22px 28px; border-radius: 0; box-shadow: none; overflow: hidden; }
  .dashboard-page .app-shell { width: 100%; height: 100%; min-height: 0; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }
}

/* The photo stays in place while product information scrolls. */
.listing-dialog[open] {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
}
.listing-dialog .dialog-close {
  position: absolute;
  z-index: 5;
  top: 14px;
  right: 18px;
  float: none;
  background: #203a63;
}
.listing-dialog .dialog-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 30px; }
.listing-dialog .detail-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  gap: 30px;
}
.listing-dialog .detail-gallery { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.listing-dialog .detail-hero {
  width: 100%;
  height: 0;
  min-height: 0;
  flex: 1 1 auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: #f1f5fa;
}
.listing-dialog .source-photos { flex: 0 0 auto; max-height: 72px; margin-top: 10px; }
.listing-dialog .detail-content { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px 0; scrollbar-width: thin; scrollbar-color: #b5c5df transparent; }
.listing-dialog.is-landscape .detail-layout { grid-template-columns: 1fr; grid-template-rows: minmax(160px, 42%) minmax(0, 1fr); gap: 18px; }
.listing-dialog.is-landscape .detail-gallery { height: 100%; }
.listing-dialog.is-landscape .detail-hero { border-radius: 10px; }
.listing-publish-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 30px;
  border-top: 1px solid #e3eaf3;
  background: #fff;
  box-shadow: 0 -8px 20px rgb(31 51 83 / 5%);
}
.listing-publish-bar > span { flex: 0 0 auto; min-width: 108px; color: #233656; font-size: 12px; font-weight: 800; }
.publish-buttons { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.publish-buttons button { min-height: 43px; padding: 8px 12px; border: 1px solid #cad8ed; border-radius: 9px; background: #f5f8fd; color: #31547e; font-size: 11px; font-weight: 750; cursor: pointer; }
.publish-buttons button:hover { border-color: #719bea; background: #eaf2ff; }
.publish-buttons button:focus-visible { outline: 2px solid #2869e8; }

@media (min-width: 761px) {
  .dashboard-page .create-panel { display: flex; flex-direction: column; }
  .dashboard-page .panel-heading, .dashboard-page .add-products-button, .dashboard-page .generate-button { flex: 0 0 auto; }
  .dashboard-page .product-grid { flex: 1; min-height: 0; overflow-y: auto; align-content: start; grid-auto-rows: minmax(165px, calc((100% - 16px) / 2)); scrollbar-width: thin; scrollbar-color: #b5c8eb transparent; }
  .dashboard-page .product-tile { height: 100%; min-height: 165px; }
  .dashboard-page .product-preview { height: calc(100% - 100px); }
}
@media (max-width: 760px) {
  .dashboard-page { background: linear-gradient(145deg, #5896f4, #2c63dc); padding: 0; }
  .dashboard-page > .topbar { background: #fff; }
  .dashboard-page > main { height: auto; padding: 14px; background: transparent; border-radius: 0; box-shadow: none; }
  .dashboard-page .workspace-panel { border-radius: 17px; box-shadow: 4px 6px 0 rgb(103 117 140 / 22%), 0 14px 25px rgb(48 70 105 / 12%); }
  .dashboard-page .create-panel, .dashboard-page .listings-panel { padding: 24px 18px; }
  .dashboard-page .listings-panel { margin-top: 18px; border: 1px solid #e6edfa; }
  .dashboard-page .product-tile { height: 310px; }
  .dashboard-page .product-preview { height: 201px; }
  .camera-button { background: #2869e8; }
  .folder-button { border-color: #dbe6f6; color: #315179; }
  .dashboard-page .listing-image, .dashboard-page .pending-image { height: 190px; }
  .listing-dialog[open] { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .listing-dialog .dialog-body { padding: 18px 16px; }
  .listing-dialog .dialog-close { top: 10px; right: 12px; }
  .listing-dialog .detail-layout, .listing-dialog.is-landscape .detail-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(150px, 35%) minmax(0, 1fr); gap: 14px; }
  .listing-dialog .detail-content { padding-right: 4px; }
  .listing-publish-bar { display: block; padding: 10px 14px 14px; }
  .listing-publish-bar > span { display: block; margin-bottom: 8px; }
  .publish-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .publish-buttons button { min-height: 39px; font-size: 10px; padding: 5px; }
}

/* Dashboard reference: inset blue canvas, compact floating workspace. */
.dashboard-page {
  background:
    radial-gradient(ellipse 22% 30% at -6% 43%, #e0edff 0 70%, transparent 71%),
    radial-gradient(ellipse 23% 35% at 105% 70%, #e2edff 0 72%, transparent 73%),
    radial-gradient(ellipse 22% 20% at 100% -4%, #e4eeff 0 72%, transparent 73%),
    #f2f7ff;
}
.dashboard-page .workspace-panel {
  border: 1px solid #e3ebfa;
  border-radius: 19px;
  box-shadow: 4px 6px 0 rgb(81 106 147 / 14%), 0 12px 26px rgb(57 91 144 / 8%);
}
.dashboard-page .panel-heading,
.dashboard-page .listings-heading { display: flex; align-items: center; gap: 15px; }
.dashboard-page .listings-heading > div:not(.view-switch) { flex: 1; min-width: 0; }
.dashboard-page .panel-icon {
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #edf4ff;
  color: #1766e9;
  box-shadow: 0 5px 12px rgb(34 91 175 / 8%);
}
.dashboard-page .panel-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-page .panel-icon { transform: translateY(-7px); }
.dashboard-page .panel-heading h1,
.dashboard-page .listings-heading h2 { font-size: 21px; letter-spacing: -.04em; }
.dashboard-page .panel-heading p,
.dashboard-page .listings-heading p { margin-top: 4px; font-size: 11px; }
.dashboard-page .product-grid { gap: 10px; margin-top: 17px; }
.dashboard-page .product-tile { border: 0; box-shadow: none; }
.dashboard-page .drop-zone { border: 1px dashed #a9c8ff; }
.dashboard-page .upload-orb { width: 55px; height: 55px; margin-bottom: 10px; }
.dashboard-page .upload-orb svg { width: 24px; height: 24px; }
.dashboard-page .drop-zone strong { font-size: 12px; }
.dashboard-page .drop-zone small { font-size: 10px; margin-top: 4px; }
.photo-count-setting { flex: 0 0 54px; min-height: 54px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 9px; margin-top: 10px; padding: 4px; border: 1px solid #e9f0fc; border-radius: 11px; background: #fff; }
.photo-count-setting.enabled { flex-basis: 91px; }
.photo-count-icon { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #edf4ff; color: #396bad; }
.photo-count-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.photo-count-label { display: block; flex: 1; min-width: 0; }
.photo-count-label strong,
.photo-count-label small { display: block; white-space: nowrap; }
.photo-count-label strong { color: #233453; font-size: 10px; font-weight: 800; }
.photo-count-label small { margin-top: 3px; color: #71819f; font-size: 9px; }
.photo-generation-toggle { flex: 0 0 48px; width: 48px; height: 28px; margin-right: 4px; padding: 3px; border: 0; border-radius: 999px; background: #cbd8eb; box-shadow: inset 0 1px 3px rgb(49 71 112 / 15%); cursor: pointer; transition: background .2s; }
.photo-generation-toggle span { display: block; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgb(31 54 100 / 22%); transition: transform .2s; }
.photo-generation-toggle[aria-checked="true"] { background: #266be9; }
.photo-generation-toggle[aria-checked="true"] span { transform: translateX(20px); }
.photo-generation-toggle:disabled { opacity: .48; cursor: not-allowed; }
.photo-count-options { flex: 0 0 100%; display: flex; gap: 5px; padding: 0 4px 2px 43px; }
.photo-count-options button { width: 40px; height: 34px; padding: 0; border: 1px solid #dce8fa; border-radius: 6px; background: #fff; color: #233453; font-size: 10px; font-weight: 800; cursor: pointer; }
.photo-count-options button.active { border-color: #256aef; color: #1b58c6; background: #f6f9ff; box-shadow: 0 2px 6px rgb(30 100 230 / 12%); }
.photo-count-options button:focus-visible { outline: 2px solid #256aef; outline-offset: 1px; }
.dashboard-page .add-products-button { height: 42px; margin-top: 8px; border-radius: 10px; background: #edf4ff; box-shadow: 0 2px 0 rgb(84 111 150 / 10%); font-size: 11px; }
.dashboard-page .generate-button { height: 44px; margin-top: 8px; border-radius: 10px; background: linear-gradient(100deg, #2e7af3, #2168e8); box-shadow: 0 5px 13px rgb(32 96 206 / 17%); font-size: 12px; }
.dashboard-page .generate-button:disabled { opacity: 1; background: linear-gradient(100deg, #9bc1ff, #b2c8f7); color: white; }
.dashboard-page .generate-icon { font-size: 18px; }
.dashboard-page .generate-arrow { right: 16px; font-size: 18px; }
.dashboard-page .view-switch { height: 36px; padding: 3px; border-radius: 9px; }
.dashboard-page .view-switch button { width: 34px; }
.dashboard-page .listing-tools { grid-template-columns: 1fr 126px; gap: 10px; margin: 11px 0 11px; }
.dashboard-page .search-box,
.dashboard-page .listing-tools select { height: 35px; }
.dashboard-page .listings-grid { gap: 9px; }
.dashboard-page .listing-card { padding: 7px; border-radius: 14px; box-shadow: 0 5px 13px rgb(60 92 141 / 9%); }
.dashboard-page .listing-image,
.dashboard-page .pending-image { height: clamp(118px, 17.2vh, 176px); }
.dashboard-page .listing-image { position: relative; }
.dashboard-page .listing-more { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; background: #fff; border-radius: 9px; box-shadow: 0 3px 10px rgb(40 63 103 / 13%); color: #183357; font-size: 11px; letter-spacing: 1px; }
.dashboard-page .listing-summary { padding: 10px 4px 1px; }
.dashboard-page .listing-title-row > span { display: none; }
.dashboard-page .listing-summary h3 { font-size: 11px; min-height: 0; height: 28px; -webkit-line-clamp: 2; }
.dashboard-page .listing-category { margin: 2px 0 5px; font-size: 9px; }
.dashboard-page .listing-summary > div:last-child { padding-top: 6px; }
.dashboard-page .status-pill { height: 21px; font-size: 8px; }

@media (min-width: 761px) {
  .dashboard-page { width: 100%; height: 100dvh; min-height: 0; padding: 8px 2.5vw 18px; overflow: hidden; }
  .dashboard-page > .topbar,
  .dashboard-page > main { width: 100%; max-width: none; margin: 0; }
  .dashboard-page > .topbar { height: 48px; padding: 0 23px; border: 1px solid #eaf0fc; border-radius: 15px; background: radial-gradient(ellipse 35% 180% at 100% 0%, #f1f7ff 0 68%, transparent 69%), #fff; box-shadow: 0 5px 18px rgb(75 111 167 / 7%); }
  .dashboard-page > .topbar .brand { width: 164px; }
  .dashboard-page > .topbar .account-avatar { width: 34px; height: 34px; }
  .dashboard-page > main { height: calc(100dvh - 91px); margin-top: 17px; padding: 0; background: transparent; box-shadow: none; overflow: hidden; }
  .dashboard-page .app-shell { width: 100%; height: 100%; min-height: 0; grid-template-columns: minmax(0, 48.5fr) minmax(0, 51.5fr); gap: 11px; }
  .dashboard-page .create-panel { padding: 18px 21px 21px; }
  .dashboard-page .listings-panel { padding: 16px; }
  .dashboard-page .product-grid { grid-auto-rows: minmax(130px, calc((100% - 10px) / 2)); gap: 10px; }
  .dashboard-page .product-tile { min-height: 130px; }
  .dashboard-page .listings-grid { margin-right: -4px; padding-right: 0; scrollbar-color: #c5cde0 transparent; }
}
@media (max-width: 760px) {
  .dashboard-page { background: #f2f7ff; }
  .dashboard-page > .topbar { border-radius: 0; }
  .dashboard-page > main { background: transparent; padding: 12px; }
  .dashboard-page .workspace-panel { border-radius: 17px; box-shadow: 3px 5px 0 rgb(81 106 147 / 13%), 0 10px 20px rgb(57 91 144 / 7%); }
  .dashboard-page .listings-panel { margin-top: 14px; border: 1px solid #e3ebfa; }
  .dashboard-page .create-panel,
  .dashboard-page .listings-panel { padding: 18px; }
  .dashboard-page .panel-heading h1,
  .dashboard-page .listings-heading h2 { font-size: 20px; }
  .dashboard-page .panel-heading p,
  .dashboard-page .listings-heading p { font-size: 10px; }
  .dashboard-page .product-tile { height: 260px; }
  .photo-count-setting { min-height: 54px; height: auto; }
  .photo-count-options { width: 100%; justify-content: space-between; padding-left: 0; }
  .photo-count-options button { flex: 1; }
  .dashboard-page .listing-image,
  .dashboard-page .pending-image { height: 180px; }
}
