@font-face {
  font-family: "Gilroy";
  src: url("https://cm-marketing.directus.app/assets/1995f55d-4c20-43e9-bc2e-ef3b529a560e")
    format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("https://cm-marketing.directus.app/assets/7d6f602f-5c6f-4c09-8e70-1feb9ab50f49")
    format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("https://cm-marketing.directus.app/assets/40e07d67-0561-4423-8cd7-6d6b4f5286b6")
    format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("https://cm-marketing.directus.app/assets/b83d2dc4-5a3d-4517-b367-fde7b500f806")
    format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --copa-blue: #003087;
  --copa-blue-dark: #00256b;
  --ink: #1a202c;
  --muted: #6b7280;
  --soft: #f0f4f8;
  --panel: #ffffff;
  --line: #dbe3ec;
  --line-strong: #cbd5e1;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --blue-soft: #eff6ff;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
  font-family:
    "Gilroy",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.header {
  background: var(--copa-blue);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  width: auto;
  height: 40px;
  flex: 0 0 auto;
}

.header-text h1 {
  font-size: 18px;
  font-weight: 700;
}

.header-text p {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.72;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
}

.cfg,
.workspace,
.asset-card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cfg {
  height: fit-content;
  box-shadow: var(--shadow);
}

.cfg-h {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.cfg-h h2 {
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cfg-b {
  padding: 16px;
}

.step {
  display: grid;
  gap: 12px;
}

.slbl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--copa-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex: 0 0 auto;
}

.slbl span {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.div {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

input[type="text"] {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

input[type="text"]:focus {
  border-color: var(--copa-blue);
  box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--copa-blue);
}

input[type="file"] {
  display: none;
}

.upload {
  width: 100%;
  min-height: 118px;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 5px;
  text-align: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.upload:hover,
.upload.drag {
  border-color: var(--copa-blue);
  background: var(--blue-soft);
  color: var(--copa-blue);
}

.upload.loaded {
  border-color: var(--green);
  background: var(--green-soft);
  color: #047857;
}

.upload-icon {
  width: 42px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--copa-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.upload-title {
  font-size: 13px;
  font-weight: 700;
}

.upload-meta {
  font-size: 11px;
}

.field-block {
  display: grid;
  gap: 6px;
}

.check-grid,
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-item {
  min-height: 36px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 12px;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.check-item:has(input:checked) {
  border-color: #93c5fd;
  background: var(--blue-soft);
  color: #1d4ed8;
}

.check-item input {
  width: 14px;
  height: 14px;
  accent-color: var(--copa-blue);
}

.btn-gen,
.btn-secondary {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.btn-gen {
  margin-top: 16px;
  background: var(--copa-blue);
  color: #fff;
}

.btn-gen:hover:not(:disabled) {
  background: var(--copa-blue-dark);
}

.btn-gen:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--copa-blue);
  border: 1px solid #bfdbfe;
}

.btn-secondary:hover {
  background: var(--blue-soft);
}

.status {
  min-height: 24px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.status.good {
  color: #047857;
}

.status.warn {
  color: #b45309;
}

.status.bad {
  color: #b91c1c;
}

.workspace {
  min-width: 0;
  padding: 18px;
  box-shadow: var(--shadow);
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.workspace-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
}

.workspace-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.stats {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.stat {
  min-width: 78px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
  display: grid;
  gap: 2px;
}

.stat span {
  color: var(--copa-blue);
  font-size: 18px;
  font-weight: 800;
}

.stat small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.source-preview {
  min-height: 180px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, #f3f6fb 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6fb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6fb 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6fb 75%);
  background-color: #fff;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 700;
}

.source-preview img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
}

.asset-table {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.asset-table-head,
.asset-row {
  display: grid;
  grid-template-columns: 1fr 1fr 100px;
  align-items: center;
}

.asset-table-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.asset-table-head span,
.asset-row span {
  min-width: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.asset-row:last-child span {
  border-bottom: 0;
}

.asset-row span:first-child {
  color: #374151;
  font-weight: 800;
}

.asset-row span:nth-child(2) {
  color: var(--muted);
}

.asset-row span:last-child {
  color: var(--copa-blue);
  font-weight: 800;
  text-align: right;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
}

.empty-state strong {
  color: #374151;
  font-size: 16px;
}

.empty-state span {
  font-size: 12px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.asset-card {
  min-width: 0;
  overflow: hidden;
}

.asset-card-header {
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.asset-card-title {
  min-width: 0;
}

.asset-card-title strong {
  display: block;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card-title span {
  color: var(--muted);
  font-size: 11px;
}

.asset-pill {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.canvas-box {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio);
  background: #f8fafc;
}

.canvas-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.progress-bar {
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.progress-bar span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--green);
  transition: width 0.15s ease;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .source-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header {
    padding: 12px 16px;
  }

  .header-logo {
    height: 34px;
  }

  .app-shell {
    padding: 12px;
    gap: 12px;
  }

  .workspace {
    padding: 14px;
  }

  .workspace-header {
    display: grid;
  }

  .stats {
    width: 100%;
  }

  .stat {
    flex: 1;
  }

  .asset-table-head,
  .asset-row {
    grid-template-columns: 1fr 0.8fr 86px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}

