/* ====== RESET & BASE ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #e8e8f0;
  --text-muted: rgba(232, 232, 240, 0.5);
  --text-dim: rgba(232, 232, 240, 0.35);
  --accent: #7c6fff;
  --accent-2: #ff6b9d;
  --accent-3: #43e7c8;
  --green: #22d3a0;
  --orange: #f59e0b;
  --red: #ef4444;
  --blue: #60a5fa;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ====== TOPBAR ====== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 12px;
}

.topbar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(239, 68, 68, 0.7);
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 100px;
  padding: 5px 12px;
  text-decoration: none;
  transition: all var(--transition);
}

.topbar-logout:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
}



/* ====== BACKGROUND ORBS ====== */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -100px;
  animation: float1 12s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-2);
  bottom: -100px;
  right: -100px;
  animation: float2 15s ease-in-out infinite;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float3 10s ease-in-out infinite;
}

@keyframes float1 {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(40px, 30px)
  }
}

@keyframes float2 {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(-30px, -40px)
  }
}

@keyframes float3 {

  0%,
  100% {
    transform: translate(-50%, -50%)
  }

  50% {
    transform: translate(-48%, -52%)
  }
}

/* ====== CONTAINER ====== */
.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.container-narrow {
  max-width: 720px;
}

/* ====== HERO ====== */
.hero {
  text-align: center;
  margin-bottom: 56px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(124, 111, 255, 0.08);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ====== CARDS ====== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 111, 255, 0.2), rgba(255, 107, 157, 0.1));
  border: 1px solid rgba(124, 111, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ====== FILE DROP ZONE ====== */
.file-drop-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(124, 111, 255, 0.06);
  color: var(--text);
}

.file-drop-zone.has-file {
  border-color: var(--green);
  background: rgba(34, 211, 160, 0.05);
  color: var(--green);
}

.file-drop-zone svg {
  flex-shrink: 0;
}

.file-drop-zone span {
  font-weight: 500;
}

.file-drop-zone small {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ====== INPUTS ====== */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.input-group svg {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.input-group .input-field {
  padding-left: 42px;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 111, 255, 0.15);
}

.input-field::placeholder {
  color: var(--text-dim);
}

.input-sm {
  width: auto;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 0.875rem;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

.textarea:focus {
  border-color: var(--accent);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #5f4dff 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 111, 255, 0.3);
  width: 100%;
  justify-content: center;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 111, 255, 0.45);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
}

.btn-copy {
  background: rgba(124, 111, 255, 0.15);
  border: 1px solid rgba(124, 111, 255, 0.3);
  border-radius: var(--radius-xs);
  color: var(--accent);
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.btn-copy:hover {
  background: rgba(124, 111, 255, 0.25);
}

.btn-copy.copied {
  background: rgba(34, 211, 160, 0.15);
  border-color: rgba(34, 211, 160, 0.3);
  color: var(--green);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.icon-btn:hover {
  background: rgba(124, 111, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.icon-btn.copied {
  color: var(--green);
  border-color: var(--green);
}

/* ====== HOW IT WORKS ====== */
.how-it-works {
  margin: 40px 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.how-it-works h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 220px;
  flex: 1;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.step-info h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.step-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.step-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ====== PAGE HEADER ====== */
.page-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
  background: var(--surface);
}

.back-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.page-header-info h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-blue {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.2);
  color: var(--blue);
}

.badge-green {
  background: rgba(34, 211, 160, 0.1);
  border-color: rgba(34, 211, 160, 0.2);
  color: var(--green);
}

/* ====== FIELD SELECTOR ====== */
.field-selector-card {
  margin-bottom: 20px;
}

.field-selector-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.field-selector-header h3 {
  font-size: 1rem;
  margin: 0;
}

.field-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.field-btn {
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: monospace;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
}

.field-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.field-btn.active {
  background: rgba(124, 111, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* ====== BULK TOOLS ====== */
.bulk-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px 20px;
}

.bulk-tools-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.bulk-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.bulk-tools-right .input-field {
  flex: 1;
  min-width: 180px;
}

/* ====== MY CATS ====== */
.my-cats-card {
  margin-bottom: 20px;
}

.my-cats-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.my-cats-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 4px;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.mt-8 {
  margin-top: 8px;
}

/* ====== MAPPING TABLE ====== */
.mapping-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mapping-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.mapping-stats {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
}

.mapping-stats span {
  color: var(--accent);
  font-weight: 700;
}

.mapping-table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.mapping-table-head {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px;
  gap: 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mapping-table-head .col-xml,
.mapping-table-head .col-mine {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mapping-rows {
  max-height: 60vh;
  overflow-y: auto;
}

.mapping-rows::-webkit-scrollbar {
  width: 5px;
}

.mapping-rows::-webkit-scrollbar-track {
  background: transparent;
}

.mapping-rows::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.mapping-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 40px;
  gap: 0;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition);
}

.mapping-row:last-child {
  border-bottom: none;
}

.mapping-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.mapping-row.is-mapped {
  background: rgba(34, 211, 160, 0.02);
}

.mapping-row.is-mapped:hover {
  background: rgba(34, 211, 160, 0.04);
}

.xml-cat-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.xml-tag {
  font-family: monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.xml-cat-value {
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  padding: 0 4px;
}

.autocomplete-wrapper {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1a2e;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.ac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
}

.ac-item:hover {
  background: rgba(124, 111, 255, 0.15);
  color: var(--accent);
}

/* ====== OPTIONS ====== */
.options-card {
  margin-bottom: 20px;
}

.options-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-label input {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 6px;
  flex-shrink: 0;
  transition: all var(--transition);
  position: relative;
}

.checkbox-label input:checked+.checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked+.checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-left: none;
  border-top: none;
  transform: rotate(45deg);
}

.output-filename-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ====== FORM ACTIONS ====== */
.form-actions {
  margin-top: 8px;
}

/* ====== SUCCESS PAGE ====== */
.success-header {
  text-align: center;
  margin-bottom: 40px;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 211, 160, 0.2), rgba(34, 211, 160, 0.05));
  border: 1px solid rgba(34, 211, 160, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin: 0 auto 24px;
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 160, 0.2);
  }

  50% {
    box-shadow: 0 0 0 16px rgba(34, 211, 160, 0);
  }
}

.success-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.success-header p {
  color: var(--text-muted);
}

/* ====== STATS GRID ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  text-align: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

.stat-green {
  background: rgba(34, 211, 160, 0.08);
  border-color: rgba(34, 211, 160, 0.2);
  color: var(--green);
}

.stat-orange {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--orange);
}

.stat-red {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.stat-blue {
  background: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.2);
  color: var(--blue);
}

/* ====== URL CARD ====== */
.url-card {
  margin-bottom: 24px;
}

.url-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.url-card-header h3 {
  font-size: 1rem;
}

.url-card>p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  overflow: hidden;
}

.url-box code {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  word-break: break-all;
  overflow-wrap: break-word;
}

.url-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.url-actions .btn {
  flex: 1;
  justify-content: center;
  min-width: 140px;
}

/* ====== PREVIEW CARD ====== */
.preview-card {
  margin-bottom: 24px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.preview-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

#preview-chevron {
  transition: transform var(--transition);
}

.xml-preview {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
}

/* ====== RESULT ACTIONS ====== */
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ====== ALERTS ====== */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* ====== PREVIOUS OUTPUTS ====== */
.previous-outputs {
  margin-top: 32px;
}

.previous-outputs h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  margin-bottom: 16px;
}

.output-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.output-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
}

.output-item svg {
  color: var(--text-dim);
  flex-shrink: 0;
}

.output-item a {
  color: var(--accent);
  text-decoration: none;
  flex: 1;
}

.output-item a:hover {
  text-decoration: underline;
}

.output-date {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* ====== SPINNER ====== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  animation: toast-in 0.3s ease;
  box-shadow: var(--shadow);
}

.toast-success {
  background: rgba(34, 211, 160, 0.9);
  color: #000;
}

.toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 640px) {
  .container {
    padding: 20px 14px 60px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }

  .mapping-table-head {
    display: none;
  }

  .mapping-row {
    grid-template-columns: 1fr 32px;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .col-xml {
    grid-column: 1 / 3;
  }

  .col-arrow {
    display: none;
  }

  .col-mine {
    grid-column: 1;
  }

  .col-action {
    grid-column: 2;
  }

  .bulk-tools {
    flex-direction: column;
    align-items: flex-start;
  }

  .bulk-tools-right {
    width: 100%;
  }
}