/* ─── Gov Page ───────────────────────────────────────────────────────────── */
.gov-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ─── Stats Bar ──────────────────────────────────────────────────────────── */
.gov-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.gov-stat {
  background: var(--bg2);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gov-stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-3);
  text-transform: uppercase;
}

.gov-stat-val {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ─── Grid ───────────────────────────────────────────────────────────────── */
.gov-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.gov-card {
  background: var(--bg2);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.3px; }
.card-sub   { font-size: 13px; color: var(--text-3); margin-bottom: 20px; line-height: 1.5; }

/* ─── Voting Power Card ──────────────────────────────────────────────────── */
.vp-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: var(--bg3);
  border-radius: var(--radius);
  margin-bottom: 16px;
  gap: 4px;
}

.vp-amount {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.vp-label {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-3);
}

.gov-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.gov-input {
  flex: 1;
  background: var(--bg3);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.gov-input:focus { border-color: var(--green); }

.gov-max-btn {
  background: var(--bg3);
  border: var(--bw) solid var(--border);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 0 14px;
  cursor: pointer;
}
.gov-max-btn:hover { border-color: var(--green); }

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

.btn-gov-primary {
  flex: 1;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-gov-primary:hover:not(:disabled) { opacity: 0.85; }
.btn-gov-primary:disabled {
  background: var(--bg3);
  color: var(--text-3);
  cursor: not-allowed;
  border: var(--bw) solid var(--border);
}

.btn-gov-secondary {
  flex: 1;
  background: transparent;
  color: var(--text-2);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-gov-secondary:hover:not(:disabled) { border-color: var(--text-2); color: var(--text); }
.btn-gov-secondary:disabled { color: var(--text-3); cursor: not-allowed; }

/* ─── Proposals ──────────────────────────────────────────────────────────── */
.proposals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.proposals-list { display: flex; flex-direction: column; gap: 12px; }

.proposal-row {
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg3);
  transition: border-color 0.15s;
}
.proposal-row:hover { border-color: rgba(20,241,149,0.2); }

.proposal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proposal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.proposal-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* Status badges */
.status-badge {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pending   { background: rgba(255,255,255,0.06); color: var(--text-3); }
.status-active    { background: rgba(40,160,240,0.15);  color: var(--blue); }
.status-passed    { background: rgba(20,241,149,0.15);  color: var(--green); }
.status-failed    { background: rgba(239,68,68,0.12);   color: #ef4444; }
.status-executed  { background: rgba(20,241,149,0.08);  color: var(--green-dim); }
.status-expired   { background: rgba(255,255,255,0.04); color: var(--text-3); }

/* Vote bar */
.vote-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vote-bar-track {
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}

.vote-bar-for     { background: var(--green); height: 100%; transition: width 0.4s; }
.vote-bar-against { background: #ef4444;      height: 100%; transition: width 0.4s; }

.vote-bar-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}

.vote-bar-labels .for-label     { color: var(--green); }
.vote-bar-labels .against-label { color: #ef4444; }

/* Vote + meta row */
.proposal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.proposal-meta {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
  flex: 1;
}

.btn-vote-for, .btn-vote-against {
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
}

.btn-vote-for {
  background: rgba(20,241,149,0.1);
  border-color: rgba(20,241,149,0.3);
  color: var(--green);
}
.btn-vote-for:hover { background: rgba(20,241,149,0.2); }

.btn-vote-against {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.25);
  color: #ef4444;
}
.btn-vote-against:hover { background: rgba(239,68,68,0.15); }

.btn-vote-for:disabled, .btn-vote-against:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.voted-indicator {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-3);
  padding: 5px 10px;
  background: var(--bg);
  border-radius: 6px;
}

.empty-state {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  padding: 32px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .gov-grid   { grid-template-columns: 1fr; }
  .gov-stats  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .gov-stats { grid-template-columns: 1fr; }
}

.btn-resolve {
  background: var(--bg);
  border: var(--bw) solid var(--border);
  color: var(--text-3);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-resolve:hover { border-color: var(--text-2); color: var(--text-2); }

/* ─── Light-mode card spacing (+20%) ──────────────────────────────────────── */
:root[data-theme="light"] .gov-grid { gap: 24px; }

/* Inline wallet balance above the amount input (matches the farm/swap
   pattern). Click fills the input with the full balance. */
.pool-bal {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  text-align: right;
  margin-bottom: 6px;
  cursor: pointer;
  transition: color 0.15s;
}
.pool-bal:hover { color: var(--text-2); }
