/* ============================
   ProdServ — CSS System
   Aesthetic: Dark Editorial / Precision Tool
   ============================ */

:root {
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card2: #f0f0f2;
  --bg-hover: #e8e8ea;
  --border: #d2d2d7;
  --border-active: #86868b;
  --accent: #5e5ce6;
  --accent-glow: rgba(94, 92, 230, 0.1);
  --accent2: #ff3b30;
  --accent3: #ff8800;
  --accent4: #34c759;
  --text-primary: #1d1d1f;
  --text-secondary: #48484a;
  --text-muted: #86868b;
  --sidebar-w: 220px;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- APP SHELL ---- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-links { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); }

.sidebar-footer { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }

.legal-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.legal-link svg { width: 14px; height: 14px; stroke: var(--text-muted); }
.legal-link:hover { color: var(--text-primary); border-color: var(--accent); background: var(--bg-card); }
.legal-link:hover svg { stroke: var(--accent); }

.stats-mini {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  flex: 1;
  padding: 40px 48px;
  overflow-y: auto;
  max-width: 1200px;
}

/* ---- VIEWS ---- */
.view { display: none; }
.view.active { display: block; }

/* ---- PAGE HEADER ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1.1;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Progress Ring */
.progress-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.progress-ring {
  width: 64px;
  height: 64px;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 4;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 175.9;
  stroke-dashoffset: 175.9;
  transition: stroke-dashoffset 0.6s ease;
}

.progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

/* ---- BUILDER GRID ---- */
.builder-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ---- IDENTITY COLUMN ---- */
.builder-col { display: flex; flex-direction: column; gap: 0; }
.col-identity { gap: 0; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.photo-card { padding: 0; }

.photo-upload-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card2);
  cursor: pointer;
  overflow: hidden;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  transition: opacity 0.2s;
}

.photo-placeholder .photo-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-hover);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.photo-placeholder .photo-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-muted);
}

.photo-placeholder p {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.photo-placeholder span {
  font-size: 11px;
  color: var(--text-muted);
}

#itemPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.photo-upload-area:hover .photo-overlay { opacity: 1; }

.photo-change-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.photo-change-btn svg { width: 16px; height: 16px; }
.photo-change-btn:hover { opacity: 0.85; }

.identity-fields {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border);
}

.field-group { display: flex; flex-direction: column; gap: 6px; }

.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field-input {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.field-input::placeholder { color: var(--text-muted); }
.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.score-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.score-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.score-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  transition: color 0.3s;
}

/* ---- TRAIT BLOCKS ---- */
.col-traits { display: flex; flex-direction: column; gap: 20px; }

.trait-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}

.trait-block.block-complete {
  border-color: rgba(6, 214, 160, 0.3);
}

.block-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.block-icon { font-size: 22px; flex-shrink: 0; }

.block-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.block-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.block-complete-badge {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--border);
  transition: all 0.3s;
  flex-shrink: 0;
}

.block-complete-badge.done {
  background: var(--accent4);
  border-color: var(--accent4);
  position: relative;
}

.block-complete-badge.done::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: white;
  font-weight: 700;
}

.traits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.trait-item {
  background: var(--bg-card);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trait-item label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.trait-select {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  width: 100%;
}

.trait-select option { background: var(--bg-card); color: var(--text-primary); }
.trait-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.trait-select.filled {
  border-color: rgba(124, 111, 255, 0.4);
  color: var(--text-primary);
}

/* ---- ACTION BAR ---- */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary svg { width: 15px; height: 15px; }
.btn-secondary:hover { border-color: var(--border-active); color: var(--text-primary); background: var(--bg-hover); }

/* ---- GALLERY ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-icon {
  margin-bottom: 16px;
  opacity: 0.3;
  display: flex;
  justify-content: center;
}

.empty-icon svg {
  width: 64px;
  height: 64px;
}

.gallery-empty p { font-size: 16px; margin-bottom: 6px; color: var(--text-secondary); }
.gallery-empty span { font-size: 14px; }

/* ITEM CARD */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  animation: cardIn 0.4s ease both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.item-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(94, 92, 230, 0.1);
}

.card-photo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-card2);
  overflow: hidden;
  position: relative;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 56px;
  opacity: 0.15;
}

.card-score-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.card-body {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  min-height: 36px;
}

.btn-conferir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s, filter 0.2s;
  white-space: nowrap;
}
.btn-conferir:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tag-purple { background: rgba(94, 92, 230, 0.1); color: var(--accent); }
.tag-red { background: rgba(255, 59, 48, 0.1); color: var(--accent2); }
.tag-yellow { background: rgba(255, 204, 0, 0.1); color: var(--accent3); }
.tag-green { background: rgba(52, 199, 89, 0.1); color: var(--accent4); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-date {
  font-size: 11px;
  color: var(--text-muted);
}

.card-actions { display: flex; gap: 8px; }

.card-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.card-btn svg { width: 14px; height: 14px; }

.card-btn-delete { background: transparent; }
.card-btn-delete svg { stroke: var(--text-muted); }
.card-btn-delete:hover { background: rgba(255, 107, 107, 0.15); }
.card-btn-delete:hover svg { stroke: var(--accent2); }

/* ---- DETAIL VIEW ---- */
.btn-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}
.btn-back svg { width: 20px; height: 20px; }

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: slideUp 0.4s ease both;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--bg-card2), var(--bg-card));
}

.detail-photo {
  width: 160px;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta { flex: 1; }

.detail-score-wrap {
  max-width: 400px;
}
.detail-score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.detail-score-bar-bg {
  height: 8px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}
.detail-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent4));
  border-radius: 10px;
  transition: width 1s ease;
}
.detail-score-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.detail-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.detail-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.detail-traits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.detail-trait {
  background: var(--bg-hover);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.detail-trait:hover {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.detail-trait-key {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.detail-trait-val {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  z-index: 1;
  transition: all 0.2s;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--accent2); color: white; border-color: var(--accent2); }

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px;
  border-bottom: 1px solid var(--border);
}

.modal-actions-top {
  margin-left: auto;
  align-self: flex-start;
}

.modal-actions-top .btn-primary {
  padding: 8px 16px;
  font-size: 13px;
}

.modal-photo {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card2);
}

.modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.modal-photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 48px; }

.modal-meta { flex: 1; }

.modal-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.modal-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-score-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-score-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.modal-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent4));
  border-radius: 10px;
  transition: width 0.8s ease;
}

.modal-score-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  min-width: 44px;
  text-align: right;
}

.modal-body { padding: 24px 28px; }

.modal-section {
  margin-bottom: 24px;
}

.modal-section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.modal-traits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.modal-trait {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.modal-trait-key {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.modal-trait-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 200;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--accent4); }
.toast.error { border-color: var(--accent2); }

.spinner-mini {
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-glow);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-card {
  max-width: 420px;
}

.checkout-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.checkout-body {
  padding: 24px 28px;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-active); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .main-content { padding: 28px 24px; }
  .builder-grid { grid-template-columns: 220px 1fr; gap: 20px; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 20px 16px; }
  .builder-grid { grid-template-columns: 1fr; }
  .traits-grid { grid-template-columns: 1fr; }
  .modal-header { flex-direction: column; }
  .modal-traits-grid { grid-template-columns: 1fr 1fr; }
}
