/* =========================================================
   ScanWin — Advertiser · Our Uploads (Asset Management Hub)
   ========================================================= */

:root {
  --sw-up-violet: #6d5ef7;
  --sw-up-border: #ece9e0;
  --sw-up-ink: #0f1020;
  --sw-up-grey: #6b7280;
  --sw-up-grey-2: #9ca3af;
}

.sw-app__content {
  min-width: 0;
  overflow-x: clip;
}
.sw-app__content .row {
  min-width: 0;
}

/* ----- Shared card ----- */
.sw-up-card {
  background: #fff;
  border: 1px solid #e5e8ed;
  border-radius: 16px;
  padding: 22px 24px;
}
.sw-up-card + .sw-up-card,
.sw-up-card,
.sw-up-row {
  margin-bottom: 24px;
}
.sw-up-row {
  margin-left: 0;
  margin-right: 0;
}

.sw-up-card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--sw-up-ink);
  margin: 0;
}
.sw-up-card__sub {
  font-size: 13px;
  color: var(--sw-up-grey);
  margin: 4px 0 0;
}

/* ----- Buttons ----- */
.sw-up-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.sw-up-btn svg {
  flex-shrink: 0;
}
.sw-up-btn--primary {
  background: var(--sw-up-violet);
  color: #fff;
}
.sw-up-btn--primary:hover {
  background: #5d4ee6;
}
.sw-up-btn--ghost {
  background: #fff;
  border-color: #e5e7eb;
  color: var(--sw-up-ink);
}
.sw-up-btn--ghost:hover {
  background: #f7f7fa;
}

/* =========================
  1. Page head
========================= */
.sw-up-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.sw-up-head__title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sw-up-ink);
  margin: 0;
}
.sw-up-head__sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--sw-up-grey);
  margin: 6px 0 0;
  max-width: 560px;
}
.sw-up-head__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* =========================
  2. Get your data in
========================= */
.sw-up-getdata__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sw-up-getdata__head-l {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sw-up-getdata__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--sw-up-ink);
}
.sw-up-info {
  display: inline-flex;
  color: var(--sw-up-grey-2);
}
.sw-up-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ece9fe;
  color: var(--sw-up-violet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.sw-up-getdata__sub {
  font-size: 13px;
  color: var(--sw-up-grey);
  margin: 4px 0px 0px 0px;
  max-width: 640px;
}
.sw-up-getdata__bold {
  font-size: 14px;
  font-weight: 700;
  color: var(--sw-up-ink);
  margin: 0 0 12px;
}

/* Progress bar with go-live marker */
.sw-up-progress {
  margin-bottom: 16px;
}
.sw-up-progress__track {
  position: relative;
  height: 10px;
  background: #eceaf3;
  border-radius: 999px;
}
.sw-up-progress__fill {
  height: 100%;
  background: #16a34a;
  border-radius: 999px;
}
.sw-up-progress__marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 18px;
  background: #111827;
  border-radius: 2px;
  transform: translateX(-50%);
}
.sw-up-progress__marker-pill {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.sw-up-progress__cap {
  font-size: 12px;
  color: var(--sw-up-grey);
  margin: 0 0 24px;
}

/* Task cards */
.sw-up-task {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 14px;
  border: 1px solid #ece9e0;
  border-radius: 12px;
  background: #fff;
}
.sw-up-task--done {
  background: #dbf5e5;
  border-color: #b2e0c7;
}
.sw-up-task__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.sw-up-task__icon--green {
  background: #21ab57;
  color: #ffffff;
}
.sw-up-task__icon--violet {
  background: #735cf5;
  color: #ffffff;
}
.sw-up-task__icon--teal {
  background: #0d998c;
  color: #ffffff;
}
.sw-up-task__icon--amber {
  background: #f2991f;
  color: #ffffff;
}
.sw-up-task__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.sw-up-task__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sw-up-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-up-task__status {
  font-size: 12px;
  color: var(--sw-up-grey-2);
}
.sw-up-task--done .sw-up-task__status {
  color: #16a34a;
}
.sw-up-task__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-up-grey-2);
  flex-shrink: 0;
}
.sw-up-task__check {
  color: #16a34a;
  flex-shrink: 0;
  display: inline-flex;
}

/* =========================
  3. Stat cards
========================= */
.sw-up-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 20px;
  height: 100%;
}
.sw-up-stat__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.sw-up-stat__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.sw-up-stat__icon--violet {
  background: #ece9fe;
  color: var(--sw-up-violet);
}
.sw-up-stat__icon--amber {
  background: #fef3c7;
  color: #d97706;
}
.sw-up-stat__icon--green {
  background: #d1fae5;
  color: #16a34a;
}
.sw-up-stat__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--sw-up-grey);
}
.sw-up-stat__value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--sw-up-ink);
  margin: 0 0 4px;
}
.sw-up-stat__value-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--sw-up-grey-2);
}
.sw-up-stat__cap {
  font-size: 12px;
  color: var(--sw-up-grey);
  margin: 0;
}
.sw-up-stat__cap-up {
  color: #16a34a;
  font-weight: 600;
}

/* =========================
  4. Category shortcuts
========================= */
.sw-up-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px;
  background: #f3f4f6;
  border-radius: 10px;
}
.sw-up-cat__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.sw-up-cat__icon--green {
  background: #d1fae5;
  color: #065f46;
}
.sw-up-cat__icon--violet {
  background: #eeedfe;
  color: #6d5ef7;
}
.sw-up-cat__icon--amber {
  background: #fef3c7;
  color: #b45309;
}
.sw-up-cat__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--sw-up-ink);
}

/* =========================
  5a. Upload drop zone
========================= */
.sw-up-upload {
  display: flex;
  flex-direction: column;
}
.sw-up-upload .sw-up-drop {
  flex: 1;
}
.sw-up-drop {
  margin-top: 18px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  border: 2px dashed #c7c3f0;
  border-radius: 16px;
  background: #f7f6fe;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.sw-up-drop.is-drag {
  background: #ece9fe;
  border-color: var(--sw-up-violet);
}
.sw-up-drop__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ece9fe;
  color: var(--sw-up-violet);
  margin-bottom: 16px;
}
.sw-up-drop__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--sw-up-ink);
  margin: 0 0 4px;
}
.sw-up-drop__or {
  font-size: 13px;
  color: var(--sw-up-grey);
  margin: 0 0 6px;
}
.sw-up-drop__browse {
  color: var(--sw-up-violet);
  font-weight: 600;
  text-decoration: none;
}
.sw-up-drop__browse:hover {
  text-decoration: underline;
}
.sw-up-drop__hint {
  font-size: 12px;
  color: var(--sw-up-grey-2);
  margin: 0;
}

/* =========================
  5b. Assets by type donut
========================= */
.sw-up-donut__body {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
}
.sw-up-donut__chart {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}
.sw-up-donut__chart canvas {
  width: 100% !important;
  height: 100% !important;
}
.sw-up-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.sw-up-donut__num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--sw-up-ink);
  line-height: 1;
}
.sw-up-donut__lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--sw-up-grey-2);
  margin-top: 4px;
}
.sw-up-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}
.sw-up-legend__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.sw-up-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.sw-up-legend__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--sw-up-ink);
  flex: 1;
}
.sw-up-legend__val {
  font-size: 16px;
  font-weight: 700;
  color: var(--sw-up-ink);
}

/* =========================
  6a. Asset Library table
========================= */
.sw-up-library__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.sw-up-library__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sw-up-search {
  position: relative;
  display: flex;
  align-items: center;
}
.sw-up-search svg {
  position: absolute;
  left: 12px;
  color: var(--sw-up-grey-2);
  pointer-events: none;
}
.sw-up-search input {
  height: 40px;
  width: 220px;
  max-width: 100%;
  padding: 0 14px 0 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 13px;
  color: var(--sw-up-ink);
}
.sw-up-search input:focus {
  outline: none;
  border-color: var(--sw-up-violet);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(110, 93, 248, 0.15);
}
.sw-up-filter {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: var(--sw-up-grey);
  cursor: pointer;
}
.sw-up-filter:hover,
.sw-up-filter:focus-visible {
  background: #f7f7fa;
}

.sw-up-library {
  display: flex;
  flex-direction: column;
}
.sw-up-library .sw-up-table-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
}
.sw-up-library .sw-up-table {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sw-up-library .sw-up-table tbody {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sw-up-library .sw-up-trow {
  flex: 1;
}
.sw-up-table {
  width: 100%;
  min-width: 570px;
  border-collapse: collapse;
}
.sw-up-table__head {
  display: block;
}
.sw-up-table__head tr,
.sw-up-trow {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.4fr 1.2fr 0.9fr;
  align-items: center;
  gap: 12px;
}
.sw-up-table__head tr {
  background: #f7f7f9;
  border-radius: 8px;
  padding: 11px 16px;
  margin-bottom: 2px;
}
.sw-up-table__head th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: none;
  text-align: left;
  color: #8b90a0;
}
.sw-up-table__head th:last-child {
  text-align: right;
}
.sw-up-trow {
  padding: 16px;
  border-bottom: 1px solid #f4f2ec;
}
.sw-up-trow:last-child {
  border-bottom: 0;
}
.sw-up-trow td {
  font-size: 13px;
  color: var(--sw-up-ink);
  min-width: 0;
}
.sw-up-trow__name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-up-trow__cat,
.sw-up-trow__camp,
.sw-up-trow__by {
  color: var(--sw-up-grey);
  font-weight: 500;
}

.sw-up-trow__size {
  display: none;
}
.sw-up-trow__status {
  display: flex;
  justify-content: flex-end;
}
.sw-up-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 600;
}

.sw-up-trow .sw-up-secure {
  color: #16a34a;
}
.sw-up-secure::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

/* =========================
  6b. Recently used
========================= */
.sw-up-recent__list {
  list-style: none;
  margin: 18px 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sw-up-recent__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #f0eee7;
  border-radius: 12px;
}
.sw-up-recent__tile {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #ece9fe;
  color: var(--sw-up-violet);
}
.sw-up-recent__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sw-up-recent__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sw-up-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-up-recent__meta {
  font-size: 12px;
  color: var(--sw-up-grey-2);
}
.sw-up-recent__view {
  width: 100%;
}

/* =========================================================
  RESPONSIVE — < 992px : single column
========================================================= */
@media (max-width: 991px) {
  .sw-up-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .sw-up-head__actions {
    flex-direction: row;
    width: 100%;
  }
  .sw-up-head__actions .sw-up-btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .sw-up-getdata__head {
    flex-wrap: wrap;
  }
  .sw-up-getdata__upload {
    order: 3;
    width: 100%;
    margin-top: 6px;
  }

  .sw-up-task {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon meta"
      "text text";
    align-items: start;
    gap: 16px 8px;
    padding: 16px;
  }
  .sw-up-task__icon {
    grid-area: icon;
  }
  .sw-up-task__count,
  .sw-up-task__check {
    grid-area: meta;
    justify-self: end;
  }
  .sw-up-task__text {
    grid-area: text;
    flex: none;
  }

  .sw-up-stat__value {
    font-size: 24px;
  }

  .sw-up-cats > .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .sw-up-donut__body {
    flex-direction: column;
    align-items: center;
  }
  .sw-up-legend {
    width: 100%;
  }

  .sw-up-library__head {
    flex-direction: column;
    align-items: stretch;
  }
  .sw-up-library__tools {
    width: 100%;
  }
  .sw-up-search {
    flex: 1;
  }
  .sw-up-search input {
    width: 100%;
  }

  .sw-app-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .sw-app-footer__links {
    justify-content: center;
  }
}

/* =========================================================
  RESPONSIVE — < 768px : Asset Library table -> stacked cards
========================================================= */
@media (max-width: 767px) {
  .sw-up-table {
    min-width: 0;
  }
  .sw-up-table__head {
    display: none;
  }
  .sw-up-trow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    position: relative;
    padding: 16px;
    border: 1px solid #f0eee7;
    border-radius: 14px;
    margin-bottom: 12px;
  }
  .sw-up-trow:last-child {
    margin-bottom: 0;
  }
  .sw-up-trow__name {
    grid-column: 1 / -1;
    padding-right: 90px;
    font-size: 14px;
  }
  .sw-up-trow__cat,
  .sw-up-trow__camp,
  .sw-up-trow__size,
  .sw-up-trow__by {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .sw-up-trow__cat::before,
  .sw-up-trow__camp::before,
  .sw-up-trow__size::before,
  .sw-up-trow__by::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 500;
    color: var(--sw-up-grey-2);
  }
  .sw-up-trow__cat,
  .sw-up-trow__camp,
  .sw-up-trow__size,
  .sw-up-trow__by {
    font-weight: 600;
    color: var(--sw-up-ink);
  }
  .sw-up-trow__size {
    display: flex;
  }
  .sw-up-trow__status {
    position: absolute;
    top: 16px;
    right: 16px;
    justify-content: flex-end;
  }
}

/* Phone (<576px) */
@media (max-width: 575px) {
  .sw-up-card {
    padding: 16px;
  }
  .sw-up-donut__chart {
    width: 180px;
    height: 180px;
  }

  .sw-up-stat {
    padding: 14px;
  }
  .sw-up-stat__value {
    font-size: 20px;
  }
}
