/* ===== Poll Module ===== */
#pollPage .po-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
#pollPage .po-topbar-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
#pollPage .po-obslink { flex: 1; min-width: 240px; }
#pollPage .po-statusbadge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 3px;
  white-space: nowrap;
}
#pollPage .po-statusbadge--live {
  background: rgba(255, 80, 80, 0.15);
  color: #ff5050;
}
#pollPage .po-statusbadge--ended {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

#pollPage .po-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
#pollPage .po-panel {
  flex: 1.25;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#pollPage .po-side {
  flex: 0.95;
  min-width: 0;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#pollPage .po-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint, #888);
  margin-bottom: 2px;
}
#pollPage .po-sectiontitle,
#pollPage .po-sidetitle {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
#pollPage .po-subhead {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#pollPage .po-sectionhead { margin-bottom: 4px; }

#pollPage .po-card-wrapper { display: flex; flex-direction: column; }
#pollPage .po-card-wrapper .tabs {
  display: flex;
  gap: 4px;
  padding-left: 2px;
  flex-wrap: wrap;
}
#pollPage .po-card-wrapper .tabs .tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}
#pollPage .po-card-wrapper .tabs .tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
#pollPage .po-card-wrapper .tabs .tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
  border-bottom-color: var(--bg-card);
  margin-bottom: -1px;
  z-index: 2;
}
#pollPage .po-card-wrapper .tab-panel { display: none; }
#pollPage .po-card-wrapper .tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#pollPage .po-card { border-top-left-radius: 0; border-radius: 3px; }
#pollPage .po-cardbody {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 16px;
}

#pollPage .po-field { display: flex; flex-direction: column; gap: 6px; }
#pollPage .po-fieldhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
#pollPage .po-fieldhint {
  font-size: 12px;
  color: var(--text-faint, #888);
}
#pollPage .po-addopt { align-self: flex-start; margin-top: 4px; }

#pollPage .po-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 960px) {
  #pollPage .po-layout { flex-direction: column; }
  #pollPage .po-side { position: static; }
  #pollPage .po-grid2 { grid-template-columns: 1fr; }
}

#pollPage .po-colorrow {
  display: flex;
  gap: 8px;
  align-items: center;
}
#pollPage .po-colorrow input[type="color"] {
  width: 42px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-raised);
  cursor: pointer;
}
#pollPage .po-colorrow input[type="text"] { flex: 1; }

#pollPage .po-rangerow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#pollPage .po-rangetop {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
#pollPage .po-rangetop .po-val {
  color: var(--text-primary);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
#pollPage input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

#pollPage .po-option-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
#pollPage .po-optnum {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#pollPage .po-option-row input[type="text"] { flex: 1; }
#pollPage .po-option-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}
#pollPage .po-option-remove:hover { color: #ff6b6b; }

#pollPage .po-status {
  font-size: 13px;
  color: var(--text-muted);
}
#pollPage .po-style-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#pollPage .po-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}
#pollPage .po-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

#pollPage .po-bar-row,
#pollPage .po-livebars .po-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}
#pollPage .po-bar-label code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  margin-left: 4px;
}
#pollPage .po-bar-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
#pollPage .po-bar-fill {
  height: 100%;
  background: #7F77DD;
  border-radius: 3px;
  transition: width 0.4s ease;
}
#pollPage .po-bar-pct {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

#pollPage .po-sidehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
#pollPage .po-reuse {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-family);
}
#pollPage .po-reuse:hover {
  background: var(--accent);
  border-color: var(--accent);
}

#pollPage .po-stage {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
  max-width: 100%;
}
#pollPage .po-preview-card {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 3px 3px 0 0;
  box-sizing: border-box;
  overflow: hidden;
}
#pollPage .po-preview-q {
  margin-bottom: 12px;
  line-height: 1.3;
}
#pollPage .po-pv-row { margin-bottom: 9px; }
#pollPage .po-pv-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
#pollPage .po-pv-top > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#pollPage .po-pv-top > span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}
#pollPage .po-pv-top code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10.5px;
  margin-left: 4px;
}
#pollPage .po-pv-track {
  border-radius: 3px;
  overflow: hidden;
}
#pollPage .po-pv-fill {
  border-radius: 3px;
  transition: width 0.4s ease;
}

#pollPage .po-side-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#pollPage .po-side-actions .btn {
  width: 100%;
  justify-content: center;
}

#pollPage .btn-danger {
  background: rgba(255, 80, 80, 0.15);
  border-color: rgba(255, 80, 80, 0.4);
  color: #ff7070;
  border-radius: 3px;
}
#pollPage .btn-danger:hover {
  background: rgba(255, 80, 80, 0.25);
}

#pollPage input,
#pollPage select,
#pollPage .url-box,
#pollPage .btn {
  border-radius: 3px;
}
