/* ─────────────────────────────────────────
   Visuale · Design System
   Font: Martian Mono · Theme: ZenCrypto light
───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Martian+Mono:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color tokens */
  --bg:          #F2F0EC;
  --surface:     #FFFFFF;
  --surface-2:   #F7F5F2;
  --border:      #E2DED8;
  --border-2:    #CCCAC4;
  --text-1:      #191314;
  --text-2:      #6A6560;
  --text-3:      #9A9590;
  --accent:      #E8F758;
  --accent-h:    #D4E040;
  --success:     #2e9968;
  --success-dim: rgba(46,153,104,.12);
  --danger:      #e05050;
  --danger-dim:  rgba(224,80,80,.1);
  --warning:     #d4972a;
  --warning-dim: rgba(212,151,42,.12);

  /* Spacing / shape */
  --sidebar-w:   240px;
  --radius:      20px;
  --radius-lg:   24px;
  --radius-sm:   12px;
  --radius-pill: 100px;

  /* Elevation */
  --shadow-sm: 0 1px 4px rgba(25,19,20,.06), 0 2px 10px rgba(25,19,20,.04);
  --shadow-md: 0 4px 20px rgba(25,19,20,.08), 0 1px 4px rgba(25,19,20,.04);
  --shadow-lg: 0 12px 40px rgba(25,19,20,.1), 0 2px 8px rgba(25,19,20,.05);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Martian Mono', monospace;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1 { font-size: 32px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; }
h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.8px; line-height: 1.2; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.4px; }
h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  font-family: 'Martian Mono', monospace;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.17s;
  border: none; text-decoration: none; white-space: nowrap;
}
.btn-primary   { background: var(--accent); color: var(--text-1); }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-dark      { background: var(--text-1); color: #fff; }
.btn-dark:hover { background: #2d2628; transform: translateY(-1px); }
.btn-ghost     { background: transparent; color: var(--text-2); border: 1.5px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--text-2); color: var(--text-1); }
.btn-danger    { background: var(--danger-dim); color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm   { padding: 7px 14px; font-size: 12px; }
.btn-lg   { padding: 13px 26px; font-size: 14px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* ── FORM INPUTS ── */
.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-1);
  font-family: 'Martian Mono', monospace; font-size: 13.5px;
  transition: border-color 0.17s, box-shadow 0.17s;
  outline: none;
  -webkit-appearance: none;
}
.input:focus { border-color: var(--text-1); box-shadow: 0 0 0 3px rgba(25,19,20,.08); }
.input::placeholder { color: var(--text-3); }
.input-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; display: block; }
.input-group { margin-bottom: 18px; position: relative; }
.input-hint  { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

/* ── CARD ── */
.card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.card:hover { border-color: var(--border-2); box-shadow: var(--shadow-md); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border);
}
.card-title { font-size: 14.5px; font-weight: 700; color: var(--text-1); }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600;
}
.badge-accent  { background: var(--accent); color: var(--text-1); }
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-danger  { background: var(--danger-dim); color: var(--danger); }
.badge-neutral { background: var(--surface-2); color: var(--text-2); border: 1.5px solid var(--border); }

/* ── CHIP / TAG ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: var(--surface);
  font-family: 'Martian Mono', monospace; font-size: 12.5px; font-weight: 500;
  cursor: pointer; color: var(--text-2); transition: all 0.17s;
}
.chip:hover { border-color: var(--border-2); color: var(--text-1); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--text-1); font-weight: 700; }

/* ── TOGGLE ── */
.toggle {
  width: 44px; height: 24px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.22s; position: relative; flex-shrink: 0;
}
.toggle::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-3); top: 2px; left: 2px;
  transition: all 0.22s;
}
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle.on::after { transform: translateX(20px); background: var(--text-1); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text-1); color: #fff;
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-family: 'Martian Mono', monospace; font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
  transform: translateX(-50%) translateY(8px); z-index: 9999;
  white-space: nowrap; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── SPINNER ── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--text-1);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── APP LAYOUT ── */
.app-layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); position: fixed; top: 0; left: 0; bottom: 0;
  background: var(--surface); border-right: 1.5px solid var(--border);
  display: flex; flex-direction: column; z-index: 50;
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.4px;
  text-decoration: none; color: var(--text-1);
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: var(--text-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
}

.sidebar-nav {
  flex: 1; padding: 16px 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.nav-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-3);
  padding: 10px 10px 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  text-decoration: none; transition: all 0.17s;
}
.nav-item:hover { background: var(--bg); color: var(--text-1); }
.nav-item.active { background: var(--accent); color: var(--text-1); font-weight: 700; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px; border-top: 1.5px solid var(--border); flex-shrink: 0;
}
.credits-widget {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px;
}
.credits-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.credits-label  { font-size: 11.5px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .8px; }
.credits-count  { font-size: 12px; font-weight: 700; color: var(--text-1); }
.credits-bar    { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 9px; }
.credits-fill   { height: 100%; background: var(--accent); border-radius: 3px; }
.credits-add    { font-size: 12px; font-weight: 600; color: var(--text-2); text-decoration: none; display: block; text-align: center; transition: color .17s; }
.credits-add:hover { color: var(--text-1); }

.user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all .17s; border: 1.5px solid transparent;
}
.user-row:hover { background: var(--bg); border-color: var(--border); }
.user-av { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--text-1); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.user-plan { font-size: 11px; color: var(--text-3); }
.user-chevron { font-size: 14px; color: var(--text-3); margin-left: auto; }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}

.main-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(242,240,236,.88); backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.page-title { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; color: var(--text-1); }
.page-sub   { font-size: 13px; color: var(--text-3); margin-top: 1px; }

.main-body { flex: 1; padding: 28px; max-width: 1160px; }

/* ── STEPS PROGRESS ── */
.steps-progress {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-pill); padding: 5px;
  width: fit-content; margin-bottom: 28px;
}
.step-dot {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--text-3);
  transition: all .2s; white-space: nowrap;
}
.step-dot.done   { color: var(--text-1); }
.step-dot.done .step-n { background: var(--success); color: #fff; border-color: var(--success); }
.step-dot.active { background: var(--accent); color: var(--text-1); }
.step-dot.active .step-n { background: var(--text-1); color: var(--accent); border-color: var(--text-1); }
.step-n {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  color: var(--text-3);
}
.step-sep {
  width: 28px; height: 1.5px; background: var(--border-2);
  flex-shrink: 0; margin: 0 2px;
}

/* ── GRID UTILITIES ── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; }

/* ── FLEX UTILITIES ── */
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-c    { align-items: center; }
.items-s    { align-items: flex-start; }
.justify-b  { justify-content: space-between; }
.justify-c  { justify-content: center; }
.gap-4      { gap: 4px; }
.gap-8      { gap: 8px; }
.gap-12     { gap: 12px; }
.gap-16     { gap: 16px; }
.gap-20     { gap: 20px; }
.gap-24     { gap: 24px; }

/* ── SPACING ── */
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-auto { margin-top: auto; }

/* ── DIVIDER ── */
.divider { height: 1.5px; background: var(--border); margin: 20px 0; }

/* ── PILL TAG (section label) ── */
.pill-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-2); background: var(--surface);
  font-size: 12px; font-weight: 500; color: var(--text-2);
}

/* ── SECTION HEADER ── */
.section-header {
  padding: 16px 22px;
  border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text-1); }

/* ── TABLE ── */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-3); border-bottom: 1.5px solid var(--border);
}
.table td { padding: 13px 16px; border-bottom: 1.5px solid var(--border); color: var(--text-2); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }

/* ── PROGRESS BAR ── */
.progress-bar { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }

/* ── SKELETON LOADER ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 0%, var(--border) 50%, var(--bg) 100%);
  background-size: 200% 100%; border-radius: var(--radius-sm);
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── OVERLAY LOADER ── */
.overlay-loader {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(242,240,236,.92); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; text-align: center;
}
.loader-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 52px; min-width: 380px;
  box-shadow: var(--shadow-lg);
}
.loader-title { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.loader-sub   { font-size: 13px; color: var(--text-3); margin-bottom: 28px; }
.loader-step  { font-size: 13.5px; color: var(--text-2); min-height: 22px; transition: all .3s; margin-bottom: 16px; }
.loader-bar   { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.loader-fill  { height: 100%; background: var(--accent); border-radius: 3px; transition: width 1s ease; }

/* ── DROPZONE ── */
.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  padding: 60px 40px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--surface);
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--text-1); background: var(--surface-2);
}
.dropzone.drag-over { border-style: solid; background: rgba(232,247,88,.06); border-color: var(--accent); }
.dz-icon  { font-size: 40px; margin-bottom: 16px; opacity: .5; }
.dz-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.dz-sub   { font-size: 13px; color: var(--text-3); }
.dz-btn   { margin-top: 20px; }

/* ── COMPARISON SLIDER ── */
.comparison-slider {
  position: relative; aspect-ratio: 16/9; cursor: ew-resize;
  user-select: none; overflow: hidden; border-radius: var(--radius-sm);
}
.cs-before, .cs-after { position: absolute; inset: 0; }
.cs-after { clip-path: inset(0 50% 0 0); }
.cs-line  { position: absolute; top:0; bottom:0; width: 2px; background: #fff; left: 50%; transform: translateX(-50%); z-index: 10; }
.cs-btn   {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); font-size: 13px; font-weight: 800;
  z-index: 11; cursor: ew-resize; color: var(--text-1);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp   { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
@keyframes fadeIn   { from{opacity:0} to{opacity:1} }
@keyframes pulse    { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.7)} }

.fade-up { animation: fadeUp .5s cubic-bezier(.16,1,.3,1) both; }
.fade-in { animation: fadeIn .4s ease both; }
.d1 { animation-delay: .08s; }
.d2 { animation-delay: .16s; }
.d3 { animation-delay: .24s; }
.d4 { animation-delay: .32s; }
