/* =============================================================
   LOGIC PRODUCTION SYSTEM STYLE GUIDE
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');

:root {
  /* type */
  --font-mono: 'Manrope', system-ui, sans-serif;

  --font-size1: 14px;
  --font-size2: 12px;
  --font-size3: 10px;

  /* surfaces — warm cream + lavender hint */
  --bg: #F7F4EE;
  --bg-tint: #F2EDE3;
  --surface: #FFFFFF;
  --surface-soft: #FDFBF7;
  --surface-2: #F4F0E8;
  --surface-3: #EBE5D8;

  /* borders are almost invisible */
  --line: rgba(45, 41, 65, 0.06);
  --line-soft: rgba(45, 41, 65, 0.04);
  --line-strong: rgba(45, 41, 65, 0.12);

  /* text */
  --text: #2D2942;
  --text-soft: #595570;
  --text-muted: #8A8699;
  --text-faint: #B7B2C4;

  /* signature pastels */
  --accent: #7C6BC9;
  /* dusty lavender CTA */
  --accent-soft: #EEE9FA;
  --accent-strong: #6457B5;
  --accent-ink: #FFFFFF;

  /* band palette (used everywhere) */
  --band-green: #7FBFA3;
  --band-yellow: #F4C57A;
  --band-orange: #FFA17C;
  --band-blue: #7FAFD6;
  --band-purple: #A78BC8;
  --band-green-soft: #E2F2EB;
  --band-yellow-soft: #FFF3DA;
  --band-orange-soft: #FFE3D4;
  --band-blue-soft: #DDEBF8;
  --band-purple-soft: #ECE2F6;

  /* state */
  --ok: #6FB088;
  --warn: #E89A6C;
  --err: #D87687;
  --info: #7FAFD6;
  --ok-soft: #E4F0EA;
  --warn-soft: #FFE5D7;
  --err-soft: #FAE0E6;

  /* sizing */
  --sb-w: 244px;
  --top-h: 64px;

  /* radius */
  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 26px;

  /* shadows — soft & low */
  --shadow-1: 0 1px 2px rgba(45, 41, 65, 0.04);
  --shadow-2: 0 6px 20px -8px rgba(124, 107, 201, 0.15), 0 2px 4px rgba(45, 41, 65, 0.04);
  --shadow-3: 0 20px 40px -16px rgba(124, 107, 201, 0.20), 0 4px 12px rgba(45, 41, 65, 0.06);
  --shadow-soft: 0 8px 24px -8px rgba(45, 41, 65, 0.08);

  --xs: 1%;
  --sm: 2.5%;
  --md: 5%;
  --lg: 7.5%;
  --xl: 10%;

  --px-xs: 1%;
  --px-sm: 2.5%;
  --px-md: 5%;
  --px-lg: 7.5%;
  --px-xl: 10%;
}


/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: var(--font-size1);
  line-height: 1.5;
}

button {
  font-family: 'Manrope', system-ui, sans-serif;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: 'Manrope', system-ui, sans-serif;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---------- Body ---------- */
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  /* For smoothing the Font */
  -moz-osx-font-smoothing: grayscale;
  /* For smoothing the Font */
  font-feature-settings: "cv11", "ss01";
  /* For stylistic sets and character variants in Manrope */
  letter-spacing: -0.005em;
}

.pageGrid {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

header {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding-bottom: 10px;
}

header .head-bar {
  display: flex;
  justify-content: space-between;
}

/* =============================================================
   SCROLLBARS
============================================================= */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
  background-clip: content-box;
}

/* =============================================================
   APP SHELL
============================================================= */

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sb-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  top: 0;
  height: 100vh;
  transition: width .3s ease;
}

.sidebar-toggle {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.sidebar-toggle:hover {
  background: var(--surface-2);
}

.toggle-icon {
  transition: 0.3s;
}

.sidebar.close {
  width: 100px;
}

.sidebar.close .nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar.close .nav-text,
.sidebar.close .profile-info,
.sidebar.close .nav-count {
  display: none;
}

.sidebar.close .profile {
  justify-content: center;
}

.sidebar.close .logo img {
  width: 50px;
}

.sidebar.close .toggle-icon {
  transform: rotate(180deg);
  width: 30px;
}

.sidebar.close .nav-item {
  justify-content: center;
  gap: 0;
}

.logo img {
  width: 55px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 11px;
  border-radius: 10px;
  font-size: var(--font-size1);
  color: var(--text-soft);
  font-weight: 500;
  transition: background .12s, color .12s;
  position: relative;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  opacity: 0.7;
}

.nav-item .nav-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1.4;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-item.active svg {
  opacity: 1;
  color: var(--accent);
}

.nav-item.active .nav-count {
  background: var(--accent);
  color: var(--accent-ink);
}

.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}

.sidebar-foot {
  margin-top: auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile {
  padding: 6px;
  background: var(--surface-2);
  border-radius: 12px;
  flex: 1;
}

.profile:hover {
  background: var(--surface-3);
}

.profile-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: var(--font-size1);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-role {
  font-size: var(--font-size3);
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--band-purple) 0%, var(--band-blue) 100%);
  color: white;
  font-size: var(--font-size3);
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Search bar ---------- */

.search-inline {
  gap: 8px;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: clamp(200px, calc(100% - 68px), 400px);
  transition: border-color .15s, box-shadow .15s;
}

.search-inline svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-inline input {
  width: 100%;
  font-size: var(--font-size1);
}

.search-inline input::placeholder {
  color: var(--text-faint);
}


/* Catalog */

.catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.catalog-tabs {
  width: fit-content;
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 1px;
}

.cat-tab {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cat-tab em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.7;
}

.cat-tab:hover {
  color: var(--text);
}

.cat-tab.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* ---------- Buttons ---------- */

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: var(--font-size1);
  font-weight: 600;
  transition: background .15s, color .15s, box-shadow .15s, transform .12s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 4px 12px -2px rgba(124, 107, 201, 0.30);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .12s, color .12s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ---------- Filter Bar ---------- */

.filter-bar {
  padding: 15px 0;
  /* display: flex;
  justify-content: space-between;
  align-items: center; */
}

/* ---------- Dropdown ---------- */

.dropdown {
  position: relative;
}

.dropdown-btn {
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: .2s;
}

.dropdown-btn:hover {
  background: var(--surface-2);
}

.dropdown-menu {
  position: absolute;
  top: 48px;
  left: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  padding: 6px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-menu button {
  border: none;
  padding: 10px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
}

.dropdown-menu button:hover {
  background: var(--surface-2);
}

.sort-dropdown .dropdown-menu {
  width: 140px;
}

/* Filter bar */

.filter-overlay {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  z-index: 999;
}

.filter-overlay.show {
  opacity: 1;
  visibility: visible;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: -360px;
  width: 340px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--line);
  transition: .35s;
  z-index: 1000;
  overflow: auto;
  padding: 24px;
}

.filter-drawer.show {
  right: 0;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.filter-header button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 24px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h4 {
  margin-bottom: 10px;
}



.band-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.band-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: var(--font-size1);
  color: var(--text-soft);
  transition: background .12s;
  font-weight: 500;
}

.band-pick i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}

.band-pick em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: var(--font-size3);
  color: var(--text-faint);
}

.band-pick:hover {
  background: var(--surface-2);
}

.band-pick.active {
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--text);
  font-weight: 600;
}

.band-pick.active em {
  color: var(--text-soft);
}

/* Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: var(--font-size2);
  font-weight: 500;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--text-soft);
  transition: background .12s, color .12s;
  border: 1px solid transparent;
}

.chip:hover {
  background: var(--surface-3);
  color: var(--text);
}

.chip.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}

.chip em {
  font-style: normal;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
}

.chip.active em {
  color: var(--accent);
}

.chip-soft {
  background: transparent;
  border: 1px solid var(--line-strong);
}

.chip-dash {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--text-muted);
}

.chip-soft button {
  margin-left: 4px;
  color: var(--text-muted);
  font-size: var(--font-size1);
  line-height: 1;
}


/* =============================================================
  ASSET CATALOG
============================================================= */

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.asset-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative;
}

.asset-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}

.asset-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.asset-card-thumb {
  min-width: 150px;
  aspect-ratio: 1;
  background: var(--c-soft, var(--band-yellow-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 22px;
}

.asset-card-thumb svg {
  max-width: 100%;
  max-height: 100%;
}

.asset-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.asset-fmt {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.asset-card-body {
  padding: 11px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.asset-card-info {
  flex: 1;
  min-width: 0;
}

.asset-card-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card-id {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.asset-card-colors {
  display: flex;
  gap: 0;
}

.asset-card-colors i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  margin-left: -4px;
  flex-shrink: 0;
}

.asset-card-colors i:first-child {
  margin-left: 0;
}

/* Drawer */
.drawer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  position: sticky;
  top: calc(var(--top-h) + 28px);
  max-height: calc(100vh - var(--top-h) - 56px);
  overflow-y: auto;
  box-shadow: var(--shadow-soft);
  animation: drawerIn .25s ease both;
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  letter-spacing: 0.01em;
  text-transform: capitalize;
}

.status-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-draft {
  color: var(--text-muted);
  background: var(--surface-2);
}

.status-review {
  color: var(--info);
  background: var(--band-blue-soft);
}

.status-revision {
  color: var(--err);
  background: var(--err-soft);
}

.status-approved {
  color: var(--ok);
  background: var(--ok-soft);
}

.status-prod {
  color: var(--accent);
  background: var(--accent-soft);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.drawer-id {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-id .mono {
  font-size: 11.5px;
  color: var(--text-muted);
}

.drawer-preview {
  aspect-ratio: 4 / 3;
  background: var(--c-soft, var(--band-yellow-soft));
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 32px;
}

.drawer-preview svg {
  max-width: 100%;
  max-height: 100%;
}

.drawer-title {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.drawer-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 1px;
  background: var(--line);
  border-radius: var(--r);
  margin-bottom: 20px;
  overflow: hidden;
}

.meta-cell {
  background: var(--surface);
  padding: 12px 14px;
}

.meta-cell em {
  font-style: normal;
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-cell span {
  font-size: 13px;
  font-weight: 600;
}

.drawer-sec {
  margin-bottom: 20px;
}

.drawer-sec h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.vari-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vari {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: transform .12s, border-color .12s;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center !important;
}

.vari svg,
.vari img {
  width: 65%;
  height: 65%;
}

.vari:hover {
  transform: scale(1.06);
  border-color: var(--line-strong);
}

.vari.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.vari-add {
  border-style: dashed;
  color: var(--text-muted);
  font-size: 18px;
  background: transparent;
}

.palette-row {
  display: flex;
  gap: 6px;
}

.palette-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.used-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.used-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background .12s;
}

.used-list li:hover {
  background: var(--surface-3);
}

.used-list li em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  color: var(--text-muted);
}

.drawer-actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.drawer-actions .btn-primary {
  flex: 1;
  justify-content: center;
}

/* Upload Asset Modal */
.modal-overlay {
  position: fixed;
  background: rgba(15, 18, 25, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 60;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.upload-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(720px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 18, 25, .25);
  padding: 20px 24px 24px;
  opacity: 0;
  z-index: 61;
  transition: opacity .2s ease, transform .2s ease;
}

.upload-modal[hidden] {
  display: none;
}

.upload-modal.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.upload-modal-grid {
  display: flex;
  gap: 25px;
}

.upload-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}


.upload-modal .tags {
  margin-bottom: 14px;
}

.upload-modal h4 {
  margin: 6px 0px;
  font-weight: 600;
  color: var(--text-soft);
}

.upload-modal .n0-i1>.inner.n1-i2 {
  position: relative;
  border: 1.5px dashed #d8dce3;
  border-radius: 10px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}

.upload-modal #fileUploadLabel {
  font-size: .85rem;
  color: #788;
  pointer-events: none;
}

.upload-modal #fileUploadLabel {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-modal input[type="text"] {
  width: 100%;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: .85rem;
}



.upload-modal .inner-flex.n2-i7 {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.upload-modal .inner-flex.n2-i7 button {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  border: none;
}

.upload-modal .n3-i1 button {
  background: #5b6bf0;
  color: #fff;
}

.upload-modal .n3-i2 button {
  background: transparent;
  border: 1px solid #d8dce3;
}

.field-error {
  outline: 2px solid #e0554f;
  border-radius: 10px;
}

.field-group {
  margin-bottom: 14px;
}

@media (max-width:640px) {
  .upload-modal .customGrid {
    grid-template-columns: 1fr;
  }
}



/* ── Primary file dropzone ── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  border: 2px dashed var(--line, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
  margin-bottom: 16px;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent, #7FAFD6);
  background: var(--bg-hover, #f5f9ff);
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone-icon {
  opacity: 0.45;
}

.dropzone-text {
  font-size: 14px;
  font-weight: 500;
}

.dropzone-text.has-file {
  color: var(--accent, #7FAFD6);
  font-weight: 600;
}

.dropzone-hint {
  font-size: 12px;
  opacity: 0.5;
}

/* ── Variation rows ── */
.variation-row {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}

.vari-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-subtle, #f9f9f9);
  border-bottom: 1px solid var(--line, #e5e7eb);
}

.vari-no {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: 0.7;
  text-transform: uppercase;
}

.vari-row-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.vari-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vari-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.6;
}

.vari-name {
  width: 100%;
}

/* Variation file mini-dropzone */
.vari-dropzone {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px dashed var(--line, #e5e7eb);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .2s, background .2s;
}

.vari-dropzone:hover {
  border-color: var(--accent, #7FAFD6);
  background: var(--bg-hover, #f5f9ff);
}

.vari-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.vari-file-text {
  font-size: 13px;
}

.vari-preview {
  margin-top: 4px;
}

.vari-preview img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.model-group {
  padding: 24px;
}

.upload-actions {
  margin-top: 16px;
}


/* Add to list hover button on card */
.asset-card-thumb {
  position: relative;
}

.card-add-list-btn {
  position: absolute;
  bottom: 8px;
  height: 30px;
  top: 10px;
  left: 75%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
  z-index: 2;
}

.asset-card:hover .card-add-list-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Add to list floating dropdown */
.add-to-list-dropdown {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
}

.add-to-list-head {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.add-to-list-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.add-to-list-option:hover {
  background: var(--surface-hover);
}

.add-to-list-option.added {
  color: var(--text-muted);
}

.add-to-list-new {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  cursor: pointer;
  color: var(--accent);
}

/* List cards grid */
.list-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s;
}

.list-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.list-card-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--surface-alt);
  aspect-ratio: 4/3;
  overflow: hidden;
}

.list-card-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.list-card-empty {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

.list-card-body {
  padding: 12px;
}

.list-card-name {
  font-weight: 600;
  font-size: 14px;
}

.list-card-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity .15s;
}

.list-card:hover .list-card-delete {
  opacity: 1;
}

.card-remove-list-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .15s;
  z-index: 2;
}

.asset-card:hover .card-remove-list-btn {
  opacity: 1;
}

/* TOAST MESSAGE */

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  min-width: 280px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #1d1d1d;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(-15px);
  transition: .3s ease;
  z-index: 9999;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.asset-card.is-variation {
    border-style: dashed;
}
.asset-card.is-variation .asset-card-id {
    opacity: 0.6;
}

.asset-card-thumb svg {
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;   
}
.card-add-list-btn {
    z-index: 5;            
}