/* ═══════════════════════════════════════════════════════════════
   CoopEnergie — Design System Complet
   MIABE Hackathon 2026 · HackForce Groupe 19
   Thème : Forest Night + Blockchain Cyber
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── DESIGN TOKENS ── */
:root {
  /* === Couleurs primaires === */
  --c-teal:       #00C9B1;
  --c-teal-mid:   #00A896;
  --c-teal-dark:  #006B5F;
  --c-teal-dim:   rgba(0,201,177,.13);
  --c-teal-glow:  rgba(0,201,177,.35);

  --c-gold:       #F0A500;
  --c-gold-light: #F7C84A;
  --c-gold-dark:  #A87200;
  --c-gold-dim:   rgba(240,165,0,.14);
  --c-gold-glow:  rgba(240,165,0,.35);

  --c-violet:     #8B5CF6;
  --c-violet-dim: rgba(139,92,246,.13);

  --c-green:      #22C55E;
  --c-green-dim:  rgba(34,197,94,.12);
  --c-red:        #EF4444;
  --c-red-dim:    rgba(239,68,68,.12);
  --c-blue:       #3B82F6;

  /* === Fonds === */
  --bg-void:   #020A10;
  --bg-0:      #040E18;
  --bg-1:      #071828;
  --bg-2:      #0C2238;
  --bg-3:      #112C48;
  --bg-4:      #163658;
  --bg-5:      #1C4268;

  /* === Texte === */
  --tx-1:      #EAF2F8;
  --tx-2:      #9BBDD4;
  --tx-3:      #567A95;
  --tx-4:      #2D4A62;

  /* === Borders === */
  --bd-1:      rgba(255,255,255,.055);
  --bd-2:      rgba(255,255,255,.10);
  --bd-3:      rgba(255,255,255,.18);

  /* === Light mode vars === */
  --lbg:       #F0F6FA;
  --lcard:     #FFFFFF;
  --lborder:   #CBE0EE;
  --ltx:       #0C2238;
  --ltx2:      #3A6070;

  /* === Typography === */
  --font:      'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;

  /* === Radii === */
  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  16px;
  --r-lg:  22px;
  --r-xl:  30px;
  --r-2xl: 40px;
  --r-pill: 100px;

  /* === Shadows === */
  --sh-sm:  0 2px 10px rgba(0,0,0,.25);
  --sh-md:  0 6px 24px rgba(0,0,0,.35);
  --sh-lg:  0 16px 48px rgba(0,0,0,.5);
  --sh-teal: 0 4px 24px rgba(0,201,177,.2);
  --sh-gold: 0 4px 24px rgba(240,165,0,.2);

  /* === Transitions === */
  --ease:      cubic-bezier(.22,.68,0,1.2);
  --ease-out:  cubic-bezier(.4,0,.2,1);
  --dur:       200ms;

  /* === Layout === */
  --sidebar-w: 260px;
  --header-h:  64px;
  --content-max: 1200px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--tx-1);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; outline: none; }
img, svg { display: block; max-width: 100%; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.15); }

/* ── BACKGROUND EFFECTS ── */
.app-bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--bd-1) 1px, transparent 1px),
    linear-gradient(90deg, var(--bd-1) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 100%);
}
.app-bg-glow-1 {
  position: fixed; pointer-events: none; z-index: 0;
  width: 700px; height: 500px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,168,150,.12) 0%, transparent 70%);
  top: -150px; left: -80px; filter: blur(60px);
  animation: drift1 20s ease-in-out infinite alternate;
}
.app-bg-glow-2 {
  position: fixed; pointer-events: none; z-index: 0;
  width: 500px; height: 400px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(240,165,0,.08) 0%, transparent 70%);
  bottom: -60px; right: -50px; filter: blur(60px);
  animation: drift2 25s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(80px, 60px) scale(1.1); } }
@keyframes drift2 { to { transform: translate(-60px, -40px) scale(1.08); } }

/* ── APP SHELL ── */
#app {
  position: relative; z-index: 1;
  display: flex; min-height: 100vh;
}

/* ── SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: rgba(4,14,24,.96);
  border-right: 1px solid var(--bd-1);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow: hidden;
  transition: width .3s var(--ease-out);
  flex-shrink: 0;
  backdrop-filter: blur(20px);
}
.sidebar-logo {
  padding: 20px 20px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--bd-1);
}
.sidebar-logo-mark {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-teal), var(--c-gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px var(--c-teal-glow);
}
.sidebar-logo-text h1 {
  font-size: 1.05rem; font-weight: 800; color: var(--tx-1);
  letter-spacing: -.02em;
}
.sidebar-logo-text span {
  font-size: .72rem; color: var(--tx-3); font-weight: 400;
}
.sidebar-network {
  margin: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg-3);
  border: 1px solid var(--bd-1); border-radius: var(--r-sm);
  font-size: .74rem; color: var(--tx-3);
}
.sidebar-network .net-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 8px var(--c-green);
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.7); }
}
.sidebar-nav {
  flex: 1; padding: 8px 10px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-section-label {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--tx-4);
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: all var(--dur) var(--ease-out);
  color: var(--tx-3); font-weight: 500; font-size: .875rem;
  border: 1px solid transparent; position: relative;
}
.nav-item:hover { background: var(--bd-1); color: var(--tx-2); border-color: var(--bd-1); }
.nav-item.active {
  background: var(--c-teal-dim); color: var(--c-teal);
  border-color: rgba(0,201,177,.2);
}
.nav-item-icon {
  width: 32px; height: 32px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .95rem;
  background: var(--bg-3);
  transition: background var(--dur);
}
.nav-item.active .nav-item-icon { background: rgba(0,201,177,.12); }
.nav-item-badge {
  margin-left: auto; font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: var(--r-pill);
  background: var(--c-teal-dim); color: var(--c-teal);
}
.nav-item-badge.gold { background: var(--c-gold-dim); color: var(--c-gold); }
.sidebar-footer {
  padding: 16px; border-top: 1px solid var(--bd-1);
}
.sidebar-coop-info {
  padding: 10px 12px; background: var(--bg-3);
  border: 1px solid var(--bd-1); border-radius: var(--r-sm);
  font-size: .78rem;
}
.sci-label { color: var(--tx-4); margin-bottom: 2px; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.sci-val   { color: var(--tx-1); font-weight: 600; margin-bottom: 4px; }
.sci-prog-track { height: 5px; background: var(--bg-5); border-radius: 100px; overflow: hidden; }
.sci-prog-fill  {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--c-teal), var(--c-gold));
  transition: width .8s var(--ease);
}

/* ── HEADER ── */
#header {
  height: var(--header-h);
  background: rgba(4,14,24,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bd-1);
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
}
.header-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--tx-3);
}
.header-breadcrumb .sep { opacity: .4; }
.header-breadcrumb .current { color: var(--tx-1); font-weight: 600; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-block-badge {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .72rem; color: var(--c-teal);
  background: var(--c-teal-dim); border: 1px solid rgba(0,201,177,.2);
  padding: .28rem .8rem; border-radius: var(--r-pill);
}
.header-btn {
  padding: .5rem 1.2rem; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 700; cursor: pointer;
  border: 1px solid var(--bd-2); background: var(--bg-3);
  color: var(--tx-2); transition: all var(--dur) var(--ease-out);
  font-family: var(--font);
}
.header-btn:hover { background: var(--bg-4); color: var(--tx-1); }
.header-btn.primary {
  background: var(--c-teal); color: var(--bg-0);
  border-color: var(--c-teal); font-weight: 700;
  box-shadow: var(--sh-teal);
}
.header-btn.primary:hover { background: var(--c-teal-mid); }

/* ── MAIN WRAPPER ── */
#main-wrapper {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden;
}
#main {
  flex: 1; overflow-y: auto;
  padding: 28px 28px 60px;
}

/* ── PAGES ── */
.page { display: none; animation: pg-in .3s var(--ease); }
.page.active { display: block; }
@keyframes pg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── PAGE HEADER ── */
.page-hd {
  margin-bottom: 28px;
}
.page-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .28rem .9rem; border-radius: var(--r-pill); margin-bottom: .85rem;
}
.tag-teal   { background: var(--c-teal-dim);   color: var(--c-teal);   border: 1px solid rgba(0,201,177,.2); }
.tag-gold   { background: var(--c-gold-dim);   color: var(--c-gold);   border: 1px solid rgba(240,165,0,.2); }
.tag-violet { background: var(--c-violet-dim); color: var(--c-violet); border: 1px solid rgba(139,92,246,.2); }
.tag-green  { background: var(--c-green-dim);  color: var(--c-green);  border: 1px solid rgba(34,197,94,.2); }
.page-title {
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 800; letter-spacing: -.03em;
  color: var(--tx-1); margin-bottom: .5rem;
}
.page-sub {
  font-size: .92rem; color: var(--tx-3); max-width: 640px; line-height: 1.7;
}

/* ── CARD ── */
.card {
  background: var(--bg-2); border: 1px solid var(--bd-1);
  border-radius: var(--r-lg); padding: 22px;
  transition: border-color var(--dur), transform var(--dur) var(--ease), box-shadow var(--dur);
}
.card:hover { border-color: var(--bd-2); }
.card-sm { padding: 16px; border-radius: var(--r-md); }
.card-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid var(--bd-1);
}
.card-header-icon {
  width: 34px; height: 34px; border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
  background: var(--bg-4);
}
.card-title { font-weight: 700; font-size: .9rem; color: var(--tx-1); }
.card-badge {
  font-size: .65rem; font-weight: 700; padding: 2px 8px;
  border-radius: var(--r-pill); margin-left: auto;
}

/* ── LIGHT CARD (for contrast sections) ── */
.card-light {
  background: var(--lcard); border: 1px solid var(--lborder);
  border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--sh-sm);
}

/* ── STAT BOXES ── */
.stat-grid { display: grid; gap: 14px; }
.stat-grid-5 { grid-template-columns: repeat(5,1fr); }
.stat-grid-4 { grid-template-columns: repeat(4,1fr); }
.stat-grid-3 { grid-template-columns: repeat(3,1fr); }
.stat-grid-2 { grid-template-columns: repeat(2,1fr); }
.stat-box {
  background: var(--bg-2); border: 1px solid var(--bd-1);
  border-radius: var(--r-md); padding: 18px 16px;
  position: relative; overflow: hidden;
  transition: border-color var(--dur), transform var(--dur) var(--ease);
}
.stat-box:hover { transform: translateY(-2px); border-color: var(--bd-2); }
.stat-box::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent, var(--c-teal));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.stat-box.loaded::after { transform: scaleX(1); }
.stat-box .sb-icon { font-size: 1.1rem; margin-bottom: 10px; opacity: .7; }
.stat-box .sb-val {
  font-size: 1.9rem; font-weight: 800; line-height: 1;
  margin-bottom: 4px; letter-spacing: -.03em;
  color: var(--accent, var(--c-teal));
}
.stat-box .sb-lbl { font-size: .76rem; color: var(--tx-3); line-height: 1.4; }

/* ── PROGRESS BAR ── */
.progress-wrap { }
.progress-row  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.progress-label { font-size: .85rem; font-weight: 600; color: var(--tx-2); }
.progress-pct   { font-size: 1.1rem; font-weight: 800; color: var(--c-gold); font-family: var(--mono); }
.progress-track {
  height: 12px; background: var(--bg-5); border-radius: 100px;
  overflow: visible; position: relative; margin-bottom: 6px;
}
.progress-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--c-teal), var(--c-gold));
  transition: width .9s var(--ease);
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; right: -2px; top: -2px; bottom: -2px;
  width: 16px; border-radius: 100px;
  background: white; opacity: .6;
  box-shadow: 0 0 10px white;
}
.progress-note { font-size: .78rem; color: var(--tx-3); }
.progress-milestones {
  display: flex; justify-content: space-between;
  margin-top: 4px; font-size: .68rem; color: var(--tx-4);
}

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--tx-2); margin-bottom: 7px;
}
.form-label .hint { font-weight: 400; color: var(--tx-3); font-size: .75rem; }
.form-input {
  width: 100%; background: var(--bg-3);
  border: 1.5px solid var(--bd-2); border-radius: var(--r-sm);
  padding: 11px 14px; color: var(--tx-1); font-size: .9rem;
  transition: border-color var(--dur), box-shadow var(--dur);
  font-family: var(--font);
}
.form-input:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px var(--c-teal-dim);
}
.form-input::placeholder { color: var(--tx-4); }
.form-input.error { border-color: var(--c-red); }
.form-select {
  width: 100%; background: var(--bg-3);
  border: 1.5px solid var(--bd-2); border-radius: var(--r-sm);
  padding: 11px 14px; color: var(--tx-1); font-size: .9rem;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23567A95' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  transition: border-color var(--dur);
  font-family: var(--font);
}
.form-select:focus { border-color: var(--c-teal); }
.form-hint { font-size: .76rem; color: var(--tx-3); margin-top: 5px; }
.form-error { font-size: .76rem; color: var(--c-red); margin-top: 5px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .45rem; padding: .78rem 1.65rem;
  border-radius: var(--r-pill); border: none; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: .88rem;
  transition: all var(--dur) var(--ease); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: .5rem 1.1rem; font-size: .8rem; }
.btn-full { width: 100%; }
.btn-teal {
  background: var(--c-teal); color: var(--bg-0);
  box-shadow: var(--sh-teal);
}
.btn-teal:hover { background: #00D9BF; box-shadow: 0 8px 32px var(--c-teal-glow); }
.btn-gold {
  background: var(--c-gold); color: var(--bg-0);
  box-shadow: var(--sh-gold);
}
.btn-gold:hover { background: var(--c-gold-light); box-shadow: 0 8px 32px var(--c-gold-glow); }
.btn-violet { background: var(--c-violet); color: white; }
.btn-ghost {
  background: var(--bd-1); color: var(--tx-2);
  border: 1px solid var(--bd-2);
}
.btn-ghost:hover { background: var(--bd-2); color: var(--tx-1); }
.btn-danger { background: var(--c-red-dim); color: var(--c-red); border: 1px solid rgba(239,68,68,.25); }

/* ── CHIP SELECTOR ── */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: .44rem 1rem; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--bd-2); background: var(--bg-3);
  color: var(--tx-3); transition: all var(--dur) var(--ease-out);
  font-family: var(--font);
}
.chip:hover { border-color: var(--bd-3); color: var(--tx-2); }
.chip.selected {
  background: var(--c-teal-dim); border-color: rgba(0,201,177,.4);
  color: var(--c-teal);
}
.chip.gold.selected {
  background: var(--c-gold-dim); border-color: rgba(240,165,0,.4);
  color: var(--c-gold);
}
.chip.violet.selected {
  background: var(--c-violet-dim); border-color: rgba(139,92,246,.4);
  color: var(--c-violet);
}
.chip.disabled { opacity: .35; cursor: not-allowed; }

/* ── MEMBER AVATAR ── */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: white;
}
.avatar-sm { width: 28px; height: 28px; font-size: .62rem; }
.avatar-lg { width: 52px; height: 52px; font-size: .95rem; }

/* ── MEMBER ROW ── */
.member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--bg-3); border: 1px solid var(--bd-1);
  transition: border-color var(--dur), background var(--dur);
  cursor: default;
}
.member-row:hover { background: var(--bg-4); border-color: var(--bd-2); }
.member-row.selected { border-color: rgba(0,201,177,.35); background: var(--c-teal-dim); }
.member-info .name  { font-size: .88rem; font-weight: 600; color: var(--tx-1); }
.member-info .role  { font-size: .74rem; color: var(--tx-3); }
.member-row .contrib { font-family: var(--mono); font-size: .78rem; font-weight: 700; margin-left: auto; }
.member-row .badge {
  font-size: .65rem; font-weight: 700; padding: 2px 8px;
  border-radius: var(--r-pill); flex-shrink: 0;
}

/* ── BLOC CARD ── */
.block-card {
  background: var(--bg-3); border: 1px solid var(--bd-1);
  border-radius: var(--r-md); padding: 13px 14px;
  cursor: pointer;
  transition: border-color var(--dur), transform var(--dur) var(--ease);
  animation: block-appear .4s var(--ease);
}
.block-card:hover { border-color: var(--bd-3); transform: translateX(3px); }
@keyframes block-appear {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.block-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.block-num {
  font-family: var(--mono); font-size: .62rem; color: var(--tx-4);
  background: var(--bg-5); padding: 2px 6px; border-radius: 4px;
}
.block-type-badge {
  font-size: .65rem; font-weight: 700; padding: 2px 8px;
  border-radius: var(--r-pill);
}
.block-time { font-family: var(--mono); font-size: .6rem; color: var(--tx-4); margin-left: auto; }
.block-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.block-data-item .k { font-size: .64rem; color: var(--tx-3); margin-bottom: 1px; }
.block-data-item .v { font-size: .76rem; font-weight: 600; font-family: var(--mono); color: var(--tx-2); }
.block-hash {
  font-family: var(--mono); font-size: .6rem; color: var(--tx-4);
  background: var(--bg-5); padding: 5px 8px; border-radius: 6px;
  display: flex; align-items: center; gap: 6px; word-break: break-all;
}
.block-hash .verified { color: var(--c-green); margin-left: auto; font-size: .65rem; flex-shrink: 0; }

/* ── CHAIN CONNECTOR ── */
.chain-entry { display: flex; gap: 0; }
.chain-spine { width: 32px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.chain-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid; background: var(--bg-0);
  z-index: 1; margin-top: 16px; flex-shrink: 0;
}
.chain-line { flex: 1; width: 2px; background: linear-gradient(to bottom, var(--bd-2), var(--bd-1)); }

/* ── VOTE OPTION CARD ── */
.vote-option {
  background: var(--bg-3); border: 2px solid var(--bd-1);
  border-radius: var(--r-lg); padding: 18px; cursor: pointer;
  transition: all .25s var(--ease); position: relative; overflow: hidden;
  margin-bottom: 12px;
}
.vote-option::before {
  content: ''; position: absolute; inset: 0;
  opacity: 0; transition: opacity .3s;
}
.vote-option:hover { border-color: var(--bd-3); transform: translateY(-1px); }
.vote-option.selected {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 1px rgba(0,201,177,.15), 0 6px 28px rgba(0,201,177,.12);
}
.vote-option.selected::before { opacity: 1; background: radial-gradient(ellipse at 50% 0%, rgba(0,201,177,.05), transparent 60%); }
.vote-opt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.vote-opt-title { font-weight: 700; font-size: .96rem; margin-bottom: 3px; }
.vote-opt-price { font-size: .82rem; color: var(--tx-2); }
.vote-opt-specs { font-size: .78rem; color: var(--tx-3); margin-top: 2px; }
.vote-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--bd-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur); font-size: .7rem;
}
.vote-option.selected .vote-radio { background: var(--c-teal); border-color: var(--c-teal); color: var(--bg-0); }
.vote-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.vb-lbl { font-size: .72rem; color: var(--tx-3); width: 28px; flex-shrink: 0; }
.vb-track { flex: 1; height: 5px; background: var(--bg-5); border-radius: 3px; overflow: hidden; }
.vb-fill  { height: 100%; border-radius: 3px; transition: width .7s var(--ease); }
.vb-cnt { font-size: .72rem; font-weight: 700; width: 52px; text-align: right; flex-shrink: 0; font-family: var(--mono); }

/* ── TOAST ── */
#toast-zone {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column;
  gap: 8px; pointer-events: none; max-width: 380px;
}
.toast {
  background: var(--bg-3); border: 1px solid var(--bd-2);
  border-radius: var(--r-md); padding: 13px 16px;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: var(--sh-lg); pointer-events: auto;
  animation: toast-in .4s var(--ease);
}
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-body strong { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 2px; }
.toast-body span   { font-size: .8rem; color: var(--tx-3); line-height: 1.5; }
.toast.teal   { border-color: rgba(0,201,177,.3); background: rgba(0,201,177,.06); }
.toast.gold   { border-color: rgba(240,165,0,.3); background: rgba(240,165,0,.06); }
.toast.violet { border-color: rgba(139,92,246,.3); background: rgba(139,92,246,.06); }
.toast.error  { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.06); }
.toast.gone   { animation: toast-out .3s ease forwards; }
@keyframes toast-in  { from { opacity:0; transform:translateX(32px); } to { opacity:1; transform:none; } }
@keyframes toast-out { to   { opacity:0; transform:translateX(32px); } }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(2,10,16,.88); backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-2); border: 1px solid var(--bd-2);
  border-radius: var(--r-xl); padding: 32px;
  max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: modal-in .35s var(--ease);
}
@keyframes modal-in { from { opacity:0; transform:scale(.94) translateY(10px); } to { opacity:1; transform:none; } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-4); border: 1px solid var(--bd-2);
  color: var(--tx-3); cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur);
}
.modal-close:hover { background: var(--bg-5); color: var(--tx-1); }
.modal-title {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.modal-field { margin-bottom: 14px; }
.modal-field .mf-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--tx-3); margin-bottom: 5px;
}
.modal-field .mf-val {
  background: var(--bg-3); border: 1px solid var(--bd-1);
  border-radius: var(--r-sm); padding: 9px 12px;
  font-family: var(--mono); font-size: .78rem;
  color: var(--tx-2); word-break: break-all; line-height: 1.65;
}
.modal-field .mf-val.valid  { border-color: rgba(0,201,177,.3); color: var(--c-teal); }
.modal-field .mf-val.golden { border-color: rgba(240,165,0,.3);  color: var(--c-gold); }

/* ── TERMINAL ── */
.terminal {
  background: #040C14; border: 1px solid var(--bd-1);
  border-radius: var(--r-md); overflow: hidden;
}
.terminal-bar {
  background: var(--bg-3); padding: 9px 14px;
  border-bottom: 1px solid var(--bd-1);
  display: flex; align-items: center; gap: 6px;
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.terminal-lbl { font-family: var(--mono); font-size: .7rem; color: var(--tx-3); margin-left: 4px; }
.terminal-body {
  padding: 14px 16px;
  font-family: var(--mono); font-size: .74rem; line-height: 1.85;
  max-height: 240px; overflow-y: auto;
}
.t-key    { color: var(--tx-3); }
.t-val    { color: var(--c-teal); }
.t-hash   { color: var(--c-gold); }
.t-ts     { color: var(--c-blue); }
.t-type   { color: var(--c-violet); }
.t-ok     { color: var(--c-green); }
.t-warn   { color: var(--c-red); }
.t-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--c-teal); animation: blink .8s step-end infinite;
  vertical-align: text-bottom; margin-left: 2px;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── WINNER BANNER ── */
.winner-banner {
  background: linear-gradient(135deg, rgba(0,201,177,.1), rgba(240,165,0,.06));
  border: 1px solid rgba(0,201,177,.25); border-radius: var(--r-md);
  padding: 16px; display: none; align-items: center; gap: 14px;
  animation: banner-in .5s var(--ease);
}
.winner-banner.show { display: flex; }
@keyframes banner-in { from { opacity:0; transform:scale(.97); } to { opacity:1; transform:none; } }
.wb-trophy { font-size: 2rem; }
.wb-title  { font-size: .92rem; font-weight: 800; color: var(--c-teal); margin-bottom: 3px; }
.wb-sub    { font-size: .8rem; color: var(--tx-2); }
.wb-contract {
  margin-left: auto; background: var(--c-teal-dim); color: var(--c-teal);
  border: 1px solid rgba(0,201,177,.25); padding: .35rem .9rem;
  border-radius: var(--r-pill); font-size: .72rem; font-weight: 700;
  white-space: nowrap;
}

/* ── LOADING MINING ── */
.mining-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(2,10,16,.92); backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
}
.mining-overlay.show { display: flex; }
.mining-icon {
  font-size: 3rem;
  animation: spin-scale 1s var(--ease) infinite;
}
@keyframes spin-scale {
  0%   { transform: rotate(0deg)  scale(1); }
  50%  { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}
.mining-text { font-size: 1rem; font-weight: 700; color: var(--c-teal); font-family: var(--mono); }
.mining-hash { font-size: .75rem; color: var(--tx-3); font-family: var(--mono); animation: hash-scroll .2s step-end infinite; }
@keyframes hash-scroll { to { opacity: .4; } }

/* ── STEP INDICATOR ── */
.step-indicator {
  display: flex; align-items: center; gap: 0; margin-bottom: 28px;
}
.step-dot {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; border: 2px solid var(--bd-2);
  background: var(--bg-3); color: var(--tx-3);
  transition: all var(--dur); position: relative; z-index: 1;
}
.step-dot.active  { border-color: var(--c-teal); background: var(--c-teal-dim); color: var(--c-teal); }
.step-dot.done    { border-color: var(--c-green); background: var(--c-green-dim); color: var(--c-green); }
.step-line { flex: 1; height: 2px; background: var(--bd-2); position: relative; top: 0; }
.step-line.done   { background: var(--c-green); }
.step-line.active { background: linear-gradient(90deg, var(--c-green), var(--c-teal)); }
.step-label {
  font-size: .72rem; color: var(--tx-3); margin-top: 6px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── SECURITY BADGE ── */
.security-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: var(--c-green-dim); border: 1px solid rgba(34,197,94,.2);
  font-size: .78rem; color: var(--c-green); font-weight: 600;
}
.security-badge.warning {
  background: var(--c-gold-dim); border-color: rgba(240,165,0,.2);
  color: var(--c-gold);
}

/* ── BMC BAND (Business Model Canvas) ── */
.bmc-band {
  background: var(--bg-1); border: 1px solid var(--bd-1);
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.bmc-icon { font-size: 1.2rem; flex-shrink: 0; }
.bmc-text .bl { font-size: .72rem; font-weight: 700; color: var(--tx-4); text-transform: uppercase; letter-spacing: .06em; }
.bmc-text .bv { font-size: .84rem; font-weight: 600; color: var(--tx-2); }

/* ── LIVE DOT ── */
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--c-green); box-shadow: 0 0 6px var(--c-green);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.live-dot.teal  { background: var(--c-teal); box-shadow: 0 0 6px var(--c-teal); }
.live-dot.gold  { background: var(--c-gold); box-shadow: 0 0 6px var(--c-gold); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  :root { --sidebar-w: 220px; }
}
@media (max-width: 860px) {
  #sidebar { display: none; }
  .stat-grid-5, .stat-grid-4 { grid-template-columns: repeat(2,1fr); }
  #main { padding: 16px 16px 48px; }
}
@media (max-width: 640px) {
  .stat-grid-3 { grid-template-columns: 1fr 1fr; }
  .stat-grid-2 { grid-template-columns: 1fr; }
  .step-indicator { display: none; }
}
